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.

5 min read Updated November 16, 2026
  • 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 in config.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 in config.toml.
  • A role is a job an agent gives a model, such as answering the chat. Roles are under [models] in the agent's agent.toml, each naming a model.
toml
# 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
toml
# 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
  • --model sets 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, init asks nothing. It reads the API key from stdin or, with nothing on stdin, prints the holaclaw auth set command 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-url ends in /v1, and --model is a model id the endpoint serves. curl <base-url>/models lists them.
  • Press Enter when init asks for an API key if the endpoint needs none, as Ollama does.
  • A key is only ever sent over https, or over plain http to a loopback address (rule NET003).
  • init writes context = 65536 for the model. That must be the window the endpoint actually runs. With Ollama, start it with OLLAMA_CONTEXT_LENGTH=65536 or 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

  1. Add the provider's snippet (below) to config.toml.

  2. Point the agent at the model. In agents/main/agent.toml, the chat line under [models] says "default", the model init wrote. Change it to the name of the [models.<name>] table you added:

    toml
    [models]
    chat = "chatgpt"
  3. Store any secret it needs with holaclaw auth set.

  4. Run holaclaw check --offline, then restart the daemon.

See Configuration overview for how to edit the files in your deployment.

Snippet: a ChatGPT subscription

toml
[providers.codex]
type = "codex"
auth = "subscription"

[models.chatgpt]
provider = "codex"
id       = "gpt-6.1-sol"
context  = 128000
tools    = true

context 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:

toml
[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    = true

Store the key. The command reads it from stdin, so it never lands in your shell history:

Terminal
read -rs KEY && printf %s "$KEY" | holaclaw auth set providers.openai api_key; unset KEY

holaclaw check reports SEC002 until the key is stored.

Snippet: a local endpoint without a key

toml
[providers.ollama]
type     = "openai-compatible"
base_url = "http://localhost:11434/v1"

[models.local]
provider = "ollama"
id       = "gemma4:e2b"
context  = 65536
tools    = true

Leave 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 fallback in the agent's [models] to a second model, used when the first fails. Every use is traced.
  • Concurrency. max_concurrent on a provider caps the requests in flight at once.

Every key of [providers.*] and [models.*] is in config.toml.

Was this page helpful?

Can’t find what you need?

Ask the community on Discord.