fix(gemini): send the lowest thinking level when thinking is 'none' on Gemini 3 by waleedlatif1 · Pull Request #9278 · simstudioai/sim · GitHub
Skip to content

fix(gemini): send the lowest thinking level when thinking is 'none' on Gemini 3 - #9278

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/gemini3-thinking-none
Oct 21, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/gemini3-thinking-none

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Thinking Level none on Gemini 3 models sent no thinkingConfig, so the API fell back to the model's default level (medium/high) and kept thinking
  • Gemini 3 has no off switch, so none now sends the lowest level the model declares: minimal where offered (closest to off per Google's docs), low on models that reject minimal (3.7/3.8-flash, 3.1/3-pro)
  • Uncataloged Gemini 3 models and Gemini 2.5 behavior are unchanged
  • Updated the noneMode TSDoc to reflect the Gemini 3 rule

Type of Change

  • Bug fix

Testing

  • New regression test in providers/gemini/core.test.ts (3.6-flash → MINIMAL, 3.8-flash → LOW); failed before the fix, passes after
  • vitest run providers/ — 177 files, 2103 tests passing; biome clean
  • Live API check through executeGeminiRequest with none (output tokens incl. thoughts, before → after): 3.6-flash 418 → 20, 3.8-flash 277 → 21, 3.7-flash 325 → 20, 3.5-flash 518 → 89; 3.1-pro-preview still thinks (it only runs in thinking mode)
  • Probed the raw API: MINIMAL is rejected on 3.7/3.8-flash and 3.1-pro; thinkingBudget: 0 is rejected on 3.5-flash-lite and 3.1-pro, so it isn't a safe general off switch

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/providers/gemini/core.ts Outdated
@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Gemini 3 requests with thinkingLevel: 'none' now send the lowest thinking level declared in the model catalog.

  • Gemini 3 requests use the lowest listed level when thinking is set to none.

Reviews (3) · Last reviewed commit: "fix(gemini): resolve the lowest thinking..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@waleedlatif1
waleedlatif1 merged commit daf2379 into staging Oct 21, 2026
55 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/gemini3-thinking-none branch October 21, 2026 16:37

This branch was previously deployed

1 inactive deployment
Preview — ab33c5da Deployed Oct 21, 2026 by vercel[bot]
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