Configure a custom provider in Codex
Plan a Codex Responses provider with TOML configuration and an isolated environment variable.
Confirm Responses compatibility first
Website under maintenance. These are planned configuration examples: api.ubtl.net is a planned domain, and no real API test has been performed for this guide. Confirm the actual Responses paths, authentication requirements, and model identifiers before configuration; the examples are not evidence of availability.
A Codex custom provider needs genuine Responses protocol support; Chat Completions compatibility alone is insufficient. This example uses responses, not the removed chat option. Exit Codex and back up ~/.codex/config.toml before editing. Check whether your installation uses a different configuration directory and preserve existing providers and account settings rather than replacing the entire file.
Add the provider and isolate its key
Keep the model and provider selectors at the TOML top level, then merge the provider table without duplicating an existing table name. The env_key value names an environment variable so the configuration need not contain a plaintext secret. The planned Base URL is https://api.ubtl.net/v1; replace the model placeholder only with a confirmed identifier. Do not set requires_openai_auth to true for this custom environment-key configuration.
The shell example illustrates a future local launch; its placeholder is not a working key. Use a dedicated UBTL_API_KEY rather than overwriting another provider's credentials. Keep real values out of committed scripts, terminal recordings, and configuration backups.
model = "YOUR_MODEL_ID"
model_provider = "ubtl"
[model_providers.ubtl]
name = "UBTL"
base_url = "https://api.ubtl.net/v1"
env_key = "UBTL_API_KEY"
wire_api = "responses"export UBTL_API_KEY='YOUR_UBTL_API_KEY'
codexRestart and troubleshoot by layer
Save the file and restart Codex from the terminal that holds the environment variable. First check that configuration parsing succeeds and ubtl is selected. After service availability is explicitly confirmed, use an empty test directory and a short non-sensitive prompt without authorizing unrelated file operations. If it fails, check inherited environment variables, Responses endpoint support, and model permissions in that order. Do not hide protocol mismatches by randomly switching API modes. Redact credentials in diagnostics; restore the backup and clear the session variable when retiring the configuration.