Adaptive Model Copilot

One endpoint.
Every model.
A decision you can read.

ModelRouter is an OpenAI-compatible gateway with a deterministic router. ChatGPT Astra and Sol, Claude Opus, Sonnet and Haiku, Gemini 4 Argon, DeepSeek V4.1 — change your base URL, keep your client, and see exactly why each request went where it did.

OpenAI-compatibleDeterministic routingExplainable tracesLocal + Cloudflare
AstraOpenAIOpusAnthropicHaikuAnthropicArgonGoogleREQUEST INcurl $https://router.example/chat/completionsmodel: router/balancedCANDIDATESAstra · Opus · Haiku · Argonscored on cost, latency, capabilityROUTE CHOSENrouter/balanced → Claude Opuswinner: Opus (best all-round fit)FALLBACKnext best: ChatGPT AstraWHY THIS MODELBest capability fit under the cost cap.Latency inside the target band.Alternatives scored lower.TRACE

Flagship models routed today: ChatGPT Astra, ChatGPT Sol, Claude Opus, Claude Sonnet, Claude Haiku, Gemini 4 Argon, DeepSeek V4.1.

Flagship models, routed

ChatGPT Astra. Claude Opus.Gemini 4 Argon. One route.

Sol, Sonnet, Haiku and DeepSeek V4.1 sit in the same catalog. Every request is scored against the frontier, then served by whichever model fits the task, the budget, and the latency target.

OpenAI

ChatGPT Astra

Long-horizon reasoning with a million-token working memory. The model you hand the whole repository to.

Best for
Deep reasoning
Window
1M tokens

OpenAI

ChatGPT Sol

The fast frontier tier: Astra-level judgement at chat latency, built for high-volume product traffic.

Best for
Product chat
Window
400K tokens

Anthropic

Claude Opus

Careful multi-step analysis and some of the steadiest code generation in the catalog.

Best for
Analysis & code
Window
500K tokens

Anthropic

Claude Sonnet

The everyday frontier: close to Opus on most tasks, quick enough for agent loops.

Best for
Agents
Window
500K tokens

Anthropic

Claude Haiku

The small, cheap Claude tier. Classification, extraction, and routing decisions at scale.

Best for
High volume
Window
200K tokens

Google

Gemini 4 Argon

Multimodal reasoning across text, image, audio, and video with a very wide context window.

Best for
Multimodal
Window
2M tokens

DeepSeek

DeepSeek V4.1

Open-weight reasoning at a fraction of the frontier price. Strong maths, honest traces.

Best for
Cost-efficient reasoning
Window
256K tokens

Keep scrolling — the runway moves the models, not the page. Open any card for a routing sample.Tap any card for a routing sample.

The routing experience

One gateway. Many routing styles.

Point any OpenAI SDK at ModelRouter and pick a routing strategy that matches your workload — balanced, cheapest, fastest, or a custom policy you control.

Scores cost, latency, and capability together. The candidate with the best all-around fit wins.

Best composite fit

CANDIDATE SCORESAstraOpenAISolOpenAI81OpusAnthropicSonnetAnthropicHaikuAnthropicArgonGoogle0.900.501.400.350.081.15
SelectedChatGPT SolOpenAI · 81
curl https://router.example/chat/completions \
  -H "Authorization: Bearer \$MODELROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "router/balanced",
    "messages": [{ "role": "user", "content": "Summarize this thread" }]
  }'
Illustrative exampleNo API call is executed on this page.
Scene 03
Deterministic first. Smarter over time.

Two routing approaches. One Router interface.

Start with a rules-based router you can audit today. Bring in a learned ranker later behind the same interface — the static policy remains the safe fallback either way.

Deterministic

Static policy

A rules-based router that ranks providers by cost, latency, and capability. No model calls your prompt — just a decision you can audit.

Smarter over time

Learned router

A ranker trained on logged routing features, behind the same Router interface. The static policy stays the safe fallback.

RequestOpenAI-compatibleCandidatesCatalog filteredRule-based scoringCost · Latency · CapabilitySelected modelExplainable decision Static policy flowLearned router flow
Same interface

The learned ranker plugs into the same Router interface. The static policy stays the safe default whenever the learned path is unavailable.

Scene 04
Explainable routing traces

Every decision has a reason.

Every request carries a routing decision you can read: which model was scored, why it won, and what the alternatives were.

Illustrative traceA representative example, not a live request log.
REQUEST INPOLICYCANDIDATESSELECTEDavailabilitycost capcapability floor
INCOMING

Incoming request

A chat completion arrives on the single OpenAI-compatible endpoint. The router sees the model, the policy, and the request shape — not the prompt.

POLICY

Routing strategy

The request is tagged with a routing variant — balanced, cheapest, fastest, or a custom policy you configured. The same interface handles all four.

POOL

Candidate pool

The catalog is filtered to models that can serve the request. In this example the pool is four flagship models across three providers.

SCORES

How each candidate scored

Every candidate is scored against the selected policy: cost, latency, and capability fit. The scores are real numbers, not vibes.

SELECTED

Selected model

The highest-scoring candidate wins. The trace records why: the scores, the trade-offs, and what it would have taken for another model to win.

Claude Opus
91
ChatGPT Astra
74
Gemini 4 Argon
62
Claude Sonnet
48

Why this model: Best capability fit under the cost cap. Latency inside the target band. Alternatives scored lower on the selected policy.

FALLBACK

What happens next

