Model Routing System
You have access to intelligent model routing. Before executing any task, analyze complexity and route to the appropriate model tier.
Current model IDs and pricing — Last verified: 2026-08-28. Re-verify at
platform.claude.com before trusting
these again; they have moved more than once in 2026.
Haiku → claude-haiku-4-5 ($1.00 / $5.00 per 1M input/output) · Sonnet → claude-sonnet-5
($2.00 / $10.00) · Opus → claude-opus-5 ($5.00 / $25.00, default).
For the hardest long-horizon reasoning, escalate above Opus to claude-fable-5 ($10.00 / $50.00 —
most capable; thinking is always on, no disabling it; reserve for genuinely demanding work).
Model IDs are complete as written — never append a date suffix. The tiers below are model-agnostic.
Routing Decision Matrix
TASK COMPLEXITY ANALYSIS
────────────────────────────────────────────────────────────────
HAIKU (Fast, Cheap) - claude-haiku-4-5 - Use for:
├── Simple file operations (read, list, navigate)
├── Scaffolding and boilerplate generation
├── Deterministic transformations (format, lint, compile)
├── Status checks and health monitoring
├── SEO metadata generation
├── Deployment commands (after code is written)
├── Documentation formatting
├── Simple search and replace
│
│ Token cost: $1.00/1M input, $5.00/1M output
│ Latency: Fastest
│ Use when: Task has clear, unambiguous steps
SONNET (Balanced) - claude-sonnet-5 - Use for:
├── Feature implementation (standard complexity)
├── Bug fixes requiring analysis
├── Content writing (articles, social posts)
├── Code review and quality checks
├── Test generation
├── Refactoring with clear patterns
├── API integration work
├── Database schema design
│
│ Token cost: $2.00/1M input, $10.00/1M output
│ Latency: Medium
│ Use when: Task requires reasoning but not deep strategy
OPUS (Strategic, Complex) - claude-opus-5 - Use for:
├── Architecture decisions (system design)
├── Multi-agent coordination (council, swarm)
├── Strategic planning (business, product)
├── Complex debugging (multi-file, subtle bugs)
├── Security audits and vulnerability analysis
├── Enterprise AI system design
├── Book writing (narrative, character development)
├── Research synthesis (multiple sources)
├── Ambiguous requirements interpretation
│
│ Token cost: $5.00/1M input, $25.00/1M output
│ Latency: Slower; most capable of the routine tiers
│ Use when: Task requires deep reasoning, creativity, or strategy
FABLE (Hardest, escalation only) - claude-fable-5 - Use for:
├── Long-horizon agentic work where Opus already fell short
├── The single hardest step in an otherwise-Opus-routed task
│
│ Token cost: $10.00/1M input, $50.00/1M output
│ Latency: Slowest; thinking is always on (cannot be disabled)
│ Use when: Opus-tier reasoning wasn't enough — this is a ceiling, not a starting point
Automatic Routing Rules
When processing a request, apply these rules:
Route to HAIKU when:
- User says: "deploy", "format", "lint", "check status", "list", "scaffold"
- File patterns:
*.config.*, package.json, tsconfig.json
- Commands:
/mcp-status, /inventory-status, /nextjs-deploy (execution phase)
Route to SONNET when:
- User says: "write", "implement", "fix", "create", "build", "test"
- File patterns:
*.ts, *.tsx, *.py, *.md (content files)
- Commands:
/article-creator, /create-music, /spec, /generate-social
Route to OPUS when:
- User says: "design", "architect", "strategy", "council", "analyze", "research"
- Keywords: "enterprise", "system", "multi-agent", "complex", "strategic"
- Commands:
/starlight-architect, /council, /author-team, /research
Escalate to FABLE when:
- Opus already ran on the task and the result fell short
- The task is genuinely the hardest tier — long-horizon agentic work, not routine strategy
- Never route here first; Fable is a ceiling for escalation, not a default
Cost Optimization
BEFORE (No routing):
All tasks → Opus → $25.00/1M output tokens
AFTER (With routing):
Simple tasks (40%) → Haiku → $5.00/1M = $2.00
Medium tasks (45%) → Sonnet → $10.00/1M = $4.50
Complex tasks (15%) → Opus → $25.00/1M = $3.75
──────────────────────────────────────────────
TOTAL: $10.25 vs $25.00 = 59% cost reduction
Implementation in Task Tool
When using the Task tool, specify model based on routing:
// Simple task - use haiku
Task({
subagent_type: "Explore",
model: "haiku",
prompt: "List all files in src/"
})
// Medium task - use sonnet (default)
Task({
subagent_type: "code-reviewer",
model: "sonnet",
prompt: "Review this PR for issues"
})
// Complex task - use opus
Task({
subagent_type: "Plan",
model: "opus",
prompt: "Design the architecture for a multi-tenant SaaS platform"
})
Command-Level Routing
| Command |
Default Model |
Rationale |
/acos |
sonnet |
Router needs reasoning |
/article-creator |
sonnet |
Content creation |
/create-music |
sonnet |
Creative work |
/infogenius |
sonnet |
Research + creation |
/starlight-architect |
opus |
Strategic design |
/council |
opus |
Multi-perspective |
/research |
sonnet |
Information synthesis |
/spec |
sonnet |
Feature planning |
/nextjs-deploy |
haiku |
Execution |
/mcp-status |
haiku |
Status check |
/inventory-status |
haiku |
Status check |
/publish |
haiku |
Execution |
/polish-content |
sonnet |
Editing |
/review-content |
sonnet |
Quality check |
Escalation Pattern
If a haiku-routed task fails or produces poor results:
- Automatically escalate to sonnet
- If still failing, escalate to opus
- If opus itself falls short on a genuinely hard task, escalate to Fable — last resort, not a retry habit
- Log escalation for learning
haiku (attempt) → fail → sonnet (retry) → fail → opus (retry) → fail (rare) → fable (last resort)
Relationship to other routing configs
This skill is the estate's model-facts reference — current model IDs, context windows, and
per-token pricing. It is not the only routing config in the estate, and on task-class routing
decisions it does not have the final word:
starlight-evals/routing-table.json is the evidence-derived source of truth for task-class
routing — which tier a task class should hit, backed by eval-round evidence and confidence
scores rather than the judgment calls in this file. Where its route for a task class disagrees
with the "Route to X when" rules above, the table wins.
agentic-ops-hub/fleet/model-routing.json and a referenced ~/.starlight/routing.toml are
operational routing configs elsewhere in the estate. They route by abstract tier name (opus,
sonnet, ...) and should resolve those names against this skill (or the evals table) rather than
hardcoding their own model IDs or pricing.
- This skill's job stays narrow: keep the model IDs, context windows, and pricing above correct and
current. It is not merged with the other three configs here — this section exists only so the next
agent knows which source to trust when they disagree.
Model Routing v1.1 - Implementing claude-flow's intelligent routing pattern. Last verified: 2026-08-28.
1---2name: model-routing-33description: Intelligent model selection — routes tasks to Haiku (fast/cheap), Sonnet (balanced), or Opus (complex/strategic) by analyzing task complexity. Use when deciding which model to run, optimizing cost vs quality, or building a tiered routing layer.4triggers:5 - model6 - routing7 - optimize8 - cost9 - haiku10 - sonnet11 - opus12priority: high13version: 1.1.014source: claude-flow15metadata:16 source: https://skillmd.com/skills/frankxai/model-routing-317---1819# Model Routing System2021You have access to intelligent model routing. Before executing any task, analyze complexity and route to the appropriate model tier.2223> **Current model IDs and pricing — Last verified: 2026-08-28. Re-verify at24> [platform.claude.com](https://platform.claude.com/docs/en/about-claude/models/overview) before trusting25> these again; they have moved more than once in 2026.**26> Haiku → `claude-haiku-4-5` ($1.00 / $5.00 per 1M input/output) · Sonnet → `claude-sonnet-5`27> ($2.00 / $10.00) · Opus → `claude-opus-5` ($5.00 / $25.00, default).28> For the hardest long-horizon reasoning, escalate above Opus to **`claude-fable-5`** ($10.00 / $50.00 —29> most capable; thinking is always on, no disabling it; reserve for genuinely demanding work).30> Model IDs are complete as written — never append a date suffix. The tiers below are model-agnostic.3132## Routing Decision Matrix3334```35TASK COMPLEXITY ANALYSIS36────────────────────────────────────────────────────────────────3738HAIKU (Fast, Cheap) - claude-haiku-4-5 - Use for:39├── Simple file operations (read, list, navigate)40├── Scaffolding and boilerplate generation41├── Deterministic transformations (format, lint, compile)42├── Status checks and health monitoring43├── SEO metadata generation44├── Deployment commands (after code is written)45├── Documentation formatting46├── Simple search and replace47│48│ Token cost: $1.00/1M input, $5.00/1M output49│ Latency: Fastest50│ Use when: Task has clear, unambiguous steps5152SONNET (Balanced) - claude-sonnet-5 - Use for:53├── Feature implementation (standard complexity)54├── Bug fixes requiring analysis55├── Content writing (articles, social posts)56├── Code review and quality checks57├── Test generation58├── Refactoring with clear patterns59├── API integration work60├── Database schema design61│62│ Token cost: $2.00/1M input, $10.00/1M output63│ Latency: Medium64│ Use when: Task requires reasoning but not deep strategy6566OPUS (Strategic, Complex) - claude-opus-5 - Use for:67├── Architecture decisions (system design)68├── Multi-agent coordination (council, swarm)69├── Strategic planning (business, product)70├── Complex debugging (multi-file, subtle bugs)71├── Security audits and vulnerability analysis72├── Enterprise AI system design73├── Book writing (narrative, character development)74├── Research synthesis (multiple sources)75├── Ambiguous requirements interpretation76│77│ Token cost: $5.00/1M input, $25.00/1M output78│ Latency: Slower; most capable of the routine tiers79│ Use when: Task requires deep reasoning, creativity, or strategy8081FABLE (Hardest, escalation only) - claude-fable-5 - Use for:82├── Long-horizon agentic work where Opus already fell short83├── The single hardest step in an otherwise-Opus-routed task84│85│ Token cost: $10.00/1M input, $50.00/1M output86│ Latency: Slowest; thinking is always on (cannot be disabled)87│ Use when: Opus-tier reasoning wasn't enough — this is a ceiling, not a starting point88```8990## Automatic Routing Rules9192When processing a request, apply these rules:9394### Route to HAIKU when:95- User says: "deploy", "format", "lint", "check status", "list", "scaffold"96- File patterns: `*.config.*`, `package.json`, `tsconfig.json`97- Commands: `/mcp-status`, `/inventory-status`, `/nextjs-deploy` (execution phase)9899### Route to SONNET when:100- User says: "write", "implement", "fix", "create", "build", "test"101- File patterns: `*.ts`, `*.tsx`, `*.py`, `*.md` (content files)102- Commands: `/article-creator`, `/create-music`, `/spec`, `/generate-social`103104### Route to OPUS when:105- User says: "design", "architect", "strategy", "council", "analyze", "research"106- Keywords: "enterprise", "system", "multi-agent", "complex", "strategic"107- Commands: `/starlight-architect`, `/council`, `/author-team`, `/research`108109### Escalate to FABLE when:110- Opus already ran on the task and the result fell short111- The task is genuinely the hardest tier — long-horizon agentic work, not routine strategy112- Never route here first; Fable is a ceiling for escalation, not a default113114## Cost Optimization115116```117BEFORE (No routing):118 All tasks → Opus → $25.00/1M output tokens119120AFTER (With routing):121 Simple tasks (40%) → Haiku → $5.00/1M = $2.00122 Medium tasks (45%) → Sonnet → $10.00/1M = $4.50123 Complex tasks (15%) → Opus → $25.00/1M = $3.75124 ──────────────────────────────────────────────125 TOTAL: $10.25 vs $25.00 = 59% cost reduction126```127128## Implementation in Task Tool129130When using the Task tool, specify model based on routing:131132```javascript133// Simple task - use haiku134Task({135 subagent_type: "Explore",136 model: "haiku",137 prompt: "List all files in src/"138})139140// Medium task - use sonnet (default)141Task({142 subagent_type: "code-reviewer",143 model: "sonnet",144 prompt: "Review this PR for issues"145})146147// Complex task - use opus148Task({149 subagent_type: "Plan",150 model: "opus",151 prompt: "Design the architecture for a multi-tenant SaaS platform"152})153```154155## Command-Level Routing156157| Command | Default Model | Rationale |158|---------|---------------|-----------|159| `/acos` | sonnet | Router needs reasoning |160| `/article-creator` | sonnet | Content creation |161| `/create-music` | sonnet | Creative work |162| `/infogenius` | sonnet | Research + creation |163| `/starlight-architect` | **opus** | Strategic design |164| `/council` | **opus** | Multi-perspective |165| `/research` | sonnet | Information synthesis |166| `/spec` | sonnet | Feature planning |167| `/nextjs-deploy` | haiku | Execution |168| `/mcp-status` | haiku | Status check |169| `/inventory-status` | haiku | Status check |170| `/publish` | haiku | Execution |171| `/polish-content` | sonnet | Editing |172| `/review-content` | sonnet | Quality check |173174## Escalation Pattern175176If a haiku-routed task fails or produces poor results:1771. Automatically escalate to sonnet1782. If still failing, escalate to opus1793. If opus itself falls short on a genuinely hard task, escalate to Fable — last resort, not a retry habit1804. Log escalation for learning181182```183haiku (attempt) → fail → sonnet (retry) → fail → opus (retry) → fail (rare) → fable (last resort)184```185186## Relationship to other routing configs187188This skill is the estate's **model-facts reference** — current model IDs, context windows, and189per-token pricing. It is not the only routing config in the estate, and on task-class routing190decisions it does not have the final word:191192- **`starlight-evals/routing-table.json`** is the **evidence-derived source of truth for task-class193 routing** — which tier a task class should hit, backed by eval-round evidence and confidence194 scores rather than the judgment calls in this file. Where its `route` for a task class disagrees195 with the "Route to X when" rules above, the table wins.196- **`agentic-ops-hub/fleet/model-routing.json`** and a referenced `~/.starlight/routing.toml` are197 operational routing configs elsewhere in the estate. They route by abstract tier name (`opus`,198 `sonnet`, ...) and should resolve those names against this skill (or the evals table) rather than199 hardcoding their own model IDs or pricing.200- This skill's job stays narrow: keep the model IDs, context windows, and pricing above correct and201 current. It is not merged with the other three configs here — this section exists only so the next202 agent knows which source to trust when they disagree.203204---205206*Model Routing v1.1 - Implementing claude-flow's intelligent routing pattern. Last verified: 2026-08-28.*