Install Codex CLI
Recommended: launch with Bifrost CLI
A new virtual key with no
provider_configs denies all providers by default.
Make sure openai/gpt-5 (or the model you choose) appears in
bifrost models list before launching, or the request is rejected.CODEX_HOME for the launched process and
declares a bifrost model provider. It copies the user’s config.toml first,
preserving MCP servers, project trust entries, reasoning preferences, and other
non-auth settings before replacing the model-provider routing. The user’s
normal authentication and session history remain isolated, and changes Codex
makes inside the temporary home are discarded when the process exits.
Enterprise SSO and virtual keys are both supported. With SSO, Codex receives
the current Bifrost agent access token only in its child-process environment.
The token is not written to the temporary Codex provider configuration.
Configure Codex manually with a virtual key
Export the virtual key in the same terminal used to start Codex:~/.codex/config.toml:
/v1 is required because Codex appends /responses to the custom
provider URL. supports_websockets = false keeps the custom provider on
HTTP(S) Responses requests, which is required when Bifrost translates the
request to a provider that does not implement OpenAI’s stateful Responses
WebSocket protocol.
Select a model
Pass the complete Bifrost model identifier when starting the session:Non-OpenAI models
Bifrost can translate Codex’s Responses API requests to other configured providers. The target model must support the tool calls Codex needs for file operations, shell commands, and edits. Provider support for streaming, reasoning items, parallel tools, images, and compaction can also differ.The current automated Codex cloud harness exercises the OpenAI provider path.
Treat other provider/model combinations as compatibility targets to validate
with your selected model before production rollout.
/status before sending the first task. If Bifrost’s error
payload reports a different original_model_requested, Codex did not switch to
the intended model.
Troubleshooting
The request still uses gpt-5
The in-session model change did not take effect. Relaunch with the desired
model on the command line and verify it with /status.
The request is routed to the wrong provider key
Bifrost routes from the model actually sent by Codex. Inspectoriginal_model_requested in the error response or the Bifrost logs. Fixing a
provider-key error will not change Codex’s active model.
401 Unauthorized
When using Bifrost CLI, run:
model_provider = "bifrost",
requires_openai_auth = false, and OPENAI_API_KEY contains a Bifrost virtual
key.

