0346GitHub
jev-codex-router
Per-turn Codex model, reasoning, and speed-mode routing.
0xNatoshi/jev-codex-routerREADME ↗
# Jev Codex Router
[](https://github.com/0xNatoshi/jev-codex-router/actions/workflows/ci.yml)
**Per-turn model routing for Codex, driven by [Jev](https://docs.typesafe.ai) (TypeSafe System One).**
Jev chooses a model and thinking effort together for each model call, including
continuations after tools. Every route uses standard speed. The objective is
sufficient capability for the next decision with no unnecessary quota consumption.
**Historical simulation: ≈ −60 % vs full Astra** on 237 turns under the old
policy. This is not measured Codex quota saved, nor evidence for the current
policy — protocol and limitations in [BACKTEST.md](BACKTEST.md).
Installing with an AI agent? Hand it [AGENTS.md](AGENTS.md).
This is not a fork of any router: it plugs into an existing local
**Codex Router** installation through its official extension points
(a *generic provider* + a *curated model*), so router updates never overwrite it.
## How it works
```
Codex ──▶ Codex Router (:4202)
├─ native models ──────────────▶ ChatGPT backend (your plan)
└─ "jev/auto" ─▶ LiteLLM ─▶ API forwarder
│
▼
jev_server.py (127.0.0.1:4319)
├─ compact decision state ─▶ Jev
│ └─ model + effort
│
└─ canonical Codex replay + decision
└─▶ local caller edge (shared native session)
└─▶ luna / sol / astra
```
- **Responses in, Responses out** — no format conversion; the SSE stream is
relayed verbatim, so tool calls, reasoning and compaction behave natively.
- **Two independent proj