moguiyu/dsh-tavily · packages/dsh-tool-tavily-search
Tavily Search for DSH: multiple API keys, rotation/failover, usage gauge, settings card. | DSH Tavily 搜索:多 Key、轮换/故障转移、用量仪表盘、设置卡片。
已收录
2
Browser
Bundle 已验证
预览
功能介绍
Tavily 多密钥搜索:支持密钥轮换/故障转移、用量仪表盘与设置卡片。
适合
- 希望在保留内置 web_search 的同时,将 Tavily 作为额外搜索工具的 DSH 用户。
- 管理多个 Tavily API Key,并需要轮换、401/429 故障转移及单 Key 用量查看的团队。
- 需要搜索深度、主题、日期范围、域名过滤、答案或原始内容等 Tavily 专用参数的流程。
不适合
- 希望替换或重新配置 DSH 内置 web_search 提供方的用户;该插件明确不修改它。
- 没有 Tavily API 凭据的部署。
- 安装后就要求高级 tavily_search 工具立即可用的流程;该工具需主动启用且默认关闭。
README
dsh-tavily
Tavily web search for DeepSeek Harness (DSH) as an opt-in extra search tool, with multiple API keys, rotation/failover, live usage gauge, and a settings card wired into the rc.7 plugin management.
The built-in web_search tool is never replaced: Tavily is an option on top of the native search, not a swap-in for it. This repo registers no web-search provider and never rewrites web.searchProvider.
Highlights
- 🧩 rc.7 plugin management — the Host registers the
tavily-searchsettings namespace; the card is keyed by it, so Settings → Plugins → plugin configuration pairs and serves it as soon as the deployment composes the plugin. - 🔑 Multiple Tavily API keys — manage a flat key list from the DSH settings UI.
- 🔁 Key rotation & failover — round-robin across keys; automatically retries on HTTP 401/429.
- 📊 Usage gauge — per-key Tavily usage and totals, fetched server-side without exposing keys.
- 🎛️ Settings card — add/remove/reveal keys, choose usage strategy, and opt into the advanced
tavily_searchmodel tool. - 🚫
web_searchuntouched — noctx.webprovider is registered; the card switch only enables/disables the extratavily_searchtool.
Packages
| Package | Role |
|---|---|
@moguiyu/dsh-tavily |
Recommended plugin: tavily_search tool + settings card + local backend + tavily-search namespace |
@moguiyu/dsh-tavily-backend |
Standalone settings backend (key manager, usage, tool switch) |
@moguiyu/dsh-tool-tavily-search |
Standalone advanced tavily_search tool (no UI) |
Install
One command installs the workspace bundle, which inserts the combined dsh-tavily row:
dsh plugin --profile web add github:moguiyu/dsh-tavily
After refreshing the browser, the Tavily Search card appears under Settings → Plugins → plugin configuration (tavily-search). It only appears when the Host half is actually composed — the rc.7 configuration tab dispatches the card keyed by the namespace the Host serves.
Credentials
-
TAVILY_API_KEYS— comma-separated key list;tavily_searchrotates through it, retrying on HTTP 401/429. -
TAVILY_API_KEY— primary key auto-synced to the first key.
Both are managed automatically by the settings card. Keys never leave the server unmasked, and no state file holds key material.
Key usage strategy
- Rotate each key — round-robin; on 401/429 the next key is tried.
- Lowest usage first / Highest usage first — re-order keys by live Tavily usage on save.
Advanced tavily_search tool
The advanced model-facing tool is opt-in and off by default. It exists for direct Tavily-only parameters (search_depth, topic, days, domain filters, include_answer, include_raw_content) and is independent of web_search:
- enabling it never changes the default
web_search(the built-in DeepSeek provider stays, along with its native schema); - disabling it only unregisters the extra
tavily_searchtool.
The switch lives in the tavily-search settings namespace (settings.yaml) and is mirrored to ~/.dsh/tavily-tool.json so every restart reads the same value.
State files
-
~/.dsh/tavily-manager.json— saved key dates + strategy -
~/.dsh/tavily-tool.json— advanced tool{ "enabled": boolean }(mirror of the settings namespace) -
~/.dsh/tavily-toggle.json— legacy pre-0.2 tool state; read for migration only
Mode 600, no secrets stored.
Screenshot

Development
pnpm install
pnpm test
pnpm build
License
MIT
常见问题常见问题
在启用了 DSH 的终端中执行已验证命令 dsh plugin --profile default add github:moguiyu/dsh-tavily#path:/packages/dsh-tool-tavily-search。命令会解析公开 package 元数据,并保持插件与本页展示的目录身份一致。
兼容性以页面上展示的 bundle 与 profile 状态为准。如果某个 profile 尚未检测到,请先保持禁用,并在生产启用前阅读仓库文档。
GitHub 链接和 activity 元数据是 release 与维护状态的来源。新版本发布后重新查看本页,确认目录已经观察到最新版本。