Codex
This guide explains how to configure OpenAI Codex CLI to work with the PwC AI-CoE Coding Agents Gateway.
Prerequisites
- Codex CLI installed (official installation guide)
- API key and tenant ID (see Get Access)
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:
| File | Purpose |
|---|---|
~/.codex/config.toml | Model, 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
| Setting | Description |
|---|---|
model | Model ID (see Models) — vendor names like gpt-5.5 work |
model_provider | Provider name (must match the key in model_providers) |
base_url | Gateway endpoint URL |
http_headers | Authentication 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:
| Model | model value |
|---|---|
| GPT-5.5 (Recommended) | gpt-5.5 |
| GPT-5.2 Codex | gpt-5.2-codex |
| GPT-5.1 Codex | gpt-5.1-codex |
| GPT-5 Codex | gpt-5-codex |
Network Requirements
| Endpoint | Network | Recommendation |
|---|---|---|
https://idi-coding-agents.pwc.it | PwC VPN (Italy / Italy On-Premise) | ✅ Recommended |
https://doc-interact-backend.pwc.it | Public internet | ⚠️ Not recommended |
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>" }
| Setting | Description |
|---|---|
model_reasoning_effort | Reasoning effort level: "low", "medium", "high", "xhigh" |
For all available options, refer to the official Codex documentation.