
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-search-failover
Advanced tools
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, an
DeepSeek Harness (DSH) 原生 provider 级智能搜索 / 抓取池
直连检索端点,模型 Token = 0 · 多源容灾 · 加权轮询 · 额度感知熔断 · AI 自主换源 · 现代卡片流 Web GUI
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。卸载后自动回落到官方通道。
ctx.web 的 搜索 + 抓取,保持原生 web_search / web_fetch 工具签名不变。web_search_from):
exa / serper / tavily / jina / firecrawl 等引擎重新搜索并对比。~/.dsh/settings.yaml,绝不上报。r.jina.ai) · Exa Contents · Tavily Extract · Firecrawl Scrape┌──────────────────────────────────────────────────────────────┐
│ AI Agent / User Chat │
└──────────────┬────────────────────────────────┬──────────────┘
│ (默认搜索 / 抓取) │ (显式换源)
▼ ▼
┌──────────────────────────────┐ ┌─────────────────────────────┐
│ 原生 web_search / web_fetch │ │ web_search_from (增强工具) │
└──────────────┬───────────────┘ └──────────────┬──────────────┘
│ │
▼ ▼
┌──────────────────────────────────────────────────────────────┐
│ SearchPoolProvider (search-pool) │
│ │
│ [调度决策] │
│ ├── 指定源 (source): 直连指定引擎, 不走池 │
│ ├── Failover: 按 priority 升序依次尝试 │
│ └── Rotate: 按 weight 展开加权轮转 │
│ │
│ [熔断与健康守护] │
│ ├── CircuitBreaker 监控各后端健康度 │
│ └── 额度耗尽(1h 冷却) / 瞬时错误(60s 冷却) / 探活恢复 │
└──────────────────────────────┬───────────────────────────────┘
│
┌──────────┬──────────┬─────┴────┬──────────┬──────────┬──────────┐
▼ ▼ ▼ ▼ ▼ ▼ ▼
┌─────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌─────────┐┌─────┐ ┌─────────┐
│ Exa │ │Serper│ │Tavily│ │ Jina │ │Firecrawl││Serp-│ │ SearXNG │
│ │ │ .dev │ │(Anon)│ │ AI │ │ .dev ││ Api │ │ (Local) │
└─────┘ └──────┘ └──────┘ └──────┘ └─────────┘└─────┘ └─────────┘
web_fetch 同步走搜索池(Jina Reader / Exa / Tavily / Firecrawl),享受同一套熔断与多 Key。在你的 DSH 项目或 Web Profile 下安装:
# 方式 A: 从 npm 安装 (推荐)
dsh plugin --profile web add dsh-search-failover
# 方式 B: 本地克隆软链调试 (开发者)
git clone https://github.com/Walvez/dsh-search-failover.git
dsh plugin --profile web add link:$(pwd)/dsh-search-failover
在 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
circuit:
threshold: 3 # 连续错误阈值
burstWindowMs: 300000 # 统计时间窗口 (5 分钟)
cooldownMs: 60000 # 瞬时错误冷却时间 (1 分钟)
quotaCooldownMs: 3600000 # 额度耗尽冷却时间 (1 小时)
dsh web
打开 Web GUI (默认 http://127.0.0.1:3080),进入 设置 → 搜索池 即可在界面直接管理所有 Key。
引擎标识 (kind) | 搜索 | 抓取 | 官方免费额度 (核实) | 密钥 | 申请页 |
|---|---|---|---|---|---|
exa | ✓ | ✓ | 注册送 $20,每月赠 $10 | 必须 | dashboard.exa.ai |
serper | ✓ | ✗ | 注册赠送 2,500 次 | 必须 | serper.dev |
tavily | ✓ | ✓ | 每月 1,000 credits;无 key 走匿名档 | 可选 | app.tavily.com |
jina | ✓ | ✓ | 免费注册 Key;s.jina.ai 搜索 / r.jina.ai 抓取 | 必须 | jina.ai |
firecrawl | ✓ | ✓ | 每月 1,000 credits | 必须 | firecrawl.dev |
serpapi | ✓ | ✗ | 每月 250 次,支持实时额度查询 | 必须 | serpapi.com |
searxng | ✓ | ✗ | 自托管无限 | 无 | docs.searxng.org |
brave | ✓ | ✗ | 需绑卡 | 必须 | brave.com/search/api |
ddg | ✓ | ✗ | 完全免费 | 无 | — |
同一后端可换行或逗号填多个 Key。Key A 额度耗尽先切 Key B,全部挂了才熔断下探下一个引擎。
web_search_from)当 Agent 认为默认搜索结果不理想时,可以主动调用由本插件注册的 web_search_from 工具:
{
"name": "web_search_from",
"description": "用指定的搜索后端(引擎)搜索当前信息并返回该源原始结果。可用于多源对比或换引擎重试。",
"parameters": {
"query": { "type": "string", "description": "搜索关键词" },
"source": { "type": "string", "description": "指定后端类型 (例如 exa, serper, tavily, jina, firecrawl, searxng 等)" },
"maxResults": { "type": "number", "description": "返回结果数量上限 (默认 8)" }
}
}
web_search(query="最新技术动态") 走默认搜索池;web_search_from(query="最新技术动态", source="serper") 从 Google 实时索引获取结果;项目包含完善的单元测试套件(覆盖熔断器状态机、加权轮询、优先级排序、多源容灾、自愈探活等):
# 运行单元测试
npm test
# 运行真实网络冒烟测试
EXA_API_KEY=your_key node scripts/smoke.mjs exa serper tavily
本项目基于 MIT License 开源。
欢迎提交 Issue 和 Pull Request 共同改进!
FAQs
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, an
We found that dsh-search-failover demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.