Model Router  ·  Documentation  ·  Previous: Guide  ·  Next: Architecture

# Model Router FAQ: questions about the Claude Code model router Short answers about Model Router 0.2.4, the Claude Code plugin with the id `model-router`. ## What is Model Router? Model Router is an open-source Claude Code plugin that tells the main session to hand work to agents and keeps the model and effort Claude names for each subagent, teammate and workflow agent within your limits. It fills in a missing effort, gives a call that names no model a level from what its agent can do, raises a call to a rule's level, routes around a failing model, and runs a call Claude marks as a redo one step higher. It is an independent Apache-2.0 project by Cris Nahine, not made or endorsed by Anthropic, and needs Claude Code 2.1.329 or later and Python 3.9 or later. ## Does it pick the model, or does Claude? Claude does, from a table the plugin gives it at session start: Haiku at `medium` for finding, reading and listing, Haiku at `high` for writing and fixing code, figures and documents to a brief that settles the approach, and Opus at `high` for a judgment call with an open approach or no check to run, such as a design, a review or a rewrite. Sonnet and Fable have no row; a subagent runs on one when a redo climbs there, a rule sets its level or the call names it. The review task is why the third row is Opus: in a round of 24 runs on a review with 10 seeded defects, the complex level on Sonnet at `high` solved 0 of 6 and on Opus at `high` 4 of 6 (one-sided Fisher p 0.030), and Opus costs more per run ($0.65 against $0.28 at the mean, with `delegation` at `strict`). A call that names no model runs on its agent's own model, else `CLAUDE_CODE_SUBAGENT_MODEL`, else at the level its tools put it, and the plugin never reads the brief ([guide](GUIDE.md#who-decides-the-model)). ## Does it make Claude use subagents? It tells Claude to, and where the mod runs it checks. With `delegation` at `strict` (the default) or `on`, the session-start note opens with a paragraph that says this session coordinates and agents do the work, and that an agent's report is a claim: work no check ran on gets a review by a second agent before it counts. The mod adds the same text to the Agent tool's description. The mod adds up the characters the main conversation's own Read, Grep, Glob, Edit, Write, NotebookEdit, Bash, PowerShell, WebFetch and WebSearch calls sent and got back, one call counting for 4,000 at most. When the total passes 8,000, and again at each further 8,000, Claude gets a reminder with that call's result. An agent starting, or a new turn, sets the total back to 0; a fork or the web-fetch agent does not count as an agent starting. Under `strict`, the next work call is refused once the total is 8,000 or more, until an agent starts. An Agent call that comes back refused or failed with no agent started also ends the refusals until an agent starts or a new turn begins, and so do 5 rounds of refusals with no agent started. Claude is told with the next result of its own work call or of the failed Agent call, unless an agent starts or a new turn begins first. With `on`, Claude gets the paragraph and the reminder, and nothing is refused. Nothing is reminded or refused while the session can't start an agent, with routing off, or without the mod, and `off` removes the paragraph, the reminder and the refusal, leaving the session-start note as the table alone ([guide](GUIDE.md#delegation)). The price of `strict` shows on small jobs. In a round of 50 runs on 5 quick tasks with an Opus session and a plain prompt, every setup solved 10 of 10, and a session without the plugin cost 34% less per solved task than the plugin under `strict` with its reviews on Sonnet (26% less per run at the median), since each quick task paid for a brief and a report on top of the work. With `delegation` off the plugin started no agent in 10 runs and cost 13% more per run at the median than a stock session on the same tasks (20 runs). No round here measured a long coordinating session or the correctness of its output, which is what `strict` is for. Set `delegation` to `off` for small jobs done in the main session, or to `on` to keep the paragraph and the reminder without the refusal ([the rounds](BENCHMARKS.md#decision-rounds)). ## What happens when a subagent gets it wrong? Claude marks a redo by starting the call's `description` with "Redo:". The redo runs above the run it redoes: one effort step up while that run was below `high`, else on the next stronger model, which starts one effort level below the run it redoes and never below `medium`, inside your cap and floor. A workflow stage is never redone ([guide](GUIDE.md#redo)). ## Can I trust work a cheaper model did? Haiku at `high` writes only work whose brief settles the approach, and Haiku at `medium` finds, reads and lists. The session note asks Claude to send work with an open approach, such as a rewrite or a design, and work with no check to run, such as a review, to Opus at `high`. A failed check or a gap in a report is redone one step up: more effort first, then the next model (Haiku at `high`, then Sonnet, Opus, Fable). Before a turn ends, the Stop check asks Claude once for the check of work an agent changed that nothing checked: the tests, a type check or a linter, or a recompute for figures. For work with no check to run (a document, an analysis, code no test covers) it asks for a review by `model-router:reviewer`, which reads the files themselves, and what it finds wrong goes back to the writer as a redo. With `min_tier` set to `sonnet` in `/config`, no subagent the router routes runs on Haiku, except one an environment variable pins. [TESTING.md](TESTING.md) has the measured results. ## Does it cost anything? The plugin is free and makes no model call of its own; the models it runs bill to your plan or API account as usual. The check before a turn ends costs one more turn when it asks. Each hook starts Python, 53 to 56 ms on Python 3.13 and 69 to 72 ms on Apple's Python 3.9.6 at the median ([PERFORMANCE.md](PERFORMANCE.md)), and [BENCHMARKS.md](BENCHMARKS.md) holds the cost and quality results. On five quick tasks with an Opus session and a brief sent as it is, a stock session cost 34% less per solved task than the plugin at `strict`, the default, with its reviews on Sonnet (26% less per run at the median), and with `delegation` off the plugin cost 13% more per run at the median than a stock session ([the rounds](BENCHMARKS.md#decision-rounds)). ## What does it add to the context? A session-start note of 1,622 characters with no option set (`strict`), holding a paragraph on delegation and the table above (1,489 with `on`, 687 with `delegation` off). The mod also adds it to the Agent tool's description, with a form of 523 characters in the Workflow tool's, plus the descriptions of its `route` skill and five agents. Claude also gets one line when your prompt names a model, when a check is due before a turn ends, after a model error, a mid-run model swap or a redo with nothing stronger left, and, without the mod, on each call it rewrites. It adds nothing to a subagent's brief, and `claude plugin details model-router` shows what it adds to every session. ## Does anything leave my machine? The plugin sends nothing anywhere: it opens no connection and makes no network call. What it adds to Claude's context, such as the session note and its reminders, goes to your model provider with the conversation, as do the briefs Claude writes for agents. Its own state stays in its data folder, and its ledger keeps model names, levels, tokens and cost estimates, never a prompt or description ([SECURITY.md](SECURITY.md)). ## Which models does it use? The aliases `haiku`, `sonnet`, `opus` and `fable`, which Claude Code resolves for your provider, or, where the mod runs and your provider's alias runs an older model, the family's newest full ID, except on Amazon Bedrock's Mantle endpoint, where the alias is sent as it is. `max_tier` caps the strongest one and `min_tier` sets the weakest, though neither moves a model `CLAUDE_CODE_SUBAGENT_MODEL`, `CLAUDE_CODE_SUBAGENT_MODEL_FORCE` or `CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL` pins. `/model-router:models` shows which are usable here and which are capped, below your floor, blocked or routed around ([guide](GUIDE.md#configuration)). ## What happens without Python, or on an older Claude Code? Without Python 3.9 or later on `PATH`, its hooks do nothing and its commands print one line saying why. Claude Code still runs the role agents on the models their definitions name, and the mod still holds a model a call names to `max_tier` and `min_tier`. Claude Code 2.1.323 to 2.1.328 refuse to load the plugin, 2.1.271 to 2.1.322 don't check the version it needs, and older versions can't load it, so update Claude Code first. ## How do I turn it off? Set `routing_mode` to `off` in `/config`: it changes no call and adds no session note or check, but still keeps its records, and `/model-router off` leaves calls as they are for this session only, where the mod runs. Set `verify_gate` to `false` to drop only the check before a turn ends and the lines about unchecked work and files an agent's shell changed, `delegation` to `off` to drop only the delegation text, reminder and refusal, or give one agent `"route": false` in your own `~/.claude/model-router.json`. To unload it, run `claude plugin disable model-router@claude-code-model-router` ([guide](GUIDE.md#configuration)). ## How do I see what it did? Where the mod runs, a line under the prompt shows the mode, the cap and floor, this session's calls and how many the router changed or ran as redos, and `/model-router` prints it with no model turn. `/model-router:usage` shows the calls per agent, how many the router changed, their levels, the models they ran on and, where the mod runs, Claude Code's cost estimate, and `/model-router:models` shows each model's state. `/model-router:route ` says what a call would run on and why ([guide](GUIDE.md#commands)). ## Does it change the main conversation's model? Only when you pick a setup. When a new session starts below the setups Model Router recommends for the session that plans and delegates (Opus or Fable at `medium` effort or higher, or Sonnet at `high` or higher), the mod asks once, before your first prompt, and a pick runs Claude Code's `/model` and `/effort`, which also make it your default for new sessions. It never switches by itself, since a switch re-reads the whole conversation uncached. `Don't ask again`, `/model-router check off` or `session_check` set to `off` in `/config` stops the question ([guide](GUIDE.md#the-session-check)).