The fast codex adapter routes Codex model traffic through Fast Inference's
OpenAI-compatible Responses API. It adds a clearly marked provider block to
Codex's configuration and saves the original file for one-command restoration.
Connect Codex
Install and sign in
npm install -g @inference/fast fast loginThe sign-in flow selects the first project in your personal workspace.
Enable Codex routing
fast codex onThe adapter configures
~/.codex/config.toml. The default model isglm-5.2; choose another callable catalog ID with:fast codex on --model <catalog-id>Restart and verify
fast codex statusRestart Codex, open a new session, and send a small prompt. Verify the request in Usage.
What the adapter writes
Codex uses the Responses API rather than Chat Completions. The adapter adds an
inference-net provider pointing to https://api.inference.net/v1, selects
your model, and writes the machine key as the provider's bearer token. Managed
blocks are labeled with inference-fast comments.
Change the model
Copy a callable ID from the model catalog, then reconnect:
fast codex on --model <catalog-id>An existing connection is not silently changed when the CLI is upgraded.
Restore your configuration
fast codex off
fast codex statusThe CLI restores the original TOML snapshot and removes its backup. Restart Codex after restoration.
Troubleshooting
| Symptom | Check |
|---|---|
| Codex still uses its old provider | Restart the process after on. |
Status says off | Run fast codex on from the same CODEX_HOME. |
| Gateway returns 401 | Run fast status, then reconnect Codex. |
| Model is rejected | Choose a callable ID from the model catalog. |