Prerequisites
- OpenAI Codex CLI installed (0.134+)
- A standard Fireworks API key (
fw_...) - The FireConnect CLI (see Install)
Enable Fireworks routing
fireconnect codex on, off, model select, or model reset, config.toml is updated immediately. To use the updated routing in Codex, run /model in the same session, start a new session, or /exit and resume with codex resume <id>.
Default model
Codex routes a single default model. The default isglm-latest.
What gets written
FireConnect edits~/.codex/config.toml:
- Sets root
model_provider/modelfor Codex 0.134+ - Adds a
[model_providers.fireworks-ai]block withwire_api = "responses" - With
--api-keyor a key from~/.fireconnect/config.json, writesexperimental_bearer_tokenso latermodel list,select, andresetwork without passing the key again - With only
FIREWORKS_API_KEYin the environment, writesenv_key = "FIREWORKS_API_KEY"instead
~/.codex/config.toml before the first change. The snapshot lives in ~/.fireconnect/codex/. Running fireconnect codex off restores it byte-for-byte. Unrelated Codex settings (for example [[mcp_servers]]) are preserved via surgical TOML edits.
Codex model catalog
When you runfireconnect codex on, FireConnect fetches your account’s serverless catalog and writes Codex-compatible model metadata to ~/.codex/fireworks-model-catalog.json. It links that file from config.toml via model_catalog_json so Codex knows display names, context windows, reasoning levels, and tool-calling support for each model.
glm-latest. Deprecated models are excluded. If catalog generation fails (for example, due to an invalid API key), routing still works but Codex may show limited model metadata until you re-run fireconnect codex on.
fireconnect codex model list and model select filter the picker to models present in the catalog. JSON output from model list includes Fireworks IN / OUT pricing where known.
Browsing and picking models
CLI reference
fireconnect codex help for all options.
Switch models
glm-5p2 supports high and max). Pick the model in Codex with /model after switching.
Turn off Fireworks routing
config.toml from the backup in ~/.fireconnect/codex/.
Use a non-default config file
Fireworks on Microsoft Foundry
Codex supports Fireworks on Microsoft Foundry (CLI:--provider azure or on --azure). See the FireConnect overview and Microsoft Foundry integration guide for portal setup.
Configure and enable
What gets written
FireConnect setsmodel_provider = "fireworks-azure" in config.toml with a Fireworks on Microsoft Foundry provider block pointed at your Foundry endpoint. The Azure API key is stored as env_key = "AZURE_API_KEY" when resolved from the environment, or written literally when passed with --api-key.
Pass your Foundry deployment name with --main. model list and model select browse the Fireworks serverless catalog only.