Bug in API OpenAI Compatibility Mode: "Request contains an invalid argument." #2570
Labels
external
This issue is blocked on a bug with the actual product.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Uh oh!
There was an error while loading. Please reload this page.
This is a bug in the Gemini API OpenAI Compatibility mode -- I wasn't sure where else to file it. Please let me know if there is a better place to file this.
Situation: If you provide response_format (tool) with a union type of str|int, you'll get the following error:
[{'error': {'code': 400, 'message': 'Request contains an invalid argument.', 'status': 'INVALID_ARGUMENT'}}]
It happens only to Gemini API, it doesn't happen to other APIs (together, OpenAI, etc.)
It happens with all models I've tried, it's model agnostic.
Environment details
google-api-python-client
version: --Steps to reproduce
id_number
, it will work fine. It's most likely missing support for theAnyOf
operator in JSON schemaCode example
Focus on the
id_number
type below! Change to typestr
and it will work.Stack trace
The text was updated successfully, but these errors were encountered: