Files
openclaw/docs/cli/models.md

80 lines
2.6 KiB
Markdown
Raw Permalink Normal View History

2026-01-15 06:12:54 +00:00
---
2026-01-30 03:15:10 +01:00
summary: "CLI reference for `openclaw models` (status/list/set/scan, aliases, fallbacks, auth)"
2026-01-15 06:12:54 +00:00
read_when:
- You want to change default models or view provider auth status
- You want to scan available models/providers and debug auth profiles
title: "models"
2026-01-15 06:12:54 +00:00
---
2026-01-30 03:15:10 +01:00
# `openclaw models`
2026-01-15 06:12:54 +00:00
Model discovery, scanning, and configuration (default model, fallbacks, auth profiles).
Related:
2026-01-31 21:13:13 +09:00
2026-01-15 06:12:54 +00:00
- Providers + models: [Models](/providers/models)
- Provider auth setup: [Getting started](/start/getting-started)
## Common commands
```bash
2026-01-30 03:15:10 +01:00
openclaw models status
openclaw models list
openclaw models set <model-or-alias>
openclaw models scan
2026-01-15 06:12:54 +00:00
```
2026-01-30 03:15:10 +01:00
`openclaw models status` shows the resolved default/fallbacks plus an auth overview.
When provider usage snapshots are available, the OAuth/token status section includes
provider usage headers.
2026-01-23 19:25:58 +00:00
Add `--probe` to run live auth probes against each configured provider profile.
Probes are real requests (may consume tokens and trigger rate limits).
Use `--agent <id>` to inspect a configured agents model/auth state. When omitted,
the command uses `OPENCLAW_AGENT_DIR`/`PI_CODING_AGENT_DIR` if set, otherwise the
configured default agent.
Notes:
2026-01-31 21:13:13 +09:00
- `models set <model-or-alias>` accepts `provider/model` or an alias.
- Model refs are parsed by splitting on the **first** `/`. If the model ID includes `/` (OpenRouter-style), include the provider prefix (example: `openrouter/moonshotai/kimi-k2`).
2026-01-30 03:15:10 +01:00
- 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).
2026-01-23 19:25:58 +00:00
### `models status`
2026-01-31 21:13:13 +09:00
2026-01-23 19:25:58 +00:00
Options:
2026-01-31 21:13:13 +09:00
2026-01-23 19:25:58 +00:00
- `--json`
- `--plain`
- `--check` (exit 1=expired/missing, 2=expiring)
- `--probe` (live probe of configured auth profiles)
- `--probe-provider <name>` (probe one provider)
- `--probe-profile <id>` (repeat or comma-separated profile ids)
- `--probe-timeout <ms>`
- `--probe-concurrency <n>`
- `--probe-max-tokens <n>`
- `--agent <id>` (configured agent id; overrides `OPENCLAW_AGENT_DIR`/`PI_CODING_AGENT_DIR`)
2026-01-23 19:25:58 +00:00
2026-01-15 06:12:54 +00:00
## Aliases + fallbacks
```bash
2026-01-30 03:15:10 +01:00
openclaw models aliases list
openclaw models fallbacks list
2026-01-15 06:12:54 +00:00
```
## Auth profiles
```bash
2026-01-30 03:15:10 +01:00
openclaw models auth add
openclaw models auth login --provider <id>
openclaw models auth setup-token
openclaw models auth paste-token
2026-01-15 06:12:54 +00:00
```
2026-01-31 21:13:13 +09:00
2026-01-16 00:39:29 +00:00
`models auth login` runs a provider plugins auth flow (OAuth/API key). Use
2026-01-30 03:15:10 +01:00
`openclaw plugins list` to see which providers are installed.
2026-01-16 02:36:29 +00:00
Notes:
2026-01-31 21:13:13 +09:00
- `setup-token` prompts for a setup-token value (generate it with `claude setup-token` on any machine).
- `paste-token` accepts a token string generated elsewhere or from automation.