Bundle
dsh-retry-policy-settings
Settings UI for DeepSeek Harness (DSH) to edit each model provider's request retryPolicy — mode (normal/always), maxRetries, retryableCodes and exponential-backoff parameters — written to settings.yaml and applied by dsh-llm-retry. 模型重试策略设置:在设置面板中可视化编辑各模型提供方的 API 请求失败重试策略。
- Source
- guanosine-diphosphate
- installs
- 3 installs
- stars
- 1 stars
- License
- MIT
- Updated
- Updated 5 days ago
Readme
# dsh-retry-policy-settings **DeepSeek Harness (DSH) 插件 · 模型重试策略设置** 在 DSH Web 设置面板中可视化编辑每个模型提供方的 **API 请求失败重试策略**(`retryPolicy`)——重试模式、重试次数、可重试错误码与指数退避参数,写入 `settings.yaml` 后由官方 [`@deepseek-ai/dsh-llm-retry`](https://www.npmjs.com/package/@deepseek-ai/dsh-llm-retry) 插件即时生效(热重载,无需重启)。 > Keywords: DeepSeek Harness · dsh · dsh-plugin · cordis · plugin · llm · retry · retry-policy · retries · backoff · maxRetries · settings · 模型重试 · 重试策略 · DSH 插件 ## 功能 - 自动读取所有已注册的模型提供方(自定义 OpenAI 兼容 API、DeepSeek 官方等) - 编辑提供方 `retryPolicy` 的全部可选字段(文件里没写、但有默认值的字段也会显示并可直接设置): - `mode`:`normal`(有限重试,默认)/ `always`(无限重试直到成功/取消) - `maxRetries`:失败后最大重试次数(默认 2,仅 normal) - `retryableCodes`:可重试错误码(默认 `EMPTY_RESPONSE, RATE_LIMIT, SERVER, TIMEOUT, TRANSPORT`,仅 normal) - `backoff.initialDelayMs`(默认 500)/ `backoff.maxDelayMs`(默认 10000)/ `backoff.jitterRatio`(默认 0.1) - 一键"移除并恢复默认",回到 dsh-llm-retry 的默认行为 - 中文 / English 自动跟随 DSH 全局语言切换 - 深色 / 浅色主题自适应(使用 DSH 主题 token) ## 安装 通过 GitHub 安装到你的 DSH profile(推荐,发布即用): ```bash dsh plugin --profile web add "github:guanosine-diphosphate/dsh-retry-policy-settings#main" ``` 或本地安装(克隆仓库后): ```bash dsh plugin --profile web add "file:./dsh-retry-policy-settings" ``` 安装后把 `dsh-retry-policy-settings` 加入 profile 的 `dsh.profile.bundles`(`<profile>/package.json`),重启 Web UI 即可在 **设置 → 模型重试策略** 看到设置页。 ## 使用 1. 打开 DSH Web UI → 左下角 **设置** 2. 点击 **模型重试策略**(英文界面显示 Model Retry Policy) 3. 选择提供方,调整模式与参数,点 **保存** 写入位置(取决于提供方所属适配器): | 提供方类型 | settings.yaml 路径 | |---|---| | 自定义 / pi-ai 提供方(如 `scnet`) | `llm-pi-ai.providers.<id>.retryPolicy` | | DeepSeek 官方(`deepseek-official`) | `llm-deepseek.retryPolicy` | ## 工作原理 - 通过 DSH 统一 API(`connection.api.llm.providers` + `connection.api.settings`)自动发现提供方并读写配置,无需额外 Host 服务 - 与官方 `dsh-llm-retry` 的 `RetryPolicySchema` 严格一致:`always` 模式下 `maxRetries`/`retryableCodes` 字段被禁用(schema 不允许) - 依赖官方插件 [`@deepseek-ai/dsh-llm-retry`](https://www.npmjs.com/package/@deepseek-ai/dsh-llm-retry)(DSH 默认已启用,无需单独安装) ## 依赖 - DeepSeek Harness ≥ 0.1.0-rc.x(Web profile) - `@deepseek-ai/dsh-llm-retry`(官方 bundle 自带) ## 开发 ```bash # 结构 lib/index.js # host 占位行(插件主体在 client) lib/client.js # 浏览器端(web bundle 格式,纯 JS,无构建步骤) cordis.patch.yml ``` `lib/client.js` 为可直接分发的 web-bundle 格式(`window.__ModuleLoader__.load`),修改后无需构建。 ## License MIT © guanosine-diphosphate ## 相关 - [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) — 官方仓库 - [`@deepseek-ai/dsh-llm-retry`](https://www.npmjs.com/package/@deepseek-ai/dsh-llm-retry) — 重试策略执行插件 - [awesome-deepseek-harness](https://github.com/Dominic789654/awesome-deepseek-harness) — DSH 社区插件列表 - [dsh-suite](https://github.com/whyihaveyou/dsh-suite) — DSH 插件活目录与商店
Install
dsh plugin --profile web add github:guanosine-diphosphate/dsh-retry-policy-settings
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-retry-policy-settings from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.