# Model routing for Codex
Give Codex a model-routing skill that works **with or without Jev**.
By default, your current Codex LLM assesses the coding task. It uses a shared registry to recommend a model and effort. Optional Jev mode replaces that assessment with one direct TypeSafe request. No Jev key or separate routing subscription is required for the default.
## Install
Paste this into Codex:
```text
Use skill-installer to install the model-routing skill from
https://github.com/codejunkie99/codex-model-routing/tree/main/skills/model-routing
```
Or install from a reviewed checkout with Python 3:
```sh
git clone https://github.com/codejunkie99/codex-model-routing.git
cd codex-model-routing
python3 install.py
```
The installer copies only the skill into `$CODEX_HOME/skills` (default `~/.codex/skills`) and refuses to overwrite an existing copy. Start a new Codex turn and invoke `$model-routing`. Node.js 22+ is required for the helper. There are no npm dependencies. On Windows use `py -3 install.py` if `python3` is unavailable.
## Use it
```text
$model-routing Choose an available model for this coding task, explain the
selection, and use a native subagent if one is available: implement cursor
pagination across my REST endpoint, React list and regression tests.
```
The skill uses the current LLM unless you explicitly request Jev:
```text
$model-routing Use Jev to assess this task and select an available model.
```
Optional Jev requires `TYPESAFE_API_KEY` in the execution environment. Enter credentials privately; never paste them into a task or commit them. The adapter calls TypeSafe directly and does not use OpenRouter. Jev errors do not silently fall back to the LLM.
## How it decides
Both modes assess intent, reasoning demand, scope and criticality. The LLM supplies a short structured assessment; Jev supplies Choice, Score and Noul answers. Ordinary code applies the same provisional policy and checks availability, score evidence and estimated cost.
| Example | Typical model | Advisory effort |
|---|---|---|
| Mechanical edit in one function | MiMo V2.6 Flash | Low |
| Ordinary application feature | MiMo V2.6 Pro | Medium |
| Difficult distributed correctness problem | GPT-5.6 Sol | High |
| Missing evidence or unmet constraints | Abstain/review | — |
See the complete [routing table](skills/model-routing/references/routing-table.md), [registry](skills/model-routing/references/registry.json), and [skill](skills/model-routing/SKILL.md).
The bundled vendor-reported DeepSWE scores are Flash 67.9, Pro 71.9 and Sol 73.0 from one [Xiaomi comparison table](https://huggingface.co/XiaomiMiMo/MiMo-V2.6-Pro-RL#3-evaluation-results). Effort is unspecified, so this does not establish Sol Max parity. The 30-day evidence expiration forces a refresh rather than silently using old data. Prices are direct API token rates, not OpenCode Go subscription charges.
## Try the helper
From this checkout:
```sh
# Default LLM mode; example already contains an illustrative assessment.
node skills/model-routing/scripts/route.mjs --request examples/feature.json
# Same task; ignore the supplied assessment and ask Jev instead.
node skills/model-routing/scripts/route.mjs --request examples/feature.json --mode jev
# Offline tests, including an isolated installation check.
npm test
```
Omit `assessment` to have the default helper return the rubric for the current Codex LLM. The CLI does not independently call an LLM; the skill's host supplies its assessment. Set `availableModels` to verified canonical IDs before dispatch. Omit it only for a recommendation. A custom source-verified registry can be passed with `--registry path/to/registry.json`.
## What installation does—and does not—do
This is an installable skill and selection helper. It does not replace the Codex engine, automatically intercept every task, or install provider integrations. MiMo and other external models require a working provider such as [Codex Router](https://github.com/duolahypercho/codex-router); see [setup](skills/model-routing/references/setup.md).
Native subagent execution depends on the exact roles and tools available in your Codex session. The skill directs the host to dispatch only a verified route, wait, and check the result. Main-model switching requires the supported picker/API. Effort is advisory until provider controls are verified. The helper never dispatches workers itself.
Benchmarks are aggregate priors. Policy weights and task judgments are experimental, not calibrated success predictions. No claims of universal parity, 90% use-case coverage, or measured worker-speed gains are made. [Validation details](VALIDATION.md).
Design references: [TypeSafe primitives](https://docs.typesafe.ai/primitives), [composite scoring](https://docs.typesafe.ai/patterns/composite-scoring), [confidence](https://docs.typesafe.ai/confidence).
MIT licensed. Independent project; not affiliated with OpenAI, TypeSafe, Xiaomi, or Codex Router.