Preface¶
When building web-connected agents in DeepSeek Harness (DSH), the model-side web_search and web_fetch are typically defined (schema), selected (provider), and rendered (results) by dsh-tool-web; the actual requests are issued by the various backends attached to the ctx.web seam. DSH ships with web-search-deepseek (provider id deepseek-official), which uses the Anthropic-compatible interface and the native web_search tool, but it does not provide a fetch provider. If you want both search and fetch to go through DeepSeek’s native POST /v1/tools/search and POST /v1/tools/fetch, with the service extracting pages into Markdown and returning that, you need a separate backend implementation. The following introduces the community plugin dsh-deepseek-search (maintainer zou-hong-run), which registers two providers on ctx.web for search and fetch. This package only provides these two backends and does not ship model tools.
What this is¶
dsh-deepseek-search is a third-party MIT-licensed DSH plugin (current package version 0.1.0), categorized as a web tool. It registers two providers on the ctx.web seam for web search and web fetch, and the backend calls DeepSeek’s native Search / Fetch JSON API. The tool names remain the harness-side web_search / web_fetch; schema, provider selection, and result rendering are still handled by @deepseek-ai/dsh-web (dsh-tool-web). After installation, a bundle patch points both searchProvider and fetchProvider to the same id: deepseek-search.
- Directory page: https://www.skillhub.cn/plugins/zou-hong-run/dsh-deepseek-search
- Source code and docs: https://github.com/zou-hong-run/dsh-deepseek-search
Core features¶
Search and fetch backends¶
- Search provider: issues
POST /v1/tools/search, and maps the response to the sources required by the seam (url,title,snippet,publishedAt).summarymaps tosnippet(falling back tosnippetwhen missing), anddatemaps topublishedAt. - Fetch provider: issues
POST /v1/tools/fetch, returns atextbody, with content as Markdown extracted by the service ({ kind: 'text', content }). - Same provider id: both capabilities are registered as
deepseek-search; the in-packagecordis.patch.ymlpoints thewebline’ssearchProviderandfetchProviderto it.
Credentials, retries, and I/O¶
Credentials are resolved once at load time, in order: plugin config apiKey → environment variable DEEPSEEK_SEARCH_API_KEY → DEEPSEEK_API_KEY; nothing is read from disk and nothing is written to logs. available() only performs local checks (key is non-empty and baseURL is a valid http/https URL) and does not make network requests.
Retries with exponential backoff are performed for 408, 429, 500, 502, 503, and 504, and Retry-After is respected (capped at 8 seconds). The seam passes in an AbortSignal; after cancellation the call ends with WEB_ABORTED. The raw response size is capped at 8 MiB, and 16 MiB after decompression; gzip/zlib is identified by magic bytes to avoid response.json() failures across different undici versions.
Differences from the official deepseek-official¶
deepseek-official (built into DSH) |
This plugin | |
|---|---|---|
| Search backend | Anthropic-compatible web_search tool |
Native POST /v1/tools/search |
| Structured fields | Sources in the tool block | Title, URL, summary/snippet, date |
| Fetch provider | None | Native POST /v1/tools/fetch |
| Model turn | Yes | No, retrieval only |
The two can coexist; which one is used is determined by the bundle patch. A common reason to choose this plugin is fetch: pages are extracted by DeepSeek and returned as Markdown rather than raw HTML. The plugin only performs retrieval; it does not run model turns and does not generate answer text; the content (answer) produced by the service side on the search path is not returned through the seam.
Environment requirements¶
- DeepSeek Harness 0.2.1-rc.2 (peer:
@deepseek-ai/dsh-web,@deepseek-ai/dsh-launch-environment). - Node.js 24+. DSH 0.2.1’s CLI uses
import.meta.main; on Node 22 (without this feature) the CLI may exit silently. - A DeepSeek API key that can access
/v1/tools/searchand/v1/tools/fetch; calls are billed by DeepSeek.
Installation and activation¶
The plugin runs with the permissions of the current dsh process. Before installation, review the source code and the MIT license yourself.
Installation¶
From npm (once published):
dsh plugin --profile web add dsh-deepseek-search
From GitHub:
dsh plugin --profile web add github:zou-hong-run/dsh-deepseek-search
From a local directory (replace the example path with your environment):
dsh plugin --profile web add link:C:/path/to/dsh-deepseek-search
dsh plugin forwards the argument to pnpm in the profile directory and adds the package to dsh.profile.bundles; registering and rewriting the web line is done by the in-package bundle patch.
After installation, restart the profile:
dsh web
Verify the configuration¶
dsh --profile web --dump-config | grep -A4 -- '- id: web'
You should see both searchProvider and fetchProvider set to deepseek-search, for example:
- id: web
name: '@deepseek-ai/dsh-web'
config:
searchProvider: deepseek-search
fetchProvider: deepseek-search
After that, you can call web_search or web_fetch in a session; the tools are still provided by dsh-tool-web, and this plugin does not introduce any separate model tool names.
Credentials and configuration¶
Credentials¶
Example startup environment:
export DEEPSEEK_API_KEY=sk-...
dsh web
Or override the plugin entry in $DSH_HOME/cordis.patch.yml:
- id: dsh-deepseek-search
config:
apiKey: sk-...
If no key is configured, explicitly calling search()/fetch() reports WEB_PROVIDER_CREDENTIAL_MISSING; on the seam side you may see WEB_PROVIDER_CONFIGURED_UNAVAILABLE or WEB_PROVIDER_UNAVAILABLE.
Configuration keys¶
| Key | Default | Purpose |
|---|---|---|
apiKey |
"" |
Explicit credential, takes precedence over environment variables |
baseURL |
https://api.deepseek.com |
Base URL; /v1/tools/search and /v1/tools/fetch are appended automatically |
count |
10 |
Default result count when the caller does not pass maxResults |
maxRetries |
2 |
Number of retries after the first attempt |
retryDelayMs |
800 |
Base delay for exponential backoff |
Override example:
- id: dsh-deepseek-search
config:
baseURL: https://api.deepseek.com
count: 5
maxRetries: 1
request.maxResults is sent as the API’s count and is capped at 50. The bundle patch replaces the entire web config line; if you need to keep other keys on the web line, write them back in a user patch layer (user patches are applied after the bundle).
Typical usage¶
After installing, configuring the key, and running dsh web, call web_search and web_fetch in a harness session just like with other web providers; no additional tool names provided by this plugin are needed. In fetch results, the seam’s WebFetchResult has no title field, so the extracted title is discarded; statusCode is always 200 (representing DeepSeek’s extraction status, not the origin site’s HTTP status).
Suitable scenarios and notes¶
Suitable for: you already use dsh-tool-web on a DSH web profile, want both search and fetch to go through DeepSeek’s native Search/Fetch JSON API, and need a fetch provider (Markdown body).
Notes:
/v1/tools/searchand/v1/tools/fetchare maintained by the service provider and may change or be rate limited; this plugin does not perform local crawling or HTML parsing, and extraction failures end withWEB_PROVIDER_ERROR.- It can coexist with
deepseek-official; the provider id selected by the patch takes precedence. - Verified on DSH 0.2.1-rc.2 + Node 24.22; other versions may change the loader or seam contract.
- Third-party plugin, not affiliated with DeepSeek; the community directory SkillHub is an independent site and is not an official app store.
Ending¶
dsh-deepseek-search connects DeepSeek’s native Search/Fetch API to DSH’s ctx.web seam, covering both search and fetch with a single provider id and complementing the official deepseek-official (especially when using fetch and Markdown bodies). Follow the README for installation and configuration; for details see the GitHub repository and the SkillHub directory page.