A router I run in production. It sends every task to the cheapest engine that can pass a deterministic check, and only spends the expensive model on the work that actually needs judgment.
The fast model drafts. Plain code checks it for free. The expensive model is called only when a check fails. This runs the same four checks that live in the repo, on your click.
Ordering matters: the free steps run first, and the paid one is a last resort with no free pass of its own.
A small fast model (gpt-oss-120b) writes, classifies, extracts, or scores. Key rotation and a local gateway fallback mean it rarely stalls.
Plain code decides if the draft is good: banned phrases, length, valid JSON, a required decision line. Anything verifiable this way never reaches a model.
On a failed check, a sensitive task, or a QA sample, Claude fixes it and runs the same checks. If it's rate-limited, the best draft ships flagged unreviewed rather than dropping the pipeline.
Drag the first-pass rate to see the split on a 1,000-task mix.
A model of the split, not a usage figure. Real per-task counts live in the repo's telemetry; this slider just shows how the ordering pays off as volume grows.
The tool's own report. The paid column is the one I want small.
$ python llm_router.py stats 🚦 LLM ROUTER — load split task groq gateway claude fails % saved ---------------------------------------------------------------------- draft_outreach 12 1 5 0 72% classify_reply 19 0 4 0 83% extract_json 8 1 2 0 82% score_lead 9 0 6 1 60% ---------------------------------------------------------------------- TOTAL 48 2 17 75% → 50 calls resolved without Claude. → of those, 2 were rescued by the gateway when Groq couldn't.