Model Providers
Model provider overview, plus example configuration and CLI flow.
This page covers LLM/model providers (not chat channels like WhatsApp/Telegram).
For model selection rules, see ''/concepts/models''.
Quick Rules
- Model references use ''provider/model'' (e.g., ''opencode/claude-opus-4-5'').
- If you set ''agents.defaults.models'', it becomes a whitelist.
- CLI helpers: ''openclaw onboard'', ''openclaw models list'', ''openclaw models set <provider/model>''.
Built-in Providers (pi-ai directory)
OpenClaw ships with the pi‑ai directory. These providers do not require
''models.providers'' configuration; just set up authentication + select a model.
#
OpenAI
- Provider: ''openai''
- Auth: ''OPENAI_API_KEY''
- Model example: ''openai/gpt-5.2''
- CLI: ''openclaw onboard --auth-choice openai-api-key''
{
agents: { defaults: { model: { primary: "openai/gpt-5.2" } } },
}#
Anthropic
- Provider: ''anthropic''
- Auth: ''ANTHROPIC_API_KEY'' or ''claude setup-token''
- Model example: ''anthropic/claude-opus-4-5''
- CLI: ''openclaw onboard --auth-choice token'' (paste setup token) or ''openclaw models auth paste-token --provider anthropic''
{
agents: { defaults: { model: { primary: "anthropic/claude-opus-4-5" } } },
}#
OpenAI Codex
- Provider: ''openai-codex''
- Auth: OAuth (ChatGPT)
- Model example: ''openai-codex/gpt-5.2''
- CLI: ''openclaw onboard --auth-choice openai-codex'' or ''openclaw models auth login --provider openai-codex''
{
agents: { defaults: { model: { primary: "openai-codex/gpt-5.2" } } },
}#
OpenCode Zen
- Provider: ''opencode''
- Auth: ''OPENCODE_API_KEY'' (or ''OPENCODE_ZEN_API_KEY'')
- Model example: ''opencode/claude-opus-4-5''
- CLI: ''openclaw onboard --auth-choice opencode-zen''
{
agents: { defaults: { model: { primary: "opencode/claude-opus-4-5" } } },
}#
Google Gemini (API Key)
- Provider: ''google''
- Auth: ''GEMINI_API_KEY''
- Model example: ''google/gemini-3-pro-preview''
- CLI: ''openclaw onboard --auth-choice gemini-api-key''
#
Google Vertex, Antigravity, and Gemini CLI
- Providers: ''google-vertex'', ''google-antigravity'', ''google-gemini-cli''
- Auth: Vertex uses gcloud ADC; Antigravity/Gemini CLI use their respective auth flows
- Antigravity OAuth is provided as a bundled plugin (''google-antigravity-auth'', disabled by default).
- Enable: ''openclaw plugins enable google-antigravity-auth''
- Login: ''openclaw models auth login --provider google-antigravity --set-default''
- Gemini CLI OAuth is provided as a bundled plugin (''google-gemini-cli-auth'', disabled by default).
- Enable: ''openclaw plugins enable google-gemini-cli-auth''
- Login: ''openclaw models auth login --provider google-gemini-cli --set-default''
- Note: You ''do not'' paste client IDs or secrets into ''openclaw.json''. The CLI login flow stores
tokens in auth profiles on the gateway host.
-
#
Z.AI (GLM)
- Provider: ''zai''
- Auth: ''ZAI_API_KEY''
- Model example: ''zai/glm-4.7''
- CLI: ''openclaw onboard --auth-choice zai-api-key''
- Aliases: ''z.ai/*'' and ''z-ai/*'' normalize to ''zai/*''
#
Vercel AI Gateway
- Provider: ''vercel-ai-gateway''
- Auth: ''AI_GATEWAY_API_KEY''
- Model example: ''vercel-ai-gateway/anthropic/claude-opus-4.5''
- CLI: ''openclaw onboard --auth-choice ai-gateway-api-key''
#
Other Built-in Providers
- OpenRouter: ''openrouter'' (''OPENROUTER_API_KEY'')
- Model example: ''openrouter/anthropic/claude-sonnet-4-5''
- xAI: ''xai'' (''XAI_API_KEY'')
- Groq: ''groq'' (''GROQ_API_KEY'')
- Cerebras: ''cerebras'' (''CEREBRAS_API_KEY'')
- GLM models on Cerebras use IDs ''zai-glm-4.7'' and ''zai-glm-4.6''.
- OpenAI-compatible base URL: ''https://api.cerebras.ai/v1''.
- Mistral: ''mistral'' (''MISTRAL_API_KEY'')
- GitHub Copilot: ''github-copilot'' (''COPILOT_GITHUB_TOKEN'' / ''GH_TOKEN'' / ''GITHUB_TOKEN'')
Providers via `models.providers` (Custom/Base URL)
Use ''models.providers'' (or ''models.json'') to add ''custom'' providers or
OpenAI/Anthropic-compatible proxies.
#
Moonshot AI (Kimi)
Moonshot uses an OpenAI-compatible endpoint, so configure it as a custom provider:
- Provider: ''moonshot''
- Auth: ''MOONSHOT_API_KEY''
- Model example: ''moonshot/kimi-k2.5''
Kimi K2 Model IDs:
- ''moonshot/kimi-k2.5''
- ''moonshot/kimi-k2-0905-preview''
- ''moonshot/kimi-k2-turbo-preview''
- ''moonshot/kimi-k2-thinking''
- ''moonshot/kimi-k2-thinking-turbo''
{
agents: {
defaults: { model: { primary: "moonshot/kimi-k2.5" } },
},
models: {
mode: "merge",
providers: {
moonshot: {
baseUrl: "https://api.moonshot.ai/v1",
apiKey: "${MOONSHOT_API_KEY}",
api: "openai-completions",
models: [{ id: "kimi-k2.5", name: "Kimi K2.5" }],
},
},
},
}#
Kimi Coding
Kimi Coding uses Moonshot AI's Anthropic-compatible endpoint:
- Provider: ''kimi-coding''
- Auth: ''KIMI_API_KEY''
- Model example: ''kimi-coding/k2p5''
{
env: { KIMI_API_KEY: "sk-..." },
agents: {
defaults: { model: { primary: "kimi-coding/k2p5" } },
},
}#
Qwen OAuth (Free Tier)
Qwen provides OAuth access to Qwen Coder + Vision via device code flow.
Enable the bundled plugin, then login:
openclaw plugins enable qwen-portal-auth openclaw models auth login --provider qwen-portal --set-default
Model references:
- ''qwen-portal/coder-model''
- ''qwen-portal/vision-model''
See ''/providers/qwen'' for setup details and notes.
#
Synthetic
Synthetic provides Anthropic-compatible models behind the ''synthetic'' provider:
- Provider: ''synthetic''
- Auth: ''SYNTHETIC_API_KEY''
- Model example: ''synthetic/hf:MiniMaxAI/MiniMax-M2.1''
- CLI: ''openclaw onboard --auth-choice synthetic-api-key''
{
agents: {
defaults: { model: { primary: "synthetic/hf:MiniMaxAI/MiniMax-M2.1" } },
},
models: {
mode: "merge",
providers: {
synthetic: {
baseUrl: "https://api.synthetic.new/anthropic",
apiKey: "${SYNTHETIC_API_KEY}",
api: "anthropic-messages",
models: [{ id: "hf:MiniMaxAI/MiniMax-M2.1", name: "MiniMax M2.1" }],
},
},
},
}#
MiniMax
MiniMax is configured via ''models.providers'' because it uses a custom endpoint:
- MiniMax (human-compatible): ''--auth-choice minimax-api''
- Auth: ''MINIMAX_API_KEY''
See ''/providers/minimax'' for setup details, model options, and configuration snippets.
#
Ollama
Ollama is a local LLM runtime that provides an OpenAI-compatible API:
- Provider: ''ollama''
- Auth: None (local server)
- Model example: ''ollama/llama3.3''
- Install: https://ollama.ai
ollama pull llama3.3
{
agents: {
defaults: { model: { primary: "ollama/llama3.3" } },
},
}Ollama is auto-detected when running locally at ''http://127.0.0.1:11434/v1''. See ''/providers/ollama'' for model recommendations and custom configuration.
#
Local Proxies (LM Studio, vLLM, LiteLLM, etc.)
Example (OpenAI-compatible):
{
agents: {
defaults: {
model: { primary: "lmstudio/minimax-m2.1-gs32" },
models: { "lmstudio/minimax-m2.1-gs32": { alias: "Minimax" } },
},
},
models: {
providers: {
lmstudio: {
baseUrl: "http://localhost:1234/v1",
apiKey: "LMSTUDIO_KEY",
api: "openai-completions",
models: [
{
id: "minimax-m2.1-gs32",
name: "MiniMax M2.1",
reasoning: false,
input: ["text"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 200000,
maxTokens: 8192,
},
],
},
},
},
}Notes:
- For custom providers, ''reasoning'', ''input'', ''cost'', ''contextWindow'', and ''maxTokens'' are optional.
When omitted, OpenClaw defaults to:
- ''reasoning: false''
- ''input: ["text"]''
- ''cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }''
- ''contextWindow: 200000''
- ''maxTokens: 8192''
- Recommendation: Set explicit values that match your agent/model limits.
CLI Examples
openclaw onboard --auth-choice opencode-zen openclaw models set opencode/claude-opus-4-5 openclaw models list
See also: ''/gateway/configuration'' for full configuration examples.