DSH Plugins Marketplace

DSH Plugins

Plugins

/

Models & Providers

/

dsh-auto-retry

d

dsh-auto-retry

Identified

Retry failed model requests automatically: intercepts every request error and replays the same step after a 2s / 5s / 10s / 20s backoff ladder, so gateway blips and rate limits no longer end the turn.

dsh-auto-retry

English | 中文

给 DeepSeek Harness 加一层模型请求自动重试:某个 step 的请求因为网关抖动、限流或超时失败时,插件拦住这次失败,等一段时间后把这个 step 重跑一遍,而不是让整轮对话直接结束。

provider 返回 503 / 429 / "upstream_error" …
        ↓  agent/request-error waterfall
   dsh-auto-retry(prepend,最先拿到这次失败)
        ↓  等待 2s → 重试;再失败等 5s → 重试 …
   重跑同一个 step

它解决什么

中转站、聚合网关、以及被限流的官方接口,常见失败是一次性的:同一个请求隔几秒再来就成功了。默认行为是这次失败直接冒到界面上、这一轮宣告结束,你得手动再点一次。

装上之后,这类抖动会被就地消化:日志里能看到「第 1/4 次自动重试,等待 2 秒」,然后对话自己继续。

装法

dsh plugin add github:643048695/dsh-auto-retry

或者在 profile 的 package.json 里写依赖、把 dsh-auto-retry 加进 dsh.profile.bundles,再把目录链接进 node_modules。

退避阶梯

默认最多重试 4 次,最坏累计静默 ≈ 37 秒:

第几次等待累计
12 秒2 秒
25 秒7 秒
310 秒17 秒
420 秒37 秒

计数按 provider + turn + step 为键,所以重试的是「同一个 step」,不会把整轮对话从头再跑一遍。

配置

设置页里可改,字段都是 volatile(改完立即生效,不需要重启):

字段默认说明
enabledtrue总开关
maxRetries4最大重试次数;阶梯延迟超出表长后固定用最后一档(20 秒)
logtrue每次拦截与等待是否写日志

边界与取舍

  • 它拦的是全部错误,不做分类。 这是有意的:中转站经常把「额度用完」「模型不存在」包成一句 upstream_error 或干脆不给状态码,按状态码分类反而漏拦。代价是不可恢复的错误也会被重试(例如密钥失效、请求体不合法),表现为多等几十秒后才报同样的错。要避免,把 maxRetries 调小或关掉插件。
  • 用户按停止(signal.aborted)时立即放弃,不会在后台偷偷重试。
  • 只重放当前 step,不改写请求内容、不换模型、不换 provider。换模型的活儿交给路由类插件。
  • 一直失败时,日志会明确写「已达到最大重试次数,停止重试」,不会静默吞掉。

兼容性

  • 依赖宿主暴露的 agent/request-error waterfall,以及处理函数返回 { kind: "retry" } 的契约。
  • 与 DSH 0.2.1-rc.3(当前桌面版内置核心)逐项核对过:这两处接缝与返回契约都在。更早的 0.1.7 线同样具备。
  • 若宿主改动这两处契约,插件的最坏表现是不生效(监听不到,或返回值不被识别),不会让原本正常的请求失败。

验证

npm test 跑 8 个用例,覆盖阶梯递增、次数上限后的回落、计数键隔离、开关关闭、以及「已中断 / 等待中中断」两条中断路径(用 node:test 的假定时器推进,不真等 37 秒)。CI 额外校验市场要求的 dsh.bundle 清单与入口文件。

许可

MIT。见 LICENSE。

Comments

Loading…

Similar plugins

dsh-client-auto-retry

by Frog755

DSH client plugin: auto-sends 「继续」 when a turn is interrupted/errored/overlong. No model/provider switching. Ships with a settings card.

Development & InfrastructureTerminal & ClientsSessions & MessagesManifest valid

★ 3

↓ 155/wk

MIT

JavaScript

Sep 10, 2026

dsh plugin --profile web add @frog755/dsh-client-auto-retry

by Harris-Logic

DSH 断点续接插件:模型回复因网络中断/超时半途失败时,自动把已生成的部分输出带进下一轮,让模型从中断处继续,而不是从零全量重跑。DSH plugin: on a mid-stream network failure, auto-resume the turn from its partial output instead of restarting from scratch.

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 0

MIT

JavaScript

Sep 10, 2026

dsh plugin --profile web add dsh-resume-turn

by weibaohui

Auto-resume for interrupted agent sessions: an ordered rule table routes by failure type (rate limit, quota, auth, context overflow, crashed orphan) to automatic backoff retry, model switch, resume af

Development & InfrastructureSessions & MessagesModels & ProvidersManifest valid

★ 9

↓ 577/wk

NOASSERTION

JavaScript

Oct 29, 2026

dsh plugin --profile web add @weibaohui/dsh-continue

by sjh9714

Observe identical tool failures and optionally pause the next model step in DeepSeek Harness.

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 0

MIT

JavaScript

Oct 4, 2026

dsh plugin --profile web add dsh-retry-guard

by Letter2025

Two-level model circuit breaker with failover for DeepSeek Harness: trip a model or a whole provider after repeated request failures and route the next request to a configured fallback

Workflow & AutomationManifest valid

★ 5

MIT

TypeScript

Sep 28, 2026

dsh plugin --profile web add dsh-model-failover

by QGG4588

DSH 模型故障自动转移 · provider-pool failover: on rate limit/quota/timeout, auto-retry with the next untried model from the selected providers' full model pools. Runtime tool: model_failover + Web UI panel.

Development & InfrastructureModels & ProvidersManifest valid

★ 1

MIT

JavaScript

Oct 22, 2026

dsh plugin --profile web add dsh-model-failover