Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 4.28 KB

File metadata and controls

56 lines (42 loc) · 4.28 KB

Command Code Model Routing

Use this reference when choosing cmd --model values for shards. The model registry changes; verify with cmd --list-models before relying on exact IDs. This reference is based on the Command Code docs and local cmd --list-models output from 2026-07-07.

Docs:

Routing Rules

  • Use the least powerful model that can finish the shard in one or two turns.
  • Prefer stronger models for synthesis, architecture, subtle code review, or multi-file edits.
  • Prefer fast/cheap models for bounded read-only tasks, grep-style investigation, summaries, and small mechanical edits.
  • Prefer long-context models when the prompt points at large files, broad histories, or many related modules.
  • Prefer vision-capable models only when screenshots, UI images, diagrams, or visual artifacts are material.

Recommended Roles

Role Primary choices Use when
Controller subagent outside cmd Project-selected medium-capability model with high reasoning if available Orchestrating shards, validating outputs, composing final response
Cheap read-only worker deepseek/deepseek-v4-flash, gpt-5.4-mini, claude-haiku-4-5, google/gemini-3.1-flash-lite, zai-org/GLM-5.2-Fast Small analysis, file summarization, log triage, scoped research
Researcher / doc synthesizer gpt-5.5, deepseek/deepseek-v4-pro, zai-org/GLM-5.2, moonshotai/Kimi-K2.6, xiaomi/mimo-v2.5-pro Combining docs, long-context evidence, ambiguous investigation
Code analyzer / reviewer claude-sonnet-5, gpt-5.3-codex, deepseek/deepseek-v4-pro, Qwen/Qwen3.7-Max, zai-org/GLM-5.2 Bug finding, diff review, dependency tracing, correctness checks
Mechanical implementer gpt-5.4-mini, claude-haiku-4-5, Qwen/Qwen3.7-Plus, zai-org/GLM-5.2-Fast Complete spec, 1-2 files, low ambiguity, easy tests
Coding implementer gpt-5.3-codex, claude-sonnet-5, MiniMaxAI/MiniMax-M3, moonshotai/Kimi-K2.7-Code, Qwen/Qwen3.7-Max Multi-step code edits, tests, refactors, implementation judgment
Full-stack / cross-platform worker MiniMaxAI/MiniMax-M3, moonshotai/Kimi-K2.7-Code, MiniMaxAI/MiniMax-M2.7, gpt-5.3-codex Frontend/backend changes, end-to-end feature shards
Frontend / multimodal worker moonshotai/Kimi-K2.7-Code, MiniMaxAI/MiniMax-M3, Qwen/Qwen3.6-Plus, google/gemini-3.5-flash UI code, screenshots, visual reasoning, frontend polish
Architecture / planning gpt-5.5, claude-fable-5, claude-opus-4-8, zai-org/GLM-5.2, sakana/fugu-ultra Broad design, multi-agent planning, risky architectural choices
High-volume batch worker google/gemini-3.1-flash-lite, deepseek/deepseek-v4-flash, zai-org/GLM-5.2-Fast, Qwen/Qwen3.7-Plus Many independent shards where cost and throughput matter

Current Model Notes

  • Command Code docs list deepseek/deepseek-v4-flash as the current default model.
  • --model accepts full IDs or short names after the final slash, case-insensitively.
  • Unknown model IDs are rejected before work starts. If that happens, run cmd --list-models and retry with an available ID.
  • Models in provider docs may appear before they are available in a user's plan. If a chosen model returns MODEL_NOT_IN_PLAN, downgrade within the same role row or omit --model to use the account default.

Effort Guidance

If the outer subagent runtime supports reasoning effort, use:

  • Controller subagent: use the project-local .commandcode-subagent/model-routing.md selection. It must be a medium-capability model with high or xhigh effort, not a cheap/lite/flash tier.
  • Cmd shards: prefer model choice over effort unless the cmd session exposes /effort or a supported effort flag.
  • Review and architecture shards: use stronger models before increasing retries.

Fallback Selection

When cmd fails due rate limits, auth, token/context limits, or repeated max-turn caps:

  1. Stop creating new cmd shards.
  2. Finish remaining shards directly in the controller subagent.
  3. Keep the same shard boundaries so the final report stays auditable.
  4. Mark FALLBACK_USED and list skipped cmd runs.