Calling openai.beta.chat.completions.runTools with gpt-4-32k returns error: "Additional properties are not allowed ('parsed', 'refusal' were unexpected)" #1161
Labels
bug
Something isn't working
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
I am using the example from https://github.com/openai/openai-node/blob/master/examples/tool-call-helpers.ts and using OpenAI node SDK v.4.69.0.
When I execute the example using gpt-4-32k model, I receive the following error:
BadRequestError: 400 Additional properties are not allowed ('parsed', 'refusal' were unexpected) - 'messages.2'
When I execute the example using gpt-4o model, the example works correctly.
I have been testing with different OpenAI node SDK versions. The last one where runTools actually works with this example is v.4.54.0. Once you upgrade to 4.55.x the error starts happening.
It could be related with the addition of Structured outputs that was added in 4.55.x.
I am using GPT models deployed in an Azure OpenAI service.
Maybe I should be doing something different to make it work with gpt-4-32k? (I haven't tested with
gpt-4-1106-preview
that is used in the example, but this should also work withgpt-4-32k
, right?).To Reproduce
https://github.com/openai/openai-node/blob/master/examples/tool-call-helpers.ts
Code snippets
No response
OS
macOS
Node version
v20.18.0
Library version
openai v.4.69.0
The text was updated successfully, but these errors were encountered: