What is Codex
Codex is OpenAI’s coding agent for software development. It can use Capriole AI through a custom model provider configured to send requests to Capriole AI’s Responses-compatible API.
Prerequisites
Before you begin, make sure you have:
Installation
Codex CLI
Codex app
Download the app from OpenAI Codex.
Configuration
Create or update ~/.codex/config.toml:
Run Codex
Set your API key, then start Codex:
Supported models
Codex supports Capriole AI OpenAI models through the Responses API. Use openai-latest for new setups so Capriole AI can route Codex to our recommended flagship OpenAI model without changing your config.
openai-latest
openai/gpt-6-astra
openai/gpt-5.6-terra
openai/gpt-5.6-luna
openai/gpt-5.5
openai/gpt-5.4-mini
Troubleshooting
Why does Codex return an authentication error?
Confirm that CAPRIOLE_AI_API_KEY is exported in the same shell before running codex.
Why can’t Codex find the model?
Confirm that model_provider = "capriole_ai" is set and that model is openai-latest or a supported Capriole AI OpenAI model ID.
Why do requests fail with endpoint or protocol errors?
Confirm that base_url = "https://api.caprioletech.com/v1" and wire_api = "responses" are set under [model_providers.capriole_ai].
Why does Codex ignore the Capriole AI provider?
Do not use a reserved built-in provider ID such as openai; keep the custom provider ID as capriole_ai.
Why don’t config changes apply?
Confirm that ~/.codex/config.toml is the active user config file, trust the project before relying on project-scoped .codex/config.toml, then restart Codex.
Notes
Last modified on September 5, 2026