dsh-custom-search: Replace DSH Built-in Web Search with Custom Search Engine

Introduction

The web_search tool exposed by DeepSeek Harness (DSH) to models defaults to the official provider @deepseek-ai/dsh-web-search-deepseek. In common usage, a single query often takes up an entire model invocation, and the retrieval itself also consumes the conversation model’s tokens. If you already have a self-hosted SearXNG instance, or have activated a search API such as Tavily, Brave, or Serper, the more natural approach is to replace the “layer that actually sends requests” with your own backend, while keeping the tool name, parameters, and Agent presets unchanged.

Below is the community plugin dsh-custom-search (maintainer: Anixuil, category: web tools). It registers custom-search at the provider layer of DSH, allowing you to switch engines such as SearXNG, Tavily, Exa, Brave, Serper, Bing, and Google CSE by changing configuration; the model side still calls web_search, with a schema consistent with the official one.

The plugin described in this article is a third-party community plugin. It has no affiliation with DeepSeek official, nor is it part of the official plugin marketplace. See the SkillHub plugin page for the ecosystem directory; see GitHub for source code and documentation.

Which Layer It Modifies in DSH

DSH splits web capabilities into three layers. This plugin only replaces the lowest layer, the “provider”:

Layer Package Responsibility This plugin
Tool layer @deepseek-ai/dsh-tool-web Exposes web_search / web_fetch Not modified
Service layer @deepseek-ai/dsh-web (ctx.web) Backend selection, cancellation, error codes, maxResults Only the provider id pinned in the config is changed
Provider layer Official: @deepseek-ai/dsh-web-search-deepseek Actual search requests Taken over by this plugin

The service layer collects providers via registerSearchProvider(). The official id is deepseek-official, and this plugin registers custom-search. Therefore, “switching the search engine” essentially means pointing the default provider to custom-search in the configuration, without replacing any official files.

After connecting to an independent search API, search requests no longer depend on the “only official DeepSeek” channel, and generally no longer consume the conversation model’s tokens solely for retrieval (specific billing depends on the vendor you choose).

Core Features

  1. Multiple engines selectable: SearXNG (can be self-hosted), Tavily, Exa, Brave, Serper, Bing, Google CSE; switch engines via pills in the form.
  2. Tool surface unchanged: The web_search name and parameter schema are consistent with the built-in one; prompts, the tool table, and Agent presets can be used as before.
  3. Configuration and credentials separated: Engine parameters are written into the patch layer of the profile; API keys are stored via the DSH credential service (by default referencing each engine’s conventional environment variable name, e.g., Brave’s BRAVE_API_KEY), stored at ~/.dsh/.credentials.yaml, and not committed to version control.
  4. Fallback chain: You can configure the fallback order when the primary engine fails; the connection test records each hop to prevent “successful fallback” from masking primary engine failures.
  5. Desktop configuration page: The plugin registers package details, a standalone card, and component row configuration entries in client.js; after saving the configuration, the Loader applies it, and generally no restart is needed for config changes (after the first installation of the plugin, a Harness restart is still required for the configuration card to appear).
  6. Connection test: Local validation (engine id, whether a key is required, endpoint validity, fallback chain spelling, etc.) plus an optional real search request (which consumes one search quota of the selected engine).

Regarding compatibility, the README states that the provider contract is implemented and offline contract validation has been done against @deepseek-ai/dsh-* 0.2.0-rc.2 (DeepSeek Harness Desktop 0.2.0-rc.2); DSH is still in developer preview. After major version upgrades, if WEB_PROVIDER_* errors appear, you need to check against @deepseek-ai/dsh-web’s registerSearchProvider and WebRuntime.Config.

The current package.json version is 0.4.3, license MIT, and requires Node >= 20.

Installation and Activation

Desktop (recommended)

  1. Sidebar “Plugins” → “+ Add plugin”.
  2. For the installation source, enter github:Anixuil/dsh-custom-search (the github: prefix is required; entering only dsh-custom-search will show “not found” because this package name has not been published on npm yet).
  3. Install → Enable now → Restart Harness (bundle-type plugins are not hot-reloaded).

