Skip to main content
Connect Codex to RunBridge AI through its custom model provider configuration. Codex sends requests to the Responses API.

Prerequisites

For the CLI, the official npm installation is:

Configure the provider

Edit your user configuration at ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml). If CODEX_HOME is already set, use config.toml in that directory instead. Merge the following with existing settings; keep top-level model and model_provider before any TOML table headers.
runbridge is the custom provider ID defined here. The base URL ends in /v1; Codex appends /responses.

Supply the API key

Use an environment variable when you launch Codex from a terminal. Enter the key at the hidden prompt rather than including it in a command saved to shell history.

Desktop app authentication

An app opened from the dock or Start menu may not inherit your terminal environment. Use Codex’s command-backed authentication if the app cannot read RUNBRIDGE_API_KEY. On macOS or Linux, create ~/.codex/runbridge_key outside any repository, restrict it to your user, and enter your key manually in a local editor. For a new file:
Save only the key, on one line. Remove env_key from the provider above and add:
On Windows, store the key in %USERPROFILE%\.codex\runbridge_key, restrict file access to your Windows user, and use this block instead:
These examples use the default key-file location; adjust the command if you store it elsewhere. The command must return only the token on stdout. Do not run it in a shared terminal or paste its output into logs. Restart the app after changing configuration.
Use one authentication method per provider. Do not combine an auth block with env_key, experimental_bearer_token, or requires_openai_auth. Keep your existing ChatGPT login; custom provider authentication does not require replacing auth.json.

Verify the connection

Start a new local Codex session in a test project. Confirm the selected model and provider, then ask: Reply with “RunBridge connected” without reading or changing files. Check that the request appears in your RunBridge AI usage records. A text reply verifies a basic request. Before using the agent on a real task, verify tool calling in a disposable project with a model that supports it.

Troubleshooting

See Codex advanced configuration and authentication for the current provider contract.
Last modified on September 23, 2026