Skip to content

decision-router

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

PluginbetaMIT

Overview

decision-router picks which of your candidate models should handle each prompt, so a rename goes to a cheap model and a deadlock investigation to a strong one. It ships as a CLI, a Claude Code plugin whose route command picks haiku, sonnet or opus and delegates to a subagent on that model, and a Pi extension with a decision-router/auto virtual model.

One Jev request asks three questions in parallel: a Choice over the candidates, the same Choice in reverse order (averaged to cancel Jev's first-option lean), and a complexity Score from 0 to 4. Code turns the score into a minimum tier, so the router never picks a model cheaper than the floor, and uses a fallback below a confidence threshold or when Jev is slow, down or unconfigured. Candidates with too small a context window or nearly exhausted quota are filtered first. On 30 labelled prompts the README reports 93% with the floor versus 73% for Choice alone, explicitly as a smoke test.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich candidate model fits this task?—
ChoiceWhich candidate fits (options in reverse order)?—
ScoreHow demanding is the work?0 · 1 · 2 · 3 · 4

How it works

  1. Filter candidates by context window and quota
  2. Ask Jev the forward and reversed Choice plus a complexity Score
  3. Apply the complexity floor and rank remaining candidates
  4. Use the fallback model on low confidence, timeout or no key

Strengths

  • Order-bias mitigation by averaging reversed options
  • Never blocks a prompt; always returns a model
  • About 300 ms per routing decision per the README

Caveats

  • Evaluation is a 30-prompt smoke test labelled by the author
  • Requires a TypeSafe key for real routing

Getting started

npm install -g decision-router (Node 22+), then decision-router pick "..."; or /plugin install decision-router@decision-router in Claude Code.

At a glance

Type
Plugin
Status
beta
Language
TypeScript
Runtime
CLI, Claude Code plugin, Pi extension
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

  • Coding agents: Claude Code plugin, Pi virtual model and CLI that pick the model for each task from one Jev call, a `Choice` over the candidates asked in both orders plus a complexity `Score` that sets a minimum tier, raising accuracy on 30 agent-labeled prompts from 73% with the `Choice` alone to 93%, with quota-aware filtering and a fallback below 0.3 confidence.

    yibie/awesome-jev

Frequently asked questions

Why ask the Choice twice?

Jev leans toward the first option, so forward and reversed answers are averaged.

What if Jev is unavailable?

The router returns your fallback model and says why.

How accurate is it?

93% on 30 labelled prompts with the complexity floor, which the author calls a smoke test.

Related projects

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

    ProjectbetaTypeScript
  • 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
  • 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
  • Claude Code plugin forked from jev-router that asks Jev how much effort each typed prompt needs and applies it to the turn.

    ProjectbetaTypeScript