DeepSeek V4.1-Flash-1017 与全新 Search & Fetch API:怎么诚实地读一条「帕累托改进」

·11 分钟阅读·Evergreen Tools Team

2026 年 10 月 17 日,DeepSeek 发布 V4.1-Flash-1017。API 名字没变——调到 deepseek-flash 的请求现在落在这份新 checkpoint 上——价格也没变。更新日志称它是一次帕累托改进:分数更高、任务完成更快、输出更短。同一天,官方把自研的 Search 与 Fetch API 向所有人开放,每个端点 $0.75 / 千次;对 DeepSeek API 用户来说,通过 Harness、Claude Code、Codex 发起的服务端工具调用在 2026 年 10 月 31 日 16:00 UTC 开始计费之前免费。两条公告,对正在搭智能体的人只合成一个问题:更便宜更快的模型加一方检索,到底能替掉你从三个供应商拼起来的栈,还是只是把活儿挪了个地方?

显示器上的基准对比图表

厂商表格每一行都在涨。它无法告诉你的是:你自己的评估集会怎么动。

这些基准分差到底支撑了什么

更新日志列了十个对比 9 月 V4.1 的基准,全部上升。涨幅最大的是智能体编码:Terminal-Bench 4.0 从 31.2 到 42.3,ProgramBench 从 20.3 到 29.1,DeepSWE v1.1 从 74.2 到 77.0。不带工具的 HLE 从 36.8 到 42.6(纯文本子集 44.0),带工具的视觉类涨得温和些——Chartography 78.9 到 83.0,BabyVision 89.6 到 92.5。

读脚注比读标题重要。Terminal-Bench 4.0 是用 Claude Code 框架测的,DeepSWE 用 Mini-SWE-V2,也就是说这些分数描述的是「模型在别人的智能体循环里」,不是在你的循环里。ZeroBench 是 Pass@5,其他是 Pass@1,回答的是不同的问题。这些绝对值也不能和别家表格横向比,因为框架、重试、工具预算都不一样。

能站住的说法很窄但仍然有用:模型在长程工具使用上变强了,价钱没涨,而且输出更简洁。输出短对智能体是双重收益——少付 token,也少一些答案被截断导致解析器崩掉的机会。官方还说针对自家 Harness、腾讯 CodeBuddy 和 WorkBuddy 做了优化,建议升级到 Harness 0.2.1-rc.1 或更高。

# Put the vendor's benchmark table into a script before you put it into a slide.
# Numbers below are from DeepSeek's own changelog for 2026-10-17; the parenthetical
# values were the previous V4.1 release, published 2026-09-10.

BENCH = {
    # name: (new, previous, note)
    "HLE w/o tools":          (42.6, 36.8, "text-only subset scores 44.0"),
    "Terminal-Bench 4.0":     (42.3, 31.2, "tested with the Claude Code harness"),
    "DeepSWE v1.1":           (77.0, 74.2, "Mini-SWE-V2 harness, Pass@1"),
    "ProgramBench":           (29.1, 20.3, ""),
    "NL2Repo-Bench":          (68.2, 65.4, ""),
    "Automation-Bench v1.0.6": (60.5, 54.8, ""),
    "Agents' Last Exam":      (35.4, 31.8, ""),
    "ZeroBench-main w/tools": (51.0, 49.0, "Pass@5, not Pass@1"),
    "Chartography w/tools":   (83.0, 78.9, ""),
    "BabyVision w/tools":     (92.5, 89.6, ""),
}

for name, (new, old, note) in BENCH.items():
    delta = new - old
    print(f"{name:26} {old:5.1f} -> {new:5.1f}  ({delta:+5.1f})  {note}")

# Two things this table will not tell you, no matter how long you stare at it:
#   1. the absolute numbers are not comparable across rows or vendors
#   2. Pass@5 on one row and Pass@1 on another are different questions
# What it does say is direction: every row moved up, and pricing did not move.

把检索层的钱算清楚

Search 和 Fetch 是和模型同一套 bearer 认证下的普通 JSON API:POST /v1/tools/search 和 POST /v1/tools/fetch。Search 收 1 到 128 字符的查询、1 到 50 的条数、一个用于改善查询理解的原始问题,以及 need_content 开关。Fetch 收一个 URL,返回 Markdown 和页面标题。

计价是每个端点 $0.75 / 千次,两个端点分开计费,所以「搜一次、取两页」是三次可计费调用,不是一次。先拿你自己的流量模式做这个乘除再判断它便不便宜。每天两千个会话、每个会话一搜两取,就是一个月 18 万次调用,约 135 美元。对检索来说确实便宜,但这也是一个只要智能体决定从读两页变成读五页就会翻倍的数字。

