docs/concepts/model-providers.md
Reference for LLM/model providers (not chat channels like WhatsApp/Telegram). For model selection rules, see Models.
To intentionally switch the default model, use `openclaw models set <provider/model>` or `openclaw models auth login --provider <id> --set-default`.
- `openai/<model>` plus `agents.defaults.agentRuntime.id: "codex"` uses the native Codex app-server harness. This is the usual ChatGPT/Codex subscription setup.
- `openai-codex/<model>` uses Codex OAuth in PI.
- `openai/<model>` without a Codex runtime override uses the direct OpenAI API-key provider in PI.
See [OpenAI](/providers/openai) and [Codex harness](/plugins/codex-harness). If the provider/runtime split is confusing, read [Agent runtimes](/concepts/agent-runtimes) first.
Plugin auto-enable follows the same boundary: `openai-codex/<model>` belongs to the OpenAI plugin, while the Codex plugin is enabled by `agentRuntime.id: "codex"` or legacy `codex/<model>` refs.
GPT-5.5 is available through the native Codex app-server harness when `agentRuntime.id: "codex"` is set, through `openai-codex/gpt-5.5` in PI for Codex OAuth, and through `openai/gpt-5.5` in PI for direct API-key traffic when your account exposes it.
Legacy `claude-cli/*`, `google-gemini-cli/*`, and `codex-cli/*` refs migrate back to canonical provider refs with the runtime recorded separately.
Most provider-specific logic lives in provider plugins (registerProvider(...)) while OpenClaw keeps the generic inference loop. Plugins own onboarding, model catalogs, auth env-var mapping, transport/config normalization, tool-schema cleanup, failover classification, OAuth refresh, usage reporting, thinking/reasoning profiles, and more.
The full list of provider-SDK hooks and bundled-plugin examples lives in Provider plugins. A provider that needs a totally custom request executor is a separate, deeper extension surface.
<Note> Provider-owned runner behavior lives on explicit provider hooks such as replay policy, tool-schema normalization, stream wrapping, and transport/request helpers. The legacy `ProviderPlugin.capabilities` static bag is compatibility-only and is no longer read by shared runner logic. </Note>- `OPENCLAW_LIVE_<PROVIDER>_KEY` (single live override, highest priority)
- `<PROVIDER>_API_KEYS` (comma or semicolon list)
- `<PROVIDER>_API_KEY` (primary key)
- `<PROVIDER>_API_KEY_*` (numbered list, e.g. `<PROVIDER>_API_KEY_1`)
For Google providers, `GOOGLE_API_KEY` is also included as fallback. Key selection order preserves priority and deduplicates values.
OpenClaw ships with the pi‑ai catalog. These providers require no models.providers config; just set auth + pick a model.
openaiOPENAI_API_KEYOPENAI_API_KEYS, OPENAI_API_KEY_1, OPENAI_API_KEY_2, plus OPENCLAW_LIVE_OPENAI_KEY (single override)openai/gpt-5.5, openai/gpt-5.4-miniopenclaw models list --provider openai if a specific install or API key behaves differently.openclaw onboard --auth-choice openai-api-keyauto (WebSocket-first, SSE fallback)agents.defaults.models["openai/<model>"].params.transport ("sse", "websocket", or "auto")params.openaiWsWarmup (true/false)agents.defaults.models["openai/<model>"].params.serviceTier/fast and params.fastMode map direct openai/* Responses requests to service_tier=priority on api.openai.comparams.serviceTier when you want an explicit tier instead of the shared /fast toggleoriginator, version, User-Agent) apply only on native OpenAI traffic to api.openai.com, not generic OpenAI-compatible proxiesstore, prompt-cache hints, and OpenAI reasoning-compat payload shaping; proxy routes do notopenai/gpt-5.3-codex-spark is intentionally suppressed in OpenClaw because live OpenAI API requests reject it and the current Codex catalog does not expose it{
agents: { defaults: { model: { primary: "openai/gpt-5.5" } } },
}
anthropicANTHROPIC_API_KEYANTHROPIC_API_KEYS, ANTHROPIC_API_KEY_1, ANTHROPIC_API_KEY_2, plus OPENCLAW_LIVE_ANTHROPIC_KEY (single override)anthropic/claude-opus-4-6openclaw onboard --auth-choice apiKey/fast toggle and params.fastMode, including API-key and OAuth-authenticated traffic sent to api.anthropic.com; OpenClaw maps that to Anthropic service_tier (auto vs standard_only)anthropic/claude-opus-4-7 with
agents.defaults.agentRuntime.id: "claude-cli". Legacy
claude-cli/claude-opus-4-7 refs still work for compatibility.{
agents: { defaults: { model: { primary: "anthropic/claude-opus-4-6" } } },
}
openai-codexopenai-codex/gpt-5.5openai/gpt-5.5 with agents.defaults.agentRuntime.id: "codex"codex/gpt-*openai-codex/* loads the OpenAI plugin; the native Codex app-server plugin is selected only by the Codex harness runtime or legacy codex/* refs.openclaw onboard --auth-choice openai-codex or openclaw models auth login --provider openai-codexauto (WebSocket-first, SSE fallback)agents.defaults.models["openai-codex/<model>"].params.transport ("sse", "websocket", or "auto")params.serviceTier is also forwarded on native Codex Responses requests (chatgpt.com/backend-api)originator, version, User-Agent) are only attached on native Codex traffic to chatgpt.com/backend-api, not generic OpenAI-compatible proxies/fast toggle and params.fastMode config as direct openai/*; OpenClaw maps that to service_tier=priorityopenai-codex/gpt-5.5 uses the Codex catalog native contextWindow = 400000 and default runtime contextTokens = 272000; override the runtime cap with models.providers.openai-codex.models[].contextTokensopenai-codex auth but configure openai/gpt-5.5 plus agents.defaults.agentRuntime.id: "codex".openai-codex/gpt-5.5 only when you want the Codex OAuth/subscription route through PI; use openai/gpt-5.5 without the Codex runtime override when your API-key setup and local catalog expose the public API route.{
plugins: { entries: { codex: { enabled: true } } },
agents: {
defaults: {
model: { primary: "openai/gpt-5.5" },
agentRuntime: { id: "codex" },
},
},
}
{
models: {
providers: {
"openai-codex": {
models: [{ id: "gpt-5.5", contextTokens: 160000 }],
},
},
},
}
OPENCODE_API_KEY (or OPENCODE_ZEN_API_KEY)opencodeopencode-goopencode/claude-opus-4-6, opencode-go/kimi-k2.6openclaw onboard --auth-choice opencode-zen or openclaw onboard --auth-choice opencode-go{
agents: { defaults: { model: { primary: "opencode/claude-opus-4-6" } } },
}
googleGEMINI_API_KEYGEMINI_API_KEYS, GEMINI_API_KEY_1, GEMINI_API_KEY_2, GOOGLE_API_KEY fallback, and OPENCLAW_LIVE_GEMINI_KEY (single override)google/gemini-3.1-pro-preview, google/gemini-3-flash-previewgoogle/gemini-3.1-flash-preview is normalized to google/gemini-3-flash-previewgoogle/gemini-3.1-pro is accepted and normalized to Google's live Gemini API id, google/gemini-3.1-pro-previewopenclaw onboard --auth-choice gemini-api-key/think adaptive uses Google dynamic thinking. Gemini 3/3.1 omit a fixed thinkingLevel; Gemini 2.5 sends thinkingBudget: -1.agents.defaults.models["google/<model>"].params.cachedContent (or legacy cached_content) to forward a provider-native cachedContents/... handle; Gemini cache hits surface as OpenClaw cacheReadgoogle-vertex, google-gemini-cliGemini CLI OAuth is shipped as part of the bundled google plugin.
Default model: `google-gemini-cli/gemini-3-flash-preview`. You do **not** paste a client id or secret into `openclaw.json`. The CLI login flow stores tokens in auth profiles on the gateway host.
Gemini CLI JSON replies are parsed from response; usage falls back to stats, with stats.cached normalized into OpenClaw cacheRead.
zaiZAI_API_KEYzai/glm-5.1openclaw onboard --auth-choice zai-api-key
z.ai/* and z-ai/* normalize to zai/*zai-api-key auto-detects the matching Z.AI endpoint; zai-coding-global, zai-coding-cn, zai-global, and zai-cn force a specific surfacevercel-ai-gatewayAI_GATEWAY_API_KEYvercel-ai-gateway/anthropic/claude-opus-4.6, vercel-ai-gateway/moonshotai/kimi-k2.6openclaw onboard --auth-choice ai-gateway-api-keykilocodeKILOCODE_API_KEYkilocode/kilo/autoopenclaw onboard --auth-choice kilocode-api-keyhttps://api.kilo.ai/api/gateway/kilocode/kilo/auto; live https://api.kilo.ai/api/gateway/models discovery can expand the runtime catalog further.kilocode/kilo/auto is owned by Kilo Gateway, not hard-coded in OpenClaw.See /providers/kilocode for setup details.
| Provider | Id | Auth env | Example model |
|---|---|---|---|
| BytePlus | byteplus / byteplus-plan | BYTEPLUS_API_KEY | byteplus-plan/ark-code-latest |
| Cerebras | cerebras | CEREBRAS_API_KEY | cerebras/zai-glm-4.7 |
| Cloudflare AI Gateway | cloudflare-ai-gateway | CLOUDFLARE_AI_GATEWAY_API_KEY | — |
| DeepInfra | deepinfra | DEEPINFRA_API_KEY | deepinfra/deepseek-ai/DeepSeek-V3.2 |
| DeepSeek | deepseek | DEEPSEEK_API_KEY | deepseek/deepseek-v4-flash |
| GitHub Copilot | github-copilot | COPILOT_GITHUB_TOKEN / GH_TOKEN / GITHUB_TOKEN | — |
| Groq | groq | GROQ_API_KEY | — |
| Hugging Face Inference | huggingface | HUGGINGFACE_HUB_TOKEN or HF_TOKEN | huggingface/deepseek-ai/DeepSeek-R1 |
| Kilo Gateway | kilocode | KILOCODE_API_KEY | kilocode/kilo/auto |
| Kimi Coding | kimi | KIMI_API_KEY or KIMICODE_API_KEY | kimi/kimi-code |
| MiniMax | minimax / minimax-portal | MINIMAX_API_KEY / MINIMAX_OAUTH_TOKEN | minimax/MiniMax-M2.7 |
| Mistral | mistral | MISTRAL_API_KEY | mistral/mistral-large-latest |
| Moonshot | moonshot | MOONSHOT_API_KEY | moonshot/kimi-k2.6 |
| NVIDIA | nvidia | NVIDIA_API_KEY | nvidia/nvidia/nemotron-3-super-120b-a12b |
| OpenRouter | openrouter | OPENROUTER_API_KEY | openrouter/auto |
| Qianfan | qianfan | QIANFAN_API_KEY | qianfan/deepseek-v3.2 |
| Qwen Cloud | qwen | QWEN_API_KEY / MODELSTUDIO_API_KEY / DASHSCOPE_API_KEY | qwen/qwen3.5-plus |
| StepFun | stepfun / stepfun-plan | STEPFUN_API_KEY | stepfun/step-3.5-flash |
| Together | together | TOGETHER_API_KEY | together/moonshotai/Kimi-K2.5 |
| Venice | venice | VENICE_API_KEY | — |
| Vercel AI Gateway | vercel-ai-gateway | AI_GATEWAY_API_KEY | vercel-ai-gateway/anthropic/claude-opus-4.6 |
| Volcano Engine (Doubao) | volcengine / volcengine-plan | VOLCANO_ENGINE_API_KEY | volcengine-plan/ark-code-latest |
| xAI | xai | XAI_API_KEY | xai/grok-4.3 |
| Xiaomi | xiaomi | XIAOMI_API_KEY | xiaomi/mimo-v2-flash |
models.providers (custom/base URL)Use models.providers (or models.json) to add custom providers or OpenAI/Anthropic‑compatible proxies.
Many of the bundled provider plugins below already publish a default catalog. Use explicit models.providers.<id> entries only when you want to override the default base URL, headers, or model list.
Gateway model capability checks also read explicit models.providers.<id>.models[] metadata. If a custom or proxy model accepts images, set input: ["text", "image"] on that model so WebChat and node-origin attachment paths pass images as native model inputs instead of text-only media refs.
Moonshot ships as a bundled provider plugin. Use the built-in provider by default, and add an explicit models.providers.moonshot entry only when you need to override the base URL or model metadata:
moonshotMOONSHOT_API_KEYmoonshot/kimi-k2.6openclaw onboard --auth-choice moonshot-api-key or openclaw onboard --auth-choice moonshot-api-key-cnKimi K2 model IDs:
moonshot/kimi-k2.6moonshot/kimi-k2.5moonshot/kimi-k2-thinkingmoonshot/kimi-k2-thinking-turbomoonshot/kimi-k2-turbo{
agents: {
defaults: { model: { primary: "moonshot/kimi-k2.6" } },
},
models: {
mode: "merge",
providers: {
moonshot: {
baseUrl: "https://api.moonshot.ai/v1",
apiKey: "${MOONSHOT_API_KEY}",
api: "openai-completions",
models: [{ id: "kimi-k2.6", name: "Kimi K2.6" }],
},
},
},
}
Kimi Coding uses Moonshot AI's Anthropic-compatible endpoint:
kimiKIMI_API_KEYkimi/kimi-code{
env: { KIMI_API_KEY: "sk-..." },
agents: {
defaults: { model: { primary: "kimi/kimi-code" } },
},
}
Legacy kimi/k2p5 remains accepted as a compatibility model id.
Volcano Engine (火山引擎) provides access to Doubao and other models in China.
volcengine (coding: volcengine-plan)VOLCANO_ENGINE_API_KEYvolcengine-plan/ark-code-latestopenclaw onboard --auth-choice volcengine-api-key{
agents: {
defaults: { model: { primary: "volcengine-plan/ark-code-latest" } },
},
}
Onboarding defaults to the coding surface, but the general volcengine/* catalog is registered at the same time.
In onboarding/configure model pickers, the Volcengine auth choice prefers both volcengine/* and volcengine-plan/* rows. If those models are not loaded yet, OpenClaw falls back to the unfiltered catalog instead of showing an empty provider-scoped picker.
BytePlus ARK provides access to the same models as Volcano Engine for international users.
byteplus (coding: byteplus-plan)BYTEPLUS_API_KEYbyteplus-plan/ark-code-latestopenclaw onboard --auth-choice byteplus-api-key{
agents: {
defaults: { model: { primary: "byteplus-plan/ark-code-latest" } },
},
}
Onboarding defaults to the coding surface, but the general byteplus/* catalog is registered at the same time.
In onboarding/configure model pickers, the BytePlus auth choice prefers both byteplus/* and byteplus-plan/* rows. If those models are not loaded yet, OpenClaw falls back to the unfiltered catalog instead of showing an empty provider-scoped picker.
Synthetic provides Anthropic-compatible models behind the synthetic provider:
syntheticSYNTHETIC_API_KEYsynthetic/hf:MiniMaxAI/MiniMax-M2.5openclaw onboard --auth-choice synthetic-api-key{
agents: {
defaults: { model: { primary: "synthetic/hf:MiniMaxAI/MiniMax-M2.5" } },
},
models: {
mode: "merge",
providers: {
synthetic: {
baseUrl: "https://api.synthetic.new/anthropic",
apiKey: "${SYNTHETIC_API_KEY}",
api: "anthropic-messages",
models: [{ id: "hf:MiniMaxAI/MiniMax-M2.5", name: "MiniMax M2.5" }],
},
},
},
}
MiniMax is configured via models.providers because it uses custom endpoints:
--auth-choice minimax-global-oauth--auth-choice minimax-cn-oauth--auth-choice minimax-global-api--auth-choice minimax-cn-apiMINIMAX_API_KEY for minimax; MINIMAX_OAUTH_TOKEN or MINIMAX_API_KEY for minimax-portalSee /providers/minimax for setup details, model options, and config snippets.
<Note> On MiniMax's Anthropic-compatible streaming path, OpenClaw disables thinking by default unless you explicitly set it, and `/fast on` rewrites `MiniMax-M2.7` to `MiniMax-M2.7-highspeed`. </Note>Plugin-owned capability split:
minimax/MiniMax-M2.7minimax/image-01 or minimax-portal/image-01MiniMax-VL-01 on both MiniMax auth pathsminimaxLM Studio ships as a bundled provider plugin which uses the native API:
lmstudioLM_API_TOKENhttp://localhost:1234/v1Then set a model (replace with one of the IDs returned by http://localhost:1234/api/v1/models):
{
agents: {
defaults: { model: { primary: "lmstudio/openai/gpt-oss-20b" } },
},
}
OpenClaw uses LM Studio's native /api/v1/models and /api/v1/models/load for discovery + auto-load, with /v1/chat/completions for inference by default. If you want LM Studio JIT loading, TTL, and auto-evict to own model lifecycle, set models.providers.lmstudio.params.preload: false. See /providers/lmstudio for setup and troubleshooting.
Ollama ships as a bundled provider plugin and uses Ollama's native API:
ollamaollama/llama3.3# Install Ollama, then pull a model:
ollama pull llama3.3
{
agents: {
defaults: { model: { primary: "ollama/llama3.3" } },
},
}
Ollama is detected locally at http://127.0.0.1:11434 when you opt in with OLLAMA_API_KEY, and the bundled provider plugin adds Ollama directly to openclaw onboard and the model picker. See /providers/ollama for onboarding, cloud/local mode, and custom configuration.
vLLM ships as a bundled provider plugin for local/self-hosted OpenAI-compatible servers:
vllmhttp://127.0.0.1:8000/v1To opt in to auto-discovery locally (any value works if your server doesn't enforce auth):
export VLLM_API_KEY="vllm-local"
Then set a model (replace with one of the IDs returned by /v1/models):
{
agents: {
defaults: { model: { primary: "vllm/your-model-id" } },
},
}
See /providers/vllm for details.
SGLang ships as a bundled provider plugin for fast self-hosted OpenAI-compatible servers:
sglanghttp://127.0.0.1:30000/v1To opt in to auto-discovery locally (any value works if your server does not enforce auth):
export SGLANG_API_KEY="sglang-local"
Then set a model (replace with one of the IDs returned by /v1/models):
{
agents: {
defaults: { model: { primary: "sglang/your-model-id" } },
},
}
See /providers/sglang for details.
Example (OpenAI‑compatible):
{
agents: {
defaults: {
model: { primary: "lmstudio/my-local-model" },
models: { "lmstudio/my-local-model": { alias: "Local" } },
},
},
models: {
providers: {
lmstudio: {
baseUrl: "http://localhost:1234/v1",
apiKey: "${LM_API_TOKEN}",
api: "openai-completions",
timeoutSeconds: 300,
models: [
{
id: "my-local-model",
name: "Local Model",
reasoning: false,
input: ["text"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 200000,
maxTokens: 8192,
},
],
},
},
},
}
- `reasoning: false`
- `input: ["text"]`
- `cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }`
- `contextWindow: 200000`
- `maxTokens: 8192`
Recommended: set explicit values that match your proxy/model limits.
openclaw onboard --auth-choice opencode-zen
openclaw models set opencode/claude-opus-4-6
openclaw models list
See also: Configuration for full configuration examples.