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官方接口进行联网搜索和网页抓取的用户。
설치
$
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;不推荐,优先用凭据引用) |
apiKeyEnv | DEEPSEEK_API_KEY | 凭据引用名,按调用经 ctx.credentials 解析;没有凭据服务时回退到启动进程的环境变量 |
baseURL | https://api.deepseek.com/v1/tools | Search/Fetch API 基础地址(含 /v1/tools,不含 /search、/fetch);必须是带 host 的 http(s) URL,且不能包含用户名/密码,非 https 会明文传输 Key |
count | 10 | deepseek_search 未显式传 count 时的默认条数(1–50) |
needContent | false | deepseek_search 未显式传 need_content 时的默认值 |
timeoutMs | 60000 | 一次工具调用的总预算(含重试退避),到点返回 TIMEOUT |
retries | 2 | 遇到 408 / 429 / 5xx / 网络错误时的重试次数(0–5),429 会优先遵守 Retry-After |
maxOutputChars | 60000 | 单次调用返回给模型的最大字符数;超出会截断并注明 |
sendOriginalQuestion | true | 把触发本轮的用户问题(折叠空白、截断 128 字符)作为 ori_question 发送 |
Key 从哪里来
apiKey字面值(若配置);ctx.credentials.resolve(apiKeyEnv):Desktop/Web 的凭据服务会读~/.dsh/.credentials.yaml的refs:,或 Web 模型页保存的 Key;- 启动进程环境变量
process.env[apiKeyEnv](例如dsh前set DEEPSEEK_API_KEY=sk-...)。
三处都没有时,工具仍会显示在工具列表里,执行时返回带修复指引的 MISSING_CREDENTIAL 错误。