
RouteWise is a token-efficient routing agent for coding queries: instead of sending every request to an expensive remote model, it routes through 5 layers — cache, a rule-based complexity router, a free local model (Ollama, qwen3:8b), a heuristic confidence verifier, and only then a paid remote model (Fireworks AI, gpt-oss-120b) — spending real tokens only on Layer 5, and only when local's answer genuinely can't be trusted. On a 50-query real-world baseline (mix of easy/medium/hard coding tasks, run against live Ollama and live Fireworks, not simulated), RouteWise resolves 72% of queries for zero tokens, with 100% answer accuracy and 96.4% routing accuracy — the router correctly identifies which queries actually need the paid model instead of guessing. The verifier layer is what makes this safe: it checks local's answer for refusals, placeholders, broken syntax (via real AST parsing, not string heuristics), and missing code before accepting it — anything that fails gets escalated to remote, and remote is given local's failed attempt so it can fix it rather than starting from scratch, cutting the fix-up cost further. Every routing decision, token cost, and confidence score is logged and inspectable — nothing is a black box. The full baseline, per-query results, and known limitations (including tradeoffs deliberately left unresolved, like completion-token truncation on the hardest "from scratch" tasks) are documented directly in the README.
13 Jul 2026