Mark930209/GoDSH--plugins-auto-retry ↗★ 0

dsh-auto-retry

Retries a failed model request with exponential backoff, then resumes the same session after a delay when a round still fails, until the task completes or a bounded attempt budget is spent.

包名
dsh-auto-retry
兼容性
待验证
版本
1.0.1
许可证
MIT
最近更新
2026年11月4日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add 'github:Mark930209/GoDSH#f3c3b80e5a2e544629ec4641dde6e9974acdd92e&path:plugins/auto-retry'

配置

配置写在 cordis.patch.yml 的本插件行里(也可以让 DSH 的配置层覆盖):

- insert:
    - id: auto-retry
      name: 'dsh-auto-retry'
      config:
        enabled: true
        maxRequestRetries: 6
        initialRetryDelayMs: 2000
        maxRetryDelayMs: 60000
        jitterRatio: 0.2
        resumeAfterFailure: true
        maxConsecutiveResumes: 5
        initialResumeDelayMs: 5000
        maxResumeDelayMs: 120000
        pauseOnUserInput: true
        continuationPrompt: ''
字段默认含义
enabledtrue总开关;关闭后插件不产生任何行为
maxRequestRetries6同一步内模型请求最多重试次数(0 关闭第 1 层)
initialRetryDelayMs2000首次重试延时
maxRetryDelayMs60000单次重试延时上限
jitterRatio0.2退避抖动比例(0–1),避免多会话同时重试
resumeAfterFailuretrue是否启用第 2 层续跑
maxConsecutiveResumes5连续续跑上限(0 关闭第 2 层)
initialResumeDelayMs5000首次续跑延时
maxResumeDelayMs120000单次续跑延时上限
pauseOnUserInputtrue用户自己发消息时取消已排队的续跑
continuationPrompt''自定义续跑提示;留空用内置 `` 模板

providerRetryAfterMs(服务端给的 Retry-After)优先于本地退避,但不会超过 maxRetryDelayMs。