Skip to content

Make ChoiceDeltaToolCall.index optional - #380

Merged
nezhyborets merged 1 commit into
MacPaw:mainfrom
batanus:make-index-optional
Sep 25, 2025
Merged

nezhyborets merged 1 commit into
MacPaw:mainfrom
batanus:make-index-optional

Conversation

@batanus

@batanus batanus commented Aug 18, 2025

Copy link
Copy Markdown
Contributor

What

Make ChoiceDeltaToolCall.index optional

Why

According to the OpenAI documentation, this property is not required in the response. ChatGPT always returns the index property, but some other providers omit it.

@JaredConover JaredConover left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed this is an issue for other endpoints/properties as well.
The openAI spec doesn't mark very many of these params as required, so I don't think parsing should automatically fail if they're not present.

@JaredConover JaredConover left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be run through the generator?

@nezhyborets
nezhyborets merged commit 2e7849e into MacPaw:main Sep 25, 2025
3 checks passed
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.

3 participants