Skip to content

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

fix-llm-timeout-errors

Magnus Müllerbe402700b5b2
diff --git a/browser_use/llm/openai/chat.py b/browser_use/llm/openai/chat.py
index 546d0d42f..86a9ecc28 100644
--- a/browser_use/llm/openai/chat.py
+++ b/browser_use/llm/openai/chat.py
@@ -47,8 +47,8 @@ class ChatOpenAI(BaseChatModel):
# Model params
# set to 0.1 because browser-use aims to be more reliable and deterministic
- temperature: float | None = 0.2
- frequency_penalty: float | None = 0.1
+ temperature: float | None = 0.3
+ frequency_penalty: float | None = 0.2
reasoning_effort: ReasoningEffort = 'low'
seed: int | None = None
service_tier: Literal['auto', 'default', 'flex', 'priority', 'scale'] | None = None
@@ -67,7 +67,7 @@ class ChatOpenAI(BaseChatModel):
default_query: Mapping[str, object] | None = None
http_client: httpx.AsyncClient | None = None
_strict_response_validation: bool = False
- max_completion_tokens: int | None = 8000
+ max_completion_tokens: int | None = 4000
# Static
@property
diff --git a/examples/simple.py b/examples/simple.py
index e6c04da4b..8b50a61d9 100644
--- a/examples/simple.py
+++ b/examples/simple.py
@@ -13,7 +13,7 @@ from browser_use import Agent, ChatOpenAI
async def main():
# Choose your model
- llm = ChatOpenAI(model='gpt-5-mini')
+ llm = ChatOpenAI(model='gpt-4.1-mini')
# Define your task
task = 'Go and find the founders of browser-use'
@@ -22,7 +22,7 @@ async def main():
agent = Agent(task=task, llm=llm)
# Start
- await agent.run()
+ await agent.run(max_steps=2)
if __name__ == '__main__':