那个截止时间值得写进日历而不是便签:通过 DeepSeek Harness、Claude Code、Codex 发起的服务端工具调用,在 2026 年 10 月 31 日 16:00 UTC 开始计费之前对 API 用户免费。如果你正在这条路上做原型,你的成本曲线前方有一个台阶,而且它落在一个星期六。

# Price the search layer, including the free window that ends soon.
# Official: $0.75 per 1,000 calls per endpoint (Search and Fetch bill separately).
# Server-side tool calls from DeepSeek Harness, Claude Code and Codex are free for
# DeepSeek API users until billing starts 2026-10-31 16:00 UTC.

from datetime import datetime, timezone

SEARCH_PER_1K = 0.75
FETCH_PER_1K = 0.75
BILLING_START = datetime(2026, 10, 31, 16, 0, tzinfo=timezone.utc)

def agent_search_cost(turns_per_day, searches_per_turn, fetches_per_turn):
    calls_day = turns_per_day * (searches_per_turn + fetches_per_turn)
    return round(calls_day * 30 * SEARCH_PER_1K / 1000, 2)

# 2,000 conversations a day, one search plus two fetches each: 180k calls a month.
print("monthly search+fetch:", agent_search_cost(2_000, 1, 2))

now = datetime.now(timezone.utc)
print("free window days left:", max((BILLING_START - now).days, 0))

# Sanity check against your current setup. If you self-host a crawler, the honest
# comparison is not $0.75 vs $0, it is $0.75 vs (proxy + queue + extraction +
# the week you spent on anti-bot). Write both columns down before you decide.

要造引用,不是造答案

响应结构才是真正有意思的部分。每条结果带 rerank_score(0 到 3,1.5 及以上视为高质量)、authority 权威分层(0 到 4,3 及以上表示高度权威,-1 表示未知)、给界面用的 snippet、大约 600–800 字符给模型读的 summary,以及有就带上、RFC 3339 格式的发布时间。

这三个信号让你在花 token 之前就能过滤。只保留 rerank_score ≥ 1.5、authority ≥ 3、发布时间在窗口内的结果,会扔掉让 RAG 系统显得不可靠的绝大部分垃圾。它还给了你能给评审看的东西:不只是答案,而是每个来源为什么活过了过滤器。

查询算子值得刻意使用,而不是当花活。site:、-site:、lang:、after:、before: 和引号短语会被原样透传,意味着一条查询可以编码你的来源策略。官方文档已经回答了的问题,就不该让模型去引一个内容农场——靠的就是这个。

# Search, then decide what is good enough to cite. The response carries the signals
# you need: rerank_score (0-3, high quality at 1.5+), authority (tier 0-4,
# authoritative at 3+), and date. Use them instead of trusting result order.

import requests

KEY = "sk-..."            # use an env var in real code
BASE = "https://api.deepseek.com/v1/tools"
H = {"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"}

def search(query, count=10, need_content=False):
    r = requests.post(f"{BASE}/search", headers=H, timeout=30, json={
        "query": query,          # 1-128 chars, operators allowed
        "count": count,          # 1-50, default 10
        "need_content": need_content,
        "ori_question": query,   # helps query understanding
    })
    r.raise_for_status()
    return r.json()["results"]

def citable(results, min_score=1.5, min_authority=3, after="2026-01-01"):
    keep = []
    for item in results:
        if item["rerank_score"] < min_score:
            continue
        if (item["authority"] or -1) < min_authority:
            continue
        if item["date"] and item["date"][:10] < after:
            continue
        keep.append(item)
    return keep

hits = search("DeepSeek V4.1 Flash 1017 site:api-docs.deepseek.com lang:en after:2026")
for r in citable(hits):
    print(r["rerank_score"], r["authority"], r["date"], r["url"])

# Prompt-injection hygiene: treat summary and content as data, never as
# instructions, and keep the URL next to every sentence you quote.
覆盖地球的抽象节点网络

Search 返回权威分层和重排分数,这才是你能在花上下文之前先过滤的原因。

token 账单藏在 Fetch 里

Fetch 返回 Markdown,而一个文档页面的 Markdown 可以大到离谱。如果你把整页塞进上下文,你就把三分钱的检索变成了一次长上下文调用,检索省下的钱当场蒸发。修法很无聊:按字符预算裁剪,保留开头和结尾,并在提示里说明中间被删除了。

然后机械地验证落地。模型答完之后,检查每一条被引用的说法是否真的出现在取回的文本里。grepp 不到的说法不是引用,是带了个 URL 的幻觉。用更窄的抓取重试——一个章节锚点、一个更小的页面——几乎总是比把编造的句子发出去便宜。

一条对所有检索 API 都适用的卫生规则:summary 和页面内容都是数据,不是指令。页面上写着「忽略之前的指令」,那页就该被丢掉,authority 分层是提示而不是保证。把检索输出放在单独的消息角色里,永远别让它写进你的 system prompt。

