Skip to main content

Codex

This guide explains how to configure OpenAI Codex CLI to work with the PwC AI-CoE Coding Agents Gateway.

Prerequisites

Model Compatibility

Codex requires models that support OpenAI's Responses API format. Only certain OpenAI models are compatible. See the Models page for the full list (look for the ✅ in the Responses API column).

Configuration

Codex is configured via a single file:

FilePurpose
~/.codex/config.tomlModel, provider, and authentication settings

Create or edit ~/.codex/config.toml:

model = "gpt-5.5"
model_provider = "coding_agents_gateway"

[model_providers.coding_agents_gateway]
name = "Coding Agents Gateway"
base_url = "https://idi-coding-agents.pwc.it"
http_headers = { "Authorization" = "apikey=<your-api-key>&tenantid=<your-tenant-id>" }

Replace <your-api-key> and <your-tenant-id> with the values obtained as described in Get Access.

Configuration Options

SettingDescription
modelModel ID (see Models) — vendor names like gpt-5.5 work
model_providerProvider name (must match the key in model_providers)
base_urlGateway endpoint URL
http_headersAuthentication headers — the gateway expects apikey=<key>&tenantid=<tenant> in the Authorization header

Available Models

Use any model with Responses API support from the Models page:

Modelmodel value
GPT-5.5 (Recommended)gpt-5.5
GPT-5.2 Codexgpt-5.2-codex
GPT-5.1 Codexgpt-5.1-codex
GPT-5 Codexgpt-5-codex

Network Requirements

EndpointNetworkRecommendation
https://idi-coding-agents.pwc.itPwC VPN (Italy / Italy On-Premise)Recommended
https://doc-interact-backend.pwc.itPublic internet⚠️ Not recommended
warning

The public endpoint is protected by the Imperva firewall, which typically blocks coding agent requests after some time due to their high frequency, interpreting them as potential DDoS attacks.

Verification

After configuration, verify your setup by running:

codex

Codex should start and connect to the PwC AI-CoE Gateway. Try a simple prompt to confirm everything is working.

Optional Settings

You can add additional settings to config.toml as needed:

model = "gpt-5.5"
model_provider = "coding_agents_gateway"
model_reasoning_effort = "xhigh"

[model_providers.coding_agents_gateway]
name = "Coding Agents Gateway"
base_url = "https://idi-coding-agents.pwc.it"
http_headers = { "Authorization" = "apikey=<your-api-key>&tenantid=<your-tenant-id>" }
SettingDescription
model_reasoning_effortReasoning effort level: "low", "medium", "high", "xhigh"

For all available options, refer to the official Codex documentation.