Skip to main content

Browser Use gateway

The default. One Browser Use key, no provider account. A 'bu-*' string is the same as ChatBrowserUse('bu-...'). The full form is ChatBrowserUse(model='bu-fast', *, api_key=None, base_url=...). The key defaults to BROWSER_USE_API_KEY, then the key from browser-use login.
  • Preflight: before any browser starts, the agent reads the gateway’s model list (free). A rejected key, no credits, or an unknown model ends the run with one line in result.error, and no browser is created.
  • Cost: result.cost_usd is what the gateway charged.
  • 0.x models: bu-2-0, bu-1-0, bu-2-0-mini-preview and bu-latest raise a ValueError that says they need browser-use<1.0. Use bu-fast.
  • 0.x model names: 'openai/gpt-5.5' is sent as gpt-5.5. The 0.x gateway also served Anthropic and Google models ('anthropic/claude-...'); in 1.0 the preflight error names ChatAnthropic(...) / ChatGoogle(...) with your own key.
Benchmarks: browser-use.com/benchmarks and the open benchmark repo.

Model card

What each gateway model runs and costs, from the gateway’s model list on 2026-11-09. Prices are USD per 1M tokens. result.cost_usd is what the gateway actually charged for the run. The live list, with every model the gateway serves and its prices:
bu-2-0 (BU 2.0) and the other 0.x Browser Use models need browser-use<1.0; their card is in the 0.x docs. On 1.0, use bu-fast.

Your own provider

Anthropic and Google are built in; no extra install.
Any other argument raises a TypeError. For other model settings, pass a Pydantic AI Model built with settings=.... ChatAnthropic(temperature=...) raises too: Anthropic’s API rejects temperature on Claude 4.x models.
  • ChatOpenAI on api.openai.com uses the Responses API. With base_url set to any other server, it uses chat completions.
  • ChatAnthropic turns on Anthropic prompt caching.
  • A missing key fails before any browser starts: OPENAI_API_KEY is not set: export it, put it in .env, or pass api_key=... to the model.
  • Whitespace around a key (a trailing newline from a file) is stripped. A key with a space, line break, control or non-ASCII character inside raises a ValueError before any browser starts, without printing the key.
  • On the official OpenAI, Anthropic and Google endpoints, the agent first looks the model up (free). A rejected key or unknown model ends the run with result.error, and no browser is started.

OpenAI-compatible servers

vLLM, DeepSeek, OpenRouter, LM Studio, Ollama or any other server with a chat completions API: ChatOpenAI(model, base_url=..., api_key=...).
  • With base_url set to a server other than api.openai.com, ChatOpenAI uses chat completions and leaves out OpenAI-only request options that such servers reject.
  • These servers get no reasoning setting from Agent(reasoning=...); pass ChatOpenAI(..., reasoning_effort=...) to send one.

Ollama

Run a local model with Ollama through its OpenAI-compatible API. Pull a model that supports tool calling first, for example ollama pull qwen2.5:7b:
  • The model must support tool calling. Small models (a few billion parameters) reach the page but often fail to finish the task; use the largest model your machine runs well.
  • Browser('chromium') keeps the whole run on your machine.
  • ChatOllama from 0.x is replaced by this; importing it raises an ImportError that says so.

Pydantic AI model strings

Any Pydantic AI model string works as llm=:
A bare name without its provider, such as llm='gpt-6-luna', raises before any browser starts, naming the 1.0 form: ChatOpenAI('gpt-6-luna') or 'openai:gpt-6-luna'. This covers 'bedrock:...', 'azure:...', 'groq:...', 'mistral:...', 'openrouter:...', 'deepseek:...', 'cerebras:...', 'vercel:...' and the rest. Some need Pydantic AI’s extra, for example pip install 'pydantic-ai-slim[groq]'; the error says which. 'openai/<model>' is read as 'openai-responses:<model>'. LangChain chat models are not supported: Agent(llm=...) raises a TypeError.

Reasoning

Agent(reasoning='low' | 'medium' | 'high') sets the effort for OpenAI reasoning models, the gateway, Anthropic and Google.
Default: a bu-* alias’s own effort (see the table above), else 'medium', including an OpenAI model on the gateway. A model without a reasoning setting logs a warning and ignores it.

Usage and cost

Every result carries result.usage (input, output, cache_read, cache_write, requests) and result.cost_usd.
  • Gateway: what the gateway charged, plus any web searches.
  • Other providers: computed from public prices when the model’s price is known, else None.

Replacing 0.x model classes

Importing a removed class raises an ImportError that names its replacement.

Advanced: a Pydantic AI Model object

llm= also takes a Pydantic AI Model. Use it only when you need a setting the forms above don’t expose:
This ties your code to Pydantic AI’s API, which can change between its releases. browser-use sends the model as you built it, without the OpenAI-compatible adjustments ChatOpenAI(base_url=...) makes. Prefer ChatOpenAI(model, base_url=..., api_key=...) when it covers what you need.