If the winner is unavailable, the router falls back to the next-best candidate and re-evaluates. Every fallback is part of the trace too.

Fallback path
  1. →Claude Opus if availability
  2. →ChatGPT Astra if cost cap
  3. →Gemini 4 Argon if capability floor
Scene 05
Two runtimes

Develop locally. Ship to the edge.

The same codebase runs fully locally in Node with SQLite, and as a Cloudflare Worker. Develop on your machine, ship to the edge.

Same codebase, two runtimes
Scene 06
Model catalog

One catalog. Every flagship.

ChatGPT, Claude, Gemini and DeepSeek flagships are pulled from upstream providers and normalized into one catalog. Filter by capability, context window, or price per token.

ChatGPT AstraOpenAI
chattoolsjsonreasoning
Context · 1M$1.10 / $4.40
ChatGPT SolOpenAI
chattoolsjson
Context · 400K$0.45 / $1.80
Claude OpusAnthropic
chattoolsjsonreasoning
Context · 500K$1.50 / $7.50
Claude SonnetAnthropic
chattoolsjson
Context · 500K$0.60 / $3.00
Claude HaikuAnthropic
chattools
Context · 200K$0.10 / $0.50
Gemini 4 ArgonGoogle
chatimagestoolsjsonreasoning
Context · 2M$0.35 / $1.40
DeepSeek V4.1DeepSeek
chattoolsjsonreasoning
Context · 256K$0.14 / $0.56
Sample data

The rows above are illustrative examples of flagship entries. Real catalog entries are synchronized from upstream providers.

Scene 07
Security and privacy

Your keys stay yours.

Provider keys never leave the gateway. The console never renders them, and prompts are logged only when you turn that on.

Key enters the gateway

Provider API keys are stored in the gateway. The console never renders them.

Stored securely

Keys live in the gateway configuration, not in client code or environment dumps.

Masked in the console

The console shows only a masked representation. The secret is returned once and never displayed again.

Prompt logging is explicit

Prompts are logged only when you turn prompt logging on. It is not the default.

Prompt loggingOff

Prompts are logged only when this is on.

Scene 08
How it works

Three steps. Same API.

Swap the base URL in your client. Everything else — auth, streaming, tool calls — is unchanged.

01
Point your client

Set the base URL

Replace `api.openai.com` with your ModelRouter endpoint. Your existing OpenAI SDK keeps working.

from openai import OpenAI

client = OpenAI(
-    base_url="https://api.openai.com/v1",
+    base_url="https://router.example/v1",
     api_key=os.environ["MODELROUTER_KEY"],
)
02
Pick a route

Choose a routing style

Select a model by capability, cost tier, or latency target. The router scores every candidate and picks the winner with a reason you can read.

{
  "model": "router/balanced",
  "routing": { "costCap": 1.0, "latTarget": 200 },
  "messages": [{ "role": "user", "content": "Plan the next step" }]
}
03
Read the decision

See why it chose

Every response includes a routing trace: the candidates, the scores, the winner, and the fallback path. Debug without guessing.

{
  "model": "router/balanced",
  "trace": {
    "winner": "Claude Opus",
    "scores": { "Claude Opus": 91, "ChatGPT Astra": 74 },
    "fallback": "ChatGPT Astra",
    "reason": "best capability fit under cost cap"
  }
}
Scene 09
Live example

Point your client. Send a message. Read the trace.

The same OpenAI SDK call, routed through ModelRouter. The trace shows which model was chosen and why.

curl
curl https://router.example/chat/completions \
  -H "Authorization: Bearer \$MODELROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "router/balanced",
    "messages": [{ "role": "user", "content": "Say hello" }]
  }'
Illustrative exampleNo API call is executed on this page.
Response200 OK
HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "chatcmpl-9x2k4",
  "object": "chat.completion",
  "created": 1730000000,
  "model": "router/balanced",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ]
}
Routing traceexplainable
routing:
  winner: Claude Opus
  scores:
    Claude Opus: 91
    ChatGPT Astra: 74
  fallback: ChatGPT Astra
  reason: best capability fit under cost cap
Scene 10
Roadmap

Small steps, stated plainly.

Every phase keeps the same seam: one router interface, one trace format, one catalog. Nothing below is presented as finished before its tests pass.

Phase 1In progress

Static gateway

OpenAI-compatible routes, a synced catalog, deterministic policy, explain traces, and dual runtimes.

Phase 2Next

Learned router

A ranker trained on logged features, behind the same Router interface. Static policy stays the fallback.

Phase 3Planned

Edge and cloud

Latency and throughput probes, durable health, and bandit-style exploration with replayable seeds.

Phase 4Planned

RouterLM

A small routing model that reads the prompt, with the static path kept as the safe default.

In progressNextPlanned
Scene 11
Straight answers

Straight answers.

Common questions about the ModelRouter gateway, routing, and runtimes.

No. ModelRouter speaks the OpenAI API. You change the base URL and keep the same SDK, the same streaming, the same tool-calling pattern.

For each request it scores every candidate model against your chosen policy — cost, latency, capability fit — and picks the winner. The decision, the scores, and the runners-up are all in the trace.

Yes. The same codebase runs fully locally in Node with SQLite, and as a Cloudflare Worker. Develop on your machine, deploy to the edge when you are ready.

Only in the gateway. The console never renders them, and prompts are logged only when you turn prompt logging on. Signing out revokes every device.

Scene 12
Ready when you are

One endpoint. Every model.

Start on the playground, or sign in to the console and wire up your own routing policy.