Skip to main content

Overview

ChatBrowserUse is the recommended LLM provider for Browser Use, offering the fastest and most cost-effective models specifically optimized for browser automation tasks. It achieves 3-5x faster task completion compared to standard models.
Get started with $10 of free LLM credits at cloud.browser-use.com/new-api-key

Basic Usage

Configuration

Parameters

str
default:"bu-latest"
Model name to use. Available options:
  • bu-latest or bu-1-0: Default model
  • bu-2-0: Latest premium model
  • browser-use/bu-30b-a3b-preview: Browser Use Open Source Model
str
default:"None"
API key for browser-use cloud. Defaults to BROWSER_USE_API_KEY environment variable.
str
default:"None"
Base URL for the API. Defaults to BROWSER_USE_LLM_URL environment variable or https://llm.api.browser-use.com.
float
default:"120.0"
Request timeout in seconds.
int
default:"5"
Maximum number of retries for transient errors (429, 500, 502, 503, 504).
float
default:"1.0"
Base delay in seconds for exponential backoff.
float
default:"60.0"
Maximum delay in seconds between retries.

Advanced Usage

Custom Model Selection

With Session ID for Sticky Routing

Custom Base URL

Environment Setup

.env

Error Handling

ChatBrowserUse automatically handles common errors with exponential backoff retry logic:
  • Rate Limits (429): Automatic retry with backoff
  • Server Errors (500, 502, 503, 504): Automatic retry with backoff
  • Network Errors: Automatic retry with backoff
  • Authentication (401): Raised immediately as ModelProviderError
  • Insufficient Credits (402): Raised immediately as ModelProviderError

Properties

provider

Returns the provider name: "browser-use"

name

Returns the model name.

Methods

ainvoke()

Asynchronously invoke the model with messages.

Parameters

  • messages (list[BaseMessage]): List of messages to send
  • output_format (type[T] | None): Optional Pydantic model for structured output
  • request_type (str): Type of request - "browser_agent" or "judge"
  • session_id (str | None): Session ID for sticky routing (same session → same container)

Returns

ChatInvokeCompletion[T] | ChatInvokeCompletion[str] with:
  • completion: Response content (string or structured output)
  • usage: Token usage information (prompt_tokens, completion_tokens, total_tokens)

Why ChatBrowserUse?

  1. Optimized for Browser Automation: Models fine-tuned specifically for browser tasks
  2. 3-5x Faster: Completes tasks significantly faster than generic models
  3. Lowest Cost: Most cost-effective solution for browser automation
  4. Built-in Retry Logic: Automatic handling of rate limits and transient errors
  5. Easy Setup: Simple API key configuration with $10 free credits