Connect Codex to DeepSeek-V4-Flash (2026)|One-Click CLI Script + CC Switch, Step by Step
DeepSeek-V4-Flash is fast and its agent capabilities are noticeably stronger than the previous generation. The good news: DeepSeek officially provides a one-click script to connect it to Codex — no code changes, no hand-written config files. Run one command, paste your API Key, done.
And you only configure it once: Codex CLI, the desktop app, and IDE extensions all pick it up.
Contents:
- What Is DeepSeek-V4-Flash?
- What to Prepare Before You Start
- Method 1. Official One-Click Script
- Method 2. CC Switch GUI
- Verify the Configuration
- FAQ
What Is DeepSeek-V4-Flash?
DeepSeek-V4-Flash is DeepSeek's fast-tier model, built for speed. Compared with V4-Pro Preview, its agent capabilities are noticeably stronger, which makes it a good fit for autonomous coding agents like Codex — reading code, editing files, and running tests.
Once connected, Codex's underlying model becomes DeepSeek-V4-Flash: you keep the familiar Codex interface, but the heavy lifting is done by DeepSeek.
What to Prepare Before You Start
- ☐ Codex CLI 0.144.0 or newer: older versions won't recognize DeepSeek's official model catalog
- ☐ A DeepSeek account and API Key: create the key on the DeepSeek platform
- ☐ A terminal with internet access: Terminal on macOS/Linux, PowerShell on Windows
First, Check the Codex CLI Version
Run this in your terminal:
codex --version
DeepSeek's official model catalog requires Codex CLI 0.144.0 or newer. If yours is older, update first:
codex updateMethod 1. Official One-Click Script
The official one-click script is the recommended way — just three steps: run the script → pick 1 → paste your API Key.
macOS and Linux
Run in your terminal:
bash <(curl -fsSL https://cdn.deepseek.com/api-docs/codex-deepseek-setup.sh)Windows
Run in PowerShell:
irm https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.ps1 | iexThe demo below uses Windows. After the script runs, DeepSeek asks what you want to do:

To connect the latest DeepSeek-V4-Flash, pick 1:

The script then asks for your API Key — paste the one you created on the DeepSeek platform and press Enter:

That's it — the connection is done:

Method 2. CC Switch GUI
Don't want to touch the command line? Use CC Switch, a GUI tool that switches model providers right inside the Codex desktop app (ChatGPT desktop).
- Open CC Switch and select the Codex tab


- Click + to add a provider, choose the DeepSeek preset, fill in your API Key, and pick DeepSeek-V4-Flash


- In Advanced Options, the upstream format defaults to routing, which is fine. If you'd rather not use routing, pick Native — but you'll need CC Switch newer than v3.19.1 to see that advanced option.

- Save, then fully quit and restart Codex (ChatGPT desktop). If you see DeepSeek in the bottom-left corner after restarting, the config is working.
Verify the Configuration
In Codex CLI, type:
/modelIf DeepSeek V4 Flash appears in the model list, the connection is live.
Pros and Cons
Advantages of the two connection methods
- Official one-click script: one command + paste your API Key, about 3 minutes, zero code — for command-line users
- CC Switch: a GUI where you click to switch models in the desktop app — for people who don't want to touch a terminal
- Configure once, works everywhere: Codex CLI, the desktop app, and IDE extensions share the same config
Limitations / things to note
- Codex CLI must be 0.144.0+ — older versions can't recognize the official model catalog
- You need to create and fund an API Key on the DeepSeek platform first, or nothing will connect
- Depends on a stable network; watch your proxy config when reaching DeepSeek / Codex from within China
Who It's For
- Developers who want Codex running on DeepSeek-V4-Flash for speed and cost
- Command-line users who want the official one-click script
- Desktop-app users who prefer a GUI and want to switch model providers anytime
FAQ
Q: What version of Codex do I need to connect DeepSeek-V4-Flash? A: Codex CLI 0.144.0 or newer. If yours is older, run codex update first — otherwise DeepSeek's official model catalog won't be recognized.
Q: What's the official one-click setup command? A: macOS/Linux: bash <(curl -fsSL https://cdn.deepseek.com/api-docs/codex-deepseek-setup.sh). Windows PowerShell: irm https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.ps1 | iex.
Q: After one setup, which Codex clients can use it? A: Codex CLI, the desktop app, and IDE extensions. One setup is shared by every Codex client form.
Q: How do I confirm DeepSeek-V4-Flash is connected? A: Type /model in Codex CLI — if DeepSeek V4 Flash appears in the list, it's connected. With CC Switch, fully restart Codex and check for "DeepSeek" in the bottom-left corner.
Q: CC Switch upstream format: routed or native? A: The default routed mode is fine. Choose Native only if you don't want routing, and you need CC Switch newer than v3.19.1 for that advanced option.
Need Codex? Check out the Codex top-up page for supported plans, payment methods, and delivery.
