跪拜 Guibai
← Back to the summary

DeepSeek V4 Flash Lands with Native Codex Support and a Config Fix for CLI 0.137.0

DeepSeek V4 Flash Released, Codex Can Now Connect Directly

DeepSeek's update log on July 31, 2026 stated that the deepseek-v4-flash official API is now in public beta, natively supports the Responses API, and has been adapted for Codex. The model name remains deepseek-v4-flash, so existing API calls do not need to change the name.

The official announcement also published a set of Agent benchmark scores, such as Terminal Bench 2.1 at 82.7 and Toolathlon verified at 70.3. These numbers come from the vendor and can be used to confirm product positioning, but cannot be taken directly as local development experience. This article focuses on the connection process and configuration verification.

Three Things to Prepare Before Starting

Preparation Item Check Method Purpose
Codex CLI or Codex Client codex --version Run model and Agent
Have run Codex at least once Confirm ~/.codex exists Let the script find the config directory
DeepSeek API Key Create from DeepSeek Platform Call the API

Windows: One Command to Complete Configuration

Open PowerShell and execute the official DeepSeek script:

irm https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.ps1 | iex

After the script displays a menu, enter 1, then provide the API Key as prompted. It will back up the original config.toml, write models.json, change the default model to deepseek-v4-flash, and point the provider to DeepSeek's Responses API.

I ran this on Windows using Codex CLI 0.137.0. The image below is from the actual local execution log, reformatted in terminal style to obscure local paths and the demo key. My personal ~/.codex was not modified; the test used an independent CODEX_HOME.

macOS / Linux Command

bash <(curl -fsSL https://cdn.deepseek.com/api-docs/codex-deepseek-setup.sh)

The configuration file is shared by different Codex clients. The CLI, ChatGPT desktop app, and VS Code Codex plugin typically all read this configuration. After making changes, restart any running clients to avoid them continuing to use the old cache.

How to Check if It's Working on the Codex Desktop App

After configuring a third-party provider on Windows, the bottom left corner may display custom. The image below is an original screenshot from a user's local Codex desktop app, showing that the custom provider has been loaded by the client. This screen alone does not prove the API is connected; connectivity still needs to be confirmed with the subsequent Codex Doctor and a real task.

A Compatibility Issue You Might Encounter with Codex 0.137.0

The first local verification did not pass directly. The models.json generated by the official script contains the reasoning tier max, but the Codex CLI 0.137.0 parser accepts none / minimal / low / medium / high / xhigh and subsequently reported unknown variant max.

This issue is unrelated to the API Key; the model request hadn't even been sent out, as it stopped during the configuration loading phase. The image below is the actual local error, with paths omitted, while the error text and version information are kept as-is.

If You Encounter the Same Error, Run This Fix

$path = "$HOME\.codex\models.json"
$json = [IO.File]::ReadAllText($path)
$json = $json.Replace('"effort": "max"', '"effort": "xhigh"')
[IO.File]::WriteAllText($path, $json, [Text.UTF8Encoding]::new($false))

This fix targets the actual run results of Codex CLI 0.137.0. If Codex does not report unknown variant max, keep the official file as is. After updating Codex, it is also recommended to re-verify first, to avoid treating a temporary compatibility fix as a long-term permanent configuration.

Verify Configuration with Codex Doctor

After the fix, execute:

codex doctor --json

Focus on four items: config.load is OK, the model is deepseek-v4-flash, the provider is deepseek, and the wire API is responses. The local retest passed these four items, indicating that Codex can read the model catalog and provider configuration.

A boundary needs to be clarified here: an intentionally invalid demo Key was used this time, so no model request was initiated and no billing occurred. The screenshot proves that "the configuration is correctly recognized by Codex," but cannot prove line latency, model output quality, or token consumption. After obtaining your own valid Key, complete the final connectivity test with a small task.

Keys and Rollback: Don't Miss These Two Things

The official Windows script writes the API Key into the local Codex configuration. Do not commit config.toml, terminal history, or full screenshots to Git, and do not post them in public Q&A. In a team environment, it's better to give each person a separate Key; if leaked, it can be individually deactivated without affecting other members.

To switch back to the original configuration, re-run the official script and select 3. The script will use the backup in ~/.codex/backup-deepseek to restore. For those who manually modified the configuration, confirm the backup time before rolling back to avoid overwriting newly added settings.

Check the Price After Running

After configuration is complete, I will also look at the actual call cost again. When Codex runs an Agent, the context is long and there are many tool calls, so just looking at the API list price is not enough. You can compare the prices, latency, and availability of different channels for DeepSeek V4, and then check the token consumption with the same task. This makes route selection more intuitive and avoids a situation where the list price is cheap, but the bill for the entire round of tasks is unexpectedly high.

Comments

Top 1 from juejin.cn, machine-translated. The original thread is authoritative.

柴弥

In that case, does Codex still require a login?