Docs/Server/Providers and models
Providers and models
Choose a model provider for HolaClaw Server — OpenRouter, OpenAI, a ChatGPT subscription or any OpenAI-compatible endpoint such as Ollama — and change the model or provider later.
- Server
- Configuration
- AI providers
- Models
HolaClaw Server needs a model to answer. This page covers the providers it supports, what holaclaw init asks for each one, and how to change the model or the provider later.
How it fits together
Three layers, each named, each pointing at the one below:
- A provider is a connection to an endpoint: its type, base URL, key and concurrency limit. It is a
[providers.<name>]table inconfig.toml. - A model is an id on a provider, plus what HolaClaw Server needs to know about it: its context window, whether it calls tools or reads images, which API it speaks. It is a
[models.<name>]table inconfig.toml. - A role is a job an agent gives a model, such as answering the chat. Roles are under
[models]in the agent'sagent.toml, each naming a model.
# config.toml
[providers.openrouter]
type = "openai-compatible"
base_url = "https://openrouter.ai/api/v1"
auth = "api-key"
sort = "throughput"
[models.default]
provider = "openrouter"
id = "deepseek/deepseek-v4.1-flash"
context = 128000
tools = true# agents/main/agent.toml
[models]
chat = "default"One model can fill several roles, in one agent or many. Only chat is required. The other roles are in agent.toml.
Choose a provider at install time
holaclaw init writes a config for one provider and one model. The provider flags are the same for every deployment:
| Provider | Flags | Asks for |
|---|---|---|
| OpenRouter | --provider openrouter |
the API key; the model, deepseek/deepseek-v4.1-flash by default |
| OpenAI | --provider openai |
the API key; the model, gpt-6.1-sol by default |
| A ChatGPT subscription | --provider openai-codex |
nothing: you sign in once the daemon runs |
| Any OpenAI-compatible endpoint | --provider openai-compat --base-url <url> --model <id> |
the API key, if the endpoint needs one |
--modelsets the model without the question, for every provider.--token-file <path>also writes an admin token for the owner to that file.- Without a terminal on stdin,
initasks nothing. It reads the API key from stdin or, with nothing on stdin, prints theholaclaw auth setcommand that stores it later.
A ChatGPT subscription
HolaClaw Server signs in by itself, with a device code, so the Codex CLI is not needed and the machine needs no browser. Run holaclaw login codex once the daemon runs (see Your first chat).
OpenAI retires the model ids a ChatGPT account may use every few months. Take a current one from OpenAI's Codex models page and pass it with --model. On 2026-10-16 those were:
| Id | Plans | Notes |
|---|---|---|
gpt-6.1-sol |
Plus, Pro, Business, Enterprise, Edu | recommended; still rolling out |
gpt-6-luna |
the same, and Free/Go in the desktop app | lighter; use it when Sol is not on your plan yet |
gpt-6-astra |
all paid plans | most capable; needs ChatGPT credits |
Warning
This flow is unofficial: OpenAI does not document it for third-party clients and can change it at any time.
An OpenAI-compatible endpoint
Ollama, llama.cpp's llama-server, LM Studio, vLLM or a hosted service, wherever it runs, as long as HolaClaw Server can reach its URL.
--base-urlends in/v1, and--modelis a model id the endpoint serves.curl <base-url>/modelslists them.- Press Enter when
initasks for an API key if the endpoint needs none, as Ollama does. - A key is only ever sent over
https, or over plainhttpto a loopback address (ruleNET003). initwritescontext = 65536for the model. That must be the window the endpoint actually runs. With Ollama, start it withOLLAMA_CONTEXT_LENGTH=65536or more.- A model that thinks by default (Qwen on Ollama, for example) spends its reasoning from the reply budget. Set
reasoning = "none"on it.
Change the model or the provider
Add the provider's snippet (below) to
config.toml.Point the agent at the model. In
agents/main/agent.toml, thechatline under[models]says"default", the modelinitwrote. Change it to the name of the[models.<name>]table you added:toml[models] chat = "chatgpt"Store any secret it needs with
holaclaw auth set.Run
holaclaw check --offline, then restart the daemon.
See Configuration overview for how to edit the files in your deployment.
Snippet: a ChatGPT subscription
[providers.codex]
type = "codex"
auth = "subscription"
[models.chatgpt]
provider = "codex"
id = "gpt-6.1-sol"
context = 128000
tools = truecontext is an estimate, because OpenAI does not publish the window sizes. After the restart, sign in with holaclaw login codex.
Snippet: an endpoint with an API key
This covers OpenAI's API, OpenRouter, and any other endpoint that speaks the OpenAI API:
[providers.openai]
type = "openai-compatible"
base_url = "https://api.openai.com/v1" # OpenRouter: https://openrouter.ai/api/v1
auth = "api-key"
[models.chatgpt]
provider = "openai"
id = "<a model id of that endpoint>"
context = 128000
tools = trueStore the key. The command reads it from stdin, so it never lands in your shell history:
read -rs KEY && printf %s "$KEY" | holaclaw auth set providers.openai api_key; unset KEYholaclaw check reports SEC002 until the key is stored.
Snippet: a local endpoint without a key
[providers.ollama]
type = "openai-compatible"
base_url = "http://localhost:11434/v1"
[models.local]
provider = "ollama"
id = "gemma4:e2b"
context = 65536
tools = trueLeave out auth for an endpoint with no key. Without it, a stored key is never sent, and check warns SEC007.
Tips
- OpenRouter routing.
sort = "throughput"on an OpenRouter provider asks for its fastest route. A slow route can turn a 2-second call into 90 seconds. - A fallback model. Set
fallbackin the agent's[models]to a second model, used when the first fails. Every use is traced. - Concurrency.
max_concurrenton a provider caps the requests in flight at once.
Every key of [providers.*] and [models.*] is in config.toml.
Was this page helpful?
