-
Notifications
You must be signed in to change notification settings - Fork 135
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
fix: fixed gemini model handling of nullish optional fields in response schema #1411
Conversation
This was intentional and Why is this becoming a problem? |
Gemini response schema does not accept this as a valid schema.
|
Then let's fix it at the Gemini plugin level, not the Picoschema level. In the Gemini plugins, can we recursively look for array |
yeah... was just looking into interestingly, zod "type": [
"string",
"null"
] we had someone on discord already run into this. I guess it makes sense to fix this at the plugin level to support both zod nullish and picoschema. |
903a72c
to
41dbec0
Compare
Zod schema like this:
and picoschema like this:
produce schema:
which is not a valid schema in Gemini API request for constrained generation.
convert
to
Checklist (if applicable):