FireConnect routes the OpenAI Codex CLI through Fireworks AI models via the Responses API. See the FireConnect overview for install and CLI basics.
Prerequisites
Fire Pass keys (fpk_...) are not supported for Codex yet. The /responses endpoint requires a standard Fireworks API key.
Enable Fireworks routing
export FIREWORKS_API_KEY=fw_...
fireconnect codex on
Or pass the key once so later model commands reuse it:
fireconnect codex on --api-key fw_...
After 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 is glm-latest.
What gets written
FireConnect edits ~/.codex/config.toml:
- Sets root
model_provider / model for Codex 0.134+
- Adds a
[model_providers.fireworks-ai] block with wire_api = "responses"
- With
--api-key or a key from ~/.fireconnect/config.json, writes experimental_bearer_token so later model list, select, and reset work without passing the key again
- With only
FIREWORKS_API_KEY in the environment, writes env_key = "FIREWORKS_API_KEY" instead
FireConnect snapshots your original ~/.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.
Browsing and picking models
fireconnect codex model list # browse serverless endpoints
fireconnect codex model select # pick Codex's default model
fireconnect codex model select --search glm
CLI reference
fireconnect codex on # Enable Fireworks routing
fireconnect codex off # Restore original config
fireconnect codex status # Check current provider and model
fireconnect codex model list # Browse serverless endpoints
fireconnect codex model select # Pick a model interactively
fireconnect codex model reset # Reset model to default
fireconnect codex help # Show harness-specific help
Run fireconnect codex help for all options.
Switch models
fireconnect codex on --main glm-5p1
Turn off Fireworks routing
This restores your previous config.toml from the backup in ~/.fireconnect/codex/.
Use a non-default config file
fireconnect codex on --config-path /path/to/config.toml
Source
FireConnect is open source: github.com/fw-ai/fireconnect