Closed BleedingDev closed 1 month ago
The provider JSON specs don't fully support the OpenAPI 3.0 spec (Google) or, as it seems, JSON Schema 7 (OpenAI) fully.
In the OpenAI case, just disable structured outputs.
In the Google case, I'm working on a workaround: #2743
Description
I updated to
"@ai-sdk/google": "^0.0.43",
and now I get error. It seems like this SDK tries to use feature that is not supported as stated in issues here: https://github.com/google-gemini/generative-ai-js/issues/200 https://github.com/google/generative-ai-docs/issues/210Edit: Seems like this is broken with OpenAI
"@ai-sdk/openai": "^0.0.51",
as well. But only whenstructuredOutputs
is true.Error
Invalid JSON payload received. Unknown name \\"minItems\\" at 'generation_config.response_schema.properties[1].value.items.properties[1].value': Cannot find field.\\nInvalid JSON payload received. Unknown name \\"minItems\\" at 'generation_config.response_schema.properties[1].value': Cannot find field.",\n
Code example
Additional context
Google
Broken in both
tool
andjson
modes.OpenAI
Broken when
structuredOutputs
istrue
.