dsh-web-search-plus: Priority Chain and Tavily Multi-Key Rotation in DSH Web Search

Preface

In DeepSeek Harness (DSH), web_search relies on the search provider selected by the ctx.web seam. The seam’s rules are strict: if a provider id is configured, only that one is used; failure is failure; when no id is configured and multiple providers are available, it throws WEB_PROVIDER_AMBIGUOUS. There is no built-in priority chain, nor any fallback of “switch to the second if the first fails.”

If you have configured both Tavily and DeepSeek native search at the same time, or want to spread free quota across multiple Tavily keys, the official seam itself cannot do ordering and rotation. dsh-web-search-plus (community catalog name: Web Search++) is maintained by polan-prologue and categorized as a networking tool. It registers a single provider web-search-plus, internally chains Tavily and DeepSeek native nodes, and supports multi-key rotation and failure fallback on the Tavily side.

What is this

dsh-web-search-plus is a web search enhancement plugin for DSH: it freely orders Tavily and DeepSeek native search, automatically tries the next when the previous one fails (or when empty results are treated as failure per configuration); on the Tavily side, up to 20 key slots rotate, and on 429 or quota exhaustion it cools down and switches to the next slot.

The DeepSeek node reuses the official provider instance; keys, account tokens, endpoints and usage limits still come from Settings → Web search, without re-implementing upstream logic.

The call relationship can be summarized as:

web_search tool
   └─ ctx.web (fixed to web-search-plus)
        ├─ 1. Tavily            → rotates among configured key slots
        └─ 2. DeepSeek native   → reuses official provider instance

Core Features

Ordered fallback

Adjust the chain order in the Priority card on the plugin page; the first node that successfully returns wins, and subsequent ones are not called. fallbackOnEmpty can decide whether “empty results” count as failure and continue the chain.

Tavily multi-key and state

Up to 20 Tavily key slots, rotating in the order of tavilyKeyRefs. Rate-limited (429) or quota-exhausted keys enter cooldown, and the chain automatically tries the next slot. Each slot shows real-time status (ready / invalid / cooling down), and the currently used slot is marked.

The Tavily keys card supports saving, clearing, removing, adding slots, and resetting cooldown; the Status card can query each slot’s current plan usage with one click.

Take over and hand back

After clicking Take over on Plugins → Web Search++, the seam uses this plugin’s chain. Hand back to official search writes the web line back to deepseek-official, and the chain is no longer consulted. The Try one search probe on the page is consistent with the real takeover state; it will not falsely report that the chain has executed when the seam points elsewhere.

Keys and UI

Keys are written via ctx.credentials, not into settings files, not into snapshot responses, not into logs. The list interface does not return key plaintext; when needed, a single slot can be revealed once via the eye button through a loopback-only, no-store route. Management routes only accept loopback, and have constraints on Origin, Sec-Fetch-Site, Content-Type of write requests, etc. The interface switches between Chinese/English following the DSH language.

Chain behavior summary

Situation Result
First node succeeds Returns that result, does not call subsequent nodes
First node throws Records reason, executes next node
Node not registered Marked as not registered, executes next node
Caller cancels Propagates immediately, will not continue fallback
All fail WEB_SEARCH_CHAIN_EXHAUSTED, one reason line per node

Installation and activation

Requires dsh 0.1.0 or newer. The plugin works via the ctx.web seam and webServer prefix routes; when the host is too old it will not register and explains the reason in logs. Node engine requires >=20 (see package metadata).

Install from npm (README original command):

dsh plugin --profile desktop add dsh-web-search-plus

After installing, refresh the browser once, open Plugins → Web Search++, and click Take over.

If you need to pin a Git tag instead of the npm release, the README gives:

dsh plugin --profile desktop add github:polan-prologue/dsh-web-search-plus#v0.1.2

Configuration and management

Options are written in the profile’s cordis.patch.yml plugin line, and can also be edited in the four cards on the plugin page: Priority (order and whether to enable the chain), Tavily keys, Tavily options, Status (takeover state, availability, probe search, usage query). When there is no experience platform it falls back to the kernel Built-in plugins page.

Key Default Meaning
priority [tavily, deepseek-official] Chain order
tavilyKeyRefs [TAVILY_API_KEY] Credential references, rotation order
tavilyBaseURL https://api.tavily.com Endpoint (auto-appends /search and /usage)
tavilyMaxResults 8 Results per search (1–20)
tavilySearchDepth basic basic / fast / ultra-fast / advanced
tavilyIncludeAnswer true Whether to request LLM summary from Tavily
tavilyTimeoutMs 30000 Per-request timeout
tavilyRateLimitCooldownMs 60000 Cooldown time after 429
fallbackOnEmpty false Whether empty results count as failure and continue chain

Tavily free tier is metered by account; multiple keys can only spread quota when they come from different accounts; advanced depth consumes double credits. The seam still only selects one provider id — this plugin is that id; ordering is plugin-internal logic, not a capability of the seam. On some builds, modifying the provider of the web line requires restarting the host; the page will prompt rather than silently fail.

Typical usage

  1. Install the plugin and refresh the browser.
  2. Configure one or more credential references in Tavily keys (default TAVILY_API_KEY).
  3. In Priority, drag Tavily and deepseek-official to the desired order; turn on the chain master switch and fallbackOnEmpty as needed (in configuration or the relevant item in Tavily options).
  4. Click Take over, and use Try one search in Status to verify the chain works as expected; use fetch per-key usage to view each Tavily slot’s usage when needed.
  5. When no longer using the chain, select Hand back to official search to hand back to official search.

Development-side self-testing (README):

npm test          # 238 unit tests, no network, no keys
npm run test:live # live search with real keys

Applicable scenarios and notes

Suitable for: Users already using web_search in the DSH desktop profile who want Tavily and DeepSeek native search to be orderable and fallback-capable; or users with multiple Tavily keys who need automatic switching between rate limits and quota.

Notes:

  • The plugin runs with the current dsh process permissions; before installing, please review the GitHub repository source code and MIT license yourself.
  • The DSH community plugin catalog (e.g. SkillHub entry) is an independent ecosystem site, with no official affiliation to DeepSeek / Huanfang; “everything is a plugin” is DSH’s product philosophy, and this article introduces a community-maintained networking tool plugin.
  • Tavily-side capabilities are constrained by Tavily account and API policies; DeepSeek native node behavior varies with Settings → Web search and upstream changes; this plugin deliberately reuses the official instance to reduce drift.

Ending

dsh-web-search-plus extends DSH web search from “the seam can only pin one provider” to “Tavily ↔ DeepSeek priority chain + Tavily multi-key rotation within a single provider”, and completes takeover, hand back and probes on the plugin page, with keys kept in the credential domain.

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

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

Xiaoye