Skip to content

Make object field in openai-compatible response optional#190

Merged
dongri merged 4 commits intodongri:mainfrom
MoonKraken:pr
Oct 31, 2025
Merged

Make object field in openai-compatible response optional#190
dongri merged 4 commits intodongri:mainfrom
MoonKraken:pr

Conversation

@MoonKraken
Copy link
Contributor

(this is a remake of #189 which will be closed because I used the wrong branch)

So the zAI API claims to be compatible with the OpenAI chat completion API, but for whatever reason it does not include an "object" field in the response. In its current state openai-api-rs requires this field to be present, so it was breaking when using zAI APIs.

This change makes the field optional, allowing the lib to successfully deserialize responses from zAI.

@dongri dongri merged commit 824cf0d into dongri:main Oct 31, 2025
1 check 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.

2 participants