Bottom line first:DeepSeek V4.1 Flash was upgraded to DeepSeek-V4.1-Flash-1017 on October 17, 2026. The API model name is still deepseek-flash, and the calling method and pricing are unchanged, so existing setups need no config changes. One thing to watch: web search (Search/Fetch) triggered when you use the DeepSeek API in tools like Claude Code and Codex becomes billed per request starting 00:00 Beijing time on November 1, 2026.
We ran a small bug-fixing task in Claude Code against the official DeepSeek API. It finished in 7.5 seconds and the tests passed.
This post was fact-checked on October 18, 2026, against the official DeepSeek changelog, models and pricing, Claude Code integration, Codex integration, and web search and fetch docs.
What Changed in 1017
From the official changelog (2026-10-17):
- DeepSeek V4.1 Flash was upgraded to DeepSeek-V4.1-Flash-1017, with the web app and mobile app updated at the same time
- API calling method and pricing are unchanged, keep using
deepseek-flashto get the new version - Shorter task runtime and output length
- The same day, DeepSeek's in-house Search / Fetch API also opened up
Selected benchmark scores published by DeepSeek, compared with the previous version released on September 10:
| Benchmark | Previous V4.1 Flash | 1017 |
|---|---|---|
| Terminal-Bench 4.0 | 31.2 | 42.3 |
| DeepSWE v1.1 | 74.2 | 77.0 |
| ProgramBench | 20.3 | 29.1 |
| NL2Repo-Bench | 65.4 | 68.2 |
| Agents' Last Exam | 31.8 | 35.4 |
| Chartography (with tools) | 78.9 | 83.0 |
| BabyVision (with tools) | 89.6 | 92.5 |
| ZeroBench-main (with tools) | 49.0 | 51.0 |
The official notes say Terminal-Bench 4.0 was run on the Claude Code framework, DeepSWE used the Mini-SWE-V2 framework, and ZeroBench-main is Pass@5. So the Terminal-Bench score is the closest match for writing code in Claude Code.
Model Name Mapping
| API model name | Maps to |
|---|---|
| deepseek-flash | DeepSeek-V4.1-Flash-1017 (recommended) |
| deepseek-v4-flash, deepseek-v4-flash-vision-exp | The old model is retired. Requests are handled by DeepSeek-V4.1-Flash-1017 and billed at Flash pricing |
| deepseek-v4-pro | DeepSeek-V4-Pro-0813, a different model |
deepseek-flash supports 1M context, up to 384K output, tool calling, image understanding, the Responses API, and the Anthropic API.
Official Billing Rules
Billing is per million tokens, split into cache-hit input, cache-miss input, and output, priced in RMB:
| deepseek-flash | Off-peak | Peak |
|---|---|---|
| Input (cache hit) | ¥0.02 | ¥0.04 |
| Input (cache miss) | ¥1 | ¥2 |
| Output | ¥4 | ¥8 |
- Peak hours: Monday to Friday, 9:00–12:00 and 14:00–18:00 Beijing time (excluding public holidays)
- Off-peak hours: all other times, including weekends and public holidays, at half the peak price
- If you have both topped-up and gifted balance, gifted balance is deducted first
- Caching is on by default. Unlike with Claude, you don't need to set
cache_control; rely on theprompt_cache_hit_tokens,prompt_cache_miss_tokensvalues in the response. See the official caching docs
Using DeepSeek in Claude Code
The official Anthropic-format endpoint is https://api.deepseek.com/anthropic. The official docs use export, but we suggest adding it to ~/.claude/settings.json in the env, so it takes effect every time you open a terminal:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.deepseek.com/anthropic",
"ANTHROPIC_AUTH_TOKEN": "sk-你的DeepSeekKey",
"ANTHROPIC_MODEL": "deepseek-flash[1m]",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "deepseek-flash[1m]",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "deepseek-flash[1m]",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek-flash",
"CLAUDE_CODE_SUBAGENT_MODEL": "deepseek-flash",
"CLAUDE_CODE_EFFORT_LEVEL": "max",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "786432"
}
}
These variables and values all come from the official docs. Create your key on the DeepSeek Open Platform. After saving, go to your project directory and run claude and you're set.
The official docs explain the model name mapping: of the model names Claude Code sends, those starting withclaude-opusmap todeepseek-v4-pro(billed at V4 Pro pricing), whileclaude-haiku,claude-sonnetprefixes map todeepseek-flash. So above, we set all the default models explicitly todeepseek-flash, so no request accidentally goes to Pro.
For other third-party API setups, see “How to Connect Claude Code to Third-Party APIs”.
Using DeepSeek in Codex
The official docs say Codex talks to models through the Responses API, and the DeepSeek API supports this format natively, so set wire_api to responses.
The docs offer two approaches:
Option 1: the official one-click script (make sure you've launched Codex at least once before running it):
bash <(curl -fsSL https://cdn.deepseek.com/api-docs/codex-deepseek-setup.sh)
The script first backs up your existing ~/.codex/config.toml, then writes the model catalog ~/.codex/models.json and the DeepSeek config. Menu option 1 uses deepseek-flash, and option 9 restores the default config.
Option 2: manual setup. First, following the official docs, create ~/.codex/models.json (it's long, so copy it straight from the docs), then add this to ~/.codex/config.toml:
model = "deepseek-flash"
model_provider = "deepseek"
preferred_auth_method = "apikey"
forced_login_method = "api"
model_reasoning_effort = "high"
web_search = "disabled"
show_raw_agent_reasoning = true
model_catalog_json = "~/.codex/models.json"
[model_providers.deepseek]
name = "deepseek"
base_url = "https://api.deepseek.com/"
wire_api = "responses"
experimental_bearer_token = "sk-你的DeepSeekKey"
Write the key directly in experimental_bearer_token, no need for env_key. Once Codex starts, the startup info showingmodel: deepseek-flash means it's in effect.
After switching to DeepSeek, earlier sessions created with a ChatGPT subscription temporarily disappear from view. The docs say they aren't deleted, just grouped by login method, and restoring the original config brings them back.
For what each field means in general, see “Codex config.toml Guide”; for using custom models in the Codex desktop app, see “Codex App Custom Model Setup”.
Search/Fetch Becomes Billable on November 1. Does It Affect You?
What's Charged and How
The official pricing page states:
- Search and Fetch are each billed at ¥5 per 1,000 successful requests, counted per request, not by token or number of results returned
- Only requests that return HTTP 200 with results are billed. Failures, empty results, and timeouts are free
- When you use the DeepSeek API in DeepSeek Harness, Claude Code, or Codex, Search/Fetch is already used through server-side tool calls. This is free for now, and becomes billed per request starting 00:00 Beijing time on November 1, 2026
Claude Code has one more cost that's easy to miss. According to the official docs, after a Web Search call, the model makes an additional request to summarize what it found, and that request is billed as regular model tokens.
When it triggers
- Claude Code: According to the official docs, when the model decides your question needs a search, it calls the Web Search tool and searches through DeepSeek's API. For example, asking "search for the best Rust tutorials" will trigger it.
- Codex: The official docs say Codex's built-in web searchis only available when you use
deepseek-v4-pro. The official config fordeepseek-flashsets this toweb_search = "disabled", and the one-click script disables it by default too.
How to tell whether it triggered
In Claude Code, a search shows up as a WebSearch tool call. In our test, we asked a question that required looking something up. Claude Code made one WebSearch call, then used WebFetch to open a few web pages. Pure coding and bug-fixing tasks produced no search calls.
Can you turn it off?
- Codex: Keep
web_search = "disabled"as is. When you usedeepseek-flash, the official config already has it turned off. - Claude Code: The DeepSeek docs don't describe how to turn it off. Claude Code's built-in permission settings can block it from calling the WebSearch and WebFetch tools. Add them to
~/.claude/settings.json:
{
"permissions": {
"deny": ["WebSearch", "WebFetch"]
}
}
If your settings.json already has aenv, addpermissionsto that same object. Don't create a separate file.
FAQ
How does 1017 perform with Claude Code?
We tested it with the official DeepSeek API using the config above. We asked Claude Code to fix a leap-year function that didn't handle century years. It read the file, changed the code, and ran the tests, finishing in 7.5 seconds with all tests passing. The fix was the standard rule: divisible by 4 and not by 100, or divisible by 400.
We also asked a question that required searching online (what the October 17 entry in the DeepSeek changelog says). It returned the correct answer in 17 seconds with a link to the official page, calling WebSearch along the way.
The officially published Terminal-Bench 4.0 score (Claude Code harness) rose from 31.2 in the previous version to 42.3.
I already use deepseek-flash. Do I need to change my config?
No. The official docs say the calling method and pricing are unchanged, so if you keep using deepseek-flash, you're on 1017. Requests that still use deepseek-v4-flash are also handled by 1017, but we recommend switching to the official name deepseek-flash.
Will coding with Claude Code cost more after November 1?
Only if a search is triggered. In that case, Search/Fetch fees apply, billed per successful request. If you don't want that, use the permissions setting above to block WebSearch and WebFetch.
Can deepseek-flash do web search in Codex?
According to the official docs, no. Codex's built-in web search only supports deepseek-v4-pro. You need to switch to Pro and set web_search to "live", and search requests are billed under the Search API rules.
What happens if I configure an opus model in Claude Code?
The official service maps model names starting with claude-opus to deepseek-v4-pro and bills at V4 Pro prices. If you want Flash only, set all the default models to deepseek-flash. For help choosing between models, see "Which Model Is Best for Claude Code".



