dsh-model-retry
其他 活跃维护

dsh-model-retry

502399493zjw-lgtm/dsh-model-retry

轻量级模型服务调用插件,支持为全局模型请求配置重试预算,可自定义重试次数、超时阈值等参数,适配各类模型服务的稳定性需求,开箱即用无需改动业务调用逻辑。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
3.8 MB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:502399493zjw-lgtm/dsh-model-retry
git clone https://github.com/502399493zjw-lgtm/dsh-model-retry.git
git clone git@github.com:502399493zjw-lgtm/dsh-model-retry.git
README.md main

@zhongjingwei/dsh-model-retry

CI

English | 中文

DeepSeek Harness Web plugin for configuring active providers' model-request retry budget from Settings → General.

Compatibility: pinned to stock DSH 0.1.0-rc.8. rc.8 moved retry ownership into provider profiles, so this version writes each active normal provider's retryPolicy.maxRetries through the published settings API.

Demo

Set the retry budget to 5, show retries 1/5 through 5/5, and recover when the sixth model request succeeds

The demo uses stock DSH 0.1.0-rc.8 and a plugin tarball packed from this source, all under an isolated DSH_HOME. It changes the retry budget from 2 to 5, then uses DSH's deterministic local LLM mock to return retryable server errors on attempts 1–5 and succeed on attempt 6. Session-title generation is disabled so those six mock requests belong only to the demonstrated model request. DSH executes and reports the retries; the plugin owns the shared retry-budget setting.

Install

For stock rc.8:

dsh plugin --profile web add @zhongjingwei/dsh-model-retry@0.1.0-rc.9

Restart Web after installation. Remove the plugin with:

dsh plugin --profile web remove @zhongjingwei/dsh-model-retry

Behavior

  • Adds one numeric retry-count row to Settings → General and shows its provider scope.
  • Accepts finite, non-negative integers, including 0.
  • Discovers active configurable providers through llm.providers and uses revision-fenced settings.mutate calls.
  • Writes retryPolicy.maxRetries for normal/default policies while preserving existing backoff and retryable-code fields.
  • Leaves always policies unlimited and leaves retry execution/backoff behavior owned by DSH.

Development

pnpm install
pnpm test
pnpm run build
pnpm run verify:package
pnpm pack

The package is an external Cordis plugin and does not patch DSH core.

License

MIT