A cost-aware router that sends each task to the cheapest model that can actually finish it — local Qwen first, Claude only when it's worth it.
68%resolved on local models
11×cheaper per resolved task
92%router classification accuracy
Python
Qwen3.6 · llama.cpp
Claude Sonnet / Opus
ROCm / Vulkan
JSONL telemetry
pytest
The problem
A capable assistant is easy to buy and hard to afford
Running every request against Claude is fast and smart, but the bill scales with volume and every keystroke leaves the building. Running everything locally on one consumer GPU is cheap and private — but a single quantized model isn't reliable on the hard ten percent, and naive "just use the big model" routing throws the cost advantage away.
I wanted one harness-agnostic interface that defaults to local inference, escalates to Claude only when a task genuinely needs it, and can prove — per task — what each routing decision cost. The constraints were real:
One AMD RX 7600 XT (16 GB) — ROCm/Vulkan, no CUDA — so model size, quantization, and KV-cache tuning are hard limits, not nice-to-haves.
Must work across harnesses (Claude Code + opencode) without bespoke logging bolted into each one.
Every routing decision has to be measurable after the fact, not guessed.
Architecture
Tiered routing, local-first inference
A task is classified, then the router picks the cheapest tier that can handle it. Local Qwen models carry the routine majority; Claude is reserved for the hard tail. Every call is logged, scored, and fed back into the routing decision.