dsh-9router-web-search: 9router Backend Web Search and Retrieval

The native search tool (web_search) in DeepSeek Harness (DSH) relies by default on the Anthropic web_search_20250305 tool definition supplied by the upstream service. Meanwhile, 9router, as an OpenAI-compatible gateway, usually does not provide server-side search capabilities directly; instead, it forwards tool definitions to the model. This plugin resolves that conflict by directly mounting DSH’s native web_search and web_fetch tools onto 9router’s gateway endpoints, enabling them to use the search and fetch capabilities provided by 9router.

Plugin Overview

  • Name: dsh-9router-web-search
  • Author: lordraiden
  • Category: Web tools
  • License: MIT

Core Capabilities

  1. Endpoint routing: Routes DSH’s web_search to 9router’s /v1/search, and web_fetch to /v1/web/fetch.
  2. Native settings panel: Provides a native settings card in DSH for configuring the API Key, Base URL, model, timeout, and limit parameters.
  3. Zero-config wiring: Uses bundle patches to automatically pin web.searchProvider and web.fetchProvider to 9router, without manual configuration.
  4. Credential awareness: Supports reading NINE_ROUTER_API_KEY from DSH’s credential service. The API Key is optional, and local instances without a Key can also run directly.
  5. Pure ESM implementation: No build step required; plug and play.

Installation and Activation

  1. Install the plugin
    Use DSH’s CLI to install the plugin into the web profile.
    npx @deepseek-ai/dsh plugin --profile web add github:lordraiden/dsh-9router-web-search
To pin a version (for example, `v0.2.3`), append a tag after the command:
    npx @deepseek-ai/dsh plugin --profile web add github:lordraiden/dsh-9router-web-search#v0.2.3
  1. Configure the gateway address
    After installation, find the plugin card in DSH’s settings panel and set baseURL to your 9router gateway address. This address must be http or https. If not configured, the provider will report itself as unavailable.

  2. Restart and refresh
    Restart Harness and perform a hard refresh in the browser to load the new plugin options.

Configuration Notes

The plugin provides several configuration items in DSH’s settings panel:

  • baseURL: The base address of the 9router-compatible gateway.
  • searchModel / fetchModel: Specify the model names used by the search and fetch endpoints, respectively (defaults to search-combo / fetch-combo).
  • searchType: The search type sent to the search endpoint (default is web).
  • timeoutMs: The unified request timeout (default 30000ms).
  • apiKey: The API Key entered directly (optional), used in credential-free environments.
  • apiKeyEnv: The key name referenced in DSH’s credential service (default is NINE_ROUTER_API_KEY).

Notes

  • DSH version requirement: This plugin requires DSH version >= 0.1.7-rc.1.
  • Gateway dependency: A 9router-compatible gateway must be deployed; the plugin does not support implicit fallback endpoints.
  • Security protection: The web_fetch capability delegates URL extraction and SSRF protection entirely to the 9router server; the plugin itself does not implement a local SSRF policy. Please ensure you are running a security-patched version of 9router.

Summary

dsh-9router-web-search is a DSH adapter layer designed for 9router gateways. It bypasses DSH’s default search tool requirement and directly calls 9router’s /v1/search and /v1/web/fetch endpoints through native tool definitions, enabling web search and fetch capabilities in an OpenAI-compatible gateway environment.

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

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

Xiaoye