Prerequisites
- Install the app or CLI from the official Codex quickstart.
- Create an active API key in the RunBridge AI dashboard.
- Choose an exact model ID that supports Responses, streaming, and tool calling. Replace
your-model-idbelow; a Chat Completions-only model is not sufficient.
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.- Bash / Zsh
- PowerShell
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 readRUNBRIDGE_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:
env_key from the provider above and add:
%USERPROFILE%\.codex\runbridge_key, restrict file access to your Windows user, and use this block instead:
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.