Yuuz12/dsh-tavily

Tavily-backed web search provider plugin for DeepSeek Harness (DSH) — multi-key balance-aware rotation with failover, manageable from the DSH web settings.

Project Overview项目介绍

dsh-tavily is a Cordis-native plugin for DeepSeek Harness (DSH) that replaces the built-in web search provider with the Tavily Search API, registering a provider id dsh-tavily via ctx.web.registerSearchProvider() and redefining the searchProviderId field through a reversible accessor that falls back to the baseline value when the toggle is off. Installation paths include the recommended npm command npx @deepseek-ai/dsh plugin --profile web add @yuuz12/dsh-tavily, GitHub or tarball variants, and a local link mode for source-level development that takes effect after restarting DSH. The plugin depends on @deepseek-ai/dsh-client-store, which corresponds to DSH ≥ 0.1.2-alpha.2 (DSH Desktop 2.0.4); earlier versions lack this package and cannot render the settings card.

A typical workflow opens Settings → Plugins → Plugin Configuration and expands the "Tavily 网页搜索" card, where users paste one or more Tavily API keys obtained from app.tavily.com, click "Refresh all usage" to pull official balances, then enable the "Replace official web search" toggle until the status row shows "已接管网页搜索". The audience is DSH users who need transparent per-key consumption tracking, multi-key pooling, and configurable search depth or result limits. The card also exposes key strategy (balance-first or manual order), depth (basic/advanced/fast/ultra-fast), max results 1–20, category, and AI answer inclusion.

