Codex DeepSeek: Use DeepSeek V4.1 Flash, V4 Flash & Pro
This guide shows you how to add DeepSeek V4.1 Flash, V4 Flash and V4 Pro to the Codex App or CLI using Codex Router. Once set up, the vendor-direct models appear in the normal Codex model picker next to the native GPT models. Your DeepSeek API key is stored only on your machine and sent only to the configured DeepSeek endpoint for selected DeepSeek requests.
What you can add
| Picker label | Model ID | Authentication |
|---|---|---|
| DeepSeek V4 Flash (API) | deepseek/deepseek-v4-flash | DeepSeek API key |
| DeepSeek V4 Pro (API) | deepseek/deepseek-v4-pro | DeepSeek API key |
| DeepSeek V4.1 Flash (API) | deepseek/deepseek-v4.1-flash | DeepSeek API key |
Every existing V4 route remains available. Those entries intentionally coexist because credentials and billing differ; selecting an OpenCode, Nous, Command Code, OpenRouter or Ollama route does not spend the vendor-direct DeepSeek balance.
DeepSeek V4.1 Flash across providers
DeepSeek released V4.1 Flash on September 10, 2026. There is no V4.1 Pro yet. Codex Router currently checks in six provider-specific routes:
| Provider | Model ID | Declared context and input | Verification note |
|---|---|---|---|
| DeepSeek API | deepseek/deepseek-v4.1-flash | 1,048,576; text + image | Vendor-direct route |
| OpenCode Go | opencode-go/deepseek-v4.1-flash | 1,000,000; text + image | Go subscription route |
| Nous Research | nousresearch/deepseek-v4.1-flash | 262,144; text + image | Uses the Portal serving cap |
| Command Code | commandcode/deepseek-v4.1-flash | 1,000,000; text only | Image input is not yet API-verified |
| OpenRouter | openrouter/deepseek-v4.1-flash | 1,048,576; text + image | Checked in; tool-history behavior is not live-verified |
| Ollama Cloud | ollama-cloud/deepseek-v4.1-flash | 1,048,576; text + image | Available in the cloud catalog; route is not live-tested by upstream |
ClinePass and Qwen Plan do not have checked-in V4.1 routes. The deepseek-flash launch ID on OpenCode was renamed to deepseek-v4.1-flash; use the canonical route above rather than curating the deprecated ID.
Requirements
- The Codex App or CLI, plus Node.js 22.19+ and
uvor Python 3.10+ (see the installation guide). - A DeepSeek API key from the DeepSeek platform. DeepSeek API access is a separate account and billing system from every other provider — including Kimi, Anthropic and xAI — and from your ChatGPT login.
Enable the provider
Install the router if you have not already (see install), then store your key and enable the provider:
./bin/model-router codex provider-key deepseek set
./bin/model-router codex providers enable deepseek
The set command opens a hidden prompt — terminal echo is disabled, so the key never lands in shell history. The key is stored in a per-user protected file (mode 600 on POSIX, a current-user ACL on Windows) and is reported only as present or absent by diagnostics.
Never paste a DeepSeek key into chat, a command argument, or a tracked file. The router only ever sends it to the configured DeepSeek endpoint, and only for requests that select a DeepSeek model.
On Windows, run the same commands through the wrapper: ./codex-router.ps1 codex provider-key deepseek set and ./codex-router.ps1 codex providers enable deepseek.
Verify the integration
./bin/model-router codex doctor
./bin/model-router codex providers
The provider must report SHOW and ready. Then fully quit Codex, reopen it, create a new task, and open the model picker — DeepSeek V4.1 Flash, V4 Flash and V4 Pro should be listed. You can confirm the startup catalog with codex debug models. If the entries are missing, see models missing from the picker.
For a live, quota-consuming check of one model:
./bin/test-model 'deepseek/deepseek-v4.1-flash' --live --yes
How DeepSeek requests behave
The router selects the exact official upstream model ID, enables thinking, and maps V4.1 Flash and V4 Flash to low, high and max; V4 Pro exposes high and max. Sampling parameters and forced tool choices that DeepSeek rejects in thinking mode are normalized before the request is sent. All three direct routes share the same forwarder and stored credential.
DeepSeek’s retired deepseek-v4-flash alias is still accepted and is now served by V4.1 Flash at Flash rates. Upstream says that from September 14, 2026 at 04:00 UTC, deepseek-v4-pro requests will temporarily be served by V4.1 Flash at Flash rates until V4.1 Pro launches. The separate deepseek/deepseek-v4.1-flash picker entry makes the actual model explicit.
Older DeepSeek aliases remain hidden compatibility routes. They are not advertised to new users, but old CLI commands keep working as long as DeepSeek continues serving those upstream aliases.
Common pitfalls
- DeepSeek keys are not interchangeable. A Kimi, Anthropic or Alibaba key cannot authenticate DeepSeek requests, and a DeepSeek key cannot authenticate anything else. The router keeps each provider’s key in its own protected file.
- The picker is credential-aware. If DeepSeek does not appear, the key may be missing or the provider disabled — not a router bug. Re-run
providersanddoctor. - Provider policy risk. Model providers may restrict or block proxy traffic. Routing DeepSeek through Codex Router is at your own risk; check DeepSeek’s terms before relying on it for production work.
- Other routes bill separately. OpenCode Go, Nous, Command Code, OpenRouter, Ollama Cloud and Alibaba plan routes use their own accounts, limits and retention terms—not your DeepSeek API balance.
Official links
Related: models overview, Kimi in Codex, GLM in Codex, troubleshooting.