DeepSeek Harness Web Search Provider Switch Plugin

Introduction

When using web_search in DeepSeek Harness, relying solely on the built-in Web search means that switching to another search engine (e.g., Exa) requires manually modifying configuration files, restarting, or clicking save — a lengthy operation chain. To quickly switch between “DeepSeek Native Search” and “Exa” on the same plugin configuration page, and to have the switch take effect immediately on the next search, a unified entry point and instant-activation mechanism are needed.

Plugin Overview

This is a DeepSeek Harness plugin package that adds a “Search provider” card on the Plugins page, offering a dropdown menu to select either “DeepSeek (Native Search)” or “Exa”. The selection is written to web.searchProvider, so the next web_search call will use the new provider without requiring a restart or save. Maintainer: qwunros.

Core Capabilities

  • The plugin displays a search provider card under Plugins → Built-in plugin configuration → Search provider.
  • After selecting an option from the dropdown, web.searchProvider is written immediately, and the next web_search call uses the new provider.
  • When DeepSeek is selected, the built-in Web search page remains visible, continuing to use DeepSeek’s key, endpoint, and result settings.
  • When Exa is selected, the built-in Web search page is hidden, and this card takes over Exa’s key and result settings.
  • Once an Exa API key is configured, search calls POST https://api.exa.ai/search and maps the results into citable sources.
  • Without a key, search uses Exa’s free hosted MCP endpoint https://mcp.exa.ai/mcp and its web_search_exa tool, parsing the returned title, URL, publication date, and highlighted content.
  • The Exa key is stored in Harness’s credential store under the key name EXA_API_KEY; configuration files do not carry plaintext secrets.
  • The result limit maxResults defaults to 5, and is also constrained by dsh-tool-web’s searchMaxResults (default 8), with a range of 1–50.
  • The plugin does not proactively select Exa upon activation; it only disables the plugin if Exa is still selected, automatically falling back to the previously recorded provider to avoid web.searchProvider pointing to a non-existent provider.

Installation & Activation

This plugin is a bundle, installed via the Harness plugin manager’s directory:

dsh plugin add ./

After installation, the plugin inserts a web-search-exa settings row via cordis.patch.yml while keeping the built-in ui-settings-web-search enabled, so the DeepSeek page and selection remain intact.

Typical Usage

  1. Open the card under Plugins → Built-in plugin configuration → Search provider.
  2. Select Exa from the “Search provider” dropdown menu.
  3. Configure the Exa API key below (if needed), and set maxResults (1–50, default 5).
  4. The next web_search call will use sources returned by Exa.
  5. If you switch back to DeepSeek, the built-in Web search page reappears, continuing to use DeepSeek’s search configuration.

Use Cases & Notes

  • Suitable for scenarios where you need to quickly switch search engines in DSH and want instant activation without a restart.
  • The plugin runs with the current DSH process permissions; review the source code and license (MIT) before installing.
  • The Exa free endpoint https://mcp.exa.ai/mcp depends on network connectivity and Exa service availability.
  • Tests cover ExaMCP text parsing, search abortion, and both with-key and without-key scenarios. Run them via node test/provider.test.mjs and node test/selection.test.mjs; with-key tests require the EXA_API_KEY environment variable.

Summary

This plugin provides a unified search provider switching entry point on the DSH plugin configuration page, enabling instant switching between DeepSeek and Exa to reduce configuration and restart overhead. For more details, visit: https://github.com/qwunros/dsh-search-mgr

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

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

Xiaoye