The installation lands in the profile directory ~/.dsh/profiles/desktop, and underlying it pnpm add fetches the Git source.

Command line (requires installing the DSH CLI separately; the desktop app package does not include a dsh executable):

dsh plugin --profile desktop add github:Anixuil/dsh-custom-search#main

For other profiles, replace desktop with the actual name, e.g., for web scenarios use dsh plugin --profile web add github:Anixuil/dsh-custom-search#main.

Local directory development installation: Enter the absolute path of the repository in the same field; pnpm records it as link:. After modifying index.js / client.js, restart the Harness to take effect, without the need to repeatedly uninstall and reinstall.

Upgrade: The plugin manager does not provide one-click upgrade; you need to uninstall and then re-add the same github: address. Command line example:

dsh plugin --profile desktop remove dsh-custom-search
dsh plugin --profile desktop add github:Anixuil/dsh-custom-search#main

If upgrading from ≤0.1.0, the README notes that the old version’s patch may cause the panel uninstall to report bundle-in-use; you need to follow the manual steps in the repository’s “Uninstall” section before installing the new version.

If pnpm blocks build scripts, you can allow dsh-custom-search in allowBuilds of $DSH_HOME/profiles/desktop/pnpm-workspace.yaml. This plugin has no separate build step, and the github: source can be installed directly.

Typical Usage

Configure on the Plugin Page

After installation and restart, choose any entry in the sidebar “Plugins” (the combined package dsh-custom-search details, the official section’s “Custom search engine” card, or the configuration button of the component row custom-search), fill in the engine-related fields, and save. For engines that require a key, after configuring it in the form, the key is written to the credential service.

The Test connection button at the bottom of the form can run local checks first, then send a real search to verify; if there are unsaved changes, the real request still uses the saved configuration, and the UI will show a prompt.

Modify the patch Without a UI

Override the default values in $DSH_HOME/profiles/desktop/cordis.patch.yml (only write the fields you want to change):

- id: custom-search
  name: dsh-custom-search
  config:
    engine: brave

After manual changes, restart the Harness. If the same id already exists, modify the original entry; do not add a duplicate.

When the service layer selects this provider, you also need to pin the DSH search provider configuration to custom-search (the specific fields depend on the current Harness’s WebRuntime.Config and the plugin’s cordis.patch.yml; the plugin README emphasizes that “switching the search engine in DSH is just changing a string”, referring to the switch at the provider id level).

Use Cases and Notes

Who it is for

  • Those who want the Agent to continue using web_search, but want retrieval to go through self-hosted SearXNG or a purchased third-party Search API.
  • Those who need a fallback chain, observable connection tests, and a scenario where API keys are not written into the profile patch.
  • Developers using DeepSeek Harness Desktop (or the corresponding profile) who are willing to install community bundle plugins via a GitHub source.

Please be aware before use

  1. Permissions and trust: The plugin runs with the permissions of the current DSH process. Before installation, you should read the source code and the MIT license, and assess the risks yourself.
  2. Community nature: Not maintained by DeepSeek official; SkillHub and similar are independent ecosystem directories, with no official affiliation with Hithink RoyalFlush.
  3. Upgrades and locking: pnpm-lock.yaml pins the git source commit and will not automatically track new commits on the default branch; to update, you need to uninstall and reinstall or switch to a local link: installation.
  4. peerDependencies: The plugin depends on host-provided packages such as @deepseek-ai/dsh-web, which must be declared in the peerDependencies of the installed package. Otherwise, some capabilities (e.g., the connection probe) may be silently unavailable, although search itself will still work.
  5. Quota and compliance: Real connection tests consume search quota of the selected engine; using each vendor’s API must comply with their service terms.

Conclusion

dsh-custom-search replaces the provider layer of DSH’s web search with configurable SearXNG / Tavily / Exa / Brave / Serper / Bing / Google CSE, while still exposing the original web_search to models. Use github:Anixuil/dsh-custom-search as the installation source, restart the Harness after enabling it, select the engine on the plugin page or in cordis.patch.yml, and save the credentials.

  • Directory page: https://www.skillhub.cn/plugins/Anixuil/dsh-custom-search
  • Repository: https://github.com/Anixuil/dsh-custom-search
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye