前言¶
在 DeepSeek Harness(DSH)裏做聯網能力時,模型側通常已有 @deepseek-ai/dsh-tool-web 提供的 web_search 工具;真正缺的是「搜什麼後端」——ctx.web 需要掛一個 search provider,才能把查詢落到可用的 HTTP API 上。若你已有 Brave Search API 訂閱,希望 Harness Web 裏統一選 Brave、並在界面裏配密鑰與地區/語言,而不是自己改進程環境或 patch,社區插件 dsh-brave-search-provider(維護者 yoggu,分類:聯網工具)就是針對這一層的實現:它提供 Brave 後端的 search provider 與 Plugins → Brave Search 設置頁,不替代模型側的 web_search 工具,也不提供 HTTP fetch provider。
這是什麼¶
dsh-brave-search-provider 是 DSH 的 Brave Search API 後端插件:bundle 爲 Web 搜索選擇 brave,並註冊 Brave 相關設置卡片。簡介原文爲:Brave-backed ctx.web search provider and settings card for the DeepSeek Harness.
插件當前發佈版本爲 0.1.4(見倉庫 package.json),許可證 MIT。社區目錄頁:SkillHub 插件頁;源碼與說明:GitHub yoggu/dsh-brave-search-provider。
核心功能¶
下面幾點均來自倉庫 README,便於和「整包聯網方案」區分邊界:
- Search provider:爲 DSH 的
ctx.web搜索提供 Brave Search API 實現;後端只調用 Brave 的 HTTPS web-search 端點,不跟隨重定向;每次請求解析 API key。 - 設置頁:在 Harness UI 中增加 Plugins → Brave Search,可配置國家(默認
us)、搜索語言(默認en)、請求超時(默認 30 秒)。設置頁界面語言支持 English、German,其他 locale 回退 English;這與搜索結果語言無關。 - 密鑰管理:在設置頁填寫 Brave Search API 訂閱 key,保存到 DSH credential store 的
BRAVE_API_KEY;也可在 DSH 進程環境中設置BRAVE_API_KEY。設置頁僅報告 key 是否存在,不展示明文。 - 不負責的部分:模型面向的
web_search仍由@deepseek-ai/dsh-tool-web提供;本插件不提供 fetch provider。
運行環境要求(package.json):Node >=22.19.0,DSH ^0.1.5-rc.2 || ^0.2.0-rc.1;面向 web 平臺(dsh.client.platform: web)。
安裝與啓用¶
安裝前請自行審閱倉庫源碼與 MIT 許可證;插件以當前 DSH 進程權限運行,密鑰勿寫入倉庫或 profile patch。
從 GitHub 標籤安裝(推薦)¶
安裝最新 tagged release(資料原文命令,profile 爲 web):
dsh plugin --profile web add 'https://github.com/yoggu/dsh-brave-search-provider.git#v0.1.4'
若你實際使用的 profile 不是 web,將 --profile web 換成對應 profile。
本地 link 安裝(可選)¶
README 還提供下載源碼並在本地 link 的方式;link 期間需保持 checkout 路徑不變:
git clone --branch v0.1.4 --depth 1 https://github.com/yoggu/dsh-brave-search-provider.git
cd dsh-brave-search-provider
pnpm install
dsh plugin --profile web add "link:$(pwd)"
啓用後配置¶
- 必要時重啓 DSH Web 並刷新頁面。
- 打開 Plugins → Brave Search,填入 Brave Search API 訂閱 key(或事先配置環境變量
BRAVE_API_KEY)。 - 按需調整 country、search language、timeout。
卸載:
dsh plugin --profile web remove dsh-brave-search-provider
典型用法¶
README 未單獨給出「對話裏怎麼說」的示例;可復現路徑是:安裝插件 → 配置 BRAVE_API_KEY 與地區/語言/超時 → 在已啓用 @deepseek-ai/dsh-tool-web 的 Harness 裏使用模型側 web 搜索。此時 ctx.web 的 Web 搜索由 bundle 選中的 brave provider 走 Brave API;開發者驗證插件時可安裝 DSH peer 依賴後執行:
npm test
(倉庫說明:在安裝 DSH peer dependencies 之後運行 npm test。)
適用場景與注意¶
適合誰:已有 Brave Search API 訂閱、使用 DSH Web profile、希望把 ctx.web 搜索固定到 Brave,並希望在 UI 裏管理密鑰與 us/en 等默認檢索參數的智能體或 Harness 開發者。
注意:
- 本插件只解決 search provider + 設置頁;若缺少模型側搜索工具,仍需
@deepseek-ai/dsh-tool-web等既有組件。 - API key 僅通過 credential store 或進程環境注入;不要 commit 到 git 或 profile patch。
- 社區目錄(如 SkillHub)與 DeepSeek / 幻方無官方從屬關係,安裝來源以你信任的倉庫與 release 標籤爲準。
結尾¶
dsh-brave-search-provider 把 Brave Search API 接到 DSH 的 ctx.web 搜索鏈路上,並用 Plugins → Brave Search 集中管理密鑰與檢索參數,適合已訂閱 Brave、希望在 Harness Web 裏即用即配的場景。進一步瞭解請查看 SkillHub 目錄頁 與 GitHub 倉庫 README。