GLM(智谱)网页搜索 provider——把 web_search 后端切到智谱 Anthropic 兼容端点的服务端搜索工具,直接复用你现有的 GLM 额度或 Coding Plan,替代 DeepSeek 官方搜索通道,并内置智谱私有响应格式的翻译层。
安装
# npm 包(预构建)
dsh plugin --profile web add dsh-web-search-zhipu
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:PartinGQAQ/dsh-web-search-zhipu
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
为 DeepSeek Harness (DSH) 编写的 GLM(智谱 bigmodel)网页搜索插件。让 DSH 的 web_search 工具走智谱的 Anthropic 兼容端点(https://open.bigmodel.cn/api/anthropic/v1),消耗你现有的 GLM 额度 / Coding Plan,替代官方 dsh-web-search-deepseek 的 DeepSeek 通道——不需要 DeepSeek 平台余额,也不需要再注册任何搜索服务。
简体中文 | English
为什么需要它
智谱端点功能上支持 Anthropic 的 web_search_20250305 服务端工具,但返回的不是标准 Anthropic 布局:
| Anthropic 标准(DSH 要求) | 智谱实际返回 | |
|---|---|---|
| 结果块类型 | web_search_tool_result |
tool_result |
| 内容格式 | 结构化数组 {type:"web_search_result", url, title} |
Python-repr 风格字符串 |
| URL 字段 | url |
link |
本插件内置格式翻译层(lib/repr.js),两种布局都能解析、按 URL 去重、拼接引用摘要——web_search 工具保持稳定的 schema 与引用卡片,后端则计费到你的智谱账户。
安装
插件市场收录后可直接安装,或:
dsh plugin --profile web add dsh-web-search-zhipu
然后重启 dsh web。插件会注册搜索 provider glm-bigmodel,并随附 patch 将 web.searchProvider 指向它。
要求:
- DSH web profile,
dsh >= 0.1.1-rc.1(在 0.1.1-rc.2 上验证) - Node.js >= 20
- 智谱 bigmodel API key,存于 DSH 凭据服务,键名
ZAI_CODING_CN_API_KEY(通常就是 agent 的 GLM 模型在用的那把)
配置
默认零配置可用;设置页 → 插件里会出现 web-search-glm 配置节。
| 配置项 | 默认值 | 说明 |
|---|---|---|
apiKeyEnv |
ZAI_CODING_CN_API_KEY |
凭据服务里的 key 引用 |
baseURL |
https://open.bigmodel.cn/api/anthropic/v1 |
也可用环境变量 GLM_SEARCH_BASE_URL 覆盖 |
model |
glm-4.6 |
任意 GLM 对话模型 |
apiVersion |
2023-06-01 |
anthropic-version 请求头 |
maxTokens |
4096 |
单次搜索生成上限 |
maxUses |
3 |
单次请求搜索工具调用上限 |
回滚
dsh plugin --profile web remove dsh-web-search-zhipu
移除后若不重新指定 web.searchProvider,会自动回落到剩余唯一注册的 provider(内置 deepseek-official)。
English
A DeepSeek Harness web-search plugin that routes the web_search tool through Zhipu's (bigmodel) Anthropic-compatible endpoint, billing your existing GLM quota / Coding Plan instead of the DeepSeek platform. Ships a translation layer for Zhipu's non-standard tool_result response layout (plus standard Anthropic layout), with URL dedupe and citation-snippet joining. Zero-config with defaults; provider id glm-bigmodel.
dsh plugin --profile web add dsh-web-search-zhipu # then restart dsh web
开发
node test/unit.mjs # 解析器单测(真实响应回放 + 合成样例)
node test/e2e.mjs # 真实端点 e2e(读取 ~/.dsh/.credentials.yaml 的 ZAI key)
License
链接
同类插件
Tencent/BrowserSkill#dsh-plugin-browserskill★ 9166
BrowserSkill 的 DeepSeek Harness 浏览器自动化桥接插件,通过原生浏览器工具控制可见的 Chrome 和 Edge Agent Window,支持可访问性与 VOM 页面观察、截图、隔离的多会话控制和 Web UI 实时观察浮层。
omdsh-dev/dsh-browser#packages/browser/bridge-browser★ 844
Chrome 侧边栏扩展,让 DSH 直接操控你的浏览器,无需视觉能力。
liustack/modsearch★ 750
纯文本 agent 的联网搜索桥:搜索网页与 X,返回结构化 JSON 证据(search/fetch/引用)。
DDDMUC/dsh-free-search★ 487
DSH 免费搜索插件:7 个引擎(DuckDuckGo/Bing/SearXNG 免费 + Exa/Perplexity/DeepSeek 付费)、自动回退、设置页 UI(API key 输入 + 官网链接)、web_fetch、引擎测试工具。
wqty123/dsh-browser★ 124
共享真实浏览器:用户可观看并随时接管的原生 Electron 窗口,agent 通过 CDP 驱动,内置 20 个 browser_* 工具(打开/快照/执行/填表/截图/下载/登录态);任务级会话隔离、登录态持久化、人机验证识别,纯 `dsh web` 无需桌面外壳即可自托管。
Tabbit-Browser/dsh-tabbit★ 110
让 DeepSeek Harness 能够控制 Tabbit 浏览器:安装即自动加载 tabbit-browser skill,检测国际版 Tabbit 与国内版 Tabbit Browser 正式版(>= 1.9.0),检查 tabbit-cli 常驻运行时,按平台诊断调用 CLI 所需的 DSH sandbox 模式,并在没有合格版本时通过后台任务下载与系统地区匹配的正式版安装包。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。