Walvez/dsh-search-failover 预览 preview

Walvez/dsh-search-failover

DSH 提供商级网络搜索故障转移池:8 个免费/付费后端,带配额感知熔断(保留原生 web_search)

Project Overview项目介绍

This is a native DSH plugin that replaces DSH's default official web search provider with a multi-source failover search pool. The default DSH search route consumes DeepSeek model tokens for every search request, because it runs a full model call to execute the search on DeepSeek's servers. This plugin connects directly to third-party search endpoints, so it consumes zero model tokens, and handles both web search and web fetch requests with built-in failover and cost management. To install, you can add it via the DSH plugin manager or install it from npm, then start DSH Web to access the configuration panel.

After installation, the plugin transparently replaces DSH's default search and fetch providers without changing the existing tool interface, so you don't need to modify any existing agent workflows. It includes a modern card-based web GUI settings panel in the DSH settings page, where you can add API keys, adjust priorities and weights, and test connectivity for each source. All API keys are stored locally in your ~/.dsh/settings.yaml file, and changes take effect immediately without requiring a DSH restart. If you uninstall the plugin, DSH automatically falls back to the original official search provider. The plugin also supports multiple API keys for a single engine, so you can rotate between keys when one hits its quota limit.

This plugin supports 10 different search backends, including Exa, Serper, Tavily, Jina, Firecrawl, SerpApi, SearXNG, DuckDuckGo, Brave, and OpenCodex. It implements two traffic routing strategies: failover by priority, where it tries sources from highest to lowest priority, and weighted round-robin to spread traffic across healthy sources to maximize free quota usage. It also has a circuit breaker that puts unhealthy or quota-exhausted sources into cooling periods, and automatically probes them to restore service when the cooling period ends. The project is released under the open source MIT license, and requires Node.js 22.0.0 or newer to run correctly. It also includes a full test suite to verify core functionality.

这是一个专为 DeepSeek Harness (DSH) 开发的原生搜索与抓取容灾插件,用于替换 DSH 默认的官方搜索通道。不同于默认搜索每次都需要消耗 DeepSeek 模型令牌,本插件直连各类第三方搜索端点,不消耗模型令牌,同时接管搜索和网页抓取功能,自带多源容灾、加权轮询、额度感知熔断等核心能力,可大幅降低搜索环节的使用成本。

安装后会自动接管 DSH 的 web_search 和 web_fetch 调用,保持原有工具接口不变,无需修改现有 Agent 工作流。用户可通过 DSH 设置页的卡片式图形面板配置各搜索源的 API 密钥、优先级和权重,配置保存后立即生效,无需重启 DSH 进程,所有密钥都保存在本地不会上传。适合需要控制 DSH 使用成本、提升搜索可靠性的用户。

本插件要求 Node.js 版本不低于 22.0.0,支持 10 种不同的搜索和抓取后端,包括 Exa、Serper、Tavily、Jina、Firecrawl、SearXNG 等,还支持单引擎多密钥轮换。项目采用 MIT 许可证开源,安装完成后启动 DSH Web 即可进入设置面板配置,卸载后自动回落到官方搜索通道。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-search-failover

把 Walvez/dsh-search-failover 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-search-failover

npm version build status node version license awesome plugin

DeepSeek Harness (DSH) 原生 provider 级智能搜索 / 抓取池
直连检索端点,模型 Token = 0 · 多源容灾 · 加权轮询 · 额度感知熔断 · AI 自主换源 · 现代卡片流 Web GUI

DSH 搜索池设置面板


为什么不用官方默认搜索?

DSH 默认通道 deepseek-official 不是专用搜索 API:每次 web_search 都会发起一轮完整 Messages 模型调用,由 DeepSeek 在服务端执行搜索。这意味着:

官方 deepseek-official 本插件 search-pool
检索方式 一整轮 LLM 调用 + 服务端 web_search 工具 直连 Exa / Tavily / Jina / Firecrawl 等检索端点
模型 token 每次搜索都烧(input + output),结果还会回灌上下文 0(纯检索,不碰任何 LLM)
计费来源 DEEPSEEK_API_KEY 余额 各引擎自己的免费额度
抓取 web_fetch 同样走官方通道 同步接管:Jina Reader / Exa Contents / Tavily Extract / Firecrawl Scrape
宕机 / 额度耗尽 整条链路挂掉 熔断冷却 + 自动下探下一个引擎 / 下一个 Key

装上即把 searchProvider 与 fetchProvider 都指到 search-pool。卸载后自动回落到官方通道。


✨ 核心特性

  • 🛡️ Provider 级透明替换:无侵入接管 DSH ctx.web 的 搜索 + 抓取,保持原生 web_search / web_fetch 工具签名不变。
  • 🔄 双重路由策略:
    • 优先顺序 (Failover):按优先级从高到低依次尝试,前一个后端失败或熔断自动下探下一个。
    • 加权轮询 (Weighted Rotate):按 1~10 权重将搜索流量平摊到所有健康引擎,最大化榨干各大搜索源的免费额度。
  • ⚡ 智能额度感知与熔断器 (Circuit Breaker):
    • 遇到额度耗尽(HTTP 402/429/Quota Exceeded)→ 长冷却 (1h),避免无效请求;
    • 遇到临时网络抖动(Transient Error)→ 5 分钟内连续 3 次失败触发 短冷却 (60s);
    • 冷却到期自动半开探活,成功立即恢复。
  • 🤖 AI 自主换源技能 (web_search_from):
    • 为 Agent 注入专属换源工具。当 AI 认为默认结果不够理想、信息过时或源单一时,可自主选择 exa / serper / tavily / jina / firecrawl 等引擎重新搜索并对比。
  • 🎛️ 现代卡片流 Web GUI 设置面板:
    • 在 DSH 设置页一键填写/修改 API Key、切换策略、拖拽排序、测试连通性,保存即实时生效,无需重启进程。
    • 密钥安全保存在本地 ~/.dsh/settings.yaml,绝不上报。
  • 🔑 单引擎多 Key 轮换:同一后端可换行或逗号填多个 Key;Key A 额度耗尽先切 Key B,全部挂了才熔断下探下一个引擎。
  • 🔌 全生态适配:
    • 搜索:Exa, Serper, Tavily (keyless 匿名档), Jina, SerpApi, Firecrawl, SearXNG (自托管), DuckDuckGo, Brave
    • 抓取:Jina Reader (r.jina.ai) · Exa Contents · Tavily Extract · Firecrawl Scrape

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev AgentCat 下一个 Next dsh-session-repair →