lxyztmds/dsh-plugin-deepseek-search ↗★ 0

dsh-plugin-deepseek-search

Official DeepSeek Search and Fetch APIs as the deepseek_search and deepseek_fetch tools for DeepSeek Harness (DSH). 适合需要让Agent调用DeepSeek官方接口进行联网搜索和网页抓取的用户。

Package
dsh-plugin-deepseek-search
Compatibility
Unverified
Harness peer range
>=0.1.5-rc.1 <0.2.0-0 || >=0.2.1-rc.1 <0.3.0-0
Cordis peer range
^4.0.0
Version
0.1.1
License
MIT
Last updated
Oct 19, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:lxyztmds/dsh-plugin-deepseek-search

配置

配置项定义在 lib/index.js 的 Config(schemastery schema),默认值由 schema 提供(bundle patch 只显式写了 apiKeyEnv),可在 profile 的 cordis.patch.yml 用 id 定向覆盖:

- id: deepseek-search
  config:
    apiKeyEnv: DEEPSEEK_API_KEY
    count: 5
    needContent: false
    timeoutMs: 60000
    retries: 2
    maxOutputChars: 60000
字段默认值含义
apiKey空直接写入的 API Key(secret role;不推荐,优先用凭据引用)
apiKeyEnvDEEPSEEK_API_KEY凭据引用名,按调用经 ctx.credentials 解析;没有凭据服务时回退到启动进程的环境变量
baseURLhttps://api.deepseek.com/v1/toolsSearch/Fetch API 基础地址(含 /v1/tools,不含 /search、/fetch);必须是带 host 的 http(s) URL,且不能包含用户名/密码,非 https 会明文传输 Key
count10deepseek_search 未显式传 count 时的默认条数(1–50)
needContentfalsedeepseek_search 未显式传 need_content 时的默认值
timeoutMs60000一次工具调用的总预算(含重试退避),到点返回 TIMEOUT
retries2遇到 408 / 429 / 5xx / 网络错误时的重试次数(0–5),429 会优先遵守 Retry-After
maxOutputChars60000单次调用返回给模型的最大字符数;超出会截断并注明
sendOriginalQuestiontrue把触发本轮的用户问题(折叠空白、截断 128 字符)作为 ori_question 发送

Key 从哪里来

  1. apiKey 字面值(若配置);
  2. ctx.credentials.resolve(apiKeyEnv):Desktop/Web 的凭据服务会读 ~/.dsh/.credentials.yaml 的 refs:,或 Web 模型页保存的 Key;
  3. 启动进程环境变量 process.env[apiKeyEnv](例如 dsh 前 set DEEPSEEK_API_KEY=sk-...)。

三处都没有时,工具仍会显示在工具列表里,执行时返回带修复指引的 MISSING_CREDENTIAL 错误。