Minokun/dsh-serper-search ↗★ 0
dsh-serper-search
Merged web search for the DeepSeek Harness: serper.dev (Google Search API) results unioned with DeepSeek native web_search, registered as one provider on the ctx.web seam so the built-in web_search tool serves both at once. 适合需要整合谷歌与原生搜索结果以提升检索质量的用户。
설치
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Minokun/dsh-serper-search配置项(settings 命名空间 web-search-serper)
| 字段 | 默认 | 说明 |
|---|---|---|
apiKey | — | serper 明文 key(volatile secret,优先于 credentials) |
apiKeyEnv | SERPER_API_KEY | serper key 的 credentials 引用名 |
baseURL | https://google.serper.dev | 也可用环境变量 SERPER_BASE_URL 覆盖 |
gl | cn | Google 国家/地区码 |
hl | zh-cn | 界面语言 |
num | 10 | serper 每次搜索默认结果数(1–100;工具层的 maxResults 优先) |
native | true | 是否合并 DeepSeek 原生搜索结果(GUI 里填 true/false) |
nativeApiKey / nativeApiKeyEnv | — / DEEPSEEK_API_KEY | 原生搜索的 key(一般用现有的 DEEPSEEK_API_KEY 即可) |
nativeBaseURL | https://api.deepseek.com/anthropic/v1 | 也可用 DEEPSEEK_SEARCH_BASE_URL 覆盖 |
nativeModel | deepseek-v4-flash | 原生搜索用的模型 |
nativeMaxUses | 5 | 原生搜索单次请求最多检索次数 |
联网搜索(web_search)使用纪律
每次 web_search 调用都会真实消耗外部 API 额度与模型 token,遵循以下约束:
- 一次调用尽量承载一个调研角度:把该角度的查询词合并进一次调用(最多 4 个),不要为同义词改写拆成多次调用。
- 查询词之间必须有实质差异(不同语言、不同平台、不同技术栈、不同子问题),禁止同一意思换措辞重发——实测同义改写的 Google 结果集重叠率不足 7%,属于纯浪费。
- 先规划后搜索:动手前先想清楚需要哪几个角度,简单事实类问题只搜 1 次;只有用户明确要求"调研/深入研究"时才多角度多轮搜索。
- 够答就停:已有来源足够回答时不再追加搜索;不要因为"再确认一下"而重复检索已覆盖的内容。
实测效果(写入前后各一次调研会话对比):并行批量搜索(多角度同秒齐发)、每次调用查询词打满差异化上限,调研墙钟时间从 ~2.5 分钟降到 ~40 秒。