terryso

Dsh Web Search Zai — Development skill for Claude Code

Development community

Zhipu (bigmodel.cn) web-search provider plugin for DeepSeek Harness (dsh).

How to install Dsh Web Search Zai

This entry records only its repository, not the path inside it, so there is no exact command to give. Open terryso/dsh-web-search-zai and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Dsh Web Search Zai does

Zhipu (bigmodel.cn) web-search provider plugin for DeepSeek Harness (dsh).

Alternatives in Development

  • IPolloWork — Enterprise-grade, local-first Agent Workbench for people and agent teams 4.9k ★
  • Petdex — A public gallery of animated pets for Codex, Claude Code, DeepSeek Harness, Hermes, OpenCode, Gemini CLI, and 4k ★
  • Flowix — Notes for you, Memory for your agents 374 ★

README

dsh-web-search-zai

[Zhipu / bigmodel.cn](https://www.bigmodel.cn) 独立网页搜索 API 的 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH) 搜索 provider 插件。向 `ctx.web` seam 注册一个 `WebSearchProvider`,让模型端的 `web_search` 工具直接调用智谱的 `POST /web_search` 接口——每次搜索是一次纯 API 调用,不消耗模型轮次。

为什么需要它

DSH 内置的 `web-search-deepseek` provider 走 Anthropic Messages 协议的 `web_search_20250305` 服务端工具;智谱的 Anthropic 兼容层返回的是自定义 `tool_result` 块,内置 provider 解析不了。本插件直接调用智谱的独立搜索 API (`POST /web_search`),把 `search_result[]` 映射为 DSH 的 `WebSearchSource`, 每次搜索是一次纯 API 调用,不消耗模型轮次。

默认引擎链为 `search_pro` + 搜狗回退:智谱自研引擎(`search_std`/`search_pro`) 排序好,但部分内容源(新闻聚合类)不返回真实 URL(`link` 为空)——某些查询下 会**全部**条目无链接;搜狗/夸克引擎的条目则全部带链接。因此 provider 先用主 引擎,若映射后 0 条来源则自动用回退引擎(默认 `search_pro_sogou`)重试一次。 无链接条目总会被丢弃,并按 `maxResults + 5` 超量请求补偿。

安装

# 1. 安装进 profile(link 方式,项目目录的修改直接生效)
#    参数为本项目的克隆路径
dsh plugin --profile web add /path/to/dsh-web-search-zai

`link:` 安装会把 profile 的 `node_modules/dsh-web-search-zai` 符号链接到本项目。 Node 解析模块时会对 symlink 取真实路径,从本项目往上找不到 DSH 的 peer 包, 因此项目的 `node_modules/@deepseek-ai/*` 里放了指向 `~/.dsh/profiles/node_modules/@deepseek-ai/*` 的符号链接(同一份代码,不产生 双实例)。克隆本项目到新机器时需要重建这些链接。

# 2. 激活条目(写入用户 patch 层,精确路径监听会热应用,无需重启)
cat >> ~/.dsh/profiles/web/cordis.patch.yml <<'YAML'
- id: web
  config:
    searchProvider: zai-web-search

- insert:
    - id: web-search-zai
      name: dsh-web-search-zai
      config:
        apiKeyEnv: ZAI_CODING_CN_API_KEY
YAML

这两条做了:① 把 `web` seam 的 `searchProvider` 钉到 `zai-web-search` (覆盖 dsh-base 里的 `deepseek-official`);② 注册本插件行。

注意:条目放在**用户层**而不是本项目的 bundle patch 里是有意的——bundle 层 在每次 `dsh plugin add` 时会自动加入组合栈,如果两层都带 insert 条目,重启后 会重复注册 provider,被 web seam 以 `WEB_PROVIDER_DUPLICATE` 拒绝。

密钥放两处任意一处即可:

  • DSH 凭据存储(GUI 的 Models 页面写入的 ZAI_CODING_CN_API_KEY);
  • 启动环境的环境变量 ZAI_CODING_CN_API_KEY

配置

patch 层或用户 `cordis.patch.yml` 里可覆盖:

字段 默认 说明
apiKeyEnv ZAI_CODING_CN_API_KEY 凭据引用名
apiKey