Native Integration of DeepSeek V4 Flash into Codex
The article explains how to directly integrate the newly released DeepSeek V4 Flash model—supporting the Responses API and offering 1 M context length—into Codex without proxy tools, provides step‑by‑step configuration files, shows cost and token‑usage tables, and compares it with OpenCode usage.
DeepSeek V4 Flash Release
On July 31 DeepSeek officially released the deepseek‑v4‑flash version, adding native support for the Responses API format. This allows Codex to use the model with simple configuration, eliminating the need for local proxy forwarding.
Benchmark Note
Benchmark scores are provided for reference only; actual experience may vary.
Codex Integration
01 Declare Model Metadata
Create a model catalog file at ~/.codex/deepseek-model-catalog.json. This file is referenced when running the /model command to select the deepseek‑v4‑flash model and its inference strength.
https://share-1256249917.cos.ap-chengdu.myqcloud.com/deepseek-model-catalog.json [1]
02 Configure Profile File
It is recommended to use a dedicated TOML file instead of the default ~/.codex/config.toml. The author uses ~/.codex/deepseek.config.toml with the following content:
model = "deepseek-v4-flash"
model_provider = "deepseek"
# preferred_auth_method = "apikey"
# forced_login_method = "api"
model_reasoning_effort = "high"
model_catalog_json = "~/.codex/deepseek-model-catalog.json"
[model_providers.deepseek]
name = "deepseek"
base_url = "https://api.deepseek.com/"
wire_api = "responses"
experimental_bearer_token = "<your DeepSeek API Key>"The experimental_bearer_token should be filled with the API key obtained from the DeepSeek Platform. The two commented options ( preferred_auth_method and forced_login_method) indicate API‑Key authentication and skipping ChatGPT account login; the author leaves them commented because they also use an official subscription.
03 Start Using the Model
After configuration, navigate to the project directory and run:
cd /path/to/my-project
codex --profile deepseekThe command launches Codex with the DeepSeek V4 Flash model.
Cost and Token Usage
The following table summarizes token consumption and pricing for DeepSeek‑V4‑Flash (0731) versus DeepSeek‑V4‑Pro:
Model Version | Context Length | Max Output | 1M tokens input (cache hit) | 1M tokens input (cache miss) | 1M tokens output
----------------------------|----------------|------------|----------------------------|-----------------------------|-------------------
DeepSeek‑V4‑Flash‑0731 | 1M | 384K | 0.02 CNY | 1 CNY | 2 CNY
DeepSeek‑V4‑Pro | 1M | 384K | 0.025 CNY | 3 CNY | 6 CNYOpenCode Integration
OpenCode offers a simpler path: download the CLI tool and use it directly. It provides a free daily quota and a subscription option (first month $5, second month $10 for the GO plan). For users who only need DeepSeek V4 Flash, usage is effectively unlimited.
Final Thoughts
The author favors DeepSeek among domestic large models because of its low pricing, fast speed, open‑source nature, and lack of hype. With a 1 M context window and about 95 % effective context utilization, DeepSeek V4 Flash is well‑suited for long‑running tasks, unlike Codex CLI combined with GPT models that are limited to roughly 258 K context and require frequent compression.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Eric Tech Circle
Backend team lead & architect with 10+ years experience, full‑stack engineer, sharing insights and solo development practice.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
