Use D1V PAI with Codex
Codex is the shortest path: keep the `/v1` base URL and use the native Responses wire protocol.
Configure Codex in CC-Switch
- Complete CC-Switch setup, then select the Codex app.
- Add an application-specific Custom provider named
D1V PAI. - Set API Key to
D1V_PAI_API_KEY. - Set Base URL to the full
D1V_PAI_BASE_URL:https://pai.d1v.ai/v1. - Select native Responses as the wire/API format.
- Use an exact model ID returned by
GET /models, save, and enable the provider. - Open a new terminal and run
codex.
Choose Codex, then Custom. The available presets can change between CC-Switch releases.
Equivalent manual configuration
~/.codex/config.toml:
model_provider = "d1v_pai"
model = "<model-id-from-v1-models>"
disable_response_storage = true
[model_providers.d1v_pai]
name = "D1V PAI"
base_url = "https://pai.d1v.ai/v1"
wire_api = "responses"
requires_openai_auth = true~/.codex/auth.json:
{ "OPENAI_API_KEY": "<D1V_PAI_API_KEY>" }Verify Codex
cc-switch --app codex env check
cc-switch --app codex provider current
codexAsk for a small read-only task first. A 401 means the key is wrong or overridden; a 404 usually means /v1 was removed or duplicated; “model not found” means the configured ID does not match the current /models response.