Skip to content

Conversation

@adubovik
Copy link
Collaborator

@adubovik adubovik commented Nov 14, 2025

Resolves #293

Breaking changes

The required index field has been removed from the ToolCall class in the chat completion request (note that in the responses it's still there).
It's not needed in the chat completion request anyway, since each tool call has a definite position in the list of tool calls.

Migration

  1. The migration at the ToolCall construction places - remove the index field:
tool_call = ToolCall(
-    index=tool_call_index,
    id="tool-call-id",
    type="function",
    function=function
)
  1. The migration at the ToolCall.index access points - assume the index field is always None:
- if tool_call.index is None:
    # handle None case
- else:
-   # handle not None case

@adubovik adubovik self-assigned this Nov 14, 2025
@adubovik adubovik requested a review from vladisavvv as a code owner November 14, 2025 14:25
@adubovik adubovik changed the title feat: tolerate index field in stages and attachments feat!: tolerate index field in stages and attachments Nov 14, 2025
@adubovik adubovik merged commit 26192e8 into development Nov 17, 2025
18 checks passed
@adubovik adubovik deleted the feat/tolerate-index-field branch November 17, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tolerate index fields in the chat completion request

3 participants