ACP agents such as Claude Code, Codex, and Gemini CLI manage their own model access. Use ACP Agents instead of creating an LLM profile for those agents.
Choose a Configuration Path
Provider Connection for Reusable API Credentials
Create a Provider Connection when you expect to use the same provider API key for more than one model or LLM profile. A connection stores the provider, API key, and optional base URL once; each linked profile supplies its own model configuration and uses the connection’s credentials.- Open
Settings > LLM. - In Provider Connections, select Add provider connection.
- Enter a recognizable name, such as
Personal OpenHands APIorTeam OpenAI. - Choose the provider from the searchable provider list.
- Enter the API key and, if needed, the provider base URL.
- Save the connection.
- Add or edit an LLM profile, select the connection in Provider Connection, then select the model and save the profile.
Provider Connections are available on local agent-server backends. The panel is hidden when using an OpenHands Cloud backend.
Direct Provider or OpenHands Profile
Use theBasic tab when you have an API key from Anthropic, OpenAI, Google, OpenHands, or another provider in the selector.
- If you will reuse the key, create or choose a Provider Connection.
- Select the provider and model.
- Select the Provider Connection, or enter the API key directly for a profile-specific credential.
- Save the profile.
- Start a new conversation and send a short message to confirm the model responds.
Local OpenAI-Compatible Server
Use theAdvanced tab for LM Studio, Ollama, vLLM, SGLang, or another server that exposes an OpenAI-compatible API.
- Find the exact model ID served by your server, usually from its
GET /v1/modelsendpoint. - Enter
openai/<served-model-id>as the model. - If the server needs an API key or a reusable base URL, create a Provider Connection with those values and select it for the profile. Otherwise, enter them directly in the profile.
- Make sure the base URL is reachable from the backend.
- Save the profile and start a new conversation to verify it.
127.0.0.1 points to the container, not the host. Use the host address appropriate for your platform, such as http://host.docker.internal:<port>/v1 where supported.
See Run Local LLMs with OpenHands for server-specific examples.
LiteLLM Proxy
Use theAdvanced tab when you use a LiteLLM proxy.
- Enter
litellm_proxy/<model-name>as the model. - Create or select a Provider Connection for the proxy URL and API key. You can instead enter those values directly when they are specific to one profile.
- Make sure
<model-name>exactly matches a model configured on the proxy. - Save the profile and start a new conversation to verify it.
OpenRouter
Use OpenRouter when you have an OpenRouter API key and want to access a model through its catalog. Create anOpenRouter Provider Connection to reuse the key, then in the Basic tab select OpenRouter, choose a model, select the connection, and save the profile. Use the Advanced tab only when you need to enter a model ID that is not available in the selector.
See OpenRouter for model-ID and recovery guidance.
Fix a Failed Configuration
For additional error-specific guidance, see Troubleshooting.

