Introduction

DeepSeek Harness (DSH) is currently in preview. Its “everything is a plugin” architecture allows developers to extend functionality as needed. When developing agents or using them day-to-day, web search is often a core capability. However, relying on a single API key can easily run into rate limits or quota exhaustion. To solve the bottleneck caused by a single key, this article introduces a multi-key management plugin that takes over DSH’s search and fetch capabilities through the Tavily interface.

What It Is

dsh-tavily-pool is a network tool plugin maintained by stormbuf. It provides DeepSeek Harness with Tavily-based web search and page fetching capabilities. The plugin’s core value lies in managing a key pool: using balance-aware rotation and automatic failover to ensure continuity and stability for search requests.

Core Features

The plugin implements the following specific features:

  1. Multi-key pool management
    Supports bulk pasting API keys (one per line). In the settings panel, you can label keys, enable/disable them, reorder them, and delete them in bulk. The interface always displays masked keys. Keys are input only through the settings panel and are not read from environment variables or credential services.

  2. Balance-aware rotation
    The plugin preferentially uses the key with the highest remaining balance. It supports unlimited-key detection (when both key.limit and account.plan_limit are null). It periodically refreshes balance data through the official /usage endpoint and does not maintain local accounting, avoiding drift caused by changes to billing rules.

  3. Automatic failover and cooldown
    When a request using a key fails, the plugin automatically switches to the next available key. It also respects upstream Retry-After headers and hard-excludes keys that are cooling down, preventing overload.

  4. Capability takeover and configuration

    • Search takeover: Takes over the web_search interface, with configurable depth, result limit, topic, and answer-generation toggle.
    • Fetch takeover: Disabled by default. When enabled, it maps web_fetch to Tavily’s /extract endpoint and returns plain text instead of HTML.
    • Independent toggles: Search and fetch can be switched back to the official provider independently.
  5. Invocation monitoring
    Records detailed information for each invocation (key, endpoint, result, duration, and request_id) and provides a 14-day invocation-count chart. The data file is limited by entry count and a 30-day window.

  6. Technical characteristics
    Implemented with pure ESM, has zero runtime dependencies, and requires no build step.

Installation and Enablement

Installing this plugin requires a DeepSeek Harness environment.

  1. Run the following command to install the plugin:
dsh plugin add dsh-tavily-pool

Or install from GitHub (no npm account registration required):

dsh plugin add github:stormbuf/dsh-tavily-pool

To install a specific version, use:

dsh plugin add github:stormbuf/dsh-tavily-pool#vX.Y.Z
  1. After installation, restart DSH.

  2. Go to Settings → Plugins → dsh-tavily-pool and paste your Tavily API key(s) in the settings panel.

Typical Usage

After enabling the plugin, search and fetch are taken over by default. You can adjust search parameters in the settings panel, such as search depth and result limit.

  • Switch providers: If you want to fall back to the official search or fetch provider, you can turn off the corresponding toggle in the settings panel.
  • Key management: In the key list, you can add new keys at any time, adjust the sorting order (balance-first or manual order), or remove keys no longer in use.

Use Cases and Notes

  • Use cases: Developers who need highly available web search, have multiple Tavily API keys, or need to obtain plain-text page content via fetching.
  • Notes: Because DeepSeek Harness is in preview, the plugin uses an adapter layer to isolate host-specific knowledge. Before installing, review the source code and confirm that the license (MIT) meets your project requirements. The plugin accepts key input only via the DSH settings panel and does not rely on environment variables.

Conclusion

By centrally managing the key pool and using intelligent scheduling strategies, the plugin resolves stability issues associated with single-key search. Its zero-dependency design and independent configuration panel also reduce integration complexity. For more technical details, see its GitHub repository.