How does a Jev router work?
A Jev router asks Jev, before a model runs, which model, tool or skill the next turn needs, and sends the turn there. Jev returns one typed answer with a confidence, your code decides what that confidence allows, and the turn goes to the cheapest option that can do it. This page covers how that works, why routing down and back up can cost more than not routing, and 16 routers people have built.
Updated 2 Oct 2026 · by Made with Jev
In short
- A router is one Choice question over the options that exist right now. The answer picks the model, the effort, the tool or the skill.
- It only saves money if the decision stays outside the conversation. A router that hands control back to a large model makes that model re-read everything.
- After routing works, the bill moves to the work that still needs a model that writes. That share is the number to tune.
- Published figures are narrow. Treat routing accuracy as unproven and run any router in shadow mode first.
How does a Jev router work?
Every router here does the same four things. It builds the list of options that exist this turn: the models you can afford, the tools that are installed, the skills that apply. It sends Jev the state of the task and one question over that list. Jev returns the winning option with a probability for each. Your code then applies a threshold and sends the turn on.
| Step | Who does it | What it returns |
|---|---|---|
| Build the menu | Your code | The models, tools or skills available now |
| Ask the question | Jev | A winning option and a probability per option |
| Apply the threshold | Your code | Route, or fall back to the default model |
| Run the turn | The chosen model | The work |
The split matters. Jev reports belief and certainty; the threshold is business logic you own. A low-confidence answer is a signal that the task does not separate the options, and the safe response is the default model, not a guess. The call itself is covered line by line in how to use Jev.
Why model routing cost more than it saved, and what Jev changes
Routing has been tried for years and mostly disappointed. One reason is a cost that does not appear on a pricing page. N01ennn’s walk-through of the arithmetic sets a larger model at $5 per million input tokens and $25 output, a smaller one at $3 and $15, and sends the easy sections to the smaller one before returning to the larger. On an assumed split of 0.65 million context tokens, 0.12 million generated and 0.23 million more produced inside that output, the guide reports that staying on the larger model costs roughly two thirds of the routed path.
The reason it gives: when control returns to the large model it has to read the whole context again, and rebuilding that cache is the dominant term. The split is the author’s assumption, not a measured run, so read it as an argument, not a result.
What follows is the useful part. A decision model that is never part of the conversation does not load history, does not generate tokens and leaves no cache to rebuild. The decision happens beside the loop and returns a typed value. That is the difference between a router built on Jev and a router that is simply a cheaper model. OpenRouter describes its own Jev router as cache-aware, which makes cache behaviour the first thing to check in any router you pick.
Jev router builds, by what they sit in front of
Routers for Claude Code and Codex
The coding agents most people already run. Each one asks Jev which model, and for Codex which reasoning effort, the next turn needs, and sends it there.

GitHubRouting and model choice
jev-router
Routes each Claude Code task to the cheapest model that can do it.
Pratyush Garg
457GitHubRouting and model choice
jev-router (skill)
A Claude Code and Codex skill that picks the model for a prompt.
heyman333
1GitHubRouting and model choice
Jev Codex Router
Jev picks the model and the thinking effort for every Codex turn.
Natoshi
275Cesar Favero
@cesaremuszka
botei o jev no codexrouter, sinto o trabalho muito mais otimizado, vou criar um harness personalizado para o codexrouter, sinto que da pra fazer muitas melhorias nesse fluxo o jev por enquanto no codexrouter está com poucas funções
XRouting and model choice
Jev inside CodexRouter

