cd /news/ai-tools/260926-how-to-connect-codex-to-third… · home › topics › ai-tools › article
[ARTICLE · art-139989] src=x-cmd.com ↗ pub= topic=ai-tools verified=true sentiment=· neutral

[260926] How to connect Codex to third-party models?

Codex v0.80.0+ now uses the Responses API as its sole inference interface and no longer supports the Chat Completions API, according to x-cmd documentation. The x-cmd tool offers `x codex <provider>` (for example `x codex deepseek`) to inject third-party provider configurations such as DeepSeek, GLM and MiniMax into a single Codex process without modifying global configs, while users needing the legacy Chat Completions API can roll back with `x env use codex=v0.80.0`. The guide also covers manual global config edits, the Rust + Tauri GUI tool CC-Switch installed via `x install cc-switch`, and notes that manual editing risks overwriting existing settings.

by read3 min views1 publishedSep 26, 2026
[260926] How to connect Codex to third-party models?
Image: X-Cmd (auto-discovered)

TLDR

  • API Shift : Codexv0.80.0+ requires Responses API; Chat Completions API is deprecated.
  • x codex Quick Run : Runx codex <provider> (e.g.,x codex deepseek ) for temporary sessions without touching global configs.
  • Global Config : Manual editing works but is tedious and easy to overwrite.
  • GUI Management : Usex install cc-switch for visual API and MCP switching.
  • Rollback : Usex env use codex=v0.80.0 if legacy Chat Completions API is needed.

Starting from Codex v0.80.0+, Codex uses the Responses API as its sole inference interface and no longer supports the Chat Completions API.

By default, Codex uses OpenAI's ChatGPT series models. For users in mainland China, accessing ChatGPT may involve network or account restrictions.

If you want to use other models within Codex, consider the following connection methods.

Switch to third-party models with a single command without modifying global configs #

x-cmd provides a lightweight connection method.

Taking DeepSeek as an example, by directly running x codex deepseek, x-cmd injects the necessary DeepSeek configuration into Codex. These configurations only affect the current Codex process and will not modify your original global settings.

Running x codex normally continues to use your original OpenAI configuration; when you need DeepSeek, simply run x codex deepseek. Both environments can coexist, and after exiting the DeepSeek session, original files like config.toml and models.json remain untouched.

Currently, providers like GLM and MiniMax can also be accessed in the same way. Specific configurations are handled by x-cmd, so users don't need to fill out a bunch of settings themselves.

Modify global configurations directly #

You can also manually edit Codex's global configuration files to insert the API and model details for third-party models.

This approach requires finding the corresponding configuration items and modifying files yourself. Switching models requires editing again, and improper modifications might overwrite existing settings, affecting your previous Codex environment.

In the future, x-cmd may wrap these operations into commands like x codex use deepseek, completing configuration switches via dedicated TOML modification tools.

Third-party GUI tools #

If you don't want to edit configuration files manually, you can use third-party GUI tools.

Taking CC-Switch as an example, it is a cross-platform desktop application built with Rust + Tauri. It can manage API configurations, MCP Servers, and Skills for Agents like Codex, Claude Code, OpenCode, OpenClaw, and Hermes Agent.

Installation can be done directly with:

x install cc-switch

Then, complete the relevant configurations and switches through the graphical user interface.

Version rollback #

Starting from Codex v0.80.0+, only the Responses API is supported. If your existing third-party model setup relies on the Chat Completions API, you can roll back to an older Codex version to maintain compatibility:

x env use codex=v0.80.0

This method is primarily suitable for scenarios where compatibility with the older interface is required.

Conclusion #

If you frequently switch between OpenAI and other models, you can choose a configuration method based on your habits. You can also try x codex to launch other models independently without altering your original global configuration.

Please indicate the source and link of this article when reprinting.

Help us make these docs great!

All X-CMD docs are generated from command help and multiple data sources. See something that's wrong or unclear? Feel free to let us know through any of these ways~

── more in #ai-tools 4 stories · sorted by recency
── more on @codex 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/260926-how-to-connec…] indexed:0 read:3min 2026-09-26 · —