Codex
Connect Codex to a compatible provider using a separate provider configuration.
On this page
Before you startPrepare your configurationUnderstand the configuration filesFollow the provider guideTest and restoreBefore you start#
Codex uses the Responses API for model requests. This integration requires a service endpoint that supports the Responses API, an API key, and a supported model. Compatibility has not yet been verified for this site.
Prepare your configuration#
Back up your existing ~/.codex/config.toml before changing it. Obtain the correct base URL and model name from the service. DeepSeek's official guide also uses a model catalog; settings and model metadata can change as Codex evolves.
Check your installed client before editing:
codex --versionUnderstand the configuration files#
| File or setting | Purpose |
|---|---|
~/.codex/config.toml | Provider selection and client settings |
model | The exact model ID supported by your provider |
model_provider | The ID matching your provider table |
model_providers.<id>.base_url | The provider's Responses-compatible API base |
model_providers.<id>.wire_api | responses for the integration described here |
model_catalog_json | A catalog with the model metadata expected by the installed client |
The official DeepSeek guide supplies a complete catalog and matching configuration. A base URL alone is not a complete setup. Ask an independent provider for its supported catalog and authentication configuration instead of assuming official metadata applies.
Follow the provider guide#
Use the DeepSeek Codex integration guide as a reference for the official API. For this service, substitute its documented provider endpoint and model configuration only after Responses API support is confirmed. Do not run a third-party setup script against your configuration without reviewing what it changes.
Test and restore#
Restart Codex after changing the provider, then run a small request in a test project. If the client cannot reach the model, verify the endpoint, API key, model metadata, and Responses API support. Restore your backed-up configuration to return to your previous provider.
- Merge provider settings into your existing file; do not duplicate a TOML table.
- Start a fresh session in a small project and check the selected model.
- Ask it to explain one file before attempting a large task.
- If configuration parsing fails, check duplicate tables and quoting first. For HTTP failures, use error codes.
- Restore both the configuration and any catalog you changed if you return to the original setup.
Guide updated November 5, 2026 · All tutorials