dsh-plugin-deepseek-search: Integrate DeepSeek Official Search / Fetch API into DSH

Preface

When building agents in DeepSeek Harness (DSH) that require real-time web information, the common practice is to use the built-in web_search / web_fetch, or to wrap third-party search and scraping services yourself. If you want the model to directly call the DeepSeek proprietary search engine and official web scraping interface, and expose these results to the session as independent tool names without modifying the built-in ctx.web configuration of DSH, you need a plugin specifically designed to interface with POST https://api.deepseek.com/v1/tools/search and POST https://api.deepseek.com/v1/tools/fetch.

Below is an introduction to the community plugin dsh-plugin-deepseek-search (maintainer: lxyztmds), which registers the above two APIs as deepseek_search and deepseek_fetch, coexisting without conflict with the built-in web tools.

What is this

dsh-plugin-deepseek-search is a Host-side plugin for DSH (npm package name dsh-plugin-deepseek-search, version 0.1.1 in current materials, MIT License). Its description is: Official DeepSeek Search / Fetch API tools for DeepSeek Harness (DSH).

The plugin is read-only, cache-free, and telemetry-free; it does not write to the workspace. Authentication defaults to resolving DEEPSEEK_API_KEY via the DSH credential service (configurable via apiKeyEnv); you can also explicitly configure an apiKey literal value, in which case the literal value takes precedence. Changing keys does not require a process restart.

For interface documentation, see DeepSeek Docs: https://api-docs.deepseek.com/zh-cn/guides/search/.

Core Features

After installation, two tools will appear in the model’s tool list:

Tool Underlying Interface Function
deepseek_search POST https://api.deepseek.com/v1/tools/search Retrieves web pages, returning title, URL, snippet, publish time, authority, ranking score, etc.; optionally returns page body content
deepseek_fetch POST https://api.deepseek.com/v1/tools/fetch Scrapes a single webpage, returning the title and Markdown body content

Relationship with DSH built-in web_search / web_fetch: This plugin uses independent tool names and does not take over built-in providers or modify built-in settings.

Main parameters of deepseek_search:

  • query (Required): 1–128 Unicode characters. Supports syntax like site:, -site:, quoted exact phrases, lang:, after: / before: (passed to the search service verbatim).
  • count (Optional): 1–50. Uses the configured default value if not passed.
  • need_content (Optional): Whether to simultaneously return webpage body content (larger and slower).

Main parameters of deepseek_fetch:

  • url (Required): Absolute http(s) URL, ≤8192 characters, must include a host, and cannot contain username/password.

The HTTP client side supports timeout, retries (408 / 429 / 5xx and network errors), and response validation; errors are mapped to text with a [CODE] prefix (e.g., MISSING_CREDENTIAL, TIMEOUT) to facilitate model and log troubleshooting. The Web side can display result cards via presentationMeta / presentResult.

Installation and Activation

DSH plugins are loaded as profile bundles: the profile’s package.json includes this package in dsh.profile.bundles, and cordis.patch.yml inserts the plugin line into the loading tree.

Recommended: Search for this plugin in the DSH sidebar Plugins → Discover; or use the command line in a non-desktop profile:

# GitHub Source Installation
dsh plugin --profile <profile-name> add github:lxyztmds/dsh-plugin-deepseek-search

# npm Installation (available after npm release)
dsh plugin --profile <profile-name> add dsh-plugin-deepseek-search

GUI Local Path Installation (effective immediately, suitable for Desktop):

  1. Open the Plugins page;
  2. Enter the absolute path of the plugin directory in the install input box;
  3. Enabled by default after installation; Host-only plugins typically appear in the tool list in subsequent sessions under HMR mode.

Profiles not hosted by Electron can also use local paths:

dsh plugin --profile <profile-name> add "file:C:\path\to\dsh-plugin-deepseek-search"
# Then restart that profile

Note: The desktop profile is exclusively owned by Electron, and the standalone dsh CLI will refuse to add to it; Desktop users should prioritize using the GUI or the manual bundle method described in the README. Materials require Node ^22.19.0 || >=24.0.0 and DSH >=0.1.5-rc.1.

Configuration Essentials

Configuration can be overridden in the profile’s cordis.patch.yml using the plugin id deepseek-search, for example:

- id: deepseek-search
  config:
    apiKeyEnv: DEEPSEEK_API_KEY
    count: 5
    needContent: false
    timeoutMs: 60000
    retries: 2
    maxOutputChars: 60000

Common fields (see the repository README for the full table):

Field Default (schema) Meaning
apiKeyEnv DEEPSEEK_API_KEY Credential reference name, resolved via ctx.credentials
count 10 Default number of results for deepseek_search when count is not passed
needContent false Default behavior for fetching body content when need_content is not passed
timeoutMs 60000 Total budget per call (including retries)
retries 2 Number of retries for retryable errors
maxOutputChars 60000 Maximum characters returned to the model
sendOriginalQuestion true Whether to send the first 128 characters of the current user question as ori_question

API Key resolution order: apiKey literal value → ctx.credentials.resolve(apiKeyEnv) (e.g., ~/.dsh/.credentials.yaml or Web Model Page) → process environment variables. If none are available, the tool remains visible, but execution returns MISSING_CREDENTIAL with fix instructions.

Typical Usage

In a session where the Key is configured and the plugin is enabled, the model can call tools autonomously based on the task, for example:

  1. Use deepseek_search to query: query is DeepSeek site:github.com, set count or need_content: true if necessary to get body content.
  2. Call deepseek_fetch on the url of a result to get the Markdown body for subsequent reasoning.

Search syntax examples (from README):

DeepSeek site:github.com OR site:huggingface.co
DeepSeek -site:example.com
DeepSeek "exact phrase" lang:zh,en after:2025-01-01 before:2026-06-01

Billing and rate limits are subject to DeepSeek documentation: Search / Fetch are billed per successful request; accounts have a limit of approximately 5 QPS each for Search and Fetch. This plugin serves as an explicit tool invocation path; please control the call frequency and count. Starting from November 1, 2026, 00:00 (Beijing Time), server-side tool calls in some host environments will also be billed per use (see README “Billing and Rate Limits” for details).

Applicable Scenarios and Notes

Suitable for: Users already using DeepSeek API Key in DSH who wish to use official Search / Fetch for web search and single-page scraping, and want to coexist with built-in web_search / web_fetch so the model can choose by tool name.

Please be aware before use:

  • The plugin runs with the permissions of the current DSH process; query and url will be sent to the DeepSeek API. Before installation, please review the GitHub Repository source code and the MIT License to ensure compliance with your security and compliance requirements.
  • Page body content is treated as external untrusted data; the plugin does not execute page scripts. If baseURL is not https, the Key will be transmitted in plain text; it should only point to a trusted gateway.
  • The community directory SkillHub Plugin Page has no official affiliation with DeepSeek or High-Flyer and is a third-party entry within the DSH “Everything is a Plugin” ecosystem (GitHub stars in materials: 1, Category: Network Tools).

Conclusion

dsh-plugin-deepseek-search integrates DeepSeek’s official Search / Fetch into DSH as two read-only tools, deepseek_search and deepseek_fetch. After configuring credentials and timeout, they can be used within sessions without interfering with built-in network settings.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye