8.3 KiB
summary, read_when
| summary | read_when | |||
|---|---|---|---|---|
| Plan for models CLI: scan, list, aliases, fallbacks, status |
|
Models CLI plan
See docs/model-failover.md for how auth profiles rotate (OAuth vs API keys), cooldowns, and how that interacts with model fallbacks.
Goal: give clear model visibility + control (configured vs available), plus scan tooling that prefers tool-call + image-capable models and maintains ordered fallbacks.
How Clawdbot models work (quick explainer)
Clawdbot selects models in this order:
- The configured primary model (
agent.model.primary). - If it fails, fallbacks in
agent.model.fallbacks(in order). - Auth failover happens inside the provider first (see /concepts/model-failover).
Key pieces:
provider/modelis the canonical model id (e.g.anthropic/claude-opus-4-5).agent.modelsis the allowlist/catalog of models Clawdbot can use, with optional aliases and provider params.agent.imageModelis only used when the primary model can’t accept images.models.providerslets you add custom providers + models (written tomodels.json)./model <id>switches the active model for the current session;/model listshows what’s allowed.
Related:
- Context limits are model-specific; long sessions may trigger compaction. See /concepts/compaction.
Model recommendations
- Claude Opus 4.5: default primary for assistant + general work. It’s pricey and cap-prone, so consider the Claude Max $200 subscription if you live here.
- Claude Sonnet 4.5: default fallback when Opus caps out. Similar behavior with fewer limit headaches.
- GPT-5.2-Codex: recommended for coding and sub-agents. Prefer the Codex CLI if you want the strongest feel.
Suggested stacks:
- Assistant-first: Opus 4.5 primary → Sonnet 4.5 fallback.
- Agentic coding: Opus 4.5 primary → GPT-5.2-Codex for sub-agents → Sonnet 4.5 fallback.
Model discussions (community notes)
Anecdotal notes from the Discord thread on January 4–5, 2026. Treat as “reported by users,” not a benchmark.
Reported working well
- Claude Opus 4.5: best overall quality in Clawdbot, especially for “assistant” work. Tradeoff is cost and hitting usage limits quickly.
- Claude Sonnet 4.5: common fallback when Opus caps out. Similar behavior with fewer limit headaches.
- Gemini 3 Pro: some users felt it maps well to Clawdbot’s structure. Vibe was “fits the framework” more than “best at everything.”
- GLM: used successfully as a worker model under orchestration. Seen as strong for delegated/secondary tasks, not the primary brain.
- MiniMax M2.1: “good enough” for grunt work or a cheap fallback. Community nickname was “Temu-Sonnet,” i.e. usable but not Sonnet-level polish.
Mixed / unclear
- Antigravity (Claude Opus access): some reported extra Opus quota. Pricing/limits were unclear, so the value is hard to predict.
Reported weak in Clawdbot
- GPT-5.2-Codex inside Clawdbot: reported as rough for conversation/assistant tasks when embedded. Same notes said Codex felt stronger via the Codex CLI than embedded use.
- Grok: people tried it and then abandoned it. No strong upside showed up in the notes.
Theme
- Token burn feels higher than expected in long sessions; people suspect context buildup + tool outputs. Pruning/compaction helps. Check session logs before blaming providers. See /concepts/session and /concepts/model-failover.
Want a tailored stack? Share whether you’re using Clawdbot or Clawdis and your main workload (agentic coding vs “assistant” work), and we can suggest a primary + fallback set based on these reports.
Models CLI
See /cli for the full command tree and CLI flags.
CLI output (list + status)
clawdbot models list (default) prints a table with these columns:
Model:provider/modelkey (truncated in TTY).Input:textortext+image.Ctx: context window in K tokens (from the model registry).Local:yes/nowhen the provider base URL is local.Auth:yes/nowhen the provider has usable auth.Tags: origin + role hints.
Common tags:
default— resolved default model.fallback#N—agent.model.fallbacksorder.image—agent.imageModel.primary.img-fallback#N—agent.imageModel.fallbacksorder.configured— present inagent.models.alias:<name>— alias fromagent.models.*.alias.missing— referenced in config but not found in the registry.
Output formats:
--plain: prints onlyprovider/modelkeys (one per line).--json:{ count, models: [{ key, name, input, contextWindow, local, available, tags, missing }] }.
clawdbot models status prints the resolved defaults, fallbacks, image model, aliases,
and an Auth overview section showing which providers have profiles/env/models.json keys.
--plain prints the resolved default model only; --json returns a structured object for tooling.
Config changes
agent.models(configured model catalog + aliases).agent.models.*.params(provider-specific API params passed through to requests).agent.model.primary+agent.model.fallbacks.agent.imageModel.primary+agent.imageModel.fallbacks(optional).auth.profiles+auth.orderfor per-provider auth failover.
Scan behavior (models scan)
Input
- OpenRouter
/modelslist (filter:free) - Requires OpenRouter API key from auth profiles or
OPENROUTER_API_KEY(see /environment) - Optional filters:
--max-age-days,--min-params,--provider,--max-candidates - Probe controls:
--timeout,--concurrency
Probes (direct pi-ai complete)
- Tool-call probe (required):
- Provide a dummy tool, verify tool call emitted.
- Image probe (preferred):
- Prompt includes 1x1 PNG; success if no "unsupported image" error.
Scoring/selection
- Prefer models passing tool + image for text/tool fallbacks.
- Prefer image-only models for image tool fallback (even if tool probe fails).
- Rank by: image ok, then lower tool latency, then larger context, then params.
Interactive selection (TTY)
- Multiselect list with per-model stats:
- model id, tool ok, image ok, median latency, context, inferred params.
- Pre-select top N (default 6).
- Non-TTY: auto-select; require
--yes/--no-inputto apply.
Output
- Writes
agent.model.fallbacksordered. - Writes
agent.imageModel.fallbacksordered (image-capable models). - Ensures
agent.modelsentries exist for selected models. - Optional
--set-defaultto setagent.model.primary. - Optional
--set-imageto setagent.imageModel.primary.
Runtime fallback
- On model failure: try
agent.model.fallbacksin order. - Per-provider auth failover uses
auth.order(or stored profile order) before moving to the next model. - Image routing uses
agent.imageModelonly when configured and the primary model lacks image input. - Persist last successful provider/model to session entry; auth profile success is global.
- See
docs/model-failover.mdfor auth profile rotation, cooldowns, and timeout handling.
Tests
- Unit: scan selection ordering + probe classification.
- CLI: list/aliases/fallbacks add/remove + scan writes config.
- Status: shows last used model + fallbacks.
Docs
- Update
docs/configuration.mdwithagent.models+agent.model+agent.imageModel. - Keep this doc current when CLI surface or scan logic changes.
- Note provider aliases like
z.ai/*->zai/*when relevant. - Provider ids in model refs are normalized to lowercase.