Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
Update thinking_budget default value to 0 for flash and flash-lite models
Magnus Müllerd5ba9008b7c1
diff --git a/browser_use/llm/google/chat.py b/browser_use/llm/google/chat.pyindex b00bb4d5c..24f823354 100644--- a/browser_use/llm/google/chat.py+++ b/browser_use/llm/google/chat.py@@ -75,7 +75,7 @@ class ChatGoogle(BaseChatModel):temperature: float | None = 0.2top_p: float | None = Noneseed: int | None = None- thinking_budget: int | None = None+ thinking_budget: int | None = None # for flash and flash-lite models, default will be set to 0max_output_tokens: int | None = 4096config: types.GenerateContentConfigDict | None = Noneinclude_system_in_user: bool = False@@ -198,8 +198,9 @@ class ChatGoogle(BaseChatModel):if self.seed is not None:config['seed'] = self.seed+ # set default for flash and falsh-liteif self.thinking_budget is None and 'gemini-2.5-flash' in self.model:- self.thinking_budget = -1+ self.thinking_budget = 0if self.thinking_budget is not None:thinking_config_dict: types.ThinkingConfigDict = {'thinking_budget': self.thinking_budget}