Skip to content

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

Replace 4o with gpt-4.1-mini

Magnus Müller823292a767c0
diff --git a/docs/customize/agent-settings.mdx b/docs/customize/agent-settings.mdx
index c3dc05cd6..78f8f5511 100644
--- a/docs/customize/agent-settings.mdx
+++ b/docs/customize/agent-settings.mdx
@@ -15,7 +15,7 @@ from browser_use import Agent, ChatOpenAI
agent = Agent(
task="Search for latest news about AI",
- llm=ChatOpenAI(model="gpt-4o"),
+ llm=ChatOpenAI(model="gpt-4.1-mini"),
)
```
diff --git a/docs/customize/hooks.mdx b/docs/customize/hooks.mdx
index 53f839141..8761cc281 100644
--- a/docs/customize/hooks.mdx
+++ b/docs/customize/hooks.mdx
@@ -67,7 +67,7 @@ async def my_step_hook(agent: Agent):
agent = Agent(
task="Search for the latest news about AI",
- llm=ChatOpenAI(model="gpt-4o"),
+ llm=ChatOpenAI(model="gpt-4.1-mini"),
)
await agent.run(
@@ -336,7 +336,7 @@ async def run_agent():
"""Run the Browser-Use agent with the recording hook"""
agent = Agent(
task="Compare the price of gpt-4o and DeepSeek-V3",
- llm=ChatOpenAI(model="gpt-4o"),
+ llm=ChatOpenAI(model="gpt-4.1-mini"),
)
try:
diff --git a/docs/customize/output-format.mdx b/docs/customize/output-format.mdx
index b48a88836..f306af184 100644
--- a/docs/customize/output-format.mdx
+++ b/docs/customize/output-format.mdx
@@ -26,7 +26,7 @@ controller = Controller(output_model=Posts)
async def main():
task = 'Go to hackernews show hn and give me the first 5 posts'
- model = ChatOpenAI(model='gpt-4o')
+ model = ChatOpenAI(model='gpt-4.1-mini')
agent = Agent(task=task, llm=model, controller=controller)
history = await agent.run()
diff --git a/docs/customize/real-browser.mdx b/docs/customize/real-browser.mdx
index 6440da912..7101b4735 100644
--- a/docs/customize/real-browser.mdx
+++ b/docs/customize/real-browser.mdx
@@ -232,14 +232,14 @@ reused_profile = BrowserProfile(user_data_dir='~/.config/browseruse/profiles/def
agent1 = Agent(
task="The first task...",
- llm=ChatOpenAI(model="gpt-4o-mini"),
+ llm=ChatOpenAI(model="gpt-4.1-mini-mini"),
browser_profile=reused_profile, # pass the profile in, it will auto-create a session
)
await agent1.run()
agent2 = Agent(
task="The second task...",
- llm=ChatOpenAI(model="gpt-4o-mini"),
+ llm=ChatOpenAI(model="gpt-4.1-mini-mini"),
browser_profile=reused_profile, # agent will auto-create its own new session
)
await agent2.run()
@@ -264,14 +264,14 @@ await reused_session.start() # when keep_alive=True, session must be started m
agent1 = Agent(
task="The first task...",
- llm=ChatOpenAI(model="gpt-4o-mini"),
+ llm=ChatOpenAI(model="gpt-4.1-mini-mini"),
browser_session=reused_session,
)
await agent1.run()
agent2 = Agent(
task="The second task...",
- llm=ChatOpenAI(model="gpt-4o-mini"),
+ llm=ChatOpenAI(model="gpt-4.1-mini-mini"),
browser_session=reused_session, # re-use the same session
)
await agent2.run()
@@ -304,13 +304,13 @@ tabs = await browser_session.get_tabs()
# Create agents that will work with different tabs
agent1 = Agent(
task="The first task...",
- llm=ChatOpenAI(model="gpt-4o-mini"),
+ llm=ChatOpenAI(model="gpt-4.1-mini-mini"),
browser_session=browser_session,
)
agent2 = Agent(
task="The second task...",
- llm=ChatOpenAI(model="gpt-4o-mini"),
+ llm=ChatOpenAI(model="gpt-4.1-mini-mini"),
browser_session=browser_session,
)
@@ -342,12 +342,12 @@ await navigate_event
agent1 = Agent(
task="Fill out the form in section A...",
- llm=ChatOpenAI(model="gpt-4o-mini"),
+ llm=ChatOpenAI(model="gpt-4.1-mini-mini"),
browser_session=shared_session
)
agent2 = Agent(
task="Fill out the form in section B...",
- llm=ChatOpenAI(model="gpt-4o-mini"),
+ llm=ChatOpenAI(model="gpt-4.1-mini-mini"),
browser_session=shared_session,
)
diff --git a/docs/customize/system-prompt.mdx b/docs/customize/system-prompt.mdx
index 49dc32985..98df732ae 100644
--- a/docs/customize/system-prompt.mdx
+++ b/docs/customize/system-prompt.mdx
@@ -65,8 +65,8 @@ Always suggest exploring multiple options before making a decision.
"""
# Create agent with extended planner system prompt
-llm = ChatOpenAI(model='gpt-4o')
-planner_llm = ChatOpenAI(model='gpt-4o-mini')
+llm = ChatOpenAI(model='gpt-4.1-mini')
+planner_llm = ChatOpenAI(model='gpt-4.1-mini-mini')
agent = Agent(
task="Your task here",
diff --git a/docs/development/evaluations.mdx b/docs/development/evaluations.mdx
index 051b4303d..1a98ca8ae 100644
--- a/docs/development/evaluations.mdx
+++ b/docs/development/evaluations.mdx
@@ -38,7 +38,7 @@ python eval/service.py
You can modify the evaluation by providing flags to the evaluation script. For instance:
```bash
-python eval/service.py --parallel_runs 5 --parallel_evaluations 5 --max-steps 25 --start 0 --end 100 --model gpt-4o
+python eval/service.py --parallel_runs 5 --parallel_evaluations 5 --max-steps 25 --start 0 --end 100 --model gpt-4.1-mini
```
The evaluations webpage has a convenient GUI for generating these commands. To use it, navigate to https://browser-use.tools/dashboard.