| name | model-router |
| description | Choose the right model and effort per task phase and apply it when dispatching subagents — strong model + high effort for planning and review, a cheaper model + lower effort for mechanical execution. Use when a task splits into plan / execute / review phases or you're spawning subagents. |
| model | inherit |
| effort | medium |
| allowed-tools | ["Read","Task"] |
| triggers | ["which model","route this","plan then implement","dispatch a subagent"] |
| tags | ["models","effort","routing","subagents","cost"] |
Model Router
Match the model and effort to the work. Reasoning-heavy phases deserve a strong
model at high effort; mechanical phases run cheaper and faster. This cuts cost
and latency without hurting quality where it matters.
The map
Defaults live in ${CLAUDE_PLUGIN_ROOT}/config.json under models.roles.
Read it first; treat it as the source of truth and let the user override.
| Phase / role | Model | Effort | Why |
|---|
| plan | strong (e.g. opus) | high | Design, trade-offs, architecture — errors here are expensive. |
| execute | mid (e.g. sonnet) | medium | Follow a plan, write code — throughput matters. |
| review | strong (e.g. opus) | high | Catch what execution missed; judge freshly. |
| cheap | small (e.g. haiku) | low | Formatting, renames, extraction, boilerplate. |
effort scales how much the model deliberates. Use inherit to keep the
session's current setting when a split isn't warranted.
How to decide
- Is the task uniform and small? Don't split — do it in the session model
at
inherit. Routing has overhead; only pay it when phases genuinely differ.
- Does it separate into plan / execute / review? Route each phase to its
row above.
- Is a chunk purely mechanical (rename across files, extract a constant,
apply a format)? Send it to
cheap.
Applying it to subagents
When you dispatch a subagent for a phase, request that phase's model + effort.
State it explicitly, e.g. "planner: strong model, high effort". If the runtime
rejects a model or effort value, surface the exact error — do not silently fall
back to a weaker setting, since that changes the quality contract.
Pair with other skills
- Under agentic-loop, route the fix-planning step to
plan and the
apply step to execute or cheap.
- Log the routing choice as a
decision via memory-keeper if it's a
standing convention for the project ("Review always runs on opus/high").
Guardrails
- Never downgrade the reasoning phases to save money if correctness is at
stake — a wrong plan or a missed review costs more than the tokens saved.
- Never upgrade mechanical work to a heavy model — it's slower for no gain.
- Respect explicit user model choices over these defaults, always.