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.
TL;DR: Connecting Codex to DeepSeek-V4-Flash takes two steps — ① create an API Key on the DeepSeek platform; ② run DeepSeek's official one-click script (or use the GUI tool CC Switch). About 3 minutes, zero code. Prefer the command line? See Method 1. Prefer switching in the desktop app? See Method 2.
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
- Related Reading
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.
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.
Related Reading
- Codex App Guide — download, install, and get started
- Codex Limits Guide — full limit comparison across all plans
- Fix Codex Reconnecting — resolve repeated reconnect errors
- ChatGPT Tutorials — index of all ChatGPT tutorials
