NEWTry the playground — no API key required
Skip to content
Intelligent routing

Send every request to the right model.

A transparent policy engine that decides, per request, which model should answer — based on task, constraints, cost, latency and live availability.

01Architecture

How a request moves through the engine.

Seven stages, each deterministic and observable. Decision overhead is designed to stay in the low milliseconds; provider latency dominates.

  1. 01~1ms
    Ingress

    Authenticate key, enforce quota and spending limits.

  2. 02~1ms
    Classify

    Infer task type and complexity from the request.

  3. 03<1ms
    Filter

    Drop models that miss capability, context, price or latency constraints.

  4. 04<1ms
    Score

    Rank survivors by your strategy’s quality, cost and latency weights.

  5. 05provider
    Dispatch

    Call the selected provider, streaming tokens back immediately.

  6. 06as needed
    Fallback

    On 5xx, 429 or timeout, retry down the configured chain.

  7. 07async
    Trace

    Record decision, usage, latency and cost for analytics.

Stage timings are design targets, not measured benchmarks.

02Strategies

Compose policies from simple primitives.

Preferred model

Always try a named model first when it meets the request’s constraints.

Fallback chain

An ordered list of alternates used when the preferred model fails or is ineligible.

Cost-based

Choose the cheapest model that clears the quality floor for the task.

Latency-based

Choose the fastest time-to-first-token, with an optional hard budget.

Task-based

Pin task types — code, extraction, long-context — to specific models.

Availability fallback

Health checks remove degraded providers before a request is ever sent.

03Simulator

See exactly why a model was chosen.

Adjust the request and policy. The same scoring function that would run in the gateway re-ranks the catalog instantly.

Request
55% · floor 73
6,000 tok
Strategy

Weighs quality, cost and latency evenly.

Simulate provider outage
Code generation2 filtered20 scoredCodestral
Codestral
Mistral · selected via scored
Blended
$0.45/M
TTFT
270ms
Eval
78
Ranked candidatesscore
  • Codestral
    76.7
  • 2Claude Haiku 5.5
    66.8
  • 3GPT-6 Luna
    66.5
  • 4Mistral Small 4
    65.1
  • 5Gemini 4 Hydrogen
    64.4
  • 6Mistral Medium 3.5
    61.9
  • 7Claude Sonnet 5.5
    60.6
  • 8Gemini 3.8 Flash
    57.7
2 models excludedshow
  • Llama 3.3 70BBelow quality floor (73)
  • Command R7BBelow quality floor (73)
01 Complexity 55% → quality floor 73.
02 Strategy “Balanced” weights Q 0.4 · C 0.3 · L 0.3.
03 Codestral scored highest (76.7) of 20 eligible models.

Scores computed live from the sample catalog. Latency and quality inputs are demo values.

04Resilience

Fallbacks that just happen.

When a provider errors, rate-limits or times out, the request moves down your chain. The client sees one response — and the trace records every attempt.

Fallback chain

Toggle which models fail, then send a request to watch the chain resolve.

  1. Preferredidle
    Claude Sonnet 5.5
    Anthropic · 560ms
  2. Fallback 1idle
    GPT-6.2 Sol
    OpenAI · 520ms
  3. Fallback 2idle
    Gemini 4 Argon
    Google · 1.30s
Waiting for request…
05Configuration

Policy as code.

Set a default policy in the dashboard, then override any field per request.

request.routing
1{2  "model": "auto",3  "routing": {4    "strategy": "balanced",            // balanced | cost | latency | quality5    "preferred": "claude-sonnet-5-5",6    "fallbacks": ["gpt-6.2-sol", "gemini-4-argon"],7    "constraints": {8      "max_price_per_million": 5.0,9      "max_latency_ms": 2000,10      "require": ["tools", "json"]11    },12    "task_rules": {13      "extraction": "gpt-6-luna",14      "code": "codestral"15    },16    "retry": { "on": [429, 500, 502, 503], "max_attempts": 2 }17  }18}
Next step

Start with one model. Route when you’re ready.