Skip to main content
Product · LLM Routing

LLM routing that picks the best model for the task

Send model="auto": each request is classified for its task, narrowed to the models that clear the quality bar, and served by the one that wins on your objective.

Routing playgroundrecorded 2026-09-10
Objective
01Classified
summarisation
complexity 0.21
02Qualified
20 models
cleared the quality bar for the task
03Routed to
Deepseek V4 Flash (fp4)
$0.09 in, $0.18 out per 1M
Decisiveness0.36

The real classifier and engine over the managed pool, no model called. In production the same decision arrives before the first token and is kept by request id.

Definition

What LLM routing does

The decision of which model should answer a request, made per request on what the request asks for, rather than once when the code was written.

An LLM router reads the prompt, works out what kind of task it is and how demanding, and picks from the models that are good enough for it on what you care about most: cost, quality, latency or a balance. Without a router, every request goes to the one model someone chose at design time, and the bill is set by the hardest request in the workload rather than the actual one.

Inferbase runs the router inside the gateway, so the decision is served, not recommended. Each pick rests on benchmark evidence for the task, an unmeasured model is treated as unknown rather than assumed, and the decision is returned with the response and kept by request id. Routing is one of the four capabilities behind the gateway, beside the catalog, security and observability.

Your applications · SDK unchanged

Inferbase Gateway

One OpenAI-compatible API, with failover, rate limits and budgets behind it.

  1. knowledge

    Catalog

    Curated creators, verified variants, benchmark evidence where it exists, live prices.

  2. decision

    Routing

    A prompt classified, a model chosen on your objective, the decision kept.

  3. policy

    Guardrails

    Which models may serve, guardrails at three doors, which tools an agent may call.

  4. record

    Observability

    Decision, verdicts, tokens, cost and latency per request; usage and an audit log.

Providers · your keys or the managed catalog
Savings

What LLM routing saves

Routing sends every request to the right-sized model for the task, which is what turns a flat frontier-model bill into one that follows the actual work.

where the requests wentMeasured, 2026-07-06
model=auto100 promptsmixed difficulty
DeepSeek V4 Flash29%generation, Q&A, classification$0.21
Qwen 3.5 9B26%Q&A, rewriting$0.08
GPT-OSS 120B12%classification, extraction$0.09

23 more prompts went to five other models, the priciest of them held back for the hardest generation work. 10 stayed on the baseline, where nothing cheaper cleared the quality bar.

Every rate above is what that model costs per million tokens on the route that served it. What a workload saves depends on what it was paying before, which is a question about your bill rather than ours.

Measured on 100 mixed-difficulty prompts, 2026-07-06. Quality equivalence is projected from benchmark evidence, not judged output by output. We publish no savings percentage: what a workload saves depends on what it pays today, which Routing Preview measures on your own traffic.

Mechanism

How LLM routing works

Three stages before the first token: classify the task, score the models that qualify on your objective, serve the winner with two fallbacks ready.

01 · Classify

“Compare RAG and fine-tuning for a support bot.”

task
analysis
complexity
high
objective
balanced
02 · Score
  • DeepSeek V4 Pro0.91
  • Qwen 3.5 122B0.84
  • Llama 3.1 70B0.78

ranked on your objective

03 · Serve
DeepSeek V4 Pro

streaming

fallback
Qwen 3.5 122B
your code
model="auto"
Objectives

One prompt, four LLM routing objectives

The objective you set changes which model wins on the very same request. Set it on the key, override it on any request.

one prompt

Summarize this 20-page provider contract and flag risky clauses.

routes to
DeepSeek V4 Pro
analysis score
0.91

Highest analysis score of the eligible models. Worth the spend when a missed clause is expensive.

Quality bar

Only models that clear the bar for the task

Price comes after quality, never instead of it. Three presets set how high the bar sits; the evidence is benchmark scores for the task.

Three presets

Strict, standard and permissive set the floor on the task score. A preset that leaves no qualifying model relaxes one step to the next.

Unknown is unknown

