zzzyaar/dsh--API-message_stop-1

dsh-missing-stop-heal

DeepSeek Harness plugin to heal third-party gateways that omit the stream terminal event (message_stop/done), which otherwise triggers repeated TRANSPORT retries in the dsh agent loop; scope is configurable per provider and per model.

包名
dsh-missing-stop-heal
版本
0.2.0
许可证
MIT
最近更新
2026年9月7日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:zzzyaar/dsh--API-message_stop-

方式 A(推荐):作为 web profile bundle,用设置页配置

装进 web profile 后,插件在进程级生效,规则可在 GUI 设置页里调。

dsh plugin --profile web add dsh-missing-stop-heal
  • dshmarket(插件市场) 里搜 missing-stop-heal 一键安装也行。
  • 装完重启 dsh(bundles 在启动时读取)。
  • 用仓库源码本地开发:dsh plugin --profile web add link:(link 方式 = 改仓库即生效,不用重装)。
  • 想先只给某个会话用,见方式 B 的 preset 挂载(此时配置走行内 config,没有设置页)。

五、配置

配置可通过行内 config(方式 B / 补丁层)或设置页(方式 A,写 user 层)提供。两种写法,rules 为主:

config:
  rules:
    - provider: xjhc            # 必填:provider 标识(llm/stream options.provider)
      models: ['*']             # 选填:缺省/空 = 全部模型;支持 * 通配,如 deepseek-v4*
      enabled: true             # 选填:缺省 true
  • 旧写法 config.providers: ['a','b'] 仍兼容=这些 provider 的全部模型;providersrules 可混用,逐条累加。
  • models 语义:留空或填 * = 该 provider 的全部模型;写多个用逗号/数组分隔;可用 * 通配前缀(如 deepseek-v4* 匹配 deepseek-v4 开头)。
  • 什么都不配 = 不修复任何流(插件对每个请求只提示一次,其余原样放行)。
  • 规则按 llm/stream 事件的 options.provider + options.model 逐条匹配;命中才包裹该流。

七、使用说明

  1. 安装(方式 A 或 B)、必要时重启 dsh;
  2. 配置生效范围:小任务常用网关(如 xjhc)用 rules 列出;官方 API 不必列,未被规则命中的请求一律放行;
  3. 想随时改:用设置页勾选(方式 A),或编辑 patch/行配置后刷新即可;
  4. 改宿主代码(heal.mjs)需重启 dsh;改客户端(client/client.js)浏览器 Ctrl+F5 即可。