Windsland52/dsh-auto-retry0

@dsh-external/dsh-auto-retry

Bounded fallback recovery for DSH rate limits, empty responses, and truncated model output

AI Analysis

核心用途是自动处理 API 报错(如限流、空回复、Token 超限),实现无感知的自动重试与长文本续写。适合调用不稳定 API 渠道、需要提高长任务运行成功率的用户。

Package
@dsh-external/dsh-auto-retry
Version
0.1.0
License
MIT
Last updated
Aug 18, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Windsland52/dsh-auto-retry

配置

- id: dsh-auto-retry
  name: '@dsh-external/dsh-auto-retry'
  config:
    # 空数组表示所有 provider;也可以只写 [scnet]
    providers: []
    retryCodes:
      - RATE_LIMIT
      - EMPTY_RESPONSE
      - STREAM_CLOSED
    retryQuota: true
    quotaRetryPatterns:
      - rate_limit_exceeded
      - rate limit
      - too many requests
      - allocated quota exceeded
      - temporarily unavailable
    maxRetries: 8
    maxElapsedMs: 900000
    initialDelayMs: 1500
    maxDelayMs: 60000
    jitterRatio: 0.2
    maxAutoContinuations: 2
    continueOnMaxTokens: true

每次后备重试都会复用 DSH 已有的 llm/retryllm/retry-started 持久事件,因此会话重放和现有重试状态 UI 仍能理解它。内部自动续行使用 plugin 来源的 user message,不会伪装成人类输入。