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

Status Closed — not planned
Maintainer reply None cached
Activity 2 comments · opened Jun 19, 2026 · closed Jul 31, 2026

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 2 comments on GitHub. Read the full discussion on GitHub ↗