Jev Codex Router: model and reasoning selection per call
A local Codex router asks Jev to choose the next model and reasoning effort while forwarding the complete conversation to that model.
Public routing code and current policy documentation were inspected on October 1, 2026. Jev receives bounded decision state; the selected model receives the full canonical replay. The router includes fallback behavior and a local kill switch. Its approximately 60% savings figure is a historical simulation over 237 turns under an older policy, not measured current Codex quota savings, so it is not presented as an outcome for this implementation.
# Jev Codex Router
Contributing? See [CONTRIBUTING.md](CONTRIBUTING.md),
[SECURITY.md](SECURITY.md), and the [release checklist](docs/RELEASING.md).
[](https://github.com/0xNatoshi/jev-codex-router/actions/workflows/ci.yml)
**Per-call 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 repository is a self-contained monorepo. It embeds the maintained
**Codex Router fork** under `router/` and connects Jev through its generic-provider
and curated-model extension points. No second Git checkout, submodule, or hidden
source clone is required. The imported fork and its provenance are documented in
[ROUTER_FORK.md](ROUTER_FORK.md).
## 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