Skip to content
MrJev

jev-router

Per-turn model routing for Claude Code and Codex. Simple work goes to the fast tier and difficult work to the strong tier.

View on GitHub →

Hands-on review

A well-built local proxy that lets Jev pick the Claude or Codex model for each turn. Safe defaults, but read the privacy and compatibility notes first.

Good for

  • Claude Code or Codex subscribers who want cheaper models on easy turns without changing how they work
  • People who want to see why a model was picked: /jev-explain shows the inputs behind each decision

Watch out for

  • All CLI traffic passes through a local proxy, and each new prompt is sent to TypeSafe
  • On Linux, v0.3.0 leaves prompt logs in /tmp readable by other users (fixed on main, not yet released)
  • Ignores an existing ANTHROPIC_BASE_URL, so Bedrock, Vertex, and gateway setups aren't supported

Tested Sep 19, 2026 at 0d39e5b4922c · v0.3.0 on Node 24 in Docker (Debian), proxy tested against a mock Anthropic API

What it does

jev-router wraps Claude Code (jev-claude) and OpenAI Codex (jev-codex). It starts a small proxy on your machine, launches the real CLI pointed at it, and adds a Jev Router entry to the model picker. When that entry is selected, Jev looks at each new prompt and chooses a tier: fast (Haiku), balanced (Sonnet), strong (Opus), or an opt-in long tier. The proxy then rewrites the model in the request before passing it on to Anthropic or OpenAI.

Everything else stays native: your login, tools, permission prompts, /compact, and /resume. A status line shows which model handled the last turn, and /jev-explain renders the factors behind that decision from a saved copy of the Jev request and response.

Setup

npm install -g jev-router
echo "JEV_API_KEY=..." > ~/.jev-router.env
jev-claude

It requires Node 20.12 or newer and an existing claude login or codex login. No Anthropic or OpenAI API key is needed if you’re on a subscription. The package has a single runtime dependency, TypeSafe’s official JavaScript SDK. All 62 tests in its suite passed in our run.

Using it

We couldn’t run a full subscription session in our test environment, so we tested the part that matters most for trust, the proxy, against a mock Anthropic API with a real Jev key:

  • Routing rewrites the model as designed. A fresh prompt sent with the Jev Router sentinel reached the upstream as a concrete model from the account’s catalog. Per the code, follow-up tool calls in the same turn keep that model.
  • Explicit requests win. Starting a prompt with “use opus” sent it to Opus regardless of Jev.
  • Your own choice is respected. Picking a concrete model in /model passed requests through untouched.
  • It fails open. With an invalid Jev key, requests went through anyway and a clear log line said routing had failed. Until a tier has been chosen, it falls back to Opus, so a Jev outage costs money rather than quality.
  • The policy is conservative. Per the code and README, low-confidence answers never downgrade you, large conversations refuse downgrades that would throw away the prompt cache, and unavailable tiers step up rather than down.

The author developed and tested it on Windows against specific Claude Code and Codex versions, and notes that both CLIs’ request formats are undocumented. Expect breakage when either CLI changes, and use JEV_DUMP only while diagnosing it (see below).

Permissions and data

This is the section to read carefully, because a routing proxy sits in the middle of everything your coding agent sends.

  • Authentication is passed through untouched. We checked the code and the mock upstream: auth headers arrive exactly as the CLI sent them, and the proxy only listens on 127.0.0.1. The code doesn’t log or store them.
  • Each new prompt goes to TypeSafe. Jev receives your latest message, the current model, a rough context-size estimate, and the list of available models. Earlier conversation history isn’t sent.
  • Prompts are kept in temporary files. The last 20 routing decisions per session, including the prompt text and the full Jev request and response, are written to jev-claude/ under the system temp directory. On Linux that’s /tmp/jev-claude/, and in v0.3.0 the files were created world-readable (mode 644), so on a shared machine other users could read your prompts. macOS uses a per-user temp directory, which avoids this. Update: after we reported it, the maintainer invited a fix, and our pull request (#24) was merged on September 19. The files are now private to your user and deleted after 7 days of inactivity. The fix isn’t in an npm release yet: v0.3.0 is still the latest.
  • Debug options capture more. JEV_DEBUG logs the start of each prompt to ~/.jev-claude.log. JEV_DUMP writes complete request bodies, meaning your whole conversation and any code in it, to disk. Turn both off when you’re done.
  • It edits Claude Code’s settings temporarily. Choosing Jev Router can save it as your default model, so jev-claude restores your previous default on exit. If the process is killed hard, plain claude may complain about an unknown model until you run jev-claude again, which cleans it up.
  • Custom endpoints are ignored. The proxy always forwards to api.anthropic.com. If you reach Claude through Bedrock, Vertex, or a corporate gateway via ANTHROPIC_BASE_URL, this won’t work for you.

Maintenance

Created on September 16 and already at v0.3.0 with 43 commits, a solid test suite, and an explicit contribution process. There are a handful of open issues, including a good question about how switching models interacts with prompt caching. The maintainer responded to our report within hours and reviewed our fix carefully before merging it. MIT licensed.

Verdict

jev-router is carefully engineered. It fails safe, respects explicit choices, passes your credentials through without logging or storing them, and is open about what it sends. If you use Claude Code or Codex on a subscription from your own Mac or a single-user Linux box, it’s worth trying. On a shared Linux server, fix the temp-file permissions first (for example, set TMPDIR to a private directory). If you rely on a custom Anthropic endpoint, it’s not an option yet.

For per-turn routing inside Codex specifically, compare Jev Codex Router; for routing arbitrary LLM traffic rather than a coding CLI, see tiershift. If you want Jev as a tool your agent calls rather than a router, start with System One Connector.

See how it compares with other tools in Best Jev tools, tested hands-on.

Review updated Sep 19, 2026. Numbers quoted from the project are its author's own; we don't publish our own measurements of Jev.

More in Model Routing

JevRouter

★ 459▲ 73

BillionsBobby/JevRouter

Routes each agent step to a model, subagent, Skill, MCP tool, or CLI with one Jev Choice, requiring confirmation for risky capabilities and keeping decision receipts.

TypeScriptReviewed

jev-gateway

★ 314▲ 19

vinilana/jev-gateway

Local gateway for Codex and Claude Code that asks Jev which tool to call next and passes everything else to your usual model.

TypeScriptReviewed

Astra-Ares

★ 305▲ 7

miuuyy/Astra-Ares

Adjusts a Codex task's reasoning effort mid-run by asking Jev how hard the next step looks. Runs a patched Codex CLI and says it is a reference implementation rather than an app.

JavaScriptReviewed

Get new Jev projects every week

New Jev releases, pricing changes, and the best new projects, once a week. No spam; unsubscribe anytime.

Powered by Buttondown. See our privacy policy.