Skip to content

translator: remove legacy Gemini JSON schema workarounds, which was for pre-2.5 gemini models - #2790

Open
hustxiayang wants to merge 4 commits into
theagentrouter:mainfrom
hustxiayang:retire-json-helper
Open

hustxiayang wants to merge 4 commits into
theagentrouter:mainfrom
hustxiayang:retire-json-helper

Conversation

@hustxiayang

@hustxiayang hustxiayang commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Description
Motivated from #2774 (comment).. Gemini 2.0 Flash and Flash-Lite are now shut down, and supported Gemini models accept JSON Schema directly. Remove the pre-2.5 schema conversion workaround and always populate responseJsonSchema and parametersJsonSchema to avoid the efforts to maintain the correctness of these codes.

Google model status: https://ai.google.dev/gemini-api/docs/models
Google structured output documentation: https://ai.google.dev/gemini-api/docs/structured-output

@hustxiayang
hustxiayang requested a review from a team as a code owner October 5, 2026 19:42
@netlify

netlify Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for theagentrouter ready!

Name Link
🔨 Latest commit 6aa624e
🔍 Latest deploy log https://app.netlify.com/projects/theagentrouter/deploys/6ac6f48bd7767700083275f1
😎 Deploy Preview https://deploy-preview-2790--theagentrouter.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hustxiayang hustxiayang closed this Oct 5, 2026
@hustxiayang hustxiayang reopened this Oct 5, 2026
@hustxiayang hustxiayang changed the title translator: remove legacy Gemini JSON schema conversion translator: remove legacy Gemini JSON schema workarounds, which was for pre-2.5 gemini models Oct 5, 2026
@hustxiayang
hustxiayang marked this pull request as draft October 5, 2026 20:09
Signed-off-by: yxia216 <yxia216@bloomberg.net>
@hustxiayang
hustxiayang marked this pull request as ready for review October 5, 2026 21:05
@hustxiayang

Copy link
Copy Markdown
Contributor Author

@nacx Could you please help to review it? Thanks!

@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant