rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Chu-m/dsh-chat-continue
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
A DSH plugin that intercepts third-party API request errors (429 Too Many Requests, 503 Service Unavailable, etc.) and automatically retries the request — preventing agent sessions from stalling when external APIs encounter issues.
When using DSH to call third-party model APIs (e.g., custom providers, external AI services), those platforms often enforce rate limits or other access restrictions. When the limit is exceeded, the API returns an error (e.g., 429 Too Many Requests, rate_limit, quota_exceeded).
DSH has built-in retry logic (dsh-llm-retry) for DeepSeek API, but it may not cover all third-party error codes. When the built-in retry is exhausted, the agent session stalls mid-conversation, requiring the user to manually type "continue" to resume — a poor experience.
This plugin acts as a second line of defense after DSH's built-in retry. It:
agent/request-error events after built-in retry failsThird-party API returns error (429, rate_limit, etc.)
↓
DSH built-in retry (`dsh-llm-retry`) handles it first
↓ (if built-in retry exhausted)
This plugin intercepts `agent/request-error`
↓
Checks against your configured retryable status codes & error codes
↓
Auto Mode → waits configured interval → retries automatically
Manual Mode → shows notification → you click "Retry" or "Skip"
↓
Retry succeeds → conversation continues without interruption
429, 503) and error codes (e.g., rate_limit, service_unavailable) to interceptdsh command available)dsh plugin --profile web add @wuxjs/dsh-chat-continue
Then restart DSH. The plugin loads automatically.
| Setting | Description | Default |
|---|---|---|
| Retry Mode | Auto = automatic retry, Manual = notification popup |
Auto |
| Retry Interval | Seconds to wait between retries (1–60) | 5s |
| Max Retries | Maximum retry attempts (1–100) | 10 |
| Retry HTTP Status Codes | Comma-separated, e.g. 429, 503 |
429 |
| Retry Error Codes | Comma-separated, e.g. rate_limit, service_unavailable |
rate_limit |
Example 1: OpenAI-compatible API returning 429
Retry HTTP Status Codes: 429
Retry Error Codes: rate_limit
Example 2: Custom API returning 503 + service_unavailable
Retry HTTP Status Codes: 429, 503
Retry Error Codes: rate_limit, service_unavailable
Example 3: Strict rate limiting with quota exceeded
Retry HTTP Status Codes: 429
Retry Error Codes: rate_limit, quota_exceeded, insufficient_quota
If auto-loading doesn't work:
cordis_define:newrtryChat ContinueAuto-retry on API request errors, supports auto/manual mode, configurable intervallib/host.js content into Host codelib/client.js content into Client codecordis_run to startdsh plugin --profile web remove @wuxjs/dsh-chat-continue
Then restart DSH.
@wuxjs/dsh-chat-continue/
├── package.json # npm package config (with dsh.bundle declaration)
├── cordis.patch.yml # registers auto-loader into host layer
├── .gitignore
├── .npmrc # npm auth token (excluded from git)
├── lib/
│ ├── auto.js # auto-loader (static plugin, registers dynamically)
│ ├── host.js # host-side code (for manual installation)
│ └── client.js # client-side code (for manual installation)
├── README.md
└── skills/
MIT
使用 DSH 接入第三方平台的模型 API 时,这些平台通常会对调用进行限速或其他限制。当超出速率或触发其他限制时,API 会返回错误(如 429 Too Many Requests、rate_limit、quota_exceeded 等)。
DSH 官方内置了针对 DeepSeek API 的重试机制(dsh-llm-retry),但并不能覆盖所有第三方平台的错误码。当内置重试耗尽后,Agent 会话会卡住中断,需要用户手动输入"继续"才能恢复对话,体验非常差。
本插件作为 DSH 内置重试的第二道防线:
agent/request-error 事件第三方 API 返回错误(429, rate_limit 等)
↓
DSH 内置重试 (`dsh-llm-retry`) 先处理
↓(内置重试耗尽后)
本插件拦截 `agent/request-error` 事件
↓
检查你配置的可重试状态码 & 错误码
↓
自动模式 → 等待指定秒数 → 自动重试
手动模式 → 右下角弹窗 → 点击「重试」或「放弃」
↓
重试成功 → 对话继续,无需手动输入
429, 503)和错误码(如 rate_limit, service_unavailable)dsh 命令可用)dsh plugin --profile web add @wuxjs/dsh-chat-continue
安装后重启 DSH,插件会自动加载。
| 配置项 | 说明 | 默认值 |
|---|---|---|
| 重试模式 | 自动 = 自动重试,手动 = 弹窗通知 |
自动 |
| 重试间隔 | 每次重试之间的等待时间(1–60 秒) | 5 秒 |
| 最大重试次数 | 超过此次数后停止重试(1–100 次) | 10 次 |
| 重试 HTTP 状态码 | 逗号分隔,如 429, 503 |
429 |
| 重试错误码 | 逗号分隔,如 rate_limit, service_unavailable |
rate_limit |
示例 1:OpenAI 兼容接口返回 429
重试 HTTP 状态码: 429
重试错误码: rate_limit
示例 2:自定义 API 返回 503 + service_unavailable
重试 HTTP 状态码: 429, 503
重试错误码: rate_limit, service_unavailable
示例 3:严格限流 + quota_exceeded
重试 HTTP 状态码: 429
重试错误码: rate_limit, quota_exceeded, insufficient_quota
如果自动加载未生效:
cordis_define:newrtryChat Continue自动重试 API 请求错误,支持手动/自动模式,可配置重试间隔lib/host.js 内容粘贴到 Host 代码lib/client.js 内容粘贴到 Client 代码cordis_run 启动dsh plugin --profile web remove @wuxjs/dsh-chat-continue
然后重启 DSH。
@wuxjs/dsh-chat-continue/
├── package.json # npm 包配置(含 dsh.bundle 声明)
├── cordis.patch.yml # 注册自动加载器到 host 层
├── .gitignore
├── .npmrc # npm 认证 token(已排除在 git 外)
├── lib/
│ ├── auto.js # 自动加载器(静态插件,启动时自动注册)
│ ├── host.js # Host 端代码(用于手动安装)
│ └── client.js # Client 端代码(用于手动安装)
├── README.md
└── skills/
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness、deepseek-harness-plugin。