Preface¶
DeepSeek Harness (DSH) provides an interface ctx.web for internet capabilities. By default, DSH’s web_search tool relies on the model itself to perform searches. This method consumes model tokens, and the result set is derived from model requests. This plugin switches the search routing of ctx.web to a real search engine index by integrating Tavily’s dedicated search API, thereby achieving zero model token consumption while ensuring result quality.
Plugin Positioning¶
This is an implementation of WebSearchProvider for the unified ctx.web interface of DSH, maintained by user cxykyw.
Its core functions are:
1. Register a search provider with the ID tavily on ctx.web.
2. Map Tavily’s return results to DSH’s standard WebSearchResult format.
3. Dynamically resolve the API key during each search.
Installation¶
The plugin is published on npm with the package name dsh-tavily-cxykyw (note the distinction from the repository of the same name).
Execute the installation command in the DSH Web profile directory:
dsh plugin --profile web add dsh-tavily-cxykyw
If the current directory is the pnpm workspace root (the default ~/.dsh/profiles/web is an example of this), you need to add the -w flag:
dsh plugin --profile web add dsh-tavily-cxykyw -w
After installation, you need to restart dsh web because bundle changes do not support hot reloading.
Configure API Key¶
Before use, you need to obtain an API Key from app.tavily.com.
The plugin resolves the key in the following order during each search:
1. Literal configuration
2. Credential service (~/.dsh/.credentials.yaml)
3. Environment variables
Method 1: Credential File (Recommended, avoids repository leakage)
Add the following to ~/.dsh/.credentials.yaml:
TAVILY_API_KEY: tvly-xxxxxxxxxxxxxxxx
Method 2: Environment Variables
Set the environment variable for the process starting DSH:
TAVILY_API_KEY=tvly-xxxxxxxxxxxxxxxx dsh web
Method 3: Profile Patch
Configure directly in ~/.dsh/profiles/web/cordis.patch.yml (Not recommended, stored as plain text):
- id: web-search-tavily
config:
apiKey: tvly-xxxxxxxxxxxxxxxx
Usage and Options¶
After the plugin is registered, DSH automatically points web.searchProvider to tavily.
You can adjust the search depth and number of results via profile patch:
- id: web-search-tavily
config:
searchDepth: advanced
maxResults: 5
searchDepth: Options arebasic(fast, 1 credit) oradvanced(deep crawl, more credits).maxResults: The number of results returned per search, ranging from 1-20.
Notes and Limitations¶
- No Settings Page: DSH version 0.2 cannot mount a settings panel for this plugin; all configurations must be done via profile patch.
- Page Fetching Unchanged: The
fetch(page content acquisition) function is unaffected and remains handled by@deepseek-ai/dsh-web-fetch-http. - Missing Time Fields: Since Tavily search results do not include publication dates, the
sources[].publishedAtfield will not be set.
Summary¶
This plugin provides DSH with a real search engine access point based on Tavily, solving the issue of native search consuming tokens. For scenarios requiring low-cost, high-quality web retrieval, this is a direct replacement solution.