Skip to content

fix(llm/google): give Gemini 3.x models the Gemini 3 thinking config - #6064

Open
HardMax71 wants to merge 3 commits into
browser-use:mainfrom
HardMax71:fix/gemini-3x-thinking-config
Open

HardMax71 wants to merge 3 commits into
browser-use:mainfrom
HardMax71:fix/gemini-3x-thinking-config

Conversation

@HardMax71

@HardMax71 HardMax71 commented Oct 14, 2026 •

Copy link
Copy Markdown

Fixes #6063

ChatGoogle recognised Gemini 3 models by four exact substrings (gemini-3-pro, gemini-3.1-pro, gemini-3-flash, gemini-3.1-flash), so gemini-3.5-flash went down the Gemini 2.5 branch: a thinking_level set by the caller was dropped with a warning, and with nothing set no thinking config was sent. The check now matches gemini-3 with an optional minor version (gemini-3(\.\d+)?-pro / -flash), so every 3.x model gets the Gemini 3 branches. Ids that matched before still match, and ids like gemini-30-... don't.

One behaviour change to be aware of: with nothing set, gemini-3.5-flash now gets the Gemini 3 Flash default thinking_budget=-1, the same as gemini-3-flash-preview today, instead of no thinking config (the API default, medium).

Testing:


Summary by cubic

Fixes #6063 by making Gemini 3.x model detection cover any minor version, so gemini-3.5-flash gets the Gemini 3 thinking config instead of falling back to the Gemini 2.5 path.

  • Matches gemini-3 with an optional minor version for both -pro and -flash variants; IDs that matched before still match, and gemini-30-... does not.
  • With no thinking_level set, gemini-3.5-flash now sends thinking_budget=-1 (Gemini 3 Flash default) instead of nothing (API default medium).
  • Adds a parametrised test covering 3.5 Flash, 3 Flash, 3.1 Pro, and 2.5 Flash.

Written for commit 7dcd9fd. Summary will update on new commits.

View guided diff

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T12:17:07.369511Z d84a823 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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 2 files

View guided diff | Re-trigger cubic

@HardMax71

Copy link
Copy Markdown
Author

@gregpr07 could you review this when you get a chance? Gemini 3.x models get the Gemini 3 thinking config instead of being treated as 2.5 (#6063). It's up to date with main, CI is green and the bot reviews are handled.

@mintlify

mintlify Bot commented Oct 25, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit e883402.

Approve preview

This branch has not been deployed

No deployments
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.

Bug: ChatGoogle treats gemini-3.5-flash as Gemini 2.5 and drops thinking_level

1 participant