orientx

Codex CLI

OpenAI Codex with a custom model provider

Codex talks the OpenAI Responses API (/v1/responses). Point it at orientx with a custom provider in ~/.codex/config.toml — do not reuse the reserved ids openai, ollama, or lmstudio.

Base URLhttps://api.orientx.ai/v1
AuthORIENTX_API_KEY (via env_key)
Config~/.codex/config.toml

Export the key

export ORIENTX_API_KEY="sk-..."

Add a provider

Put this in your user-level ~/.codex/config.toml (project-local files cannot override provider settings):

model = "<MODEL_ID>"
model_provider = "orientx"

[model_providers.orientx]
name = "orientx"
base_url = "https://api.orientx.ai/v1"
env_key = "ORIENTX_API_KEY"

Replace <MODEL_ID> with an id from GET /v1/models. Codex defaults to the Responses wire format; leave wire_api unset.

Run Codex

codex

Or pass the model once: codex --model <MODEL_ID>.

The model you pick must accept /v1/responses. If Codex errors on an unknown path or an unsupported field, choose another id from GET /v1/models — Chat Completions-only models will not drive the agent.

On this page