openai/... models over OpenAI-compatible Chat Completions.
Configure
Set your API key in the environment:~/.codex/config.toml, set the base URL and model (recommended). Newer Codex builds deprecate OPENAI_BASE_URL as an environment variable—prefer openai_base_url in config:
Get a Modellix API key from the console. It is not an OpenAI platform key.
Verify
After saving the config, run Codex as usual. Traffic should hithttps://llm.modellix.ai/v1 (typically Chat Completions). For protocol details, see Chat Completions and the LLM API guide.
Related
- OpenAI SDK — same
/v1base URL for application code - OpenCode — another OpenAI-compatible client config
- Cursor — IDE OpenAI-compatible provider setup