Model or dataset
CommonstackAI/UncommonRoute avatar
CommonstackAI/UncommonRoute

UncommonRoute reads its own cost savings two different ways

Automatic LLM router — 82% cost savings, 79.4% accuracy, 93.4% pass rate. Drop-in OpenAI proxy.

700 stars30 forksPythonMIT

At a glance

What is it?
A local Python proxy that classifies each request and forwards it to a cheaper model. Its summary line claims 82 percent cost savings, its comparison table claims 53, and neither explains where the 93.4 percent pass rate comes from.
Who is it for?
Treat UncommonRoute as a local cost experiment rather than a settled default. Before pointing a real client at port 8403, confirm three things for yourself: which savings figure your own workload resembles, where the feedback overlay lives and how to roll it back, and whether the upstream you choose is a gateway run by the project's own owner.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 101 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 5, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Two savings numbers sit in the same README

The summary line that sits above the README advertises 82% cost savings, 79.4% accuracy and a 93.4% pass rate. Further down the same page, a two column table compares Opus-only against the trained router on a held-out 100-case split of SWE-bench Verified: 74 / 100 tasks solved at $54.73, versus 75 / 100 at $25.66, which the table renders as a 53% saving. Nothing in the page reconciles the two sets of figures. A 93.4% pass rate has no counterpart in the only metric on display, which is tasks solved. The headline result is one task out of a hundred, a margin no error bar in the text addresses, and the numbers come from TwinRouterBench, a separate repository, while this repository ships a `bench/` directory and a `router/benchmark_seed.json` file that the text never ties back to the 75.

Port 8403 is configurable in .env and pinned in every client recipe

The sample environment file treats the port as a setting:

bash
# Option 1: OpenAI direct
# UNCOMMON_ROUTE_UPSTREAM=https://api.openai.com/v1
# UNCOMMON_ROUTE_API_KEY=sk-...

# Option 2: Commonstack (multi-provider gateway)
# UNCOMMON_ROUTE_UPSTREAM=https://api.commonstack.ai/v1
# UNCOMMON_ROUTE_API_KEY=csk-...

# Option 3: Local (Ollama, vLLM, etc.) — no key needed
# UNCOMMON_ROUTE_UPSTREAM=http://127.0.0.1:11434/v1

# --- Proxy settings ---
# UNCOMMON_ROUTE_PORT=8403

Every client recipe further down hardcodes that default instead. Claude Code reads the bare root while the OpenAI SDK, Codex and Cursor all read `/v1`, so changing `UNCOMMON_ROUTE_PORT` leaves the documented exports aimed at the wrong socket, and no command rewrites them. Note also that one of the three upstream choices points at `api.commonstack.ai`, the gateway belonging to the same owner that publishes this repository, while the third runs entirely on your own machine with no key at all.

Three signals, and the one that needs downloaded assets

The signal table prices two of the three inputs as cheap. Metadata covers conversation structure, tool use and context depth. Structural looks at text and conversation complexity, stays inactive unless needed, and is shadow-tracked otherwise. The embedding signal runs a BGE classifier over the request, recent agent state and metadata, with a KNN fallback when it is uncertain, and it carries the only runtime caveat in the table: it depends on local runtime assets and cache state. The packaging follows from that. Base dependencies pull sentence-transformers, scikit-learn, xgboost, numpy, httpx, uvicorn and starlette, package data ships `router/model.json` and `data/v2_splits/seed_embeddings.npy`, and the macOS setup line is `brew install pipx libomp && pipx ensurepath`, with libomp named as a requirement of the trained classifier runtime. The prose that introduces the table stops mid word, after `The router then weighs capabiliti`, so the fusion rule the signals vote into is not written down.

The newest tag and the working tree both say 0.7.21

The three newest tags, v0.7.19, v0.7.20 and v0.7.21, were all published on the morning of 2026-05-07, roughly an hour apart. `pyproject.toml` also reads `version = "0.7.21"`, and the last push to the default branch is dated 2026-06-26. Anything installed straight from main therefore reports the same version string as the newest release while carrying about seven weeks of commits that no tag covers, and there is no version suffix to tell the two apart. The project is not archived and the push date is recent, so the usual staleness warnings do not apply. What the tags show instead is a burst pattern: three releases in one morning, then nothing new for months of continued work on the branch.

The v2 extra repeats three base dependencies at a lower floor

The base dependency list already requires scikit-learn>=1.4, sentence-transformers>=2.7 and xgboost>=2.0. The optional group named v2 lists those same three packages and pins sentence-transformers at >=2.2, a weaker floor than the one an ordinary install already enforces. So the extra introduces no package that is not already required and cannot raise the version constraint, and a resolution that pulls both ends up with the stricter bound and a duplicate requirement line. The remaining extras are unremarkable by comparison: textual for the tui group, and build, pytest, pytest-asyncio, ruff and twine for dev. The console entry point is a single function, `uncommon_route.cli:main`, which is why subcommand behaviour lives entirely behind the `uncommon-route` name rather than in separate executables.