The implementation is zero-dependency pure JavaScript with no build step, licensed under MIT. Tavily keys are kept only on disk and masked as tvly-…xxxx in the UI, while the test button performs a real basic search consuming 1 credit and the toggle is shared globally across profiles but keys are isolated per profile. When dsh-webui-auth is detected, all /dsh-tavily/* endpoints require a valid dsh_wua_session cookie; otherwise they remain open. Failover rules assign a 5-minute cooldown for 401/403/432/433 and 30 seconds for 429 rate limits, with cooled-down keys sinking to the queue tail but still eligible for failover.

dsh-tavily 是面向 DeepSeek Harness(DSH)的 Cordis 插件,使用 Tavily Search API 替代 DSH 内置网页搜索提供方,通过 ctx.web.registerSearchProvider() 注册 id 为 dsh-tavily 的提供方并改写 searchProviderId 字段。安装方式包括 npm 推荐命令、GitHub 或 tarball,以及本地 link 开发模式;安装后需重启 DSH 才能生效,依赖 DSH ≥ 0.1.2-alpha.2(DSH Desktop 2.0.4)的 @deepseek-ai/dsh-client-store。

典型使用流程是在设置 → 插件 → 插件配置中展开 Tavily 网页搜索卡片,添加一个或多个 Tavily API Key 后开启顶部"替换官方网页搜索"开关。插件面向需要可观测搜索用量、追求更优结果质量的 DSH 用户,支持多密钥按余额优先或手动顺序调度,并自动 failover。

技术栈为纯 JS、零依赖、无构建步骤;MIT 协议。密钥仅本地存储,自动脱敏显示;测试按钮会真实消耗 1 积分;多个 profile 共享开关但密钥池按 profile 隔离。未安装 dsh-webui-auth 时端点保持开放,否则需校验会话 Cookie。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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命令行安装

npx @deepseek-ai/dsh plugin --profile web add @yuuz12/dsh-tavily

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

READMEREADME

dsh-tavily

English | 中文

用 Tavily 替换 DeepSeek Harness(DSH)官方网页搜索的持久化插件。

模型的 web_search 工具不再调用 DSH 内置的搜索提供方,而是改走 Tavily Search API。支持:

  • 随时开关:在 设置 → 插件 → 插件配置 的「Tavily 搜索」卡片里一键切换;关闭后立即回落到官方搜索,无需重启。
  • 多 API Key 池:添加任意多个 Tavily Key,分别查看每个 Key 的用量统计与余额。
  • 余额优先轮流:自动按剩余额度排序,额度多的先用;剩余额度并列的密钥轮流使用。
  • 手动顺序:也可切换为按自定义顺序从上到下使用。
  • 失败自动切换(failover):某把钥匙鉴权失败 / 额度用尽 / 限流时自动换下一把;硬失败会进入 5 分钟冷却(429 限流冷却 30 秒),沉到队尾。
  • 用量统计:本地记录每个 Key 的调用数、成功/失败、积分消耗、最近错误与耗时;并可一键从 Tavily 官方 Usage 端点刷新真实余额。

零依赖、纯 JS、无构建步骤。

安装 / 卸载

# 使用者:从 npm 安装(推荐)
npx @deepseek-ai/dsh plugin --profile web add @yuuz12/dsh-tavily

# 维护者 / 本地开发(link 模式,改源码后重启 DSH 即生效)
npx @deepseek-ai/dsh plugin --profile web add D:/Project/dsh-tavily

# 使用者:从 GitHub 或 tarball
npx @deepseek-ai/dsh plugin --profile web add github:Yuuz12/dsh-tavily
npx @deepseek-ai/dsh plugin --profile web add ./yuuz12-dsh-tavily-0.1.0.tgz   # npm pack 产物

# 卸载
npx @deepseek-ai/dsh plugin --profile web remove @yuuz12/dsh-tavily

安装后重启 DSH 生效。目标 profile 若已装过旧版,先 remove 再 add。

关于 DSH 版本兼容:本插件 client 端依赖 @deepseek-ai/dsh-client-store(设置卡片渲染、createSnapshotStore)。该依赖对应 DSH ≥ 0.1.2-alpha.2(DSH Desktop 2.0.4)的客户端结构——更早版本没有这个包且使用已移除的 dsh-client-runtime,无法渲染设置卡片。

使用

打开 设置 → 插件 → 插件配置,展开「Tavily 网页搜索」卡片(与内置「终端」「Agent 循环」「网页搜索」卡片并列)。

使用步骤:

  1. 粘贴一个或多个 Tavily API Key(在 app.tavily.com 免费注册即得,每把每月 1000 积分),点击添加密钥。
  2. 点击密钥区右上角刷新全部用量拉取每个 Key 的官方余额数据。
  3. 打开顶部的替换官方网页搜索开关——状态行显示「已接管网页搜索」即生效。

卡片内还可调整:多密钥策略(余额优先 / 手动顺序)、搜索深度(basic=1 积分、advanced=2 积分、fast、ultra-fast)、单次结果上限(1–20)、类别(general/news/finance)、AI 摘要回答(include_answer)。

多密钥调度规则

场景 行为
余额优先(默认) 剩余积分多的先用;无限额度的计划最优先;从未刷新过用量的 Key 排在已知余额之后作兜底;头部并列的密钥按请求次数轮流
手动顺序 严格按列表自上而下(▲▼ 可调序),不做轮转
失败切换 任一密钥出错即尝试下一把;全部失败才向模型报错
冷却 401/403(鉴权失败)、432/433(超额)→ 5 分钟;429(限流)→ 30 秒;冷却中的密钥沉底但不会拒绝参与 failover

每次成功调用的积分消耗(来自 Tavily 响应的 usage.credits)会即时累加到缓存的已用量上,让余额排序在不刷新的情况下也保持准确。

数据存储位置

安装方式 密钥/统计数据位置 开关与搜索参数位置
link 本地目录 / junction 插件目录下 dsh-tavily.json(见下方回退说明) DSH 全局设置文档(~/.dsh/settings.yaml 的 dsh-tavily 节)
npm / GitHub / tgz <profile>/dsh-tavily.json(用户数据,随 profile 持久) 同上

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

← 上一个 Prev dsh-windows-notifications 下一个 Next deep-design →