Azure OpenAI: Invalid parameter 'response_format' of type 'json_schema' appears after updating to 0.4.0 #7593
Closed
5 tasks done
Labels
auto:bug
Related to a bug, vulnerability, unexpected error with an existing feature
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Error: 400 Invalid parameter: 'response_format' of type 'json_schema' is not supported with this model. Learn more about supported models at the Structured Outputs guide: https://platform.openai.com/docs/guides/structured-outputs
at oL.generate (.next/server/app/api/chat-bot/callback/route.js:400:30952)
at uY.makeStatusError (.next/server/app/api/chat-bot/callback/route.js:400:44061)
at uY.makeRequest (.next/server/app/api/chat-bot/callback/route.js:400:45005)
at async (.next/server/app/api/chat-bot/callback/route.js:411:17970)
at async t._fn (.next/server/app/api/chat-bot/callback/route.js:912:254750) {
status: 400,
headers: [Object],
request_id: '3d372b97-b1a9-48bb-93cb-5346235e4f80',
error: [Object],
code: null,
param: null,
type: 'invalid_request_error',
attemptNumber: 1,
retriesLeft: 6
}
Description
When I use version 0.3.17, everything works perfectly without any issues. However, after updating to 0.4.0, I consistently encounter the error: "Invalid parameter: 'response_format' of type 'json_schema'".
It seems likely that this issue is related to changes introduced in #7535.
Interestingly, prompts using the same model with only slight differences in output structure work without any problems. This inconsistency makes the issue even more puzzling.
System Info
node = v22.11.0
yarn = v1.22.22
"@langchain/community": "^0.3.27",
"@langchain/core": "^0.3.35",
"@langchain/google-genai": "^0.1.6",
"@langchain/openai": "^0.4.0",
"@langchain/pinecone": "^0.1.3",
"langchain": "^0.3.13",
"langsmith": "^0.3.3",
The text was updated successfully, but these errors were encountered: