# Codex CLI Facts from the Codex configuration reference (2026-10-15): `config.toml` keys `model`, `model_provider`, `[model_providers.]` (`base_url`, `env_key`, `wire_api`; `responses` is the only supported value), `model_reasoning_effort` (values depend on the model: `low`, `medium`, `high`, `xhigh`, …), profile files `$CODEX_HOME/.config.toml` selected with `--profile`, and lifecycle hooks (`features.hooks = true`, event `UserPromptSubmit`, command handlers). I did not find a documented way for a hook to change the model. ## 1. Choose at launch (*router untested; `-m` and `-c` assumed from the Codex CLI*) ```bash python integrations/serve.py --model scombat/s1d1-router --policy integrations/policy.example.yaml & python integrations/routed.py codex "fix the failing test in utils/" ``` runs `codex -m -c model_reasoning_effort="" ""`. Edit the `codex` profile in `policy.example.yaml` first: put the model ids of your account in `models` (they are placeholders) and keep only the efforts your models accept. If `-c` is not available in your version, use profile files (one per tier) and `--profile`. ## 2. Through a gateway Point a custom provider at a LiteLLM proxy (`base_url = "http://localhost:4000/v1"`, `env_key`), with the Responses API enabled on the proxy, and use the hook of `02-litellm.md`. *Untested: the Responses path of the hook is not written; check that LiteLLM runs `async_pre_call_hook` on `/v1/responses` for your version.*