A model with no measurement for the task does not qualify on guesswork, and a variant is never assumed to match the model it was derived from.

Context fit

A candidate has to fit the request's tokens in its servable window; the router checks the window the host actually serves, not the advertised one.

Structured output

A request with a JSON schema goes only to a model whose deployment honors it; tool calls only to a model that supports them.

Quality bar · summarisation · preset standardexample values
Model A
in
Model B
in
Model C
in
Model D
out
A model with no measurement
unknown

The fainter marks are the other two floors, permissive lower and strict higher. Price is compared among the models marked in; a preset that leaves nobody in relaxes one step, and the relaxation is on the decision record.

Integration

Turn on LLM routing with one line

Keep the OpenAI SDK, your prompts and your request shape. Point the base URL at Inferbase and set the model to auto; name a model again to pin it.

stays the same
  • Your OpenAI SDK
  • Your prompts and messages
  • Streaming
  • Request and response shape
what changes
  • base URL
    api.inferbase.ai/api/v1/inference
  • model
    gpt-4oauto

Two values. That is the whole integration.

Explainability

Every LLM routing decision explained

Every route leaves a record you can read: the task, the candidates, their scores, the winner and how clearly it won.

route #a3f2c1audit record
task analysisobjective balanced
deepseek-v3chosen0.91
qwen2.5-72b0.84
llama-3.1-70b0.78
mistral-smallnot evaluated for analysisunknown
decision deepseek-v3  ·  fallback qwen2.5-72b
  • Every decision is auditable

    The task, the eligible models, their scores, and the winner are all on the record. Nothing happens in a black box.

  • Unknown is an honest answer

    A model we have not evaluated for a task is marked unknown, never assumed as good as the model it came from.

  • You stay in control

    Set the objective, scope the eligible models, or pin one outright. Routing executes; the choice is yours.

Fetch any decision by request id →

Control

Routing decides; the scope is yours

Every control lives on the API key and changes without a deploy: what the router may choose from, how high the bar sits, when to stay put.

Pin a model

Name a model instead of auto and it is served as named, with the same receipts, limits and failover and no routing fee.

Model pool

A list of catalog models the router chooses from and nothing else, per key.

Scope

The managed catalog, only what your own connected provider keys reach, or both. A model reachable both ways runs on your key when you asked for your keys.

Session affinity

A conversation stays on the model that already holds it unless a switch is worth the cost. On by default; off per request.

Per request

The objective and the session are set on the key and can be overridden on any single request.

Routing preview

Try prompts on the card above with no model called, or upload past traffic in the dashboard and see what the router would have chosen.

Key · prod-apiexample values
model
autoper request
objective
balancedper request
quality preset
standard
scope
managed catalog + your keys
model pool
any qualifying model
session affinity
onper request

Changed in the dashboard or the API; the next request uses the new settings, no deploy.

The category

How LLM routers compare

Routers recommend, proxies follow your rules, frameworks make you host it. Inferbase decides, serves and keeps the record, in one API.

InferbaseOpenRouterLiteLLMPortkeyNotDiamondRouteLLM
Picks the best model per requestFirst-partyVia NotDiamond add-onBeta tiers you map by handNo, rules you defineYesStrong vs weak only
Routes and serves in one APIYesYesProxies via your providersProxies via your providersNo, you run itNo, self-hosted
Per-request decision auditYesNoLogs and cost trackingDeep logs and tracesRecommend-sideBuild your own
Nothing to self-host or calibrateYesYesNoHosted, rules are yoursYesNo
Model breadthCurated catalog of open modelsHundreds of models100+ providers, your keys1,600+ models, your keysYour chosen poolTwo models

Read the full comparisons →

FAQ

Frequently asked questions about LLM routing

What LLM routing is, how it differs from a gateway, a load balancer and a fallback, and how this router decides.

Put intelligence in the middle.

One gateway in front of every model, with your policies applied and every decision on record. Start with $5 of credit and 5,000 routing decisions a month, no card required.