Skip to content

Connecting Codex CLI to NordRouter

Experimentally

Codex uses the Responses API. The custom provider is supported by Codex itself, but the specific model via NordRouter needs to be checked separately: the usual /chat/completions is not enough for this client.

Recommended option

UseOpenCodex: It locally translates API Codex Responses into NordRouter supported format /chat/completions.

In %USERPROFILE%\.codex\config.toml on Windows or ~/.codex/config.toml on macOS/Linux:

toml
model = "anthropic/claude-sonnet-4.6"
model_provider = "nordrouter"

[model_providers.nordrouter]
name = "NordRouter"
base_url = "https://nordrouter.com/v1"
env_key = "NORDROUTER_API_KEY"
wire_api = "responses"

Then set the variable NORDROUTER_API_KEY and run Codex in the test folder. If 404 comes to /responses, use Cline, Roo Code, OpenCode or Claude Code - they work through supported API formats.

Official information:Custom model providers.

All programs