CODEX SIFT
Model router for the Codex CLI
Each user turn goes to flash, craft or forge before Codex bills it. On twelve live prompts that cut estimated quota 53.7% versus always-forge.
Results
53.7% less quota on twelve prompts
Live Jev classified twelve representative Codex prompts into flash, craft or forge. Estimated quota fell from 16.2 to 7.5 against an always-forge baseline. The report measures routing cost. Answer quality is out of scope.
Estimated Codex quota, 12 prompts
Always-forge baseline
every turn on gpt-5.6-sol
16.20
Sift routed
flash + craft + forge lanes
7.50
Measured by npm run e2e:report with live Jev answers. It measures routing and quota efficiency against the baseline. It does not claim answer quality. Read the full report.
12 / 12
turns classified by live Jev
0 degraded
11/12
landed on the expected lane
policy expectation
418 ms
average Jev latency
in this run
4 · 5 · 3
flash · craft · forge
lane mix
Lane usage per prompt
Gray is the always-forge cost (1.35). Blue is what the routed lane used.
- flash · gpt-5.6-luna
- craft · gpt-5.6-terra
- forge · gpt-5.6-sol
How it works
A decision layer before Codex spends the turn
you
codex-sift
Codex TUI
model=sift
Sift proxy
127.0.0.1 · Jev + policy.yaml
Upstream
chatgpt.com/backend-api/codex or api.openai.com
Intercepts the Responses call
Codex has no hook that changes the model before a turn is billed. Sift starts a loopback Responses proxy and launches Codex with process-local -c overrides. TUI, sessions and sandbox stay native.
Asks Jev six atomic questions
On every user turn Sift asks Jev for task_kind, difficulty, needs_reasoning, needs_planning, high_stakes and cross_cutting. Typed signals come back in about 300 ms. Jev never writes code or picks a model.
Maps signals with policy.yaml
YAML rules turn those signals into flash, craft or forge. If Jev times out or the key is missing, Sift fails open to on_jev_down (default craft) and marks the decision degraded.
Rewrites model and effort only
Only model and reasoning.effort change. Your ChatGPT or API-key login is forwarded upstream. Tool-loop continuations stay pinned to the chosen lane.
What is not routed
- Tool-loop continuations of the same user turn
- codex-auto-review and compact/review prompts
- Codex housekeeping that is not a /responses call
- Invocations with -m / --model pointing at a real model
Sift is Codex-only. It is not an MCP server and does not patch ~/.codex/config.toml. Pin another model in /model and routing pauses until you pick Sift again.
Quick start
Install, set up, then run Codex through Sift
Install with npm install -g codex-sift, run codex-sift setup to assign models to flash, craft and forge, then start a session. Arguments match codex.
Install from npm, then assign a model to flash, craft and forge.
# recommendednpm install -g codex-siftcodex-sift setup# or without a global installnpx codex-sift setupnpx codex-siftFAQ
Questions about Codex Sift
- What is Codex Sift?
- Codex Sift is a model router for the OpenAI Codex CLI. It sends each user turn to the flash, craft or forge lane before Codex bills the turn.
- How does Codex Sift choose a model?
- On every user turn Sift asks TypeSafe Jev for typed signals such as task_kind and difficulty. Your policy.yaml maps those signals to a lane. First matching rule wins.
- Does Codex Sift change the Codex TUI?
- No. Sift launches Codex through a loopback model_provider. Sessions, tools and sandbox stay native to Codex.
- How much quota can routing save?
- On twelve live Jev prompts in reports/e2e-routing.md, estimated quota fell from 16.2 to 7.5 versus an always-forge baseline, a 53.7% cut. That measures routing cost, not answer quality.
- Who built Codex Sift?
- Codex Sift was built by Roman Meclazcke (github.com/romanmeclazcke, x.com/romanmeclazcke_, linkedin.com/in/roman-meclazcke) and is released under the MIT license.
- How do I install Codex Sift?
- Install from npm with npm install -g codex-sift, then run codex-sift setup. You can also use npx codex-sift without a global install. The package is at npmjs.com/package/codex-sift.
Next step
Install Sift and keep the Codex TUI
Stop spending your strongest model on “explain this file”. Add the decision layer in front of Codex, then check the difference with codex-sift report. Built by Roman Meclazcke.