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_usdis what the gateway charged. - 0.x models:
bu-2-0,bu-1-0,bu-2-0-mini-previewandbu-latestraise aValueErrorthat says they needbrowser-use<1.0. Usebu-fast. - 0.x model names:
'openai/gpt-5.5'is sent asgpt-5.5. The 0.x gateway also served Anthropic and Google models ('anthropic/claude-...'); in 1.0 the preflight error namesChatAnthropic(...)/ChatGoogle(...)with your own key.
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.
ChatOpenAIon api.openai.com uses the Responses API. Withbase_urlset to any other server, it uses chat completions.ChatAnthropicturns 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
ValueErrorbefore 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_urlset to a server other than api.openai.com,ChatOpenAIuses chat completions and leaves out OpenAI-only request options that such servers reject. - These servers get no reasoning setting from
Agent(reasoning=...); passChatOpenAI(..., 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 exampleollama 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.ChatOllamafrom 0.x is replaced by this; importing it raises anImportErrorthat says so.
Pydantic AI model strings
Any Pydantic AI model string works asllm=:
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.
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 carriesresult.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:
ChatOpenAI(base_url=...) makes. Prefer ChatOpenAI(model, base_url=..., api_key=...) when it covers what you need.