jev-codex-router
Per-call router for Codex where Jev picks the model and thinking effort for every model call, including tool continuations.
Overview
Jev Codex Router sits between Codex and its model backends. Each model call, including continuations after tool calls, sends a compact decision state to Jev, which chooses a model and thinking effort together. The goal stated in the README is enough capability for the next step without wasting quota. It embeds a maintained Codex Router fork and uses LiteLLM and a local Python server to relay Responses API traffic unchanged.
The design separates what Jev sees (a bounded decision state) from what the executing model receives (the full canonical replay). It is fail-open, has a kill-switch sentinel file, a quota fallback that only activates on observed native quota exhaustion, and logs each routed turn locally for calibration. The README reports a historical simulation of about 60 percent lower cost than always using the top model on 237 turns, while stating this is not measured quota savings for the current policy. List sources note the repository is archived.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which model and thinking effort should handle this Codex call? | luna · terra · sol · astra |
How it works
- Codex sends a request to the local Codex Router on the jev/auto route
- jev_server.py builds a compact decision state and asks Jev for model plus effort
- The full replay is forwarded to the chosen model and the SSE stream relayed verbatim
- On Jev errors use a safe fallback route; log every decision locally for calibration
Strengths
- Responses stream relayed without format conversion, so tools and compaction behave natively
- Fail-open design and kill switch keep turns alive
- README reports roughly 60 percent lower simulated cost on 237 historical turns
Caveats
- Listed as archived
- Savings figure is a historical simulation, not measured quota saved
- Several local services (router, LiteLLM, Python server) to run
Getting started
Hand AGENTS.md from the repository to an AI agent to install, or follow the README setup for the embedded router and jev_server.py.At a glance
- Type
- Project
- Status
- beta
- Language
- Python
- Runtime
- Local proxy server for Codex
- Has code
- yes
- License
- MIT
- Stars
- 274
Use cases and integrations
How curated lists describe it
Uses Jev to classify each Codex turn, then applies local rules to choose the model, reasoning effort, and speed mode.
logicrw/awesome-jev-projectsPer-turn model & reasoning routing for Codex, driven by Jev (TypeSafe System One): picks the model, thinking depth and speed mode for every turn.
wh000wh000/awesome-jev-livePer-turn Codex model, reasoning, and speed-mode routing.
cobanov/awesome-jevPer-turn model & reasoning routing for Codex, driven by Jev (TypeSafe System One): picks the model, thinking depth and speed mode for every turn.
hellogumbo/awesome-jev*(archived)* - Picks the model, reasoning depth, and speed mode for every Codex turn based on how hard Jev judges it to be. The author reports about 60% lower cost when replaying 237 real turns.
MrJev/awesome-jev
Frequently asked questions
What does Jev decide?
The model and thinking effort for each Codex model call, including follow-ups after tool results.
What happens if Jev fails?
The router fails open to a safe fallback route, and a sentinel file can disable Jev entirely.
How much does it save?
The README reports about 60 percent lower cost in a 237-turn historical simulation, with the caveat that this is not measured quota savings.
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.
ProjectbetaTypeScriptGo CLI model router that uses one Jev analysis to recommend a model, harness and effort level, then selects deterministically.
CLIbetaGoLocal bridge where Jev selects model and reasoning effort for Codex Desktop and CLI, with a Windows service and cache-aware routing.
CLIbetaTypeScriptmacOS wrapper for Codex that lets Jev pick the model and reasoning effort for a thread, then pins that route.
ProjectbetaClaude Code and Codex plugin where Jev judges each turn for model routing, delegation, evidence search and compaction.
ProjectbetaTypeScript