Connect Browser Use
Configure Browser Use's native ChatOpenAI wrapper for a custom endpoint, with vision disabled.
https://aelder.dev/v1LOCAL CONFIGURATION
Let my agent set this up
Copy this task to an agent already running on your computer. Enter your API key locally when asked.
Help me connect Browser Use to AELDER using this guide: https://aelder.dev/docs/browser-use/
Service Base URL: https://aelder.dev/v1
First inspect my installed version, active profile and configuration. Explain any mismatch with the guide before changing anything.
Use the documented local configuration or CLI method. Do not automate the GUI, install software or change permissions without asking.
Preserve existing accounts, providers, models, defaults, permissions and unrelated settings. Propose the smallest change, show a redacted diff, and back up any files before editing.
Have me enter my API key locally using the tool's secret storage or an environment variable. Never ask me to paste a key into chat, print it, or include it in a command, diff, log or commit.
Use the exact model ID I choose from my account's model list. Do not invent model IDs or assume every model supports every API format or tool feature.
Validate syntax and configuration loading before making any generation request. If there is no dry-run, say so.
Explain any proposed paid test, the model and what it sends, and ask for approval before running it. Do not send project files or private conversation history as a test.
Finish with the settings changed, checks performed and steps to restore the backup.Browser Use includes its own ChatOpenAI wrapper with base_url and api_key settings. It can connect directly to an OpenAI-compatible Chat Completions endpoint.
This guide assumes an existing Python Browser Use installation and a working local browser setup. It covers text and page information with vision disabled; it does not establish screenshot or image support.
1. Prepare local values
Set SERVICE_BASE_URL to the Base URL above, including /v1. Set SERVICE_MODEL_ID to an exact ID from the authenticated models endpoint. Provide SERVICE_API_KEY through your local environment or secrets manager.
For Bash or Zsh, this hidden prompt avoids recording the literal key in shell history:
printf 'Service API key: '
IFS= read -r -s SERVICE_API_KEY
printf '\n'
export SERVICE_API_KEYStart Python from the same environment. Keep the key out of agent conversations and tracked files.
2. Configure the model and agent
import os
from browser_use import Agent, ChatOpenAI
llm = ChatOpenAI(
model=os.environ["SERVICE_MODEL_ID"],
base_url=os.environ["SERVICE_BASE_URL"],
api_key=os.environ["SERVICE_API_KEY"],
max_retries=0,
temperature=None,
frequency_penalty=None,
max_completion_tokens=None,
)
agent = Agent(
task="Open https://example.com and report the page title. Do not follow links.",
llm=llm,
use_vision=False,
)Import ChatOpenAI from browser_use, rather than substituting a similarly named LangChain class. The URL ends at /v1; the wrapper appends /chat/completions. The HTTP model ID is the exact value of SERVICE_MODEL_ID.
This example omits optional sampling and output-limit parameters. Browser Use can still send structured-output schemas and model-dependent reasoning fields. Browser automation needs a model that produces valid action output; ordinary text availability alone does not prove that capability.
3. Verify in stages
Imports and constructing llm check local configuration. A minimal billable text request, before running the browser agent, is:
import asyncio
from browser_use.llm.messages import UserMessage
async def check_text():
result = await llm.ainvoke([UserMessage(content="Reply with OK.")])
print(result.completion)
asyncio.run(check_text())Confirm the model and usage in the service dashboard. To test the browser workflow separately, run asyncio.run(agent.run()). That task can make multiple billable model requests and operates your browser. Use a fresh browser context with the harmless task above before adapting an existing workflow.
Recreate the model and agent to switch IDs. Keep use_vision=False for this text configuration. Vision, structured output and successful multi-step browser actions each need separate verification. If schemas or reasoning fields are rejected, check the wrapper version and chosen model; do not disable validation switches blindly.
Sources: Browser Use’s supported-model configuration and ChatOpenAI implementation. The native configuration was reviewed; a live service or browser-agent run has not been verified.
Need the key? Open your AELDER dashboard. For direct API calls, see the API reference.

