Skip to content

Install ​

text
/plugin marketplace add AqueGen/model-routing

Then enable the plugin:

text
/plugin install model-routing@model-routing

(or toggle it in the /plugin menu, or add "model-routing@model-routing": true to enabledPlugins in ~/.claude/settings.json).

For local development: clone the repo and /plugin marketplace add /path/to/model-routing (or claude plugin marketplace add /path/to/model-routing from a shell).

Requirements ​

  • Claude Code with plugin support (agents, skills, hooks).
  • The plugin ships a Claude Code mod. It provides the automatic default for bare dispatches, the routing modes with their band buttons, the one-time migration of the old dispatch log and the cost line above the prompt (which appears after the session's first subagent). Mods need Claude Code 2.1.287 or later in the terminal, and 2.1.286 or later in the Desktop app; the plugin was tested on 2.1.330. Mods are off under disableAllHooks, under --safe-mode and under an organization's allowManagedModsOnly; under disableAllHooks and allowManagedModsOnly the rest of the plugin stays loaded (skills, commands, agents, MCP servers). In Desktop WSL sessions plugins are not available at all, so the whole plugin is absent there. Under disableAllHooks and allowManagedModsOnly the skill and the agents still work, but the default, the routing modes, the migration and the cost line do not run. Dollars are Claude API list prices, as in the dispatch report.
  • node 18+ on PATH - used only by the dispatch counter and /model-routing:stats. The routing itself (skill, agents) works without node; if node is missing you lose stats, nothing else, and the stats command says so instead of printing nothing.
  • The tier ladder recognizes the current Claude families (fable/opus/sonnet/haiku). A future model family shows up in stats as not tier-comparable rather than silently skewing the numbers.
  • Status: validated in daily use (Windows, opus/fable sessions). The tokens mode parses Claude Code transcript files, whose format may evolve - if it breaks, stats degrade to an explanatory message, not wrong numbers. Issues welcome.
  • Continuing a stuck agent uses SendMessage when the harness provides it; where it is absent the skill falls back to re-dispatching with the packaged state. Neither path is a hard requirement.
  • What "read-only" means here: scout, surveyor, reviewer, task-reviewer and test-runner block the file-edit tools (Edit, Write, NotebookEdit) at the tool level via disallowedTools. Bash (needed to run tests and inspect repos) and MCP tools remain available and could in principle mutate state - that boundary is behavioral (prompt rules), not a sandbox. Scout deliberately uses a denylist rather than a tool allowlist so a connected code-graph MCP server stays usable (an allowlist silently hides every MCP tool).

Turn it off or remove ​

The enabledPlugins entry in ~/.claude/settings.json named above, or the /plugin menu, is where the plugin is toggled. The dispatch log at ${CLAUDE_PLUGIN_DATA}/dispatches.jsonl (~/.claude/plugins/data/<id>/), with dispatches-legacy.jsonl beside it if an older version's log was moved there, can be deleted any time to reset the stats; a missing file just means zero. Uninstalling the plugin deletes the log too; claude plugin uninstall --keep-data keeps it.

MIT License.