6 custom skills (assign-task, dispatch-webhook, daily-briefing, task-capture, qmd-brain, tts-voice) with technical documentation. Compatible with Claude Code, OpenClaw, Codex CLI, and OpenCode.
85 lines
11 KiB
JSON
Executable File
85 lines
11 KiB
JSON
Executable File
{
|
||
"title": "Models CLI",
|
||
"content": "See [/concepts/model-failover](/concepts/model-failover) for auth profile\nrotation, cooldowns, and how that interacts with fallbacks.\nQuick provider overview + examples: [/concepts/model-providers](/concepts/model-providers).\n\n## How model selection works\n\nOpenClaw selects models in this order:\n\n1. **Primary** model (`agents.defaults.model.primary` or `agents.defaults.model`).\n2. **Fallbacks** in `agents.defaults.model.fallbacks` (in order).\n3. **Provider auth failover** happens inside a provider before moving to the\n next model.\n\n* `agents.defaults.models` is the allowlist/catalog of models OpenClaw can use (plus aliases).\n* `agents.defaults.imageModel` is used **only when** the primary model can’t accept images.\n* Per-agent defaults can override `agents.defaults.model` via `agents.list[].model` plus bindings (see [/concepts/multi-agent](/concepts/multi-agent)).\n\n## Quick model picks (anecdotal)\n\n* **GLM**: a bit better for coding/tool calling.\n* **MiniMax**: better for writing and vibes.\n\n## Setup wizard (recommended)\n\nIf you don’t want to hand-edit config, run the onboarding wizard:\n\nIt can set up model + auth for common providers, including **OpenAI Code (Codex)\nsubscription** (OAuth) and **Anthropic** (API key recommended; `claude\nsetup-token` also supported).\n\n## Config keys (overview)\n\n* `agents.defaults.model.primary` and `agents.defaults.model.fallbacks`\n* `agents.defaults.imageModel.primary` and `agents.defaults.imageModel.fallbacks`\n* `agents.defaults.models` (allowlist + aliases + provider params)\n* `models.providers` (custom providers written into `models.json`)\n\nModel refs are normalized to lowercase. Provider aliases like `z.ai/*` normalize\nto `zai/*`.\n\nProvider configuration examples (including OpenCode Zen) live in\n[/gateway/configuration](/gateway/configuration#opencode-zen-multi-model-proxy).\n\n## “Model is not allowed” (and why replies stop)\n\nIf `agents.defaults.models` is set, it becomes the **allowlist** for `/model` and for\nsession overrides. When a user selects a model that isn’t in that allowlist,\nOpenClaw returns:\n\nThis happens **before** a normal reply is generated, so the message can feel\nlike it “didn’t respond.” The fix is to either:\n\n* Add the model to `agents.defaults.models`, or\n* Clear the allowlist (remove `agents.defaults.models`), or\n* Pick a model from `/model list`.\n\nExample allowlist config:\n\n## Switching models in chat (`/model`)\n\nYou can switch models for the current session without restarting:\n\n* `/model` (and `/model list`) is a compact, numbered picker (model family + available providers).\n* `/model <#>` selects from that picker.\n* `/model status` is the detailed view (auth candidates and, when configured, provider endpoint `baseUrl` + `api` mode).\n* Model refs are parsed by splitting on the **first** `/`. Use `provider/model` when typing `/model <ref>`.\n* If the model ID itself contains `/` (OpenRouter-style), you must include the provider prefix (example: `/model openrouter/moonshotai/kimi-k2`).\n* If you omit the provider, OpenClaw treats the input as an alias or a model for the **default provider** (only works when there is no `/` in the model ID).\n\nFull command behavior/config: [Slash commands](/tools/slash-commands).\n\n`openclaw models` (no subcommand) is a shortcut for `models status`.\n\nShows configured models by default. Useful flags:\n\n* `--all`: full catalog\n* `--local`: local providers only\n* `--provider <name>`: filter by provider\n* `--plain`: one model per line\n* `--json`: machine‑readable output\n\nShows the resolved primary model, fallbacks, image model, and an auth overview\nof configured providers. It also surfaces OAuth expiry status for profiles found\nin the auth store (warns within 24h by default). `--plain` prints only the\nresolved primary model.\nOAuth status is always shown (and included in `--json` output). If a configured\nprovider has no credentials, `models status` prints a **Missing auth** section.\nJSON includes `auth.oauth` (warn window + profiles) and `auth.providers`\n(effective auth per provider).\nUse `--check` for automation (exit `1` when missing/expired, `2` when expiring).\n\nPreferred Anthropic auth is the Claude Code CLI setup-token (run anywhere; paste on the gateway host if needed):\n\n## Scanning (OpenRouter free models)\n\n`openclaw models scan` inspects OpenRouter’s **free model catalog** and can\noptionally probe models for tool and image support.\n\n* `--no-probe`: skip live probes (metadata only)\n* `--min-params <b>`: minimum parameter size (billions)\n* `--max-age-days <days>`: skip older models\n* `--provider <name>`: provider prefix filter\n* `--max-candidates <n>`: fallback list size\n* `--set-default`: set `agents.defaults.model.primary` to the first selection\n* `--set-image`: set `agents.defaults.imageModel.primary` to the first image selection\n\nProbing requires an OpenRouter API key (from auth profiles or\n`OPENROUTER_API_KEY`). Without a key, use `--no-probe` to list candidates only.\n\nScan results are ranked by:\n\n1. Image support\n2. Tool latency\n3. Context size\n4. Parameter count\n\n* OpenRouter `/models` list (filter `:free`)\n* Requires OpenRouter API key from auth profiles or `OPENROUTER_API_KEY` (see [/environment](/environment))\n* Optional filters: `--max-age-days`, `--min-params`, `--provider`, `--max-candidates`\n* Probe controls: `--timeout`, `--concurrency`\n\nWhen run in a TTY, you can select fallbacks interactively. In non‑interactive\nmode, pass `--yes` to accept defaults.\n\n## Models registry (`models.json`)\n\nCustom providers in `models.providers` are written into `models.json` under the\nagent directory (default `~/.openclaw/agents/<agentId>/models.json`). This file\nis merged by default unless `models.mode` is set to `replace`.",
|
||
"code_samples": [
|
||
{
|
||
"code": "It can set up model + auth for common providers, including **OpenAI Code (Codex)\nsubscription** (OAuth) and **Anthropic** (API key recommended; `claude\nsetup-token` also supported).\n\n## Config keys (overview)\n\n* `agents.defaults.model.primary` and `agents.defaults.model.fallbacks`\n* `agents.defaults.imageModel.primary` and `agents.defaults.imageModel.fallbacks`\n* `agents.defaults.models` (allowlist + aliases + provider params)\n* `models.providers` (custom providers written into `models.json`)\n\nModel refs are normalized to lowercase. Provider aliases like `z.ai/*` normalize\nto `zai/*`.\n\nProvider configuration examples (including OpenCode Zen) live in\n[/gateway/configuration](/gateway/configuration#opencode-zen-multi-model-proxy).\n\n## “Model is not allowed” (and why replies stop)\n\nIf `agents.defaults.models` is set, it becomes the **allowlist** for `/model` and for\nsession overrides. When a user selects a model that isn’t in that allowlist,\nOpenClaw returns:",
|
||
"language": "unknown"
|
||
},
|
||
{
|
||
"code": "This happens **before** a normal reply is generated, so the message can feel\nlike it “didn’t respond.” The fix is to either:\n\n* Add the model to `agents.defaults.models`, or\n* Clear the allowlist (remove `agents.defaults.models`), or\n* Pick a model from `/model list`.\n\nExample allowlist config:",
|
||
"language": "unknown"
|
||
},
|
||
{
|
||
"code": "## Switching models in chat (`/model`)\n\nYou can switch models for the current session without restarting:",
|
||
"language": "unknown"
|
||
},
|
||
{
|
||
"code": "Notes:\n\n* `/model` (and `/model list`) is a compact, numbered picker (model family + available providers).\n* `/model <#>` selects from that picker.\n* `/model status` is the detailed view (auth candidates and, when configured, provider endpoint `baseUrl` + `api` mode).\n* Model refs are parsed by splitting on the **first** `/`. Use `provider/model` when typing `/model <ref>`.\n* If the model ID itself contains `/` (OpenRouter-style), you must include the provider prefix (example: `/model openrouter/moonshotai/kimi-k2`).\n* If you omit the provider, OpenClaw treats the input as an alias or a model for the **default provider** (only works when there is no `/` in the model ID).\n\nFull command behavior/config: [Slash commands](/tools/slash-commands).\n\n## CLI commands",
|
||
"language": "unknown"
|
||
},
|
||
{
|
||
"code": "`openclaw models` (no subcommand) is a shortcut for `models status`.\n\n### `models list`\n\nShows configured models by default. Useful flags:\n\n* `--all`: full catalog\n* `--local`: local providers only\n* `--provider <name>`: filter by provider\n* `--plain`: one model per line\n* `--json`: machine‑readable output\n\n### `models status`\n\nShows the resolved primary model, fallbacks, image model, and an auth overview\nof configured providers. It also surfaces OAuth expiry status for profiles found\nin the auth store (warns within 24h by default). `--plain` prints only the\nresolved primary model.\nOAuth status is always shown (and included in `--json` output). If a configured\nprovider has no credentials, `models status` prints a **Missing auth** section.\nJSON includes `auth.oauth` (warn window + profiles) and `auth.providers`\n(effective auth per provider).\nUse `--check` for automation (exit `1` when missing/expired, `2` when expiring).\n\nPreferred Anthropic auth is the Claude Code CLI setup-token (run anywhere; paste on the gateway host if needed):",
|
||
"language": "unknown"
|
||
}
|
||
],
|
||
"headings": [
|
||
{
|
||
"level": "h2",
|
||
"text": "How model selection works",
|
||
"id": "how-model-selection-works"
|
||
},
|
||
{
|
||
"level": "h2",
|
||
"text": "Quick model picks (anecdotal)",
|
||
"id": "quick-model-picks-(anecdotal)"
|
||
},
|
||
{
|
||
"level": "h2",
|
||
"text": "Setup wizard (recommended)",
|
||
"id": "setup-wizard-(recommended)"
|
||
},
|
||
{
|
||
"level": "h2",
|
||
"text": "Config keys (overview)",
|
||
"id": "config-keys-(overview)"
|
||
},
|
||
{
|
||
"level": "h2",
|
||
"text": "“Model is not allowed” (and why replies stop)",
|
||
"id": "“model-is-not-allowed”-(and-why-replies-stop)"
|
||
},
|
||
{
|
||
"level": "h2",
|
||
"text": "Switching models in chat (`/model`)",
|
||
"id": "switching-models-in-chat-(`/model`)"
|
||
},
|
||
{
|
||
"level": "h2",
|
||
"text": "CLI commands",
|
||
"id": "cli-commands"
|
||
},
|
||
{
|
||
"level": "h3",
|
||
"text": "`models list`",
|
||
"id": "`models-list`"
|
||
},
|
||
{
|
||
"level": "h3",
|
||
"text": "`models status`",
|
||
"id": "`models-status`"
|
||
},
|
||
{
|
||
"level": "h2",
|
||
"text": "Scanning (OpenRouter free models)",
|
||
"id": "scanning-(openrouter-free-models)"
|
||
},
|
||
{
|
||
"level": "h2",
|
||
"text": "Models registry (`models.json`)",
|
||
"id": "models-registry-(`models.json`)"
|
||
}
|
||
],
|
||
"url": "llms-txt#models-cli",
|
||
"links": []
|
||
} |