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
change parameter chat google
Magnus Müllerf3bab2d78194
diff --git a/browser_use/llm/google/chat.py b/browser_use/llm/google/chat.pyindex 66ba74b90..52cf62b20 100644--- a/browser_use/llm/google/chat.py+++ b/browser_use/llm/google/chat.py@@ -73,10 +73,11 @@ class ChatGoogle(BaseChatModel):# Model configurationmodel: VerifiedGeminiModels | str- temperature: float | None = None+ temperature: float | None = 0.2 # Match OpenAI defaulttop_p: float | None = Noneseed: int | None = Nonethinking_budget: int | None = None+ max_output_tokens: int | None = 4096 # Match OpenAI defaultconfig: types.GenerateContentConfigDict | None = None# Client initialization parameters@@ -193,6 +194,9 @@ class ChatGoogle(BaseChatModel):thinking_config_dict: types.ThinkingConfigDict = {'thinking_budget': self.thinking_budget}config['thinking_config'] = thinking_config_dict+ if self.max_output_tokens is not None:+ config['max_output_tokens'] = self.max_output_tokens+async def _make_api_call():if output_format is None:# Return string responsediff --git a/pyproject.toml b/pyproject.tomlindex 80d820a4e..7a8db62fb 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -199,4 +199,5 @@ dev-dependencies = ["lmnr[all]==0.7.6",# "pytest-playwright-asyncio>=0.7.0", # not actually needed I think"pytest-timeout>=2.4.0",+ "pydantic_settings>=2.10.1"]