DSH | dsh-plugin-web-search-tavily | Tavily backend for the built-in web_search / 给内置 web_search 换上 Tavily 后端 #2021
coderdailyone
started this conversation in
Show Your Plugins!
Replies: 1 comment
|
给内置 web_search 换 Tavily 后端——解决 #408(web_search 写死官方端点)的好思路,后端可插拔。 已收录进手册生态章节:https://github.com/Electricitysheep/dsh-handbook/blob/main/docs/07-ecosystem.md |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Project URL:
https://github.com/coderdailyone/dsh-plugin-web-search-tavily · npm (
dsh-plugin-web-search-tavily@0.1.1, MIT)Introduction / 项目介绍
A Tavily search provider for dsh's built-in
web_search. It registers aWebSearchProviderinto thectx.webcapability seam, so the shipped tool gets served by Tavily without touching any model-facing schema — the model sees the exact sameweb_searchit already knows; only the backend changes.Honest mapping, nothing invented:
results[].content→snippet,published_date→publishedAt; entries without a real snippet are dropped rather than padded; Tavily's generated answer surfaces as the resultcontentonly when it actually returned one. Cancellation isWEB_ABORTED; every other failure isWEB_PROVIDER_ERRORwith the richest provider detail and a preservedcausechain.给 dsh 内置
web_search换上 Tavily 后端:向ctx.web能力缝注册一个WebSearchProvider,模型侧 schema 一个字不动。字段映射诚实——没有真实摘要的条目直接丢弃而不是编造文本;Tavily 没返回答案时不虚构任何内容。取消与失败都有干净的错误分类和保留的 cause 链。Screenshots / 截图
A provider plugin has no UI of its own — its "screenshot" is the config layer and the search flowing through the ordinary tool rendering:
How it integrates with DSH / 与 DSH 的集成方式
Ships as a dsh bundle: installing inserts the plugin row automatically. The API key comes from
$TAVILY_API_KEY(e.g.$DSH_HOME/.env) or plugin config; with several providers loaded, pin selection via$DSH_WEB_SEARCH_PROVIDER=tavily. Config knobs:searchDepth(basic/advanced),topic(general/news),includeAnswer,numResults.Engineering / 工程
Keyless tests drive the real provider against a loopback HTTP double and pin the exact wire shape (method, path, bearer header, body fields), the response mapping, the error taxonomy, and cancellation; a live smoke verifies the real API and self-skips without a key (last green at v0.1.1, 2026-08). Known limitations are listed in the README — the Tavily wire contract is pinned to its 2026-08 docs and the live smoke is the drift detector.
All reactions