Automatic model routing: send each task to the cheapest capable model (Haiku/Sonnet/Opus)

Open 💬 1 comment Opened Jun 19, 2026 by mkrupkin

Problem

Claude Code lets me set a model per subagent (model: haiku|sonnet|opus) and switch the main model manually, but there is no built-in way to automatically send each task to the cheapest model that can handle it. Today everything runs on whatever model the session is on, so trivial work (renames, formatting, config edits, file reads) is billed at the session model's rate.

Proposal

A built-in, opt-in "model router" that classifies each incoming task by difficulty and dispatches it to the cheapest capable tier:

  • trivial / mechanical -> Haiku
  • normal development -> Sonnet
  • hard / risky (architecture, security, ambiguous) -> Opus

With an escalation path (a cheaper tier can hand back up) and a "when in doubt, route up" default. Configurable rubric / thresholds.

Why

  • Large token/cost savings: the bulk of agentic work (search, reads, boilerplate) does not need the top model.
  • Quality preserved where it matters: hard tasks still get Opus.

Current workaround

I built this as a community plugin (tier subagents + a routing skill): https://github.com/mkrupkin/plng-mmodels - it works, but routing decisions still cost main-model tokens and there is no native token accounting. A first-class feature could classify cheaply and report savings.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