dsh-bing-search
已验证dsh-bing-search · v1.1.7 · MIT · Web 界面
Free Bing-backed web search provider for DeepSeek Harness (DSH). No API key needed, uses cn.bing.com for mainland China accessibility.
安装
dsh plugin add dsh-bing-search 用 dsh --profile default --dump-config 确认 layer 已生效 —— 参见安装指南。
源码
标签
说明文档
dsh-bing-search
DeepSeek Harness (DSH) 的免费 Bing 搜索 provider。无需 API Key,不消耗模型搜索配额。
English | 中文
本仓库是 godchen520/dsh-web-search-bing 的维护 fork,适配 DSH
>=0.1.5-rc.1 <0.3.0(含0.2.0-rc.1)。包名用dsh-bing-search,因为dsh-web-search-bing已被占用,dsh-websearch-bing又被 npm 判定过于相似。
特点
- 完全免费:使用 Bing 公共 HTML 搜索页面,无需 API Key
- 国内可达:默认使用 cn.bing.com,中国大陆可直接访问
- 零配额消耗:不消耗 DeepSeek 或任何 LLM 的搜索配额
- 即插即用:安装后自动把
web_search切到bing-free - 可配置:支持切换搜索端点、中英文结果、结果数量
安装
npm:
dsh plugin --profile desktop add dsh-bing-search
GitHub:
dsh plugin --profile desktop add github:whiteS18/dsh-bing-search
网页版 profile 把 desktop 换成 web。装完重启 DSH。
也可以在 profile 目录手动安装:
cd $DSH_HOME/profiles/desktop # 桌面版通常为 ~/.dsh/profiles/desktop
pnpm add dsh-bing-search
然后把 "dsh-bing-search" 加入 dsh.profile.bundles(放在 @deepseek-ai/dsh-web-app 之后),重启 DSH。
注意: node_modules 里的目录名必须等于 package.json 的 name。不要用旧名 dsh-web-search-bing 去 link 这个目录,否则桌面端会报 profile package identity is invalid。
配置
配置界面取决于 DSH 版本:
- DSH >= 0.1.6:设置 → 插件 → 本插件详情页里有「Bing 免费搜索」配置表单(搜索入口 URL、解析上限、结果语言),保存即生效——三个字段都是 volatile,热更新,无需重启。
- DSH <= 0.1.5:插件通过
settings.installSection自动生成设置节;也可以直接改~/.dsh/settings.yaml(热加载):
bing-search:
endpoint: https://cn.bing.com/search
maxResults: 20
ensearch: 0
或改 profile 的 cordis.patch.yml 后重启:
- id: bing-search
config:
endpoint: https://cn.bing.com/search
maxResults: 15
ensearch: 0
| 参数 | 默认值 | 说明 |
|---|---|---|
endpoint |
https://cn.bing.com/search |
搜索端点(必须是合法 URL,否则 provider 报不可用) |
maxResults |
20 |
每次搜索最大结果数(正整数,最小 1) |
ensearch |
0 |
0=中文结果,1=英文结果 |
设置 → 插件 → 插件配置 里的 Web Search 卡片属于官方 web-search-deepseek,不是本插件。
如何确认走的是 Bing
把 endpoint 临时改成无效地址后再搜一次。如果报错包含 bing-search 和你写的 endpoint,就是本 provider。测完改回去。
错误统一为 WebError(code 为 WEB_PROVIDER_ERROR / WEB_ABORTED),错误信息自带恢复指引。如果报错提示 captcha/反爬拦截,说明 Bing 触发了人机验证,稍后重试或临时切回官方搜索。
恢复默认搜索
本插件把 web 行的 searchProvider 切到 bing-free(provider id)。恢复默认:把本插件 patch 中的 searchProvider 改回 deepseek-official(或从 bundles 移除本包),重启即可。
[!WARNING] 自带
cordis.patch.yml对web行是整段替换,所以补丁里必须同时复述fetchProvider: http。自己改 patch 时若只写searchProvider而不带fetchProvider,会丢掉默认的 fetch 配置。
工作原理
调用 cn.bing.com/search(带桌面 Chrome UA 和 accept-language: zh-CN)→ 解析 HTML 搜索结果(<li class="b_algo"> 块,URL 去重、实体解码、丢弃非 http(s) 链接)→ 提取标题/URL/摘要 → 返回给 DSH 的 web_search 工具。