Skip to content

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

add bu3 browser use models

MagMuellerbe81a1bfe57f
diff --git a/README.md b/README.md
index 640522553..a4dab5fea 100644
--- a/README.md
+++ b/README.md
@@ -82,7 +82,7 @@ import asyncio
async def main():
agent = Agent(
task="Find the number of stars of the browser-use repo",
- llm=ChatBrowserUse(),
+ llm=ChatBrowserUse(model='bu-3-max'),
# llm=ChatOpenAI(model='gpt-5.5'),
# llm=ChatGoogle(model='gemini-3.1-pro-preview'),
# llm=ChatAnthropic(model='claude-opus-4-8'), # Sonnet also works well.
@@ -215,10 +215,15 @@ curl -o ~/.claude/skills/browser-use/SKILL.md \
We optimized **ChatBrowserUse()** specifically for browser automation tasks. On avg it completes tasks 3-5x faster than other models with SOTA accuracy.
-**Pricing (per 1M tokens):**
-- Input tokens: $0.20
-- Cached input tokens: $0.02
-- Output tokens: $2.00
+**BU3 pricing (per 1M tokens):**
+- Input tokens: $1.80
+- Cached input tokens: $0.18
+- Output tokens: $10.80
+
+**BU3max pricing (per 1M tokens):**
+- Input tokens: $2.50
+- Cached input tokens: $0.25
+- Output tokens: $14.50
For other LLM providers, see our [supported models documentation](https://docs.browser-use.com/supported-models).
</details>
diff --git a/browser_use/beta/service.py b/browser_use/beta/service.py
index 298a949a3..55763a9fe 100644
--- a/browser_use/beta/service.py
+++ b/browser_use/beta/service.py
@@ -1162,6 +1162,11 @@ def _llm_env_overrides(llm: Any) -> dict[str, str]:
overrides['OPENROUTER_BASE_URL'] = base_url
elif provider == 'deepseek' and api_key:
overrides['DEEPSEEK_API_KEY'] = api_key
+ elif provider == 'browser-use':
+ if api_key:
+ overrides['LLM_BROWSER_BROWSER_USE_API_KEY'] = api_key
+ if base_url:
+ overrides['LLM_BROWSER_BROWSER_USE_BASE_URL'] = base_url.rstrip('/').removesuffix('/v1')
return overrides
diff --git a/browser_use/llm/browser_use/chat.py b/browser_use/llm/browser_use/chat.py
index a47ad289e..a854e7b45 100644
--- a/browser_use/llm/browser_use/chat.py
+++ b/browser_use/llm/browser_use/chat.py
@@ -38,7 +38,7 @@ class ChatBrowserUse(BaseChatModel):
Usage:
agent = Agent(
task="Find the number of stars of the browser-use repo",
- llm=ChatBrowserUse(model='bu-2-0'),
+ llm=ChatBrowserUse(model='bu-3-max'),
)
"""
@@ -59,6 +59,8 @@ class ChatBrowserUse(BaseChatModel):
Args:
model: Model name to use. Options:
- 'bu-2-0' or 'bu-latest': Default model (latest premium)
+ - 'bu-3': Fast premium model
+ - 'bu-3-max': Most capable model
- 'bu-1-0': Previous generation model
- 'browser-use/bu-30b-a3b-preview': Browser Use Open Source Model
api_key: API key for browser-use cloud. Defaults to BROWSER_USE_API_KEY env var.
@@ -69,7 +71,7 @@ class ChatBrowserUse(BaseChatModel):
retry_max_delay: Maximum delay in seconds between retries (default: 60.0).
"""
# Validate model name - allow bu-* and browser-use/* patterns
- valid_models = ['bu-latest', 'bu-1-0', 'bu-2-0']
+ valid_models = ['bu-latest', 'bu-1-0', 'bu-2-0', 'bu-3', 'bu-3-max']
is_valid = model in valid_models or model.startswith('browser-use/')
if not is_valid:
raise ValueError(f"Invalid model: '{model}'. Must be one of {valid_models} or start with 'browser-use/'")
diff --git a/tests/ci/test_beta_agent.py b/tests/ci/test_beta_agent.py
index 3af84ec52..23ee45a9f 100644
--- a/tests/ci/test_beta_agent.py
+++ b/tests/ci/test_beta_agent.py
@@ -3401,6 +3401,8 @@ def test_beta_agent_bridges_llm_credentials_to_terminal_env(monkeypatch):
'OPENROUTER_API_KEY',
'OPENROUTER_BASE_URL',
'DEEPSEEK_API_KEY',
+ 'LLM_BROWSER_BROWSER_USE_API_KEY',
+ 'LLM_BROWSER_BROWSER_USE_BASE_URL',
):
monkeypatch.delenv(key, raising=False)
monkeypatch.setenv('LLM_BROWSER_OPENAI_API_KEY', 'ambient-openai-key')
@@ -3426,6 +3428,10 @@ def test_beta_agent_bridges_llm_credentials_to_terminal_env(monkeypatch):
task='DeepSeek credentials.',
llm=LLM('deepseek', 'deepseek-chat', api_key='llm-deepseek-key', base_url='https://ignored.example'),
)
+ browser_use_agent = Agent(
+ task='Browser Use credentials.',
+ llm=LLM('browser-use', 'bu-3-max', api_key='llm-browser-use-key', base_url='https://llm.example/v1'),
+ )
ambient_env = Agent(
task='Ambient credentials.',
llm=LLM('anthropic', 'claude-test'),
@@ -3433,6 +3439,7 @@ def test_beta_agent_bridges_llm_credentials_to_terminal_env(monkeypatch):
anthropic_env = anthropic_agent._run_env()
openrouter_env = openrouter_agent._run_env()
deepseek_env = deepseek_agent._run_env()
+ browser_use_env = browser_use_agent._run_env()
assert openai_env['LLM_BROWSER_OPENAI_API_KEY'] == 'llm-openai-key'
assert openai_env['LLM_BROWSER_OPENAI_BASE_URL'] == 'https://openai.example/v1'
@@ -3442,6 +3449,8 @@ def test_beta_agent_bridges_llm_credentials_to_terminal_env(monkeypatch):
assert openrouter_env['OPENROUTER_BASE_URL'] == 'https://openrouter.example/api/v1'
assert deepseek_env['DEEPSEEK_API_KEY'] == 'llm-deepseek-key'
assert 'LLM_BROWSER_OPENAI_COMPAT_BASE_URL' not in deepseek_env
+ assert browser_use_env['LLM_BROWSER_BROWSER_USE_API_KEY'] == 'llm-browser-use-key'
+ assert browser_use_env['LLM_BROWSER_BROWSER_USE_BASE_URL'] == 'https://llm.example'
assert ambient_env['LLM_BROWSER_ANTHROPIC_API_KEY'] == 'ambient-anthropic-key'
assert openai_agent._sdk_run_params(max_steps=3, task=openai_agent.task)['llm'] | {'timeout': None} == {
@@ -3464,6 +3473,11 @@ def test_beta_agent_bridges_llm_credentials_to_terminal_env(monkeypatch):
'model': 'deepseek-chat',
'timeout': None,
}
+ assert browser_use_agent._sdk_run_params(max_steps=3, task=browser_use_agent.task)['llm'] | {'timeout': None} == {
+ 'provider': 'browser-use',
+ 'model': 'bu-3-max',
+ 'timeout': None,
+ }
def test_beta_agent_requests_openai_compatible_usage_for_cost_calculation(monkeypatch):
diff --git a/tests/ci/test_llm_retries.py b/tests/ci/test_llm_retries.py
index cacc0a397..b069743af 100644
--- a/tests/ci/test_llm_retries.py
+++ b/tests/ci/test_llm_retries.py
@@ -17,6 +17,15 @@ class TestChatBrowserUseRetries:
"""Set up environment for ChatBrowserUse."""
monkeypatch.setenv('BROWSER_USE_API_KEY', 'test-api-key')
+ @pytest.mark.parametrize('model', ['bu-3', 'bu-3-max'])
+ def test_accepts_bu3_models(self, mock_env, model):
+ """Test that BU3 model names are accepted."""
+ from browser_use.llm.browser_use.chat import ChatBrowserUse
+
+ client = ChatBrowserUse(model=model)
+
+ assert client.model == model
+
@pytest.mark.asyncio
async def test_retries_on_503_with_exponential_backoff(self, mock_env):
"""Test that 503 errors trigger retries with exponential backoff."""