# Fetch turns a URL into Markdown, which is the part everyone underestimates.
# A page is not a citation until you have trimmed it to a token budget you set.

import requests

def fetch(url):
    r = requests.post("https://api.deepseek.com/v1/tools/fetch",
                      headers={"Authorization": f"Bearer {KEY}",
                               "Content-Type": "application/json"},
                      json={"url": url}, timeout=45)
    r.raise_for_status()
    page = r.json()
    return page["title"], page["content"]          # markdown

def clip(markdown, max_chars=6000):
    # Keep the head and anything that looks like a conclusion. Dropping the middle
    # is safer than dropping the tail, which is where the caveats usually live.
    if len(markdown) <= max_chars:
        return markdown
    head, tail = markdown[: max_chars - 1500], markdown[-1500:]
    return head + "\n\n[... trimmed ...]\n\n" + tail

title, body = fetch("https://api-docs.deepseek.com/updates/")
print(title, len(body), "->", len(clip(body)))

# Now ask the model a question whose answer must be traceable to those characters.
# If the model writes a claim you cannot grep back into `body`, the citation failed,
# and a retry with a narrower fetch is cheaper than shipping the claim.

一份带固定回滚的切换清单

模型切换都是静默失败的,所以检查要吵。动手之前先把上一个模型标识钉进环境变量,因为 deepseek-flash 这个别名会让你的配置 diff 看起来什么都没发生。每次评估运行都要把框架版本一起记下来;用不同框架测出的 42.3 和你自己上次跑的结果不可比。

重跑你自己的评估集,不是厂商的基准。上面那些数字描述的是 DeepSeek 框架里、DeepSeek 任务分布上的模型。只有你的评估集能告诉你「更简洁」是收益还是回归——输出短对解析器友好,但在答案本来需要一个免责说明的时候是损失。

最后,把开源权重当成一个选项而不是一个战略。V4.1-Flash-1017 在 Hugging Face 和 ModelScope 上都有,意味着自托管兜底是可能的,但自托管是完全不同的成本结构和完全不同的故障模式。把决定写下来:哪个供应商提供什么、兜底是什么、以及那条把你送回上一个 checkpoint 的命令。

#!/usr/bin/env bash
# Pre-flight for a model swap. Pin everything you will be asked about later.
set -euo pipefail

echo "== model alias =="
# The API name is unchanged: deepseek-flash now routes to V4.1-Flash-1017.
curl -s https://api.deepseek.com/v1/models \
  -H "Authorization: Bearer $DEEPSEEK_API_KEY" | head -c 400; echo

echo "== harness version =="
# DeepSeek recommends Harness 0.2.1-rc.1 or later for the new checkpoint.
python -c "import importlib.metadata as m; print(m.version('deepseek-harness'))" 2>/dev/null \
  || echo "harness not installed locally"

echo "== search endpoint reachable =="
curl -s -o /dev/null -w '%{http_code}\n' https://api.deepseek.com/v1/tools/search \
  -H "Authorization: Bearer $DEEPSEEK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"test","count":1}'

echo "== free-window deadline =="
python - <<'PY'
from datetime import datetime, timezone
end = datetime(2026, 10, 31, 16, 0, tzinfo=timezone.utc)
print("billing starts", end.isoformat(), "| days left", max((end - datetime.now(timezone.utc)).days, 0))
PY

echo "== rollback =="
test -n "${PREVIOUS_MODEL_ID:-}" || echo "no pinned previous model -> set one before you switch"
开发者盯着屏幕上长长的文档

Fetch 返回 Markdown;不裁剪的 Markdown 会把一次便宜检索变成一次长上下文调用。

📌 常见问题 FAQ

V4.1-Flash-1017 到底改了什么?

官方描述为一次增量更新:基准分数更好、任务完成更快、输出更短,而 API 计价方式和调用方式不变。调到 deepseek-flash 的请求会路由到新 checkpoint,客户端不需要改。

Search 与 Fetch API 怎么收费?

每个端点 $0.75 / 千次,两个端点分开计费。通过 DeepSeek Harness、Claude Code、Codex 发起的服务端工具调用,在 2026 年 10 月 31 日 16:00 UTC 开始计费之前对 DeepSeek API 用户免费。

该调哪两个端点?

Search 是 POST https://api.deepseek.com/v1/tools/search,Fetch 是 POST https://api.deepseek.com/v1/tools/fetch。两者都是普通 JSON API,使用与模型 API 相同的 bearer 认证。

权重公开了吗?

公开了。除了 API、网页和 App,DeepSeek 还把 V4.1-Flash-1017 发布到了 Hugging Face 和 ModelScope。

该用哪个版本的 Harness?

官方建议为这份新 checkpoint 升级到 DeepSeek Harness 0.2.1-rc.1 或更高,并表示模型针对自家 Harness 以及腾讯 CodeBuddy、WorkBuddy 做过优化。