Introduction

The design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When the built-in search provider cannot meet the needs of a specific scenario, developers need to integrate external APIs. This plugin connects ByteDance’s feedcoop global_search API to the ctx.web capability seam in DSH, adding Doubao’s web search capability to DSH.

Plugin Overview

This is an out-of-tree bundle plugin. It registers a WebSearchProvider (id: doubao) with ctx.web and ships with a cordis.patch.yml layer. After installation, it automatically mounts the provider and switches the default search selection to doubao. The plugin has zero runtime dependencies and does not modify the harness source code.

Installation and Enablement

Run the following command in the harness repository root directory:

dsh plugin --profile web add github:JayLi52/dsh-web-search-doubao

The installation process automatically links the package into the profile, adds the bundle layer to dsh.profile.bundles, mounts the provider, and switches searchProvider: doubao. It is ready to use immediately after installation, with no manual configuration changes required.

Token Configuration

After installation, a feedcoop Bearer token is required. The environment variable method is recommended.

  1. Add the following line to $DSH_HOME/.env (default on Windows: C:\Users\<you>\.dsh\.env):
DOUBAO_SEARCH_API_KEY=<你的-token>
  1. Restart dsh web (environment variables are loaded at startup).

Subsequent configuration changes (except the token) can take effect through hot reload. You can also inline the token in the profile’s cordis.patch.yml, but changing the environment variable requires a restart.

Verify the configuration:

dsh --profile web --dump-config | grep -A3 web-search-doubao

Configuration Items

Field Default Description
apiKey '' Bearer token; if empty, falls back to reading $<apiKeyEnv>. If both are empty → the provider is unavailable
apiKeyEnv DOUBAO_SEARCH_API_KEY Environment variable name for the token
baseURL https://open.feedcoopapi.com API base URL
docCount 10 Default DocCount when the request does not include maxResults
maxSnippetLength 300 Maximum snippet length for each result

Usage Example

In a new Web UI session, ask the model to call the web_search tool; search requests will then go through the Doubao provider.

If you suspect the search is not going through Doubao, you can use a --patch overlay to inject a bad key and run a one-off task:

dsh --profile headless --patch ./wrong-key-test.yml "用 web_search 搜 海淀必去景点"

Frequently Asked Questions

Tool call reports unknown tool "", and the model gets stuck in a thinking-only loop
This is not a problem with this plugin. The harness llm-deepseek adapter has a parsing bug for streams where continuation chunks carry empty-string id/name values (e.g., OpenAI-compatible endpoints such as DashScope compatible mode), which overwrites the tool name with an empty string. See the fix in deepseek-harness packages/llm/llm-deepseek/src/translate.ts (overwrite only when non-empty). Using the official DeepSeek endpoint is not affected.

Doubao API error: invalid_api_key
The token is incorrect or not set. Check $DSH_HOME/.env or the apiKey in the patch; changing the environment variable requires a restart.

WEB_PROVIDER_CONFIGURED_UNAVAILABLE
doubao is selected, but available() is false, meaning the token has not been configured.

WEB_PROVIDER_AMBIGUOUS
Multiple providers are available and searchProvider is not configured. Explicitly specify the provider ID.

Changes to cordis.patch.yml do not take effect
The patch is hot-reloaded; if parsing the entire layer fails, the old tree is retained and a log is printed. Check whether the YAML is a top-level array.

Notes

When sharing with others, the profile directory itself is not portable (package.json contains a local link: absolute path), and the model key (DEEPSEEK_API_KEY or the configuration on the Models page) must be provided by the recipient.

Summary

This plugin provides Doubao’s web search capability for DeepSeek Harness. It is simple to install, dependency-free, and suitable for DSH scenarios that require enhanced web search functionality.

References:
- GitHub Repository
- Plugin Directory Page