dsh-web-search-tavily-relay: Configuring Tavily and Relay Search on ctx.web

Preface

The web_search tool built into DeepSeek Harness (DSH) operates via the ctx.web seam. If you wish to use Tavily for web search, the common approach is to mount the official tavily-mcp and integrate it via dsh-mcp-client. However, when using a relay domain, a custom base URL, or when you simply want the built-in web_search to uniformly route through a single provider, the MCP path often falls short: the endpoint is hardcoded to https://api.tavily.com/..., the tool bypasses ctx.web, and the model may be forced to choose between two sets of tools.

The following section introduces the community plugin dsh-web-search-tavily-relay (maintained by hjnvv00v). It registers the search provider into ctx.web, allowing the Harness’s native web_search to call this implementation directly. This requires no learning of new tools and involves no intermediate MCP process.

What is this

dsh-web-search-tavily-relay is a Tavily-compatible web search provider designed for the DSH ctx.web interface. It supports the official Tavily API, relays that mirror the Tavily REST format, and gateways exposing OpenAI-compatible interfaces. Users can switch endpoints, credentials, and wire protocols through configuration. The current version of the plugin is 0.2.0, licensed under MIT, and categorized under “Web Tools” in the community directory.

Differences from the Official Tavily MCP (Design Motivation from README)

The README explicitly contrasts the seam-native solution with tavily-mcp:

  1. The MCP endpoint is fixed to https://api.tavily.com/{search,extract,crawl,map,research,feedback}. It cannot be configured with a base URL, rendering custom domains unusable.
  2. MCP tools bypass ctx.web. The built-in web_search continues to use the provider selected in the seam, meaning the model might face two parallel sets of tools.

This plugin follows the seam-native path: one provider, three wire protocols, and one configurable endpoint.

Supported Wire Protocols

Select the request format via protocol (aliases such as responses, chat, rest, etc., are also accepted; baseURL can be either a base path or a full URL):

protocol Request Method Use Case
tavily (default) POST {base}/search, Tavily native body Tavily official or relays with identical REST structure
openai-responses POST {base}/responses, native web_search tool OpenAI-compatible gateways exposing the Responses API
openai-chat POST {base}/chat/completions, with web_search_options Chat Completions gateways that perform search and citation on the model side

Sources in the search results are read exclusively from structured evidence: Tavily’s results[], url_citation and web_search_call sources within Responses, and annotations within Chat. If the gateway lacks annotations, it falls back to links found in the markdown of the answer.

Configuration Essentials

Configuration can be edited on the plugin page in the Web sidebar under Plugins, or written into the profile’s cordis.patch.yml. Common fields are listed below (default values and meanings are subject to the README):

Field Default Meaning
providerId tavily Registration ID; must match searchProvider in the web entry
protocol tavily tavily / openai-responses / openai-chat
baseURL Varies Relay domain or full endpoint; if empty, uses https://api.tavily.com for Tavily or https://api.openai.com/v1 for OpenAI protocols
apiKey Omitted Plaintext key; apiKeyEnv is recommended to avoid keys in config files
apiKeyEnv TAVILY_API_KEY Resolved via ctx.credentials then startup environment
authStyle auto auto / bearer / body / header / none
searchDepth basic Tavily search_depth
maxResults 5 Maximum number of results requested from the provider
includeAnswer "false" Whether to request a synthesized answer from Tavily as the result content
defaultParameters Omitted Similar to the official MCP’s DEFAULT_PARAMETERS: a JSON object merged last into the request body. It can override or add Tavily parameter fields (query cannot be overridden)
timeoutMs 30000 Timeout for a single request

Example of defaultParameters (can be written directly as an object in profile YAML; the plugin card may also write it as a JSON string, yielding the same result):

- id: web-search-tavily
  name: dsh-web-search-tavily-relay
  config:
    baseURL: https://relay.example
    defaultParameters:
      time_range: week
      country: China
      exact_match: true

Authentication: authStyle: auto sends Authorization: Bearer <key> and, under the tavily protocol, includes api_key in the body to accommodate various relay implementations. Key resolution order: apiKey → ctx.credentials (apiKeyEnv) → DSH startup environment. Keys written in the config page go to the credentials domain and do not land in the settings document. If no key is present, requests to https://api.tavily.com will use Tavily’s keyless mode.

The package includes cordis.patch.yml: upon installation, it mounts the loader and points the searchProvider of the web entry to tavily (bound to the provider selection mechanism, requiring activation alongside the plugin). ctx.web reads searchProvider once when constructing the seam; it does not guess when multiple providers are available, and it fails to work if not selected. Installing this plugin completes part of the pinning process.

Installation and Activation

Official installation command (web is the profile name; on desktop, this can be replaced with desktop, etc.):

dsh plugin --profile web add github:hjnvv00v/dsh-web-search-tavily-relay

Running dsh plugin add standalone is also acceptable; the bundle already includes the patch. After installation, open the plugin page in the Web sidebar Plugins, configure credentials, and if using a relay, change the endpoint, then reload the UI.

Installing from a local package directory (README instructions for non-git clone scenarios):

node install.mjs                 # Copies to desktop profile and wires the seam
node install.mjs --profile web   # Or other profiles

install.mjs packs the plugin into <profile>/node_modules, writes to dsh.profile.bundles, and records dependencies. It is re-runnable and backs up modified files; node install.mjs --uninstall can revert changes.

Runtime requirements: Node.js >= 22 (see engines in package.json).

Typical Usage

  1. Add the plugin to the target profile using the command above.
  2. Set the environment variable corresponding to apiKeyEnv or credentials in the plugin page or cordis.patch.yml. Set baseURL and protocol if necessary.
  3. After reloading the UI, the Harness’s built-in web_search will perform web retrieval via this provider. There is no need to mount a separate MCP tool for searching.

If the relay only accepts Bearer or only accepts keys in the body, set authStyle to bearer, body, or header. For OpenAI-compatible gateways, change protocol to openai-responses or openai-chat and adjust fields like model, responsesToolType, chatWebSearchOptions according to the gateway requirements.

Use Cases and Notes

Who it is for: Developers already using the built-in web seam in their DSH Web/Desktop profiles who want to connect Tavily, Tavily-shaped relays, or OpenAI-compatible search gateways to web_search uniformly.

Notes:

  • The plugin accesses the network with the permissions of the current DSH process and holds your configured API key. Before installation, please review the GitHub repository source code and the MIT license to ensure compliance with your security and compliance requirements.
  • The community plugin directory (e.g., the SkillHub entry) is an independent ecosystem site and has no official affiliation with DeepSeek or HiaInfo. “Everything is a plugin” is a DSH product philosophy; this article introduces a community-maintained web tool plugin.
  • When includeRawContent is true, Tavily may return raw_content, but the seam’s source format lacks a full-page field. It can only be used as a supplement when the snippet is missing; full-page scraping should use other capabilities like web_fetch (as stated in the README).

Links

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

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

Xiaoye