dsh-llm-retry-settings

by zeng6125-rgb

模型与账号接入github收录于 08-21

在 DSH 设置里调整 LLM 自动重试的次数与退避时间并实时生效的设置卡片。

Settings card to tune the DSH LLM auto-retry policy (retry count, backoff, jitter) live from Settings → General.

安装

dsh plugin --profile web add github:zeng6125-rgb/dsh-llm-retry-settings

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗

安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。

README

目录

DSH「LLM 自动重试」设置卡片:在 设置 → General 里调整自动重试的次数与退避时间,宿主 @deepseek-ai/dsh-llm-retry 实时生效。

English

功能

  • 自带设置 UI(客户端 bundle lib/client.js):一张位于 设置 → General 的卡片,无需另外装 UI 包。
  • 覆盖 agent/request-error 重试策略中的 maxRetries、initialDelayMs、maxDelayMs、jitterRatio。
  • 保留各 provider 自带的 mode 与 retryableCodes —— 只覆盖「次数」和「退避时间」。
  • 默认 enabled: false = 完全旁路:不开启覆盖时,不改动任何东西。

安装

前置:一个 DSH Desktop profile(web profile 位于 ~/.dsh/profiles/web)。

方式 A —— GitHub Release 安装包(推荐)

# 1. 从 v0.0.1 release 下载打包好的插件 tgz
gh release download v0.0.1 -R zeng6125-rgb/dsh-llm-retry-settings

# 2. 解压进 profile 的 node_modules
mkdir -p ~/.dsh/profiles/web/node_modules/@dsh-external
tar -xzf dsh-external-dsh-llm-retry-settings-0.0.1.tgz -C ~/.dsh/profiles/web/node_modules/@dsh-external/
mv ~/.dsh/profiles/web/node_modules/@dsh-external/package \
   ~/.dsh/profiles/web/node_modules/@dsh-external/dsh-llm-retry-settings

# 3. 在 profile 里注册 bundle,然后重启 DSH
#    在 ~/.dsh/profiles/web/package.json 的 dsh.profile.bundles 里加 "@dsh-external/dsh-llm-retry-settings"

方式 B —— dsh CLI / pnpm(需要 git + 网络)

dsh plugin 命令会把参数转发给 profile 目录里的 pnpm:

# 从 git 仓库安装(pnpm 会 clone;lib/ 已提交,无需构建)
dsh plugin --profile web add github:zeng6125-rgb/dsh-llm-retry-settings

# 或从 release tarball 地址安装
dsh plugin --profile web add https://github.com/zeng6125-rgb/dsh-llm-retry-settings/releases/download/v0.0.1/dsh-external-dsh-llm-retry-settings-0.0.1.tgz

装完还需要在 profile 里启用:把 "@dsh-external/dsh-llm-retry-settings" 加进 dsh.profile.bundles(或使用 Desktop 的插件管理 UI),然后重启 DSH。

注意:命令是 dsh plugin(dsh CLI 的子命令),不是 dsh-plugin。dsh CLI 随 Desktop 应用内置;如果不在 PATH 里,用 app 的 bin 调用,例如 node "<app>/node_modules/@deepseek-ai/dsh/lib/bin.js" plugin --profile web ...。

方式 C —— 源码

git clone https://github.com/zeng6125-rgb/dsh-llm-retry-settings.git
cd dsh-llm-retry-settings
npm run build        # bash scripts/build.sh(需要 DSH_CHECKOUT)

把本地构建 link 进 profile 并注册 bundle:

dsh plugin --profile web link "$PWD"
# 然后把 "@dsh-external/dsh-llm-retry-settings" 加进 dsh.profile.bundles 并重启 DSH

使用

  1. 打开 DSH 设置 → General。
  2. 找到 LLM 自动重试 卡片。
  3. 打开 开启覆盖(enabled)。
  4. 设置 maxRetries / initialDelayMs / maxDelayMs / jitterRatio,点 保存。

改动会写入 dsh-llm-retry 设置命名空间,重试引擎实时生效。

配置项

键 类型 默认值 说明
enabled boolean false 是否开启重试策略覆盖。
maxRetries integer(≥ 0) 2 最大重试次数(0 = 不重试)。
initialDelayMs integer(≥ 1) 500 首次重试前的初始退避(毫秒)。
maxDelayMs integer(≥ 1) 10000 退避时间上限(毫秒)。
jitterRatio number(0–1) 0.1 退避抖动比例(0 = 无抖动)。

工作原理

宿主半边注册 dsh-llm-retry 设置命名空间(schema 校验 + 持久化 + live 同步),并在 agent/request-error 监听链最前端 prepend 改写 retryPolicy,官方 @deepseek-ai/dsh-llm-retry 的 recover 直接消费覆盖后的策略:

agent/request-error  →  [本插件:覆盖次数/退避]  →  dsh-llm-retry recover

界面

设置 → General → LLM 自动重试 卡片。编辑采用草稿模式:点「保存」提交、「放弃」回滚;保存后会对快照做校验,显示 已保存 ✓ / 保存失败 ✗。

依赖

  • 宿主插件:@deepseek-ai/dsh-llm-retry
  • 客户端运行时:@deepseek-ai/dsh-client-web-react
  • DSH settings 服务

构建

npm run build        # bash scripts/build.sh(需要 DSH_CHECKOUT)
npm run typecheck    # tsc --noEmit

License

MIT

原始 README: https://github.com/zeng6125-rgb/dsh-llm-retry-settings/blob/main/README.zh-CN.md ↗

同类插件

查看全部 →
模型与账号接入Anionex

agent-vision-toolkit

为纯文本模型"看图“设计更好的视觉工具箱和技能,支持多图理解,图片问答,前端UI还原、GUI 自动化等,并可选无缝接入多个主流agent,直接识别粘贴图片| A vision toolkit and skill designed for text-only llms — image Q&A, long-screenshot OCR, frontend UI restoration, and GUI automation, with optional seamless integration for Codex, Claude Code, Pi, Oh My Pi, and OpenCode

查看详情
928github+08-16
模型与账号接入toby-bridges

api-relay-audit

从 DeepSeek Harness 对 AI API 中转站和 LLM 代理运行本地安全审计,生成 Markdown 报告,覆盖提示词注入、模型替换信号、工具调用改写、错误泄漏、流完整性和按 profile 启用的 Web3 风险。

查看详情
791github+08-21
模型与账号接入ZJU-LLMs

OpenStory

✨ OpenStory 现已支持 DeepSeek Harness 插件! 现在可以通过 dsh-openstory 将 OpenStory 多智能体推演接入 DeepSeek Harness,让 agent 直接启动模拟、查看角色、下达指令并逐回合推进故事。查看 DSH 插件配置与使用指南。

查看详情
377github+08-17
模型与账号接入pulseaiclub

phi

pi的编码代理 ∞ 提供者、子代理、hashline编辑和权限门

查看详情
89github+08-16
模型与账号接入anysearch-team

anysearch-dsh

DeepSeek Harness(DSH)的 AnySearch 网络搜索提供方与高级搜索工具。

查看详情
79github+08-17
模型与账号接入kuangre123

codex-switch

Codex Switch 是一个 macOS 工具,一键配置 Codex 的自定义 API,同时保留官方 OpenAI 登录。保存后 Codex 的模型选择器里只会出现你选的那个 provider 的模型。也支持 Claude Code 的官方 / 自定义 API 切换。Codex Switch is a lightweight helper for configuring multiple coding-agent API routes. For Codex, it keeps Official OpenAI and a custom API provider configured in parallel, registers the custom model in Codex's mod

查看详情
67github+08-16