SkillRouting and model choice
switchloom
Deterministic model routing for coding agents, with a skill for Codex.
Instructa
1Routers that pick from many providers
OpenRouter's own router and the ones built on top of it. These choose from a catalogue of models, so cache behaviour and failover matter as much as the pick.
OpenRouter
@OpenRouter
Introducing typesafe/jev-router: a cache-aware model router powered by Jev and @typesafeai The Jev Router picks the best model and reasoning effort for each request, balancing quality, speed, and cost. Here's how it works 👇🏻
XRouting and model choice
Jev Router on OpenRouter
GitHubRouting and model choice
pi-jev-router
A Pareto-optimal OpenRouter router for Pi, decided by Jev.
Philipp D. Dubach
13GitHubRouting and model choice
pi-jev-router (win4r)
Model routing at task boundaries, with caching and failover.
Chao Qin
12Duncan
@ephraimduncan
Built a model router with Jev by @typesafeai. Jev decides what model fits your request best and the request is sent to that model.
XRouting and model choice
A model router on Jev
Riley Brown
@rileybrown
Building an agent with model router powered by Jev.
XRouting and model choice
An agent with a Jev model router
Routing the tool, the skill or the route
The same call, pointed at something other than a model: which skill runs, which tool is loaded, which route an agent takes before it spends anything.

