-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix structured output with nested definitions with Gemini via OpenRouter #3618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…tion errors link to fallbackmodel in agnets.md
DouweM
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dsfaccini We should also have a recorded test that verifies that a nested schema now works properly with OpenRouter + Gemini again
| """ | ||
| is_image_model = 'image' in model_name | ||
| is_3_or_newer = 'gemini-3' in model_name | ||
| return GoogleModelProfile( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't copy paste all of this! We should call the original google_model_profile, and then do the replace thing to swap out just the transformer
| ) from _import_error | ||
|
|
||
|
|
||
| class OpenRouterGoogleJsonSchemaTransformer(JsonSchemaTransformer): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is public now, I don't think it should be :)
Fixes #3617 temporarily while support is added.