[Bug] web_search 的獨立搜尋回合缺少時間與來源約束,導致「最新」比較引用舊代模型 #332
Replies: 1 comment
更新:可直接安裝的 rc.6 外掛與真實搜尋服務實測我已將 #332 的緩解方案封裝成社群外掛,可直接安裝於目前發布的 DeepSeek Harness
建議使用不可變的完整 commit SHA 安裝: dsh plugin --profile web add github:f0909172434/dsh-plugin-verified-search#b65f244a0acbc4c1dabc1adb435accdd0ce877ee
dsh --profile web --dump-config
dsh web與 #344 的關係#344 是必要修正,但不足以單獨解決 #332。它把目前時間加入外層 agent 的 context;然而 DeepSeek 搜尋 adapter 會另外啟動一個獨立的 因此此外掛同時掛載 #344 的 time-context row,並以
真實 DeepSeek 實測結果(2026-08-14)本次測試透過真實的 Harness 查詢參數: {
"query": "DeepSeek 官方 API 目前可用模型名稱,截至 2026-08-14",
"allowed_domains": ["api-docs.deepseek.com"]
}即使已收到原生 allowlist,搜尋服務仍回傳了 7 個超出範圍的結構化來源。 這 8 個保留結果都沒有 citation excerpt,因此 agent 明確回報「目前模型名稱仍無法確認」,沒有以模型記憶補上答案。這就是 #332 應有的安全失敗模式。 已完成的驗證:
重要限制這項保證只是回傳之結構化來源 hostname 的本機 postcondition,不代表搜尋服務的候選池、內部推理、對外擷取、redirect、生成文字或事實時效性受到同樣限制;它也不是隱私、法遵或網路出口的安全邊界。 目前出廠 profile 仍停用 給維護者的請求目前儲存庫關閉了 Issues,且 建議將官方修正拆成:
在官方修正完成追蹤與合併前,我可以繼續維護這個社群外掛並配合上游變更。 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
試了一下,大部分都挺好,但目前的搜尋能力有點問題,資訊經常是落後的。
我讓他做了一個用來介紹 DeepSeek 旗艦模型的網站,Flash Max 做了一個介紹 V3.2,Pro Max 雖然做了 V4 Pro,但跑分比較都是和其他公司的前代產品比較(比如 Opus 4.6、GPT-5.4、K2.6、GLM-5.1)。
現象:即使
web_search成功執行,current/latest/as-of 題目仍可能把目前旗艦模型拿去和舊代對手比較。這不只是連線失敗:我本機原始失敗 session 的 19/19 次 DeepSeek auxiliary search 都完成,沒有 error 或 timeout;但模型最後看到的 152/152 個 structured sources 全部沒有 snippet 與 date,19/19 次又都在 provider order 的前 8 筆被截斷,所以主模型通常只能依 title/URL 猜測版本。定位:
dsh-web-search-deepseek每次搜尋還會另外建立一個deepseek-v4-flashMessages 回合,這個回合不繼承外層 agent 的 system prompt 或 time-contextweb_searchschema 只有query,無法要求 first-party-only 的驗證 pass;DeepSeek auxiliary prompt 也只有Perform a web search for the query: ...,沒有 current-version、as-of、官方來源或 citation excerpt 要求cited_text。沒有被引用的結果通常只剩 title/URLfetch: false,因此不能靠打開頁面補驗證page_age是 provider-supplied last-update/page-age label,不應被當成可跨 provider 排序的 ISO publication timestamp修復(疊在 #344 的
2fac33fca7之上;fork 分支fix/discussion-332-search-freshness,commitce4d0455c,作者 Chih-Kai Wang / @f0909172434):web_search新增可選的allowed_domains(1–20 個 bare printable-ASCII hostnames),seam 使用allowedDomainsallowed_domains、ExaincludeDomains、Perplexitysearch_domain_filtermaxResults截斷前驗證每個 structured source;允許 exact host 與 subdomain,違規 fail loud。輸入會 lowercase/dedupe,並拒絕 scheme、path、port、credential、wildcard、Unicode 與 IP literal(包含127.1、hex/octal 等 legacy 形式)publishedAt文件契約,明確標示它可能只是 provider date/page-age label;本提交沒有用它做 freshness ranking與 #344 的關係:#344 提供外層 conversation 的 current time;本提交處理獨立 search turn、first-party source restriction 與 returned-source postcondition。兩者互補,單獨套用 #344 不會讓 auxiliary Flash 自動繼承時間或來源政策。本分支的 parent 就是 #344 的 commit,方便一起審查。
分支:https://github.com/f0909172434/deepseek-harness/tree/fix/discussion-332-search-freshness
提交:f0909172434@ce4d045
維護者可直接:
驗證:
allowed_domainswire、完整 auxiliary prompt、durable request、provider ordering/cap 與 UI snapshotpnpm run typecheck、focused TypeScript builds、pnpm run lint、tool/Cordis/persistence catalogs、type-equivalence、translation pairing、Agent Note、Markdown links/wrap 與docs:build均通過doc-sync在這台 Windows 主機仍有一個環境限制:project-doc-site.spec.ts建立 symlink 時得到EPERM;與本 diff 無關。先前被並行 lint probe 與缺少暫時 build artifact 影響的 export-JSDoc / docs build 已分別清理並重跑通過限制:這不是「搜尋一定最新」的保證。allowlist 只對 returned structured source URLs 建立可驗證 postcondition,不能證明 provider 的生成 prose 或內部 candidate pool 全都來自該網域;absolute-date prompt 也不能保證上游 index/ranking 已收錄最新頁面。DeepSeek 的 credentialed live API smoke test 在 upstream 目前是
it.skip,所以allowed_domains現在有 request-body mock 與 seam postcondition 測試,但尚未宣稱已在真實 endpoint 做 conformance;建議維護者在有 credential 的內部 CI 補跑一次。按
CONTRIBUTING.md,官方目前不接受 external PR,而且 repository Issues 目前是停用狀態,所以我沒有建立一個違反專案政策、也無法正式引用 Issue 的外部 PR。建議維護者為 #332 建立正式 Issue(例如web_search can compare current models against stale generations)與內部 PR,將 #344 與本 commit 作為兩個可獨立審查的提交;若之後開放 external PR,我可以直接從此分支轉成正式 PR。All reactions