DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Key Fallback — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

@omdp/dsh-key-fallback

Key Fallback

API Key 回退轮换插件:多 key 池 + 自动轮换(触发码可配置,含 LlmError 标准码全集)+ 环境密钥编辑 + 明文揭示 + 短 ref 迁移。Settings → API Key 回退 UI. v6.1.

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add @omdp/dsh-key-fallback@3.1.7
README兼容性版本

兼容性与来源证明

Key Fallback 以 @omdp/dsh-key-fallback 发布,当前版本为 3.1.7。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/9/20

版本

3.1.7stable
2026/9/15
3.1.6stable
2026/9/10
3.1.5stable
2026/9/3
查看其余 15 个版本收起版本
3.1.4stable
2026/9/2
3.1.3stable
2026/8/31
3.1.2stable
2026/8/31
3.1.1stable
2026/8/27
3.1.0stable
2026/8/27
3.0.1stable
2026/8/26
3.0.0stable
2026/8/26
1.0.7stable
2026/8/25
1.0.6stable
2026/8/25
1.0.5stable
2026/8/25
1.0.4stable
2026/8/25
1.0.3stable
2026/8/25
1.0.2stable
2026/8/25
1.0.1stable
2026/8/25
1.0.0stable
2026/8/25

相关插件

正在加载相关插件…

最新版
3.1.7
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
94.1 kB
文件数
6
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 1
周下载
84
最近提交
2026/9/15
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

README

@omdp/dsh-key-fallback

简体中文 | English

Multi-key API key pool with automatic rotation for DeepSeek Harness (DSH) — sits between the LLM adapter and the credential store. Before each request the plugin picks a key from the per-provider pool and pre-writes it into the provider's credential reference; when a configured trigger error occurs it marks the failed key cooling (fixed cooldownMs, no exponential backoff) and advances to the next key. Re-sending is left entirely to DSH's own dsh-llm-retry — this plugin never re-sends on its own; it only switches the key and lets the retry policy decide.

Current version: v3.1.7 (v6 UI generation).

Requirements

  • DeepSeek Harness with a web-profile GUI (npx @deepseek-ai/dsh web)
  • Node.js ^22.19 or >=24
  • Peer ranges strictly enumerate only compatibility-tested versions — @deepseek-ai/dsh-credentials 0.1.0-rc.6 || 0.1.1-rc.2 || 0.1.2-alpha.1 || 0.1.2-alpha.2 || 0.1.2-alpha.3 || 0.1.2-alpha.4 || 0.1.2-alpha.5 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1, @deepseek-ai/dsh-llm / @deepseek-ai/dsh-settings 0.1.1-rc.2 || 0.1.2-alpha.1 || 0.1.2-alpha.2 || 0.1.2-alpha.3 || 0.1.2-alpha.4 || 0.1.2-alpha.5 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1, @deepseek-ai/cordis 4.0.1 || 4.0.2, @deepseek-ai/schemastery 3.18.1 || 3.18.2. No open-ended ranges (<0.2.0, caret): untested versions are deliberately excluded until verified. The plugin only uses the credential-reference half (resolve/describe/set/unset/credentialRef — stable since 0.1.0-rc.6) and the agent/request + agent/request-error waterfall (payload unchanged across the enumerated versions); isCredentialRefName (added rc.8) is implemented locally for compatibility. The 0.1.2-alpha.2 → alpha.5 → 0.1.2-rc.1 companion packages are byte-identical (2026-09-03 verified), so DSH 0.1.2-rc.1 (next) needs no plugin change.

