Overview

The design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” DSH’s built-in search router (deepseek-official) invokes an expensive model (such as deepseek-v4-flash) for a full round of conversation during web_search, regardless of the current session model. This causes unnecessary token consumption and cost.

dsh-web-search-ddg is a web tool plugin for DeepSeek Harness, maintained by aooyoo. It provides zero-token web search capability, replacing DSH’s built-in high-cost search router with local headless browser and API calls.

Core Features

  1. Router Replacement: Replaces DSH’s built-in search router with zero-cost engines (Bing and DuckDuckGo).
  2. Zero Cost: Does not consume model tokens, requires no API key, and does not initiate auxiliary model requests.
  3. Zero Dependencies: Uses only built-in Node.js modules; no external dependencies such as Playwright or Puppeteer are required.
  4. Fallback Mechanism: Engine fallback mechanism (first success wins); if one engine is blocked or its HTML changes, the other engine takes over.
  5. Compatibility Preserved: Keeps the built-in provider registration; switching back to official search only requires one configuration line.

Installation and Enablement

In a DSH profile directory (for example ~/.dsh/profiles/web), install it as an offline plugin:

pnpm add dsh-web-search-ddg

Declare the bundle in the profile’s package.json so that DSH loads it as a first-class layer (visible in the plugin manager and cleanly removable):

"bundles": [..., "dsh-web-search-ddg"]

Select the provider in the profile’s cordis.patch.yml:

# 选择该提供者供模型侧的 web_search 工具使用。
- id: web
  config:
    searchProvider: ddg-browser

Note: A patch line replaces the entire configuration of the target line (no deep merging is supported), so the web line must restate all keys. The built-in web-search-deepseek line remains unchanged; switching back to official search only requires changing searchProvider back to deepseek-official.

Typical Usage

  1. Installation: Run pnpm add dsh-web-search-ddg.
  2. Declaration: Add "dsh-web-search-ddg" to bundles in the profile package.json.
  3. Configuration: Set searchProvider: ddg-browser in cordis.patch.yml.

Applicability and Notes

  • Environment Requirements: Requires a DSH host environment (version ≥ 0.1.0-rc) and Node.js ≥ 18.
  • Local Browser: The DuckDuckGo engine requires a local Chromium-based browser. The plugin automatically detects Chrome, Edge, or Chromium on macOS, or /usr/bin/chromium//usr/bin/google-chrome on Linux. The Bing engine does not require a browser.
  • Cookie Dependency: The quality of the Bing engine depends on cookies. The plugin visits the Bing homepage and injects a cookie during a session; if the results are empty, it re-bootstraps the cookie.
  • Permissions: The plugin runs with host privileges. Be sure to review the source code and license before installation.

Conclusion

This plugin addresses the high cost of DSH’s official search through local engines and a browser, while maintaining good flexibility and a fallback mechanism. The related documentation and source code are located in the GitHub repository.