Skip to main content
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

Or pass the key once:
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-fast-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" and env_key = "FIREWORKS_API_KEY"
  • Harness configs never contain literal keys
In keychain mode, FireConnect installs a marked block in ~/.zshrc (or bash profile) that exports FIREWORKS_API_KEY="$(fireconnect key export)". Open a new terminal or source your profile after enabling. 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 and removes the shell hook when no env-based harnesses remain. Unrelated Codex settings (for example [[mcp_servers]]) are preserved via surgical TOML edits.

Codex model catalog

When you run fireconnect 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.
The catalog includes serverless models that support tool calling with a non-zero context window, plus curated aliases such as glm-fast-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

Run fireconnect codex help for all options.

Switch models

Some models expose multiple reasoning levels in the Codex catalog (for example, glm-5p2 supports high and max). Pick the model in Codex with /model after switching.

Turn off Fireworks routing

This restores your previous 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.
Foundry routing requires a standard Azure API key. Fire Pass keys (fpk_...) are not supported. FireConnect does not write a Fireworks model catalog on the Foundry path — set your deployment with --main.

Configure and enable

One-off routing:

What gets written

FireConnect sets model_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.

Turn off Foundry routing

To switch back to the Fireworks gateway:
To remove FireConnect entirely and restore your original config.toml:
See Turn off Foundry routing for details on global config behavior and uninstall.

Source

FireConnect is open source: github.com/fw-ai/fireconnect