← all repositories
CommonstackAI/UncommonRoute

This proxy cuts your AI agent bill by half without touching code

UncommonRoute is a local proxy that stops coding agents from sending every request—even typo fixes—to the most expensive frontier model.

UncommonRoute
Not currently ranked — collecting fresh signals.
star history

What it does UncommonRoute runs locally as a drop-in proxy for Claude Code, Cursor, Codex, or the OpenAI SDK. It classifies every incoming request as simple, medium, or complex using three local signals—metadata, embedding, and structural analysis—then forwards it to the cheapest upstream model that can plausibly handle the task. The result is lower API spend without pinning an entire conversation to a single model tier.

The interesting bit The router isn’t a black box. It exposes a dashboard that explains every routing decision—complexity class, confidence, signal readout, cost—and lets you rate decisions as too strong or too weak. Those ratings train a thin local overlay on top of the base classifier, so the router adapts to your specific traffic without overwriting its core model or leaking data to a cloud service.

Key highlights

  • Per-request granularity: each agent step is routed independently, so a single session can bounce between lightweight and frontier models.
  • Explainable routing: inspect complexity, confidence, chosen model, and cost for every request in a local dashboard.
  • Local feedback loop: rate decisions and train a personal overlay locally; roll back anytime if the adaptation goes sideways.
  • Hard spend caps: set per-request, hourly, or daily API ceilings; hit the limit and it falls back to the cheapest available tier instead of failing.
  • Benchmarked cost savings: on a 100-case SWE-bench Verified split, the trained router matched Opus-only task completion (75 vs. 74 solved) while cutting realized API cost by 53%.

Caveats

  • Routing latency and compute overhead depend on your hardware, local runtime assets, and cache state; the project offers no single guaranteed overhead figure and recommends benchmarking your own environment.
  • The proxy ignores standard OPENAI_API_KEY and ANTHROPIC_API_KEY environment variables; you must register credentials explicitly before it will route traffic.
  • When upstream pricing is unknown, it routes conservatively, which can nudge requests toward more capable (and more expensive) models than strictly necessary.

Verdict Worth a look if you run coding agents daily and suspect you’re burning API budget on requests that don’t need a frontier model. Skip it if you already have a rigid model-tier policy or prefer a single model for every session to keep debugging simple.

Frequently asked

What is CommonstackAI/UncommonRoute?
UncommonRoute is a local proxy that stops coding agents from sending every request—even typo fixes—to the most expensive frontier model.
Is UncommonRoute open source?
Yes — CommonstackAI/UncommonRoute is open source, released under the MIT license.
What language is UncommonRoute written in?
CommonstackAI/UncommonRoute is primarily written in Python.
How popular is UncommonRoute?
CommonstackAI/UncommonRoute has 683 stars on GitHub.
Where can I find UncommonRoute?
CommonstackAI/UncommonRoute is on GitHub at https://github.com/CommonstackAI/UncommonRoute.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.