Feedback labels train an overlay with no named rollback path

The dashboard lets you rate a routed request as `too strong`, `just right` or `too weak`, and states that those labels train a thin local overlay on top of the base classifier without touching the base model, that training happens locally, and that the overlay can be rolled back anytime. None of the three subcommands walked through in the setup flow, `init`, `doctor` and `serve`, is described as that rollback, and no variable in the sample environment file names an overlay, a model path or a checkpoint. Spend caps are described the same way: per-request, hourly and daily API limits that the dashboard tunes, with no matching budget setting in `.env.example`. The one command that prints a URL is the dashboard server itself:

bash
uncommon-route serve
# -> http://localhost:8403/dashboard/

So the policy surface a reader can inspect from the outside is a base URL and an OpenAI model name.

Claude Code is handed a placeholder token for localhost

Pointing Claude Code at the local proxy takes two exports, and the second one is a literal placeholder:

bash
export ANTHROPIC_BASE_URL="http://localhost:8403"
export ANTHROPIC_AUTH_TOKEN="not-needed"

The OpenAI SDK path uses the same proxy under `/v1` and asks for a model name rather than a real model:

python
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8403/v1")
resp = client.chat.completions.create(
    model="uncommon-route/auto",
    messages=msgs,
)

Cursor and Codex need only the base URL, and OpenClaw is reached through the plugin directory in the repository root, which points at openclaw.ai. The routing examples map `"hello"` and a README typo fix to `simple`, a failing test to `medium`, and a distributed scheduler to `complex`, with each class going to a different tier. The highlights table also offers `auto`, `fast` and `best` as policy names, yet no client recipe shows a request selecting between them, which leaves the policy switch as something set inside the dashboard rather than at the call site.

TELEMETRY.md sits in the root and outside the setup flow

The repository root carries a `TELEMETRY.md` file next to `.env.example`, `README.zh-CN.md` and the LICENSE, and the highlights table stresses that routing runs locally with no extra hop through a cloud routing service. The setup walkthrough says nothing about telemetry in any of its steps: `init` is described as handling connection setup, saving credentials and configuring a client, and `doctor` as a health check you can run anytime. Whether telemetry is off by default, opt-in, or limited to the dashboard is not stated in the text that describes setup. The credentials path has the same gap. `init` saves keys, the sample file tells you to `cp .env.example .env`, and pyproject records the author as Anjie Yang, yet no document text here names the file the keys land in or the permissions it gets.

Editorial conclusion

Treat UncommonRoute as a local cost experiment rather than a settled default. Before pointing a real client at port 8403, confirm three things for yourself: which savings figure your own workload resembles, where the feedback overlay lives and how to roll it back, and whether the upstream you choose is a gateway run by the project's own owner. The routing idea is sound and the packaging admits how heavy it is. The one line summary above it is not that honest.

Frequently asked questions

Does UncommonRoute send my prompts to a third party service?

The routing decision is made on your machine, and the proxy forwards each request to whichever upstream you configured: OpenAI direct, the Commonstack gateway at api.commonstack.ai, or a local runtime such as Ollama or vLLM that needs no key. The choice of upstream is yours, but whichever one you pick still receives your prompts, and the default gateway in the sample environment file belongs to the same owner as this repository.

What does UncommonRoute need before it can classify a request?

Three local signals: conversation metadata, a BGE embedding classifier with a KNN fallback when uncertain, and a structural pass that activates only when needed. The embedding row is the one with a runtime caveat, depending on local assets and cache state, which is why the macOS setup line installs libomp alongside pipx and the package ships router/model.json plus data/v2_splits/seed_embeddings.npy.

How much cheaper is UncommonRoute than running Opus for everything?

On the held-out 100-case SWE-bench Verified split in TwinRouterBench, the comparison table reports 75 of 100 tasks solved at $25.66 against 74 of 100 at $54.73 for Opus-only, a 53% saving. The summary line above the README advertises a different set of figures: 82% savings, 79.4% accuracy and a 93.4% pass rate, with no explanation of how those were measured.

Which Python versions does UncommonRoute support?

pyproject.toml requires Python 3.11 or newer, and the classifiers list 3.11, 3.12 and 3.13. For a pinned interpreter the setup path is pipx install --python python3.12 uncommon-route, and inside an existing virtualenv it is python3 -m pip install uncommon-route. On Ubuntu and Fedora the pipx route needs apt or dnf plus pipx ensurepath.

Can I undo the routing feedback I give UncommonRoute?

Ratings of too strong, just right or too weak train a thin local overlay above the base classifier, and the text states the base model is never overwritten and the overlay can be rolled back anytime. No rollback command, overlay path or checkpoint file appears among init, doctor and serve, and no variable in .env.example names the overlay.

Official sources

  1. CommonstackAI/UncommonRoute on GitHub
  2. Issues
  3. License: MIT
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/commonstackai-uncommonroute.svg)](https://hysenlabs.com/projects/commonstackai-uncommonroute)