Walvez/dsh-search-failover ↗★ 4

dsh-search-failover

Provider-level web search+fetch pool for DeepSeek Harness: bypass the official LLM search channel (0 model tokens), failover/rotate across Exa/Tavily/Jina/Firecrawl/Serper/SerpApi/SearXNG/DDG/Brave with quota-aware circuit breaking, multi-key rotation, and a GUI settings page. 适合需要整合 Exa、Tavily 等多渠道搜索,并实现自动轮询与故障转移的用户。

Package
dsh-search-failover
Compatibility
Unverified
Harness peer range
^0.1.0-rc.6
Version
0.3.11
License
MIT
Last updated
Aug 28, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Walvez/dsh-search-failover

2. 启用配置

在 cordis.patch.yml 中声明挂载与默认后端配置:

- id: search-pool
  name: dsh-search-failover
  config:
    strategy: failover          # failover (优先顺序) | rotate (轮询分摊)
    maxResults: 8               # 默认返回条数上限
    timeoutMs: 15000            # 单个请求超时时间 (ms)
    backends:
      - id: exa
        kind: exa
        apiKeyEnv: EXA_API_KEY  # 从 ~/.dsh/.env 读取
        priority: 1
      - id: serper
        kind: serper
        apiKeyEnv: SERPER_API_KEY
        priority: 2
      - id: tavily
        kind: tavily
        apiKeyEnv: TAVILY_API_KEY
        priority: 3
      - id: jina
        kind: jina
        apiKeyEnv: JINA_API_KEY
        priority: 4
      - id: firecrawl
        kind: firecrawl
        apiKeyEnv: FIRECRAWL_API_KEY
        priority: 5
      - id: serpapi
        kind: serpapi
        apiKeyEnv: SERPAPI_API_KEY
        priority: 6
      - id: searxng
        kind: searxng
        baseURL: http://127.0.0.1:8080
        priority: 7
      # opencodex web-search sidecar (可选, 默认不启用):
      # 本机 opencodex 代理的 Codex 登录额度执行真搜索, 结果带摘要质量最高,
      # 但比纯检索端点慢 (~3-15s)。需要本机运行 opencodex (127.0.0.1:10100)。
      # - id: opencodex
      #   kind: opencodex
      #   priority: 0              # 置顶 = 首选, 失败熔断自动下探
      #   # baseURL: http://127.0.0.1:10100
      #   # apiKey: ocx_data_dsh   # 默认免 token / 自定义 token 时填
      #   # carrierModel: opencode-go/glm-5.3-flash
    circuit:
      threshold: 3              # 连续错误阈值
      burstWindowMs: 300000     # 统计时间窗口 (5 分钟)
      cooldownMs: 60000         # 瞬时错误冷却时间 (1 分钟)
      quotaCooldownMs: 3600000  # 额度耗尽冷却时间 (1 小时)