Quick answer
- One-line definition
- Match each task to the cheapest model that can do it well
- The pattern
- Plan with the frontier model, execute with the cheap one (Claude Fable 5 plans, Claude Sonnet 5/GPT-5.6 Terra execute)
- Why it saves
- Output tokens dominate spend; routine work is the bulk of it
- Frontier vs fast (output)
- $50 vs $5 per MTok, a 10x delta
What Model Routing Is, and Why One Model for Everything Wastes Money
Model routing is the practice of sending each coding task to the cheapest model that can do it well, rather than picking one model at the start of a project and running it for everything. The frontier tier is priced for the hardest reasoning; most of the work a coding agent does is not the hardest reasoning. Paying frontier rates for routine execution is the single most common and most invisible way agentic coding budgets get burned.
The waste is structural, not incidental. Coding output is token-heavy, and output tokens are the expensive half of the meter. Run every story through Claude Fable 5 at $50 per million output tokens and a codebase-full of routine edits, tests, and renames costs the same per token as a genuinely hard cross-cutting refactor, even though a model costing a tenth as much would have produced identical routine code. The frontier model is not doing anything special on the easy work; you are just paying as if it were.
The Tiers, Their Real Prices, and What Each Is For
Routing only works if you know the roster. Both vendors ship a capability ladder, frontier, flagship, workhorse, fast, and the price gap between top and bottom is roughly 10x on output tokens. Verified prices and positioning across both CLIs (AIDEN runs both), as of July 18, 2026:
| Model | Vendor | Tier | Price (per MTok) | Context | Where it fits |
|---|---|---|---|---|---|
| Claude Fable 5 | Anthropic | frontier | $10 in / $50 out per MTok | 1M tokens (128k output) | Plan, architect, review the hard parts |
| Claude Opus 4.8 | Anthropic | flagship | $5 in / $25 out per MTok | 1M tokens | Complex day-to-day feature work |
| Claude Sonnet 5 | Anthropic | workhorse | $3 in / $15 out per MTok | 1M tokens (default) | Routine features, tests, refactors |
| Claude Haiku 4.5 | Anthropic | fast | $1 in / $5 out per MTok | 200k tokens | Mechanical edits, sub-agents, triage |
| GPT-5.6 Sol | OpenAI | frontier | $5 in / $30 out per MTok | n/a | Hard terminal-agent runs in Codex |
| GPT-5.6 Terra | OpenAI | workhorse | $2.5 in / $15 out per MTok | n/a | Default Codex executor |
| GPT-5.6 Luna | OpenAI | fast | $1 in / $6 out per MTok | n/a | Cheap mechanical work in Codex |
The prices tell you where each tier earns its place. Claude Fable 5 is the frontier: the best published SWE-bench Verified score (95.0%) and a 1M-token window that holds a large repo plus specs, but $50/MTok out and, by the catalog's own note, “overkill for routine edits” and not even Claude Code's default, you select it explicitly. Claude Sonnet 5 gives you a 1M window at $15/MTok out, the value tier for real work. Claude Haiku 4.5 is the floor at $5/MTok out, built for sub-agent fan-outs and lint-fix mechanical changes, not complex autonomous coding. On the Codex side the same ladder repeats: GPT-5.6 Sol for hard runs, GPT-5.6 Terra as the sane default, GPT-5.6 Luna for cheap volume. Full detail on each is on the models hub, with tier-picking guides for Claude and Codex.
The Delegation Pattern: Planner Drafts and Reviews, Executor Implements
Routing is not just picking a model once per task in isolation, the highest-leverage version is a delegation pattern within a single unit of work. The expensive model does the thinking that is hard to get right; a cheaper model does the typing that is not. Concretely, Fable plans, Codex or Sonnet execute, Fable reviews.
- 1
The frontier model plans (spend frontier tokens here)
Point Claude Fable 5 at the codebase and have it draft the spec: files to touch, the approach, acceptance criteria, explicit exclusions. This is exactly where its 1M-token window and best-in-class reasoning pay for themselves, a large-context spec review is a frontier-tier job. It is a small slice of the total tokens and the one place a wrong decision is expensive. - 2
A cheaper model executes (spend most tokens here)
Hand the approved spec to a workhorse: Claude Sonnet 5 on the Claude side, GPT-5.6 Terra on the Codex side, or Claude Haiku 4.5/GPT-5.6 Luna for genuinely mechanical work. Because the scope is written down, the executor gets a bounded contract, not a vague brief, and a cheaper model with a good spec beats a frontier model with a fuzzy one. - 3
The frontier model reviews (spend a little frontier again)
Bring the diff back to Claude Fable 5 and have it check the implementation against the spec: does it match, did anything out of scope change, do the acceptance criteria hold? The reviewer is not grading its own homework, and reviewing a diff is cheaper than writing it. This closes the loop without paying frontier rates for the bulk execution.
The reason this works is that the token distribution is lopsided. Planning and review are a thin layer of high-value tokens; execution is the thick layer of routine tokens. Routing puts the expensive model only on the thin layers. The mechanics of running two model families on one repo, branches, worktrees, and the shared spec that acts as the contract, are covered in using Claude Code and Codex together; this article is about which model gets which layer and why.
Your AI workspace for shipping software.
Download AIDEN free and point it at your existing Claude Code or Codex setup. No credit card, running in minutes.
Download AIDEN freeFree to start · macOS 12+ · No credit card required
The Decision Matrix: Task Type to Model
Here is the routing table in one place. Read it as a starting heuristic tuned to the current roster, not a law, your codebase gets the final vote. The rule underneath every row: escalate a tier when a wrong early step is expensive, drop a tier when the work is bounded and you review it anyway.
| Task type | Recommended model | Why |
|---|---|---|
| Hard, cross-cutting refactor | Claude Fable 5 | Tangled multi-file reasoning where one wrong step costs the run; frontier SWE-bench Verified (95.0%) earns its $10 in / $50 out per MTok |
| Spec drafting / large-context review | Claude Fable 5 | 1M-token window holds the repo plus specs; the planning-and-review layer is where frontier tokens belong |
| Complex day-to-day feature | Claude Opus 4.8 | Flagship, Anthropic's own recommended default for complex agentic coding, at half Fable's price ($5 in / $25 out per MTok) |
| Routine CRUD, tests, refactors | Claude Sonnet 5 | Workhorse with a 1M window at $3 in / $15 out per MTok; a good spec makes it as good as a frontier model on bounded work |
| Parallel bulk edits in Codex | GPT-5.6 Terra (or GPT-5.6 Sol) | Sane Codex default at $2.5 in / $15 out per MTok; escalate to Sol for ultra mode's parallel subagents on hard runs |
| Cheap / throwaway mechanical edits | Claude Haiku 4.5 / GPT-5.6 Luna | Fast tiers at $1 in / $5 out per MTok and $1 in / $6 out per MTok; plenty for renames, lint fixes, sub-agents, and triage you review anyway |
Two rows deserve a note. The frontier appears twice, refactors and spec review, because both are reasoning-bound and both are cheap as a share of total tokens; that is precisely the profile you want to spend up on. The fast tier also appears twice, Claude and Codex, because the cheapest model that clears the bar is a fine default for mechanical work regardless of vendor. When both CLIs are in play, route the story to whichever family fits and let cost break the tie.
The Cost Math, Kept Honest
The savings claim is easy to hand-wave, so here is a rough, clearly illustrative split using catalog output prices (output dominates coding spend). Assume a feature worth roughly 2M output tokens of agent work: a thin planning-and-review layer and a thick execution layer. Take the split as about 15% planning/review and 85% execution, which matches the lopsided distribution routing exploits.
Illustrative feature ~= 2,000,000 output tokens
(output prices only; verified July 18, 2026)
A) All-frontier (Claude Fable 5, $50/MTok out)
2.0M x $50 = $100.00
B) Routed (plan/review on Fable, execute on Claude Sonnet 5)
plan+review 0.3M x $50 = $15.00
execution 1.7M x $15 = $25.50
total = $40.50
C) Routed to the floor (execute on Claude Haiku 4.5, $5/MTok)
plan+review 0.3M x $50 = $15.00
execution 1.7M x $5 = $8.50
total = $23.50Routing execution to Claude Sonnet 5 takes the output bill from $100.00 to about $40.50, roughly a 2.5x reduction, and routing the mechanical slice to Claude Haiku 4.5 pushes it near $23.50, close to a 4.3x reduction, all while the planning and review stay on the frontier model. The exact multiple depends on your token split and ignores input tokens and caching, but the shape is robust: the more of your work is routine, the more routing saves, because you keep frontier rates on the thin layer and pay workhorse or fast rates on the thick one.
The Failure Modes of Routing
Routing is a lever, and like any lever it can be pulled wrong. Three failure modes account for most of the disappointment:
Routing too aggressively
Cheap model on a frontier task
Context handoff loss
How AIDEN Routes: Both CLIs, One Board, Model per Story
Routing only pays off if switching models is cheap and the handoff is enforced. That is what AIDEN is built for. It is a cockpit over the CLIs you already have, it orchestrates Claude Code and Codex side by side on one spec-first kanban board, BYO inference (your own Claude and Codex subs or keys), local-first, PR-per-story. Because both CLIs run at once, routing is a per-card choice, not a per-project commitment.
Model per story
The spec is the handoff
Worktree and PR per story
The result is that plan-with-the-expensive-model, execute-with-the-cheap-one stops being a manual juggling act across terminals and becomes the default shape of the board. Assign the planning story to Claude Fable 5, fan the execution stories out to Claude Sonnet 5 and GPT-5.6 Terra, and review on the frontier again, all in one project. If you are still choosing between the two CLIs, start with Claude Code vs Codex; the routing pattern here assumes you have answered “both.” AIDEN is free for one project and Solo is $19/mo, so you can put a real routed workflow on a board today. And once the window matters as much as the model, pair this with context engineering, the other half of getting good work out of a coding agent cheaply.