Skip to content

jev-router

Local pass-through proxy for Claude Code and Codex where Jev picks a model tier per human turn and only moves up within a session.

ProxybetaApache-2.0

Overview

jev-router (dirien) is a local pass-through proxy for Claude Code (Anthropic Messages) and the Codex CLI (OpenAI Responses). When you write a new message, the router asks Jev which tier the work needs and sends the session to a fast, balanced or frontier model, optionally with a fourth max tier. Requests go upstream unchanged except for the model, credential and unsupported fields, and responses including SSE stream back byte for byte.

It decides only on human turns and only moves up within a session, because prompt caches are per model and switching mid-task costs more than it saves; the README cites research that a stronger model inheriting a weaker model's half-done transcript recovers only part of the quality gap. Setup asks which models to use (Claude-only by default, with options for Fable or Ollama Cloud), takes a TypeSafe or OpenRouter key (validated with one call costing about $0.00003), and can run the router in the background. It needs only Node 22+, with no runtime dependencies. The README warns that the unscoped npm name belongs to a different project.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich model tier does this turn need?fast · balanced · frontier · max

How it works

  1. Run npx @ediri/jev-router setup
  2. Claude Code or Codex sends requests to the local proxy
  3. On each human turn, Jev picks a tier
  4. The router only moves up within a session
  5. Requests are forwarded and responses streamed back unchanged

Strengths

  • Preserves prompt caches by never downgrading mid-session
  • No runtime dependencies
  • Works with existing Claude login

Caveats

  • Anthropic does not support routing Claude Code to non-Claude models via gateways
  • Requires a TypeSafe or OpenRouter key
  • Use the scoped package name

Getting started

npx @ediri/jev-router setup, then run claude

At a glance

Type
Proxy
Status
beta
Language
TypeScript
Runtime
Node local proxy
Has code
yes
License
Apache-2.0

Use cases and integrations

How curated lists describe it

  • Pass-through model router for Claude Code and Codex CLI that picks a model tier per human turn with Jev, TypeSafe AI's decision model

    logicrw/awesome-jev-projects
  • Pass-through model router for Claude Code and Codex CLI that picks a model tier per human turn with Jev, TypeSafe AI's decision model.

    hellogumbo/awesome-jev
  • Local pass-through proxy for Claude Code and the Codex CLI that asks Jev which model tier each human turn needs and only moves up within a session, so prompt caches survive. No runtime dependencies.

    MrJev/awesome-jev

Frequently asked questions

What does Jev decide?

Which model tier each human turn needs.

Why only move up?

Switching models mid-session discards the prompt cache and can hurt quality.

Do I need an Anthropic key?

No. Claude Code keeps using your own login.

Related projects

  • jev-router★ 593

    Per-turn model routing for Claude Code and Codex: wraps the real CLI and lets Jev send simple turns to fast models and hard ones to strong.

    ProxybetaJavaScript
  • TypeScript/Bun launcher that asks Jev which model and reasoning effort each Codex, Claude Code or Pi turn should use.

    ProjectbetaTypeScript
  • Go CLI model router that uses one Jev analysis to recommend a model, harness and effort level, then selects deterministically.

    CLIbetaGo
  • Claude Code and Codex plugin where Jev judges each turn for model routing, delegation, evidence search and compaction.

    ProjectbetaTypeScript
  • Claude Code, Claude Desktop and Codex plugin where Jev reads a task and ranks live models and reasoning effort by quality, speed and cost.

    PluginbetaTypeScript
  • Local OpenAI/Anthropic-compatible proxy where one Jev call picks the model route and thinking level for each coding-agent turn.

    ProxybetaGo