What v3.1.7 offers

  • DSH 0.1.5-rc.2 support declared (2026-09-15). Source check: @deepseek-ai/dsh-credentials / dsh-llm / dsh-settings 0.1.5-rc.1 → rc.2 differ in package.json only — every lib/docs file is SHA256-identical. Runtime check: strict peer install (no --legacy-peer-deps) against a real dsh@0.1.5-rc.2 web profile + clean boot, zero browser-console errors, /dsh-key-fallback/* routes serve, Settings → API Key 回退 renders.
  • DSH 0.1.6-alpha.1 support declared (2026-09-15, source-level file-hash diff plus a runtime boot smoke test on a real 0.1.6-alpha.1 install). No code change was needed: @deepseek-ai/dsh-credentials and @deepseek-ai/dsh-settings are byte-identical in lib/ vs 0.1.5-rc.2 (version/docs bump only), and @deepseek-ai/dsh-llm's removals (priceImages, the projectImagesForTextModel/request-image-offload family) are outside every API this plugin calls — credentialRef, credentials.resolve/set/unset/describe, llm.listProviders/listConfigurableProviders, agent/request, agent/request-error, settings, webServer all verified present (dsh-host-webserver — the webServer.register provider — is itself byte-identical). Runtime check: plugin activates, /dsh-key-fallback/* routes serve, Settings → API Key 回退 renders. Old versions stay supported — both 0.1.5-rc.2 and 0.1.6-alpha.1 are appended, nothing dropped.

What v3.1.6 offers

  • DSH 0.1.5-rc.1 support declared (source-level compatibility check, 2026-09-10). No code change was needed: @deepseek-ai/dsh-credentials and @deepseek-ai/dsh-settings differ from 0.1.2-rc.1 only in package.json (version bump), and @deepseek-ai/dsh-llm's changes are additive (FileBlock / fileHandleText / assembleAssistantStream …) with every API this plugin calls preserved: credentialRef, credentials.resolve/set/unset/describe, llm.listProviders/listConfigurableProviders, agent/request, agent/request-error, settings, webServer. The agent/pre-step waterfall payload is line-identical between the two versions. Old versions stay supported — 0.1.5-rc.1 is appended to the enumeration, nothing is dropped.
  • Note: DSH 0.1.5-rc.1 removes ctx.agent and changes the Inbox/Session APIs, but this plugin never used them.

What v3.1.4 offers

  • Env name auto-derivation sanitized: creating a pool for a provider whose id contains non-identifier characters (b-ai, B.AI, …) no longer fails with env must be POSIX identifier — the derived env name (<PROVIDER>_API_KEY) now strips -/. etc. (b-ai → B_AI_API_KEY). Explicit env values are still validated as before. Fixes the "选择 LLM provider → 启用" 400 error for such providers.

What v3.1.3 offers

Settings → API Key 回退 — a top-level settings page with a redesigned UI (status dots, badges, gradient pool cards, per-key rows):

  • Configurable rotation triggers that are actually enforced (rotateOn): click chips to select which error codes cause rotation. The preset chips cover the full DSH LlmError standard code set — QUOTA / AUTH / RATE_LIMIT / TIMEOUT / TRANSPORT / SERVER / EMPTY_RESPONSE / INVALID_CREDENTIAL — or add a non-standard/custom code (matched exactly against the provider's failure.code). What you save is what runs: there is no "magic upgrade" that rewrites three selected codes back into a six-code superset. ABORTED (user cancel) never triggers rotation.
  • 真实当前使用 key 显示: the page shows which key is actually being used right now (derived from the last value written to the provider's env) — not a truncated hash, not a guessed name.
  • 短 ref 命名: new keys are auto-named key_fallback_<provider>_key1, key_fallback_<provider>_key2, … so the UI shows clean short names (key1, key2, … or your custom label) instead of long ref strings. Existing legacy long refs are migrated once, automatically and idempotently (write new ref → persist config → best-effort unset old ref; any failure aborts and retries safely).
  • 明文揭示: every key row has an eye toggle (👁 / 🙈) that fetches and shows the real value via GET /keys/plain (only for keys owned by that pool, or the pool's env key). The env key row also reveals plaintext — it is not swallowed by the read-only note.
  • 环境密钥可编辑: the pool's env key (AGNES_API_KEY etc.) can be updated right in the page when it is backed by the writable credential file. If it is supplied by the launching environment (read-only), the UI says so and refuses to edit (HTTP 400).
  • Per-key controls: update value, set the "失败后→" next key (nextRef), lock the pool to a specific key ("设为当前"), delete a key (the env key is not deletable).
  • Pool-level controls: enable switch, cooldown display, "↺ 重置冷却", pool lock/auto-rotation, per-pool status (live / cooling / recovered).

Rotation semantics

  • pick (agent/request, pre-write): respects useKeyRef lock first (but a cooling locked key is skipped so the pool never deadlocks on a bad key), otherwise cursor round-robin over live keys. The chosen key is written via credentials.set and process.env so the provider actually authenticates with it.
  • fail (agent/request-error, registered prepend so it runs before dsh-llm-retry): only when the error matches the pool's rotateOn — by failure.code (exact), by HTTP status mapping (429→RATE_LIMIT, 401/403→AUTH, 402→QUOTA, 5xx→SERVER), or by message keyword. Marks the failed key with a fixed cooldownMs (default 30 s), then switches to nextRef if configured, else the next live key.
  • re-send is left entirely to DSH's dsh-llm-retry with the user's own per-provider retry policy. The two are independent and complementary: the retry plugin decides "retry the same key N times" (retryPolicy.retryableCodes, default EMPTY_RESPONSE/RATE_LIMIT/SERVER/TIMEOUT/TRANSPORT — which notably excludes AUTH/QUOTA); this plugin decides "switch to the next key". So e.g. an AUTH failure (which retry would not re-send anyway) still rotates to the next key — that next request will authenticate with the fresh key.

Diagnostics

  • The client POSTs runtime exceptions to POST /dsh-key-fallback/diag.
  • GET /dsh-key-fallback/diag returns the in-memory buffer (last 200 entries) as JSON.

Install

# from npm (recommended)
cd ~/.dsh/profiles/web
pnpm add @omdp/dsh-key-fallback

# or from a local checkout
dsh plugin --profile web add link:D:/WorkSpace/omdp/dsh-key-fallback

# restart DSH, then open Settings → API Key 回退

Note: the profile currently installs the package from npm (^3.x) into ~/.dsh/profiles/web/node_modules/@omdp/dsh-key-fallback; copying updated lib/index.js + lib/client.js there and restarting DSH picks up a newer version. The package declares a dsh.bundle.patch, so it activates automatically — no manual cordis.patch.yml editing.

HTTP API (host)

MethodPathPurpose
GET/dsh-key-fallback/poolslist pools with live status, activeRef, env writability/source, per-key status
POST/dsh-key-fallback/poolscreate/update pool (enabled, cooldownMs, rotateOn, useKeyRef, …)
DELETE/dsh-key-fallback/pools?provider=delete pool + all its keys
POST/dsh-key-fallback/keysadd key (auto short ref key_fallback_<p>_keyN)
PATCH/dsh-key-fallback/keysupdate value / label / nextRef / useKeyRef (env key value = edit env)
DELETE/dsh-key-fallback/keys?provider=&ref=delete key (env key refused)
GET/dsh-key-fallback/keys/plain?provider=&ref=reveal real value (pool-owned keys / env key only)
POST/dsh-key-fallback/resetreset cooldown state for a pool
GET/POST/dsh-key-fallback/diagdiagnostics buffer

Known limitations

  • Cooldown is a fixed per-pool cooldownMs (no exponential backoff); a cooled key becomes live again when the timer expires.
  • The plugin manages rotation/cooldown state in-memory plus persisted pool config (keyFallback.providers in settings.yaml); a DSH restart re-reads config and recomputes live status.
  • The env key cannot be deleted through the UI (it is the pool's identity).

License

MIT

相关插件

继续浏览 security-access 分类下经过校验的插件。

Doctor@linxin666/dsh-doctorDSH 配置档案的事务性救援模式,配备受监督的启动器、隔离的恢复容器、确定性修复、健康监控以及本地 Web 恢复控制台Pocketdsh-pocket把 DeepSeek Harness 装进你的口袋:一个包、一个设置页,手机扫码即同步访问电脑上的 DSH(局域网 + 公网,实时同屏)。DSCODE@toddzheng024/dscode-bundle完整的 DeepSeek 编码代理,支持持久化 shell、Ultra 协作和自动权限审查。Auto Reviewdsh-auto-review针对 DeepSeek Harness 审批请求的第二模型 AI 自动审查:只读审查子代理在审批应答链上决定允许或拒绝,并采用故障关闭回退机制和完整的会话日志审计。