New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

dsh-web-search-router

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dsh-web-search-router

搜索路由:按用户选择与模型渠道决定使用官方 DeepSeek 搜索还是自定义搜索;两者都不可用时给出明确提示。

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
269
Maintainers
1
Weekly downloads
 
Created
Source

dsh-web-search-router

中文 | English

搜索路由插件:按「用的是哪个模型通道」决定走官方搜索还是你自己的搜索服务,并且在两者都不可用时给出可读的原因,而不是一句 500。

为什么需要

DSH 自带的搜索只对官方 DeepSeek 账号通道生效。用第三方模型通道时搜索会静默失败,用户看到的只是一个模糊的错误。这个插件把两种情况都接上:

当前通道走哪条路
官方 DeepSeek 账号Anthropic Messages 协议里的 web_search 工具
第三方通道你自己配置的搜索服务(Parallel 兼容接口)

配置

设置 → 搜索,填搜索服务的 API Key 与接口地址。

凭据按以下顺序解析,前一个取不到就用下一个:

  • 账号令牌
  • 凭据存储里的 DEEPSEEK_API_KEY
  • 启动环境变量

失败提示

搜索失败时右下角弹提示,说明具体是哪一步不行:

  • 没配 Key → 「还没有可用的搜索服务。请到「设置 → 搜索」填写 API Key。」
  • 请求被拒 → 带上游返回的状态与原因
  • 超时 / 网络错误 → 单独区分,不混为一谈

提示 12 秒自动消失,也可以手动确认。

安装

推荐用 DSH 内置插件安装程序。 打开「设置 → 内置插件」,在安装输入框里粘贴下面这一串(就是 pnpm add 后面的地址),点安装,再重启应用:

github:MCJF28/dsh-web-search-router

安装程序会自动把包写进 dsh.profile.bundles,不用手动改任何文件。

习惯命令行的话:先完全退出应用,再在 profile 目录执行

cd ~/.dsh/profiles/desktop
pnpm add github:MCJF28/dsh-web-search-router

然后把包名加进 dsh.profile.bundles,重启应用。

注意

如果你的 profile patch 里 web 这一行被 base 包写死了 searchProvider: deepseek-official,需要在 profile 的 cordis.patch.yml 里覆盖它,否则这个插件注册的 provider 不会被选中:

- id: web
  name: "@deepseek-ai/dsh-web"
  config:
    searchProvider: custom-search
    fetchProvider: http

原因:resolveProvider 只在 configuredId === undefined 时才遍历 provider 列表找可用项。一旦配置里写死了名字,插件的 available() 根本不会被调用。

English | 中文

Channel-aware search routing for DeepSeek Harness: which provider a search uses depends on which model route is active, and when neither side is usable you get a readable reason instead of a bare 500.

Why it exists

The built-in search only works on the official DeepSeek account route. On a third-party model route it fails silently, leaving the user with a vague error. This plugin wires up both sides:

Active routeWhat gets used
Official DeepSeek accountThe web_search tool over the Anthropic Messages protocol
Third-party routeYour own search endpoint (Parallel-compatible API)

Configuration

Settings → Search, then fill in the API key and endpoint of your search service.

Credentials resolve in this order; the first one that exists wins:

  • Account token
  • DEEPSEEK_API_KEY in the credential store
  • Launch environment variable

Failure reporting

When a search fails, a notice appears in the bottom-right corner and names the step that failed:

  • No key configured → "No search service is available yet. Set an API key in Settings → Search."
  • Upstream refused → status and reason from the upstream response
  • Timeout / network error → reported separately, never lumped together

Notices disappear after 12 seconds, and can also be dismissed manually.

Install

The built-in plugin installer is the recommended way. Open Settings → Built-in Plugins, paste the string below into the install box — it is exactly what follows pnpm add — then press install and restart the app:

github:MCJF28/dsh-web-search-router

The installer writes the package into dsh.profile.bundles for you; no manual file edits.

Prefer the command line? Quit the app completely first, then from the profile directory:

cd ~/.dsh/profiles/desktop
pnpm add github:MCJF28/dsh-web-search-router

Add the package name to dsh.profile.bundles yourself and restart the app.

Notes

If your profile patch has the web row hard-coded to searchProvider: deepseek-official by the base bundle, override it in the profile's cordis.patch.yml — otherwise the provider this plugin registers is never selected:

- id: web
  name: "@deepseek-ai/dsh-web"
  config:
    searchProvider: custom-search
    fetchProvider: http

Why: resolveProvider only walks the provider list looking for an available one while configuredId === undefined. Once a name is hard-coded in configuration, the plugin's available() is never even called.

Keywords

dsh

FAQs

Package last updated on 18 Oct 2026

Related posts