Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

fix(llm/google): route gemini-3.1-flash through gemini-3 flash thinking branch

Saurav Panda9e8dfdd18fd4
diff --git a/browser_use/llm/google/chat.py b/browser_use/llm/google/chat.py
index 493323b39..596a0a588 100644
--- a/browser_use/llm/google/chat.py
+++ b/browser_use/llm/google/chat.py
@@ -269,7 +269,7 @@ class ChatGoogle(BaseChatModel):
# Gemini 3 Flash: supports both, defaults to thinking_budget=-1
# Gemini 2.5: uses thinking_budget only
is_gemini_3_pro = 'gemini-3-pro' in self.model
- is_gemini_3_flash = 'gemini-3-flash' in self.model
+ is_gemini_3_flash = 'gemini-3-flash' in self.model or 'gemini-3.1-flash' in self.model
if is_gemini_3_pro:
# Validate: thinking_budget should not be set for Gemini 3 Pro