Skip to content

jev-model-router (satviksinha)

Claude Code mod that asks Jev for a model tier and reasoning effort before each turn and routes every request in that turn.

ProjectbetaMIT

Overview

jev-router is a Claude Code mod that picks the model for each turn with Jev. Before a turn runs, Jev is asked two questions at once: which tier should answer and how hard it should think. Every model request in that turn then goes to the named model, and a line above the reply shows the choice, confidence and latency. A /jev command prints the full history, with reasons for anything left unrouted.

The tier ladder is haiku for trivial lookups, sonnet for straightforward work, opus for implementation with some complexity, and fable for planning, architecture and systematic debugging. The tier descriptions in a policy file are what Jev is told, so editing them changes the router's behaviour. It works with TypeSafe directly or the Vercel AI Gateway. The README warns that the router fails open, so misconfiguration shows up as silently doing nothing, and provides a check script.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich tier should answer this turn?haiku · sonnet · opus · fable
ScoreHow hard should the model think (effort level)?—

How it works

  1. The user types a prompt
  2. At turn start, Jev answers tier and effort in one call
  3. All model requests in the turn go to the chosen model and effort
  4. A status line shows the decision; /jev shows history

Strengths

  • Policy is plain text in one file
  • Supports TypeSafe direct or Vercel AI Gateway
  • Fail-open, so it never blocks a turn

Caveats

  • Requires CLAUDE_CODE_ENABLE_FUNCTION_HOOKS or it silently does nothing
  • Vercel AI Gateway needs a card on file
  • Fail-open can hide setup errors

Getting started

Put TYPESAFE_API_KEY (or AI_GATEWAY_API_KEY) and CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 in ~/.claude/settings.json, then claude --plugin-dir ~/Desktop/jev-router

At a glance

Type
Project
Status
beta
Language
TypeScript
Runtime
Claude Code mod
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

Frequently asked questions

What does Jev decide?

The model tier and reasoning effort for each Claude Code turn.

How do I change routing behaviour?

Edit the tier descriptions in TIER_CRITERIA in hooks/policy.ts.

Why does nothing seem to happen?

The router fails open; run npm run check-jev and make sure function hooks are enabled.

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
  • Claude Code mod that sets model and effort per turn and subagent from a prompt classifier: Jev by default, or Clef, OpenAI or Ollama.

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

    ProjectbetaTypeScript
  • CLI, Claude Code plugin and Pi virtual model that pick the right model per prompt from one Jev call with a complexity floor.

    PluginbetaTypeScript
  • Claude Code mod that picks reasoning effort per prompt with a Haiku judge, optionally Jev, and shows cache and context state.

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

    CLIbetaGo