dsh-searxng-search: Making DSH's web_search use self-hosted SearXNG

Preface

Among the built-in tools exposed to the model in DeepSeek Harness (DSH), web_search defaults to the bundled DeepSeek search channel (deepseek-official). If you have already deployed SearXNG on your intranet or locally, and wish for search results to come from your own instance without altering the tool name or return format on the model side, you need to mount an additional search provider on DSH’s web capability seam and explicitly point searchProvider to it.

mimoxh/dsh-searxng-search is a community-maintained DSH bundle plugin (Category: Web Tools). It does exactly one thing: registers a search provider with the id searxng to respond to web_search requests via SearXNG’s JSON API. web_fetch remains handled by the bundled dsh-web-fetch-http and is unaffected.

What is this

  • Name: dsh-searxng-search (npm package name, current version 0.2.0)
  • Maintainer: mimoxh
  • License: MIT
  • Positioning: SearXNG search provider for DSH —— zero dependencies, no build step, utilizing only Node global fetch / URL / AbortSignal.

The plugin declares dsh.seams: ["web"] in package.json and accomplishes two things via cordis.patch.yml: mounts the searxng provider and sets the searchProvider for the web line to searxng (to avoid triggering WEB_PROVIDER_AMBIGUOUS when both it and deepseek-official are “available”).

Core Features

Below are the verified capability highlights from the README.

Unchanged Tool Contract

The tool remains the original web_search on the model side; parameters, result cards, and citation formats are consistent with DSH’s default behavior. Implementation reuses ctx.web.registerSearchProvider.

Zero Dependencies & Auditable

No npm packages are imported, and there is no build step. dsh-vet audits the consistency of seam declarations and implementations in CI. The repository includes 17 offline self-tests (npm test) requiring no network or dependency installation.

Multi-surface & Profile Isolation

The code only registers the seam and does not bind to a specific interface. Whichever profile it is installed into determines which surface takes effect: the desktop App uses the desktop profile (must be installed via the App’s plugin manager); dsh web / dsh tui / dsh headless correspond to the web, tui, and headless profiles respectively.

Compatibility (Original Source)

Item Requirement
DSH 0.2.0-rc.2 (verified); peerDependencies is ^0.2.0-rc.2
Node >= 20.3.0 (uses AbortSignal.any())
Runtime Dependencies None
Build Step None

DSH is currently in developer preview; the seam API (ctx.web.registerSearchProvider) may change with versions. This third-party project is not affiliated with DeepSeek.

SearXNG Preparation

If SearXNG is not ready before installing the plugin, common symptoms include no search results or HTTP 403. Perform the following steps before installation.

1. Enable JSON API

In SearXNG’s settings.yml, add json to search.formats, then restart SearXNG:

search:
  formats:
    - html
    - json

If JSON is not enabled, requests with format=json will return 403 (the same query via HTML might return 200).

2. Allow Programmatic Requests from DSH Hosts

SearXNG’s default rate limiting/bot detection may cause 429/403. The simplest approach for self-use is to disable the limiter in settings.yml or configure a whitelist for the DSH host IP (see the repository README “2.2 Allow requests from DSH hosts” for details).

3. Verify Reachability with curl

Replace the placeholder address with your instance:

curl -s -o /dev/null -w '%{http_code}\n' 'http://searxng.example:8888/search?q=test&format=json'

A return of 200 indicates JSON search is ready; 403 means you should return to the JSON format configuration.

Installation & Activation

Before installation, ensure baseURL points to a real SearXNG instance (see configuration items in the next section). If the repository’s default placeholder is unchanged, the provider’s available() will be false, and web_search will report WEB_PROVIDER_CONFIGURED_UNAVAILABLE.

Desktop: Plugin Manager

  1. Open the DSH Web interface → Sidebar Plugins → Add Plugin.
  2. Paste the absolute path of this repository, or paste the Git URL:
https://github.com/mimoxh/dsh-searxng-search
  1. Wait for pnpm to finish after installation.
  2. Completely exit and restart DSH (closing the window is not enough; ensure the process exits); bundle patches take effect upon startup.

This package is not yet published to npm; once published, the README provides commands like:

dsh plugin --profile <profile> add dsh-searxng-search

Command Line: Specify Profile (web / tui / headless common)

dsh plugin --profile web add github:mimoxh/dsh-searxng-search

Local directory example (replace path according to your environment):

dsh plugin --profile web add "D:/path/to/dsh-searxng-search"

After appending this package to bundles, the patch will override the default searchProvider; usually, only the instance address is needed.

Override baseURL via overlay (without modifying profile files)

Prerequisite: The corresponding profile has this package installed. Example from the repository examples/dsh-searxng.overlay.yml:

export SEARXNG_BASE_URL=http://192.168.1.20:8086
dsh web      --patch ./examples/dsh-searxng.overlay.yml
dsh tui      --patch ./examples/dsh-searxng.overlay.yml
dsh headless --patch ./examples/dsh-searxng.overlay.yml "Search for today's news"

The overlay reads SEARXNG_BASE_URL during the composition phase; if not set, the placeholder address will make the provider unavailable rather than silently falling back to the DeepSeek channel.

Extra Notes for Web-type Surfaces

In dsh web and the desktop client, besides the provider, ensure that the agent preset used by the current session has tool-web mounted; otherwise, even if searxng exists in the seam, no tool will invoke it. dsh tui / dsh headless use tool-web on the host plane; see the README “Two pitfalls when installing to other surfaces” for semantics and restart behavior.

Configuration Items

Configuration is located in the config of the web-search-searxng line in the bundle’s cordis.patch.yml:

Field Default Description
baseURL None (Env var SEARXNG_BASE_URL available) SearXNG address, including protocol/port/path prefix, no trailing slash
apiPath /search JSON API path
language Not sent e.g., zh-CN, en-US, all
categories Not sent e.g., general, general,news
engines Not sent e.g., google,bing
timeRange Not sent day / week / month / year
safeSearch Not sent 0 / 1 / 2
timeoutMs 15000 Single search timeout
maxResults 10 Provider limit; seam will also truncate based on web_search request

Typical Usage

After the installation and baseURL configuration above, and restarting DSH, simply let the model use web_search in conversations as usual, requiring no new tool names. Search requests will be sent to the SearXNG instance configured in baseURL (or SEARXNG_BASE_URL); page scraping still goes through the built-in web_fetch.

Headless one-off task example (consistent with README):

export SEARXNG_BASE_URL=http://192.168.1.20:8086
dsh headless --patch ./examples/dsh-searxng.overlay.yml "Search for today's news"

Use Cases & Notes

Who it is for: DSH developers who have deployed or can access SearXNG, wish to route DSH web searches through their own/internal aggregated search, and want to keep the web_search contract unchanged.

Before installation: The plugin runs with the permissions of the current DSH process and will make HTTP requests to the configured SearXNG. Before installation, you should read the Source Code & LICENSE to ensure the instance address and SearXNG security policies comply with your environment.

Verification: The repository provides npm test offline self-tests; for integration issues, refer to the README’s “Troubleshooting” and “Known DSH-side Issues”. For alternative paths (MCP), see README Section 8.

Links

The community plugin directory is an independent site and is not officially affiliated with DeepSeek / High-Flyer. Facts in this document are based on the repository README and package.json.

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

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

Xiaoye