Skip to content

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

Update thinking_budget handling in ChatGoogle class to use dynamic value

Magnus Müller819aa7783858
diff --git a/browser_use/llm/google/chat.py b/browser_use/llm/google/chat.py
index 42abd2e77..b997d1097 100644
--- a/browser_use/llm/google/chat.py
+++ b/browser_use/llm/google/chat.py
@@ -199,7 +199,7 @@ class ChatGoogle(BaseChatModel):
config['seed'] = self.seed
if self.thinking_budget is not None:
- thinking_config_dict: types.ThinkingConfigDict = {'thinking_budget': -1}
+ thinking_config_dict: types.ThinkingConfigDict = {'thinking_budget': self.thinking_budget}
config['thinking_config'] = thinking_config_dict
if self.max_output_tokens is not None: