jev-codex-router
Per-turn model & reasoning routing for Codex, driven by Jev (TypeSafe System One): picks the model, thinking depth and speed mode for every turn.
by @0xLogicrw
What it does
jev-codex-router in the Jev ecosystem. Per-turn model & reasoning routing for Codex, driven by Jev (TypeSafe System One): picks the model, thinking depth and speed mode for every turn. Agent plumbing where probabilities beat regex on model output. Fork the pattern, not the prose.
Tags in the wild: agent tooling, routing, agents. The repo has install steps, env vars, and recent commits if you are deciding whether to depend on it.
How Jev is used
Exposes a curated jev/auto model inside Codex Router. A local jev_server.py compacts decision state, asks Jev one Choice over fifteen model and effort pairs, then replays the canonical Codex request on the selected native route. Responses stream verbatim; tool and reasoning behavior stay native.
Setup: Requires an existing Codex Router install, LiteLLM sidecar, and TYPESAFE_API_KEY. README documents AGENTS.md for AI-assisted setup, kill switch file, and ~/.codex/codex-router/jev-router-live.jsonl decision logs.
Caveats: Historical simulation figures in README are not measured Codex quota savings. Fail-open uses a logged technical fallback route when Jev errors; read BACKTEST.md before trusting headline percentages.
Routing at the Codex edge
Codex sends each turn through Codex Router on port 4202. Native models hit the ChatGPT backend; jev/auto forwards through a forwarder where Jev sees only bounded decision state while the executing model still receives the full canonical replay including tools and compaction handoff.
The design keeps Responses in and Responses out with no format conversion, so tool calls and reasoning blocks behave like stock Codex.
Fail-open and operational bypasses
Jev errors keep the turn alive on a safe fallback route. A sentinel kill switch file skips Jev instantly. When native quota is exhausted, README documents a Codex-dry tandem that swaps models until native usage returns.
FAQ
- How is this different from jev-judge-mcp?
jev-judge-mcp exposes a judge tool for evidence you supply. jev-codex-router is traffic control: it picks which Codex model and thinking effort run the next native call.
- Does every route use Fast speed?
README states the policy forces standard speed on every pair, overriding an incoming Fast setting, so Jev optimizes capability per turn rather than a fixed cheap model.
Related products
Hand-picked neighbors with rich profiles or overlapping tags.