Title: fix(gemini): support structured output with tools on Gemini 3 models by waleedlatif1 · Pull Request #4184 · simstudioai/sim · GitHub
Open Graph Title: fix(gemini): support structured output with tools on Gemini 3 models by waleedlatif1 · Pull Request #4184 · simstudioai/sim
X Title: fix(gemini): support structured output with tools on Gemini 3 models by waleedlatif1 · Pull Request #4184 · simstudioai/sim
Description: Summary Gemini 3 models support responseJsonSchema alongside tools/function declarations in the same request — Gemini 2 does not When an Agent block uses a Gemini 3 model with both tools and a response format, structured output was silently skipped, returning plain text instead of JSON Added isGemini3Model() helper and branching logic to use responseJsonSchema (not responseSchema) for Gemini 3 + tools, preserving existing Gemini 2 behavior Verified all scenarios against the live Gemini API: Gemini 3 + tools + schema, Gemini 3 no tools, Gemini 2 + tools (400 rejection), Gemini 2 no tools Type of Change Bug fix Testing Tested manually against the live Gemini API with comprehensive matrix covering all model/tools/schema combinations. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary Gemini 3 models support responseJsonSchema alongside tools/function declarations in the same request — Gemini 2 does not When an Agent block uses a Gemini 3 model with both tools and a res...
X Description: Summary Gemini 3 models support responseJsonSchema alongside tools/function declarations in the same request — Gemini 2 does not When an Agent block uses a Gemini 3 model with both tools and a res...
Opengraph URL: https://github.com/simstudioai/sim/pull/4184
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e8fc0175-1509-b6b7-42b3-1bce6c14b500 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A726:187399:9D68BE:E0D733:6A63803D |
| html-safe-nonce | dfaf3a71e27ef2ec936d61cb958927f2341efd550b866031060d858ecd9a527a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzI2OjE4NzM5OTo5RDY4QkU6RTBENzMzOjZBNjM4MDNEIiwidmlzaXRvcl9pZCI6IjM0MzM3Nzg1Nzc3MjA3MDUwODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c2f3a8e0a40afb87d9a7f9fd1542eee98f05f31fc6e39b59792ba7f72cd098b7 |
| hovercard-subject-tag | pull_request:3535717979 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/4184/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Gemini 3 models support responseJsonSchema alongside tools/function declarations in the same request — Gemini 2 does not When an Agent block uses a Gemini 3 model with both tools and a res... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e4fb64aef87da454ec25b158147f7f5f14aef29216e5ca1612c2e48faa599d1f |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e839936ba5faffb9c836dda1cf4729d50c88a32e |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width