LLM router
OpenSmartRoute is an open-source LLM router. Every request is read, priced against every model you allow and sent to the cheapest one that meets your quality rules, with a trace of the decision. OpenAI-compatible, self-hostable, free plan.
Free plan, no card. Open source under Apache-2.0; self-hosting is free forever.
From the benchmark
89%
less spent than always using the frontier model
On 150 real prompts the router cost 89% less than sending every one to the frontier model, at a higher judged quality (9.53 vs 9.15, two blind judges).
The whole benchmark, with the cases the router lostThe problem
A frontier model answers a one-line rewrite and a forty-page analysis at the same price. A small model is fine for the first and fails the second. Picking by hand does not scale past one application, and a hard-coded if/else on prompt length is not a strategy.
How the router answers it
Task, complexity, domain, language, whether it carries personal data - signals extracted on the way in, before any model is called.
Each model you allow is scored on quality for this task, cost for this length and latency; your policy removes the ones that may not answer. The best value wins.
The answer carries the model, the confidence, the alternatives and the cost. Report whether it was good and the next decision moves.
A real request
A short rewrite routes to a small, fast model; change the prompt to a step-by-step analysis and the same call picks a reasoning model. Same code.
from openai import OpenAI
client = OpenAI(base_url="https://opensmartroute.ai/v1",
api_key=OSR_API_KEY)
reply = client.chat.completions.create(
model="auto", # the router picks
messages=[{"role": "user", "content": "<prompt>"}],
)
print(reply.choices[0].message.content)
print(reply.model) # the model that answeredRead next
Install
pip install "opensmartroute[yaml]"Or no install at all: the hosted API answers a plain curl with the decision, and the browser extension shows the price and the router's pick under the composer of the AI chat sites you already use.
OpenSmartRoute is open source and the free plan keeps the full trace of every decision. Create a workspace, mint a key and send the request above.
Free plan, no card. Fifteen thousand decisions a month with the full trace.