Skip to main content

Overview

Browser Use supports multiple LLM providers through a unified BaseChatModel interface. Each provider offers different models with varying capabilities, speeds, and costs. The agent automatically configures optimal settings based on your chosen model.

BaseChatModel Interface

All LLM providers implement the BaseChatModel protocol (line 18 in llm/base.py):
The unified interface means you can switch providers without changing your agent code - just swap the LLM instance.
The ChatBrowserUse model is specifically optimized for browser automation tasks:
Why ChatBrowserUse?
  • Fastest: 3-5x faster task completion
  • Cheapest: Lowest token cost per task
  • Most accurate: Built specifically for Browser Use
  • Free credits: Get $10 to start at cloud.browser-use.com
Setup:
Model Selection:

Supported Providers

OpenAI

Wide range of models including GPT-4 and GPT-3.5:
Setup:
Model Options:
  • gpt-4.1-mini - Fast, cost-effective
  • gpt-4.1 - Most capable, slower
  • o3-mini - Advanced reasoning
  • gpt-3.5-turbo - Legacy, cheap
Auto-Configuration:
  • O3 models: 90s LLM timeout
  • Default: 75s timeout

Anthropic

Claude models with excellent reasoning:
Setup:
Model Options:
  • claude-sonnet-4-0 - Best balance, coordinate clicking
  • claude-opus-4-0 - Most capable, coordinate clicking
  • claude-sonnet-3-5 - Previous generation
Auto-Configuration:
  • Screenshot size: 1400x850 (auto-optimized)
  • LLM timeout: 90s
  • Coordinate clicking: Enabled for Sonnet 4 & Opus 4
Claude models excel at visual understanding and complex multi-step reasoning.

Google

Gemini models with fast inference:
Setup:
Model Options:
  • gemini-flash-latest - Fast, cost-effective
  • gemini-3-pro-exp - Experimental, coordinate clicking
  • gemini-pro-latest - Stable, capable
Auto-Configuration:
  • Gemini 3 Pro: 90s timeout, coordinate clicking
  • Other Gemini: 75s timeout

DeepSeek

Cost-effective models with good performance:
Setup:
Auto-Configuration:
  • LLM timeout: 90s
  • Vision: Disabled (not yet supported)
DeepSeek models don’t support vision yet. The agent automatically sets use_vision=False.

Groq

Ultra-fast inference with LPU:
Setup:
Auto-Configuration:
  • LLM timeout: 30s (fast inference)

XAI (Grok)

XAI’s Grok models:
Setup:
Vision Support:
  • ✅ Grok 2, Grok 4
  • ❌ Grok 3, Grok Code (auto-disabled)

AWS Bedrock

Use models through AWS:
Setup:

Azure OpenAI

OpenAI models through Azure:
Setup:

Ollama

Local models with Ollama:
Setup:
Local models may require more patience and fine-tuning for browser automation tasks.

Model Configuration

Temperature

Control randomness in model outputs:
Recommendations:
  • 0.0: Deterministic, repeatable (best for automation)
  • 0.3-0.5: Slight variation, still focused
  • 0.7-1.0: Creative, diverse (not recommended for tasks)

Timeout Configuration

The agent automatically sets timeouts based on model:
Auto-Detected Timeouts:
  • Gemini 3 Pro: 90s
  • Groq: 30s (fast inference)
  • O3, Claude, DeepSeek: 90s
  • Default: 75s

Vision Configuration

Control how the agent uses vision:
Vision Modes:
  • True: Always include screenshots in every step
  • False: Never include screenshots
  • 'auto': Include screenshot tool, agent requests when needed
Detail Levels:
  • 'high': Full resolution (slower, more accurate)
  • 'low': Lower resolution (faster, less detail)
  • 'auto': Model decides based on content

Screenshot Optimization

Resize screenshots for faster processing:
Auto-Configuration:
  • Claude Sonnet models: (1400, 850) automatically set
  • Other models: Original viewport size
Screenshot resizing reduces token costs and speeds up inference. Coordinates from the LLM are automatically scaled back to original size.

Structured Output

All providers support structured output through Pydantic models:

Fallback LLM

Configure a backup model if the primary fails:
When Fallback Activates:
  • Rate limit errors
  • API connection failures
  • Model-specific errors
The agent automatically switches to fallback and continues execution.

Cost Tracking

Track API costs across providers:

Model Selection Guide

Fast & Cheap
  • ChatBrowserUse (recommended)
  • ChatOpenAI(‘gpt-4.1-mini’)
  • ChatGoogle(‘gemini-flash-latest’)
Most Capable
  • ChatAnthropic(‘claude-opus-4-0’)
  • ChatOpenAI(‘gpt-4.1’)
  • ChatBrowserUse()
Visual Tasks
  • ChatAnthropic(‘claude-sonnet-4-0’) - Auto-optimized
  • ChatBrowserUse()
  • ChatOpenAI(‘gpt-4.1’)
Local/Private
  • ChatOllama(‘llama3.1’)
  • ChatOllama(‘mistral’)

Advanced Features

Coordinate Clicking

Automatically enabled for models that support it (line 321 in agent/service.py):
With coordinate clicking, the agent can click by pixel coordinates instead of element indices.

Flash Mode

Some models work better with simplified prompts:
Flash Mode Effects:
  • Disables evaluation and next_goal fields
  • Disables thinking field
  • Disables planning
  • Faster execution

Page Extraction LLM

Use a different model for content extraction:
Using a smaller model for extraction can significantly reduce costs without affecting accuracy for text extraction tasks.

Judge LLM

Validate task completion with a separate model:

Complete Example

Troubleshooting

Solutions:
  • Use fallback LLM: fallback_llm=ChatOpenAI(...)
  • Add retry logic with exponential backoff
  • Switch to ChatBrowserUse for higher limits
Fix:
  • Increase timeout: llm_timeout=120
  • Use faster model: ChatBrowserUse, ChatGroq
  • Enable flash_mode for simpler prompts
Check:
  • Model supports vision (not DeepSeek, Grok 3)
  • use_vision is enabled
  • Screenshots are being captured: include_screenshot=True
Optimize:
  • Use ChatBrowserUse (lowest cost per task)
  • Use smaller extraction LLM: page_extraction_llm
  • Enable message compaction
  • Reduce screenshot size: llm_screenshot_size
  • Set max_steps limit

Next Steps

Supported Models

Complete list of available models

Agent Configuration

Learn about agent settings

Cost Optimization

Reduce API costs

Structured Output

Extract structured data