DeepSeek Harness 插件

dsh-web-search-tokenrhythm

Token Rhythm (OpenAI Responses web_search) search provider for the DeepSeek Harness web capability seam (ctx.web)(英文原文)

跳到安装方式

来源信息

GitHub 仓库
Joeytisaly/dsh-web-search-tokenrhythm
最近更新
2026年8月15日
分类
文档与渲染
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/Joeytisaly/dsh-web-search-tokenrhythm
插件名:dsh-web-search-tokenrhythm
作者:Joeytisaly

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-web-search-tokenrhythm

![npm version](https://www.npmjs.com/package/dsh-web-search-tokenrhythm) ![license](https://www.npmjs.com/package/dsh-web-search-tokenrhythm)

A web-search provider for DeepSeek Harness that turns the built-in web_search tool into real searches through the Token Rhythm (基元律动) gateway's OpenAI Responses API (web_search tool). No extra account, no new API key — it reuses the key you already store for chat.

Quick start (3 steps)

Run these inside your dsh profile directory (e.g. %USERPROFILE%\.dsh\profiles\web):

# 1. Install the package
pnpm add dsh-web-search-tokenrhythm
// 2. Register the bundle in profiles/web/package.json
"dsh": {
  "profile": {
    "bundles": [
      "@deepseek-ai/dsh-base",
      "@deepseek-ai/dsh-web-app",
      "dsh-web-search-tokenrhythm"   // ← add this line
    ]
  }
}
# 3. Restart dsh web

That's it. The bundle mounts the provider and switches web_search to it automatically — no cordis.patch.yml editing required.

Prerequisites

  • Your gateway must support the OpenAI Responses API with the native web_search tool. Token Rhythm does (deepseek-v4-flash-0731, which declares webSearch: true). Other gateways: check their model metadata before switching.
  • Store an API key so the provider can authenticate. The default credential reference is DEEPSEEK_API_KEY — save it through the web UI (Settings → Models) or your credentials file. Point the provider at another reference with apiKeyEnv if you prefer.

Verify it works

In any chat, ask: “帮我搜一下 XXX” or “search the web for XXX”. The response will include real source links.

Configuration

KeyDefaultMeaning
apiKeyEnvDEEPSEEK_API_KEYCredential reference resolved for each search.
baseURLhttps://tokenrhythm.studio/v1OpenAI-compatible endpoint base; /responses is appended.
modeldeepseek-v4-flash-0731Search model; must declare webSearch: true on your gateway.
maxTokens2048Upper bound on generated answer tokens.
maxRetries2Retries for transient gateway 503 responses.

Switching to another gateway

Override the row from your own profile cordis.patch.yml (later layers win):

- id: web-search-tokenrhythm
  name: dsh-web-search-tokenrhythm
  config:
    apiKeyEnv: MY_GATEWAY_API_KEY
    baseURL: https://my-gateway.example/v1
    model: my-web-search-model

Or edit the web-search-tokenrhythm section in the GUI Settings page — it takes effect on the next search without a restart.

Not using a gateway with web_search?

This provider cannot help. Install a different search backend instead (e.g. @deepseek-ai/dsh-web-search-exa or @deepseek-ai/dsh-web-search-perplexity) and set searchProvider to its id.

Troubleshooting

SymptomCause / Fix
WEB_PROVIDER_CREDENTIAL_MISSINGNo key for apiKeyEnv. Save it in Settings → Models or set apiKeyEnv to a reference you have.
tools.0.input_schema 类型错误 / invalid tool typeThe gateway does not support the web_search tool. Switch gateway or provider.
SERVICE_BUSY (HTTP 503)Gateway overloaded; retried automatically up to maxRetries. Retry the search later if it still fails.
Search works but sources have no titlesExpected: this gateway returns opened-page URLs plus a generated answer; no structured title/snippet.

How it works

One search issues a full Responses model call with tools: [{ type: 'web_search' }]. The gateway runs server-side retrieval; the model may open several pages (web_search_call items). The provider:

  • collects opened-page URLs as citeable sources[] (deduplicated, #ws_call_id= tracking fragments stripped);
  • takes the model's final_answer text as content;
  • retries transient 503 responses.

Failures surface as WEB_PROVIDER_ERROR; caller cancellation as WEB_ABORTED. MIT licensed.

Development

# Build (TypeScript → lib/)
pnpm exec tsc -b .

# Test (Vitest, 16 cases)
pnpm exec vitest run tests/provider.spec.ts

# Package
npm pack

The package follows the DeepSeek Harness plugin conventions: a Cordis plugin exporting name / inject / apply / Config, plus a bundle patch (cordis.patch.yml) that mounts itself when the package is listed in a profile's dsh.profile.bundles.

License

[MIT](LICENSE)