Connect Codex to DeepSeek-V4-Flash: Complete Zero-Code Setup Guide (August 2026)
[//]: # (# 2026 Latest Tutorial: Connect Codex to DeepSeek-V4-Flash - Zero-Code Setup Guide (CLI One-Click Script + CC Switch))
With the official release of DeepSeek-V4-Flash, its response speed and Agent capabilities have improved significantly compared to the previous generation. If you want a smarter, faster coding assistant, connecting Codex to DeepSeek-V4-Flash is currently an excellent combination.
Good news: the official one-click setup script for Codex is already available — no code changes and no hand-written config files required. Just one command plus your API Key, and you'll be done in 3 minutes with zero-code setup. Even better, configure once and it applies everywhere (Codex CLI, the desktop app, and IDE extensions all work directly).
To help you get started quickly, this article covers two mainstream setup methods. Use the table of contents to jump straight to the section you need.
# 📑 Table of Contents
- 1. Why Connect Codex to DeepSeek-V4-Flash?
- 2. Preparation Before You Start (Must-Read)
- 3. Method 1: Codex CLI Official One-Click Script (Fastest, Recommended)
- 4. Method 2: CC Switch Graphical Setup (for Desktop)
- 5. How to Verify Your Setup
- 6. FAQ
# 💡 Quickly Choose the Setup Method for You
| Setup Method | Best For | Est. Time | Difficulty |
|---|---|---|---|
| Method 1: CLI one-click script | Developers comfortable with the command line, seeking maximum efficiency | 1 minute | ⭐ |
| Method 2: CC Switch | Codex desktop users who prefer a fully graphical interface | 3 minutes | ⭐⭐ |
1. Why Connect Codex to DeepSeek-V4-Flash?
DeepSeek-V4-Flash is DeepSeek's flagship "fast" model for 2026. Compared to V4-Pro Preview, its Agent (intelligent agent) capabilities are greatly enhanced, making it ideal for running autonomous coding-agent tasks like Codex (such as reading source code, modifying files, and running tests).
In short, after connecting Codex to DeepSeek-V4-Flash, you still use the familiar Codex interface, but the "brain" doing the work behind the scenes is replaced by the faster, more cost-effective DeepSeek.
2. Preparation Before You Start (Must-Read)
Before you begin, check the following three prerequisites:
- Get a DeepSeek account and API Key: Register on the DeepSeek open platform and generate your dedicated API Key.
- Prepare a networked terminal: macOS/Linux users use Terminal; Windows users use PowerShell.
- Check the Codex CLI version: the version must be 0.144.0 or higher, otherwise DeepSeek's official model directory won't be recognized.
Steps to check and update the Codex CLI: Open your terminal and run the following command to check your current version:

codex --version
If the version is lower than 0.144.0, run the update command first:
codex update
3. Method 1: Codex CLI Official One-Click Script (Fastest, Recommended)
This is the fastest setup the official team recommends. The whole process is just three steps: run the script → choose the mode → paste your API Key.
# Step 3.1: Run the Script for Your OS
For macOS / Linux users, run this in the terminal:
bash <(curl -fsSL https://cdn.deepseek.com/api-docs/codex-deepseek-setup.sh)
For Windows users, run this in PowerShell:
irm https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.ps1 | iex
# Step 3.2: Configure According to the Prompts (Windows Example)
After running the script, an operation menu will appear:

To connect the latest model, enter 1 in the menu and press Enter to choose DeepSeek-V4-Flash:

Next, the script will ask for your API Key. Paste the Key you copied from the open platform and press Enter:

You'll see the following message, which means the setup has succeeded!

4. Method 2: CC Switch Graphical Setup (for Desktop)
If you'd rather not touch the command line, use CC Switch, a graphical tool to switch model providers directly in the Codex desktop app (ChatGPT desktop application).
Here are the steps:
- Open CC Switch and select the Codex tab in the top navigation bar.


- Click the + to add a provider and choose the DeepSeek preset. Fill in your API Key and select DeepSeek-V4-Flash from the model dropdown.

- Configure the advanced options: find the "Upstream format" setting. The default with "Route" enabled is enough for the vast majority of needs; if you don't want routing, you can choose Native. (⚠️ Note: choosing "Native" requires your CC Switch version to be higher than v3.19.1)

- Save and restart: after saving, completely quit and restart Codex (ChatGPT desktop app). After restarting, if you see the DeepSeek logo in the bottom-left corner of the app, your setup has taken effect successfully.

5. How to Verify Your Setup
Whichever method you used above, you can verify it with an extremely simple command:

Enter the following command in the Codex CLI:
/model
If you see DeepSeek V4 Flash in the model list that appears, congratulations — your Codex is now connected to a powerful "external brain"!
6. FAQ
To help you avoid pitfalls, we've compiled the most popular questions about "Codex connected to DeepSeek" from Bing and Google searches:
Q1: Does connecting Codex to DeepSeek-V4-Flash have any software version requirements?
A: Yes. The Codex CLI version must be at least 0.144.0. If the version is too old, DeepSeek's official model directory won't be recognized. Run
codex updateto upgrade first.
Q2: What are the one-click commands for Mac and Windows?
A:
- macOS / Linux:
bash <(curl -fsSL [https://cdn.deepseek.com/api-docs/codex-deepseek-setup.sh](https://cdn.deepseek.com/api-docs/codex-deepseek-setup.sh))- Windows (PowerShell):
irm [https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.ps1](https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.ps1) | iex
Q3: Do I need to configure each client (CLI, desktop, IDE) separately?
A: No! The configuration is shared globally. As long as you complete the setup once, the Codex CLI, the desktop app, and your IDE extensions will all take effect automatically and synchronize.
Q4: In CC Switch, should "Upstream format" be set to Route or Native?
A: Beginners are recommended to simply use the default Route enabled. If you have specific needs and don't want routing, you can choose Native, but your CC Switch version must be > v3.19.1 to support this advanced option.