{"slug": "260926-how-to-connect-codex-to-third-party-models", "title": "[260926] How to connect Codex to third-party models?", "summary": "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.", "body_md": "# How to connect Codex to third-party models?\n\nTLDR\n\n- **API Shift** : Codex**v0.80.0+** requires Responses API; Chat Completions API is deprecated.\n- **`x codex` Quick Run** : Run`x codex <provider>` (e.g.,`x codex deepseek` ) for temporary sessions without touching global configs.\n- **Global Config** : Manual editing works but is tedious and easy to overwrite.\n- **GUI Management** : Use`x install cc-switch` for visual API and MCP switching.\n- **Rollback** : Use`x env use codex=v0.80.0` if legacy Chat Completions API is needed.\n\nStarting from Codex **v0.80.0+**, Codex uses the **Responses API as its sole inference interface and no longer supports the Chat Completions API**.\n\nBy default, Codex uses OpenAI's ChatGPT series models. For users in mainland China, accessing ChatGPT may involve network or account restrictions.\n\nIf you want to use other models within Codex, consider the following connection methods.\n\n## Switch to third-party models with a single command without modifying global configs \n\nx-cmd provides a lightweight connection method.\n\nTaking 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**.\n\nRunning `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.\n\nCurrently, 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**.\n\n## Modify global configurations directly \n\nYou can also manually edit Codex's global configuration files to insert the API and model details for third-party models.\n\nThis 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**.\n\nIn the future, x-cmd may wrap these operations into commands like `x codex use deepseek`, completing configuration switches via dedicated TOML modification tools.\n\n## Third-party GUI tools \n\nIf you don't want to edit configuration files manually, you can use third-party GUI tools.\n\nTaking 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.\n\nInstallation can be done directly with:\n\n```\nx install cc-switch\n```\n\nThen, complete the relevant configurations and switches through the graphical user interface.\n\n## Version rollback \n\nStarting 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:\n\n```\nx env use codex=v0.80.0\n```\n\nThis method is primarily suitable for scenarios where compatibility with the older interface is required.\n\n## Conclusion \n\nIf 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**.\n\nPlease indicate the source and link of this article when reprinting.\n\nHelp us make these docs great!\n\nAll 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~", "url": "https://wpnews.pro/news/260926-how-to-connect-codex-to-third-party-models", "canonical_source": "https://x-cmd.com/blog/260926/", "published_at": "2026-09-26 00:00:00+00:00", "updated_at": "2026-09-26 02:30:39.586795+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "large-language-models", "ai-products"], "entities": ["Codex", "x-cmd", "DeepSeek", "GLM", "MiniMax", "CC-Switch", "OpenAI", "Responses API"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/260926-how-to-connect-codex-to-third-party-models", "markdown": "https://wpnews.pro/news/260926-how-to-connect-codex-to-third-party-models.md", "text": "https://wpnews.pro/news/260926-how-to-connect-codex-to-third-party-models.txt", "jsonld": "https://wpnews.pro/news/260926-how-to-connect-codex-to-third-party-models.jsonld"}}