dsh-web-tools-deepseek: Enabling DSH Web Access via DeepSeek's Native Search/Fetch API

Preface

In DeepSeek Harness (DSH), the commonly used web_search and web_fetch tools pass through the ctx.web layer, the “networking seam.” By default, searches typically go through the model-side web_search tool (with results entering the context as tokens), while fetching is mostly local HTTP with anonymous page pulls. If you want both search and fetch to go through DeepSeek’s official standalone Tools API, and to be billed per “successful request” instead of having the retrieval results stuffed wholesale into your token bill, you need to switch to a different web provider. Below we introduce how the community plugin dsh-web-tools-deepseek (maintainer CarbonAnime, category: networking tools) works.

What Is This

dsh-web-tools-deepseek is a provider bundle mounted on the DSH ctx.web seam: it routes Harness’s web_search and web_fetch to DeepSeek’s native APIs POST /v1/tools/search and POST /v1/tools/fetch, instead of the default model-side search tool or pure local HTTP fetching.

In terms of implementation, HTTP requests are handled by a ~900 KiB Rust engine (crates/engine), communicating via NDJSON over stdio with a thin JavaScript bridge in the Cordis plugin; when the Tools API fails or returns no results, it can fall back to DSH’s built-in native provider (default search falls back to deepseek-official).

tool-web ──▶ ctx.web ──▶ this bundle ──┬─▶ WebSearchProvider ─┐
                                       └─▶ WebFetchProvider  ─┤ NDJSON/stdio
                                                              ▼
                                          dsh-web-tools-deepseek(.exe)   (Rust)
                                                              │
                                        POST /v1/tools/search │ POST /v1/tools/fetch
                                                              ▼
                                                    https://api.deepseek.com

Repository: GitHub — CarbonAnime/dsh-web-tools-deepseek
Community directory: SkillHub plugin page
License: MIT (as noted in the README).

How It Differs from the Default Networking Method

The default DSH combination is roughly as follows:

Capability Default provider How it works Billing
search deepseek-official Model invokes the server-side tool web_search_20250305 within the service token (results enter the context)
fetch http Local anonymous URL fetch Free

After installing this bundle, both search and fetch switch to dedicated endpoints:

Capability Endpoint Billing (README notes)
search POST /v1/tools/search ¥5 per 1000 successful requests (~¥0.005/request)
fetch POST /v1/tools/fetch Same as above

The README emphasizes: only HTTP 200 with actual results counts toward billing (search requires non-empty results, fetch requires page content); 403, 404, empty results, timeouts, and failed calls are not billed. count only affects the number of entries, not the unit price. The trade-off is: per-request pricing is more predictable, and search results come as structured fields (title / url / summary / date) rather than the model having to parse a large chunk of text from its own tool output.

Core Features

  1. Unified registration of deepseek-tools-api: In Cordis it serves as both the search and fetch provider, and overrides the searchProvider and fetchProvider on the web row, avoiding WEB_PROVIDER_AMBIGUOUS when multiple providers coexist.
  2. Rust engine + NDJSON: Actual requests are completed in a standalone binary; the plugin side only does bridging. The engine lookup order supports the environment variable DSH_WEB_TOOLS_DEEPSEEK_BIN, the enginePath config, and the bundled bin/dsh-web-tools-deepseek-<platform>-<arch>, etc.
  3. Configurable fallback: When the Tools API fails or returns empty results, it can fall back to a registered provider (default fallbackSearchProviderId: deepseek-official, fallbackOn: both).
  4. Retrieval and fetch details: Default snippetSource: summary (a 600–800-character summary oriented toward model reading); localization is IP-based rather than language tags; blockedAsResult can turn fetch’s 403/404 into results with explanations rather than throwing errors; independent QPS rate limiting (default 5 QPS per endpoint).

Installation and Activation

Environment requirements (README):

Item Requirement
DSH @deepseek-ai/dsh-desktop 0.2.x (oriented toward the ctx.web provider seam)
Node ≥ 18.17
Credentials DEEPSEEK_API_KEY in $DSH_HOME/.credentials.yaml, or a literal apiKey in config
Rust Not required when using the precompiled engine; Linux/macOS can fetch assets from Release (the zip may need chmod +x)

Install from GitHub (official README command):

dsh plugin --profile desktop add "github:CarbonAnime/dsh-web-tools-deepseek"

Installation applies the bundled dsh.bundle.patch: it appends entries to dsh.profile.bundles and applies cordis.patch.yml—inserting a plugin line (registering deepseek-tools-api) and overriding the web line so that searchProvider and fetchProvider point to that id. The README requires that the patch rewrite the entire config line (not a deep merge), and both modifications are indispensable.

You need to restart the DSH process after installation: config reloading will re-apply(), but the plugin module has ESM caching, so first-time mounting or code changes usually require a restart to take effect.

Optional configuration example (written on the plugin line in the subsequent cordis.patch.yml; an empty config also has defaults):

- id: web-tools-deepseek
  name: dsh-web-tools-deepseek
  config:
    count: 8
    qps: 4

Common fields include: apiKeyEnv (default DEEPSEEK_API_KEY), baseURL (default https://api.deepseek.com), count (default 10, range 1–50), timeoutMs, retries, fallbackSearchProviderId, enginePath, diag, etc. For the full table see the Configuration section in the repository README.

Typical Usage

This plugin does not expose a standalone CLI “subcommand”; instead it takes over the existing networking tool path in Harness. After installation and restart, agents or workflows trigger web_search / web_fetch as usual (via tool-web → ctx.web), and the actual HTTP requests are made by the Rust engine to https://api.deepseek.com’s /v1/tools/search and /v1/tools/fetch.

To verify the engine and credentials, you can run the test scripts in the repository directory per the README (dependencies installed and a valid API Key required):

npm test

(Includes test/unit.mjs, test/engine.mjs, test/smoke.mjs.)

To roll back to the default networking method, remove the bundle or revert web.searchProvider / web.fetchProvider per the Rolling back section in the README.

Suitable Scenarios and Notes

Better suited for: developers already using DSH Desktop 0.2.x, who want search/fetch to align with DeepSeek’s billing model (billed per successful Tools call), and who want search results to enter the context as structured summaries.

Please note before use:

  • The plugin runs with the permissions of the current DSH process. Before installation, review the source code and the MIT license yourself, and configure DEEPSEEK_API_KEY in a trusted environment.
  • Billing and limits are subject to DeepSeek’s official documentation and the README’s Pricing and limits; do not assume they are the same as the default deepseek-official token billing.
  • The community directory SkillHub has no official affiliation with DeepSeek / High-Flyer. The plugin is community-maintained (current GitHub stars: 0, which is not a quality conclusion, only a directory lead).

Conclusion

dsh-web-tools-deepseek connects DSH’s web_search and web_fetch to DeepSeek’s native Search/Fetch API, uses a small Rust engine to handle HTTP, and can fall back to the default provider on failure. If you are building networked agents in Harness and want to compare “token-embedded search” with “per-request Tools API,” you can install and try it from the directory page or the repository README using the commands above.

  • Directory page: https://www.skillhub.cn/plugins/CarbonAnime/dsh-web-tools-deepseek
  • GitHub: https://github.com/CarbonAnime/dsh-web-tools-deepseek
羽毛球分组比赛记分
小程序二维码

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

Xiaoye