GitHubRouting and model choice
jev-harness-router
One batched call picks model tier, tools, skill and effort for each turn.
Joaquin Marcoff
3
SkillRouting and model choice
jev-agent-skill-router
Routes which agent skill runs, with typed Jev decisions and confidence.
Dewaldt Huysamen
22GitHubRouting and model choice
jev-tool-router
Picks the MCP tool for Codex, instead of listing them all.
jackbarunz
8John Yeo
@johnyeo_
Jev made our Slack agent 2x faster ⚡️ Our agent can be quite slow because it needs to read skills and figure out which tools to call. We used @typesafeai's new model to speed this up by first passing it the prompt and classifying the best skill, tool and params to use before handing it to the agent
codila
@0xCodila
Jev + GrokBot is the best AI agent system I’ve built in my life It just made my setup CHEAPER and FASTER than what 95% of people are running... setup takes literally 7 minutes: prompt → GrokBot → Jev decision → GrokBot execution → result step 1 → open @typesafeai , create API key (keep it off chat paste) step 2 → tell Grok Bot: store TYPESAFE_API_KEY in the secure field step 3 → prompt Grok Bot: install typesafe-sdk on Agent Computer + smoke system_one (Choice) step 4 → tell Grok Bot: build the usage lab (router, dry-run, config, logs) - or clone Github below step 5 → add skill jev-usage-router: before browser / research / retry / extra bot → call the router, honor action step 6 → stay shadow first, read logs, then active when you trust it - kill switch: bypass jev or enabled: false step 7 → flip active: GrokBot obeys route - Jev decides - GrokBot executes - humans control irreversible actions the result: Jev + GrokBot the best and fastest agent running directly on your computer rn, I’ve already tested it on routine tasks - and the results are genuinely incredible You can come up with endless ways to use Jev + GrokBot - but the most important thing is to install it as soon as possible Copy this 2028 setup, explore my repo below - then read the full Jev deep dive ↓
XRouting and model choice
A usage router for Grok Bot
What a Jev router costs and saves, in the figures published
| Figure | Value | Scope |
|---|---|---|
| Price of the decision | $0.042 per million input tokens, output free | TypeSafe’s published price |
| Routing latency | 154 ms against 860 ms | 200 synthetic classification cases |
| Codex routing, backtest | About 60% less than the largest model | The router’s own backtest |
The second half of the bill is the half most people do not measure. Gipp’s priced event desk takes 20,000 events a day through a Jev decision layer: 14,000 are dropped as noise, 4,700 become logs, 800 earn a draft and 500 go to human review. Only about 4% reaches a writing model. Jev costs $0.84 of a $29.04 day. He is clear that the bill figures are published prices with assumed rates, not an invoice, but the shape is the point: once the decision is cheap, the bill follows the share that still needs a model that writes. See Jev pricing for what people actually paid.
What a Jev router has not proved yet
Routing accuracy. Nobody has published how often a Jev router picks a model that was good enough, with a set someone else can re-run. The latency and backtest figures above are real and narrow.
Whether the pick was the right one. A router that always chooses the cheap model will look efficient until the task fails. Measure cost per completed task, not cost per call.
Switching models mid-session. Changing model resets the cache. The builds that take this seriously change model only at a task boundary, keep an exact cache of past decisions and log every failover, so the routing can be checked afterwards.
How to build a Jev router, in the order that fails least
- Start with one fork. Which model handles this step is the usual first one.
- Describe each option by what it can do. Criteria text carries the decision. A label such as “research” carries nothing.
- Run it in shadow. Let Jev answer while the old path still runs, log the disagreements, and read them before you switch it on.
- Set a deadline. An answer that arrives late counts as no answer, and the default model takes the turn.
- Keep irreversible actions with a person. Routing picks who works. It does not decide what is allowed.
The same layer in a team of agents is on Jev agent orchestration, and the single-agent version is on the agentic harness page. For routing inside a coding agent, see Jev with Claude Code, and for the context side of the same saving, see Jev compaction. To have your coding agent build the router for you, start from the Jev routing prompts.
Where the Jev router figures come from
The arithmetic and the priced desk are two long guides; the other three describe the same routing from other angles.
NO1ennn
@N01ennn
x.com/i/article/2103…
Guidex.com
Jev in the Agent Loop: A Complete Guide to Decision-Layer Automation
N01ennn's long guide: mark the decisions in an agent loop, move them off the frontier model, and measure the result. Its best part is the arithmetic for why routing down and back up can cost more than never routing.
Gipp 🦅
@gippp69
x.com/i/article/2103…
Guidex.com
Jev Desk: How to Build a 24/7 AI Agent That Decides for Free and Only Pays to Write
Gipp prices a four-lane event desk and shows where the bill ends up: in the share of events that go to a writing model. Includes an audit lane for the ignored events and a daily bill script. The bill figures are assumed rates, not invoices.
Guideyoutube.com/@NidhiSinghAttri
Jev and herdr: routing between models
Nidhi Singh’s setup: one terminal, three AI subscriptions, and Jev picks the model for Claude Code, Codex and Cursor.
OpenRouter
@OpenRouter
Jev by @typesafeai is now on OpenRouter, in beta. Jev is a System One model. Instead of generating text, it takes your app's state plus a typed question and returns a typed decision with a probability attached. There is no JSON prompting, parsing layer, and nothing to validate against.
Guidex.com
Jev on OpenRouter
Jev is live on OpenRouter in beta: app state and a typed question in, a typed decision with a probability out.
Harry Tandy
@HarryTandy
TypeSafe founder Diogo Almeida: "I want to automate the easy work before the hard work" In this 2-hour interview, he explains how Jev uses choices, scores, and yes/no probabilities to route work inside agent loops The guide below has 3 builds: a skill router, a codebase linter, and a retrieval reranker Watch the interview, then copy the builds below
Guidex.com
How Jev routes agents
In a two-hour interview, TypeSafe founder Diogo Almeida explains how Jev uses choices, scores and yes-or-no probabilities to route an agent.
Common questions
- What is a Jev router?
- A router that asks Jev, before a model runs, which model, tool or skill the next turn needs, and sends the turn there. Jev returns a typed answer with a confidence, and your code decides what that confidence allows.
- Why not route with a small LLM?
- A small LLM generates text you have to parse and can answer outside your options. Jev can only answer inside the options you gave it, costs $0.042 per million input tokens with output free, and never enters the conversation, so there is no context for the big model to re-read later.
- Does routing to a cheaper model always save money?
- No. One walk-through works the numbers with an assumed split and finds that sending a session to a smaller model and back to the larger one can cost more than staying on the larger model, because the larger model has to re-read the whole context when control returns. Its split is an assumption, not a measurement.
- Where does the money go once routing works?
- To the share of work that reaches a model that writes. In one priced example, 20,000 events a day shrink to 500 for human review and about 4% reach writing, and Jev costs $0.84 of a $29.04 day. Both figures are the author's, from published prices and assumed rates.
- Is there a published routing accuracy?
- No one has published one that others can re-run. The measured figures are narrow: 154 ms against 860 ms on 200 synthetic classification cases, and a backtest for a Codex router at about 60% less than always using the largest model.
Made with Jev is independent and not affiliated with TypeSafe AI. Every figure on this page is the one its author published, linked to where it can be checked.