OpenClawSkills
GitHub
Core Concepts • TutorialHeader.readTime

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''.

Tutorial.step

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>''.

Tutorial.step

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.

#

Tutorial.step

OpenAI

- Provider: ''openai''

- Auth: ''OPENAI_API_KEY''

- Model example: ''openai/gpt-5.2''

- CLI: ''openclaw onboard --auth-choice openai-api-key''

Json5
{
  agents: { defaults: { model: { primary: "openai/gpt-5.2" } } },
}

#

Tutorial.step

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''

Json5
{
  agents: { defaults: { model: { primary: "anthropic/claude-opus-4-5" } } },
}

#

Tutorial.step

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''

Json5
{
  agents: { defaults: { model: { primary: "openai-codex/gpt-5.2" } } },
}

#

Tutorial.step

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''

Json5
{
  agents: { defaults: { model: { primary: "opencode/claude-opus-4-5" } } },
}

#

Tutorial.step

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''

#

Tutorial.step

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.

-

#

Tutorial.step

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/*''

#

Tutorial.step

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''

#

Tutorial.step

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'')

Tutorial.step

Providers via `models.providers` (Custom/Base URL)

Use ''models.providers'' (or ''models.json'') to add ''custom'' providers or

OpenAI/Anthropic-compatible proxies.

#

Tutorial.step

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''

Json5
{
  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" }],
      },
    },
  },
}

#

Tutorial.step

Kimi Coding

Kimi Coding uses Moonshot AI's Anthropic-compatible endpoint:

- Provider: ''kimi-coding''

- Auth: ''KIMI_API_KEY''

- Model example: ''kimi-coding/k2p5''

Json5
{
  env: { KIMI_API_KEY: "sk-..." },
  agents: {
    defaults: { model: { primary: "kimi-coding/k2p5" } },
  },
}

#

Tutorial.step

Qwen OAuth (Free Tier)

Qwen provides OAuth access to Qwen Coder + Vision via device code flow.

Enable the bundled plugin, then login:

Bash
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.

#

Tutorial.step

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''

Json5
{
  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" }],
      },
    },
  },
}

#

Tutorial.step

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.

#

Tutorial.step

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

Bash
ollama pull llama3.3
Json5
{
  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.

#

Tutorial.step

Local Proxies (LM Studio, vLLM, LiteLLM, etc.)

Example (OpenAI-compatible):

Json5
{
  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.

Tutorial.step

CLI Examples

Bash
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.