reasoning-router
Router that asks Jev or another classifier how much reasoning effort each coding-agent step needs, without breaking the prompt cache.
Overview
reasoning-router lets one strong model handle both quick edits and hard debugging by having a classifier pick the reasoning effort for each step of a coding session. It ships as an OpenCode plugin, a Pi extension (Claude models), and a local proxy for Codex CLI or any Responses/Messages client. The chosen effort is added as an OpenAI configuration_update item or an Anthropic effort-only system message so earlier context and the prompt cache stay intact. It succeeds opencode-jev-router.
Jev is the default classifier, but the project deliberately avoids depending on any one provider: Cloudflare Clef, Laya, Kev, OpenAI Decisions and others are supported. If the classifier is slow or unavailable, the request runs at a fallback effort (high by default). In the authors' SWE-bench Verified runs on GPT-6 Astra, Jev-routed effort solved every task fixed high effort solved, with 52% fewer output tokens on a short Flask fix but only 5-7% on harder Django and pytest issues; the README stresses these are selected examples. Status is alpha.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | How much reasoning effort does this step need?(inferred) | low · medium · high |
How it works
- Intercept the agent's next model request
- Ask the classifier which reasoning effort the step needs
- Append the effort as a configuration update, preserving the cache
- Forward to the upstream model; on classifier failure use the fallback effort
Strengths
- Saved up to 52% output tokens on an easy task in the authors' runs
- Provider-agnostic classifier choice, including local models
- Prompt cache preserved
- Logs metadata only
Caveats
- Alpha status
- Savings on hard tasks were small (5-7%) and samples are few
- Codex's own effort setting is ignored while routed
Getting started
REASONING_ROUTER_CLASSIFIER_API_KEY=<typesafe-key> REASONING_ROUTER_UPSTREAM_BASE_URL=https://api.openai.com/v1 REASONING_ROUTER_UPSTREAM_API_KEY=<openai-key> npx @reasoning-router/proxyAt a glance
- Type
- Proxy
- Status
- prototype
- Language
- TypeScript
- Runtime
- OpenCode plugin, Pi extension, local proxy
- Has code
- yes
- Has tests
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Per-step reasoning effort for coding agents, picked by a classifier, without breaking the prompt cache. OpenCode plugin, Pi extension, and a local proxy for Codex CLI.
hellogumbo/awesome-jevAsks a classifier, Jev by default, how much reasoning each step of a coding session needs, so one model handles quick edits and hard debugging; an OpenCode plugin, a Pi extension and a local proxy for Codex CLI. Successor to opencode-jev-router.
MrJev/awesome-jev
Frequently asked questions
What does Jev decide?
The reasoning effort level for each step, for example low for a rename and high for debugging a race condition.
Does it need Jev?
No; Jev is the default, but Clef, Laya, Kev, OpenAI Decisions and others can be used.
What if the classifier fails?
The request still runs at the fallback effort, high by default.
Related projects
Cost-, cache- and quota-aware LLM router that classifies each turn with a Jev-class model, prices every route, and checks cheap answers.
ProjectprototypePython- 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.
ProjectbetaTypeScriptHost-agnostic routing layer that picks model, effort and provider per round for coding harnesses from trajectory evidence.
ProxybetaTypeScriptLocal router for Claude Code and Codex that has Jev assess each new task, then pins a policy-chosen model and effort for the conversation.
ProxybetaTypeScriptLocal-first, outcome-aware model router for coding harnesses that picks a capability tier per task with Jev and learns from history.
ProjectprototypeRust