If your Allowed Headers are already set to
*, you can skip this note. If not, and you face issues integrating Bifrost with Codex CLI, try switching to * or adding the specific headers required by your client. By default, Bifrost whitelists: Content-Type, Authorization, X-Requested-With, X-Stainless-Timeout, and X-Api-Key.Installing Codex CLI
Configuring Codex CLI with Bifrost
Update codex.toml
Add the Bifrost base URL and credentials to your global~/.codex/config.toml or project-specific .codex/config.toml:
codex from the same terminal session where you exported variables, or restart the terminal after changing your profile. GUI-launched terminals or IDEs may not pick up shell-profile exports unless the environment is configured there as well.
Using Non-OpenAI models
Codex CLI defaults to websocket mode for the Responses API and automatically falls back to HTTPS if the WebSocket connection fails. Non-OpenAI models are not supported in WebSocket mode, because in this mode, the server is expected to maintain the conversation context. If you are using non-OpenAI models, you must enable HTTPS mode. To enable https for Codex CLI by default, add these settings in yourconfig.toml:
Model Configuration
Use the--model flag to start Codex with a specific model:
/model command:
Using Non-OpenAI Models with Codex CLI
Bifrost automatically translates OpenAI API requests to other providers, so you can use Codex CLI with models from Anthropic, Google, Mistral, and more. Use theprovider/model-name format to specify any Bifrost-configured model:
Supported Providers
Bifrost supports the following providers with theprovider/model-name format:
openai, azure, gemini, vertex, bedrock, mistral, groq, cerebras, deepseek, cohere, perplexity, xai, ollama, openrouter, huggingface, nebius, parasail, replicate, vllm, sgl
Listing Non-OpenAI Models in the Model Picker
You can always start or switch to a non-OpenAI model by passing it explicitly (codex --model bedrock/... or /model bedrock/...). However, these models do not appear in the /models picker by default, and selecting them logs a warning like:
/models and carry correct metadata, create a local model catalog file and reference it from config.toml.
1. Create a model catalog file
You don’t need to create a model entry from scratch. First choose a complete, compatible entry from~/.codex/models_cache.json, then copy it into ~/.codex/bifrost_catalog.json while overriding only slug, display_name, and context_window.
The following example shows the complete entry shape. The two <COPY-...> values represent long, version-specific strings; copy their full values from the same source entry without modifying them.
The catalog JSON schema is internal to Codex and can change between versions. Select a source entry whose API behavior and capabilities are closest to the target model. Preserve every other field from that entry, including compatibility, response parsing, priority, visibility, truncation, reasoning, and tooling metadata. Do not trim the copied object into a minimal entry or remove fields that appear optional.
2. Reference it from config.toml
Add themodel_catalog_json key to your ~/.codex/config.toml, pointing at the file:
/models — your Bifrost models now appear in the picker, and the metadata warning is gone.

