ctx.web 搜索提供方:通过 LiteLLM 代理走 OpenAI Responses API 调用 DeepSeek 原生服务端 web_search,复用 LITELLM_API_KEY,无需新密钥。
安装
# npm 包(预构建)
dsh plugin --profile web add dsh-web-search-litellm
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:yunxiyang/dsh-web-search-litellm
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
DSH web_search provider over the LiteLLM proxy using the OpenAI Responses protocol. The request carries the server-side web_search tool, executed natively by the DeepSeek Responses API; the grounded answer and the real URLs the model opened are returned to the harness web seam (ctx.web).
- No Anthropic protocol — speaks
POST {baseURL}/responses, not/messages. - No new keys — reuses the
LITELLM_API_KEYcredential your chat Models page already stores. - No third-party search service — search runs on DeepSeek's official server side, billed through your existing LiteLLM route.
- Fully configurable in the Settings UI (
web-search-litellmsection).
简介 / 快速上手(中文)
这是 DeepSeek Harness ctx.web 能力的联网搜索提供方:web_search 请求走 OpenAI Responses 协议发往你的 LiteLLM 代理,由 DeepSeek 官方 Responses API 在服务端原生执行搜索,返回带真实来源 URL 的答案。
- 不需要 Anthropic 协议,也不需要新的 API Key——直接复用聊天模型页已配置的
LITELLM_API_KEY。 - 不接任何第三方搜索服务;搜索在 DeepSeek 官方服务端完成,走你现有的 LiteLLM 计费路由。
- 安装:
dsh plugin --profile <name> add dsh-web-search-litellm,然后在 profile 的cordis.patch.yml里把web的searchProvider设为litellm-responses(详见下方英文说明)。 - 常见症状:
web_search报Authentication Fails, Your api key is invalid,且你的DEEPSEEK_API_KEY其实是 LiteLLM 代理 key——装这个插件并把baseURL指向代理即可。
何时使用 / When to use
Pick this provider when any of these is your situation:
web_searchfails withAuthentication Fails, Your api key: ****XXXX is invalid— usually becauseDEEPSEEK_API_KEYholds a LiteLLM proxy key, not a DeepSeek platform key.- All company traffic must go through LiteLLM (direct api.deepseek.com is blocked or forbidden).
- You prefer the OpenAI Responses protocol over the Anthropic
/messagesformat. - You want no free-tier / third-party search service (Tavily, Brave, Exa, …) — search stays on DeepSeek's official server side.
- You use
openai/deepseek-v4-flashoropenai/deepseek-v4-prothrough a LiteLLM proxy as your main model.
Install
dsh plugin --profile <name> add dsh-web-search-litellm
# or from a local checkout:
dsh plugin --profile <name> add ./dsh-web-search-litellm
Then route the seam (profile cordis.patch.yml):
- id: web
config:
searchProvider: litellm-responses
# optional: disable the shipped Anthropic-format DeepSeek provider
- id: web-search-deepseek
disabled: true
Restart the profile (desktop: Settings → Desktop settings → Restart, or quit and reopen).
Configuration
Settings section web-search-litellm (harness Settings UI) or the bundle patch config:
Configuration — derive, don't hardcode
Every endpoint/model field is optional. When unset, the provider derives its values from dsh's active model configuration (the same provider the chat uses), so it works on any machine without baking in a proxy URL or model:
baseURL← the active provider'sbaseURL(the chat's gateway).apiKeyEnv← the active provider'sapiKeyEnv.model← the active model's id.candidateModels← the active provider's fullmodels[]list, so discovery can race every model on that gateway and latch onto the first that actually runsweb_search.
Only set a field here to override the derived value (e.g. to force a specific search model).
| key | default | meaning |
|---|---|---|
baseURL |
derived → $LITELLM_SEARCH_BASE_URL → http://127.0.0.1:4000/v1 |
LiteLLM proxy root; /responses is appended |
model |
derived (active model) | starting model id; the first pick |
candidateModels |
derived (active provider models[]) |
fallback pool raced in parallel when the active model fails to actually run web_search; the fastest searcher wins and is cached |
apiKeyEnv |
derived → LITELLM_API_KEY |
credential reference resolved at each search |
apiKey |
— | optional literal key (secret role) |
maxTokens |
4096 |
max_output_tokens for one search request |
timeoutMs |
60000 |
connect deadline + idle deadline for the response stream; resets whenever data arrives, so slow-but-active searches are never cut off (WEB_TIMEOUT only on real stalls) |
How it works
- The model calls
web_searchwith a query string. - This provider POSTs to
{baseURL}/responseswithtools: [{"type": "web_search"}],stream: true. - The LiteLLM proxy forwards the call; DeepSeek executes the search server-side and feeds results to the model.
- The provider parses the SSE stream: the final
output_textbecomes the resultcontent, and everyweb_search_callitem whose action isopen_pagecontributes its URL tosources.
Session compatibility (why this plugin writes no custom session events)
This plugin appends no session events of its own. The harness reads
session logs fail-closed: any event type outside the build's
KNOWN_SESSION_EVENT_TYPES catalog aborts loading unless the event envelope
carries ignorable: true. A third-party type can never be in that catalog,
and the public session.append API offers no way to set ignorable, so a
custom log-only event here would make older harness builds refuse to open any
session this plugin ran in. Searches are still fully visible in the session
through the standard web_search tool call/result events.
Known upstream limits (not configuration issues)
- DeepSeek's Responses API documents
includeas not supported, so structured result items are consumed server-side; sources therefore carryurlonly (no title/snippet). - Each search costs one DeepSeek model turn (official mechanism).
License
MIT
链接
同类插件
Tencent/WeKnora#dsh-weknora★ 34236
把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己带引用的 RAG 或 ReAct agent 回答(含可续聊的 session id)。
superdesigndev/treg★ 5325
给 Agent 的工具目录:按「要做的事」检索约 2,600 个外部接口(SEO 与 SERP、外链、社交、人物与公司信息补全、广告库、抓取),查看参数与单次调用价格后直接调用,凭据由服务端注入。附带技能,MCP 行在未设置 TREG_TOKEN 前保持禁用。
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1137
把腾讯云 CloudBase 后端接入 DeepSeek Harness——在对话里搭好并部署全栈应用,查询结果渲染为表格卡片(分页、排序、导出 CSV),部署后可预览真实域名,并提供 CloudBase MCP 工具集(`mcp__cloudbase__*`),登录走 device-code 流程。
gitroomhq/postiz-agent#dsh-postiz★ 518
通过 MCP 将 DeepSeek Harness 连接到 Postiz:列出已连接的社交媒体渠道、获取各平台发帖规则,并向 X、LinkedIn、Instagram、Facebook、Threads、TikTok、YouTube、Reddit、Bluesky、Mastodon、Discord、Slack、Telegram 等平台排期、存草稿或发布帖子;附带 postiz 工作流技能。
EthanYoQ/Invoice-Downloader#dsh-invoice-downloader★ 508
面向 DeepSeek Harness 的本地 IMAP 发票下载、OCR 识别、归档与 Excel 报销汇总。
anysearch-team/anysearch-dsh★ 490
基于 AnySearch 的实时网页与垂直搜索插件,为 DeepSeek Harness 提供搜索工具。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。