dsh-llm-compat-healer
LLM compatibility auto-healer: detects 400 errors from incorrectly declared model capabilities (thinking/reasoning) on transit/gateway providers, then idempotently patches `llm-pi-ai` config and suppresses thinking on the next request — no restart needed. Full settings UI for every pi-ai compat field.
安装
dsh plugin --profile web add github:semidia/dsh-llm-compat-healer
需要可复现安装时,可在仓库后追加 #commit 固定提交。
LLM compatibility auto-healer: detects 400 errors from incorrectly declared model capabilities (thinking/reasoning) on transit/gateway providers, then idempotently patches `llm-pi-ai` config and suppresses thinking on the next request — no restart needed. Full settings UI for every pi-ai compat field.
该插件未提供要点说明,请参考仓库 README。
- 安装并启动 DeepSeek Harness:
npx @deepseek-ai/dsh web - 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
- 用 dsh plugins list 确认已安装,必要时重启 Harness 生效
插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。
| 代码仓库 | github.com/semidia/dsh-llm-compat-healer |
| 许可证 | 未标注(见仓库) |
| 主要语言 | main |
| 下载量 | 2 |
| GitHub 星标 | 0 |
| 最近推送 | 2026-08-21 |
| 收录日期 | 2026-09-19 |
| 分类 | 界面增强 |
事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。
以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。
# dsh-llm-compat-healer
LLM 兼容自愈插件:自动检测并修复「中转/网关未正确声明模型能力」导致的请求失败(thinking/reasoning 兼容),并为 `llm-pi-ai` 配置提供完整的设置页 UI。
## 解决的问题
使用中转/聚合 API(如某公益中转、某聚合网关)时,如果 provider 的模型列表没有正确声明 `reasoningEfforts` / `compat`(如 `thinkingFormat: deepseek`),DeepSeek 官方 API 会返回:
```
{"message":"The reasoning_content in the thinking mode must be passed back to the API.","type":"invalid_request_error"}
```
(400 错误)。本插件自动检测该错误并修复配置,无需手动编辑 `settings.yaml`。
## 三层机制
1. **agent/request-error 监听(自愈)**:命中规则表 → 标记问题 provider + 异步幂等补全 `llm-pi-ai` 配置(只增不改不删);
未命中 → 记录到「未匹配错误」队列供 UI 查看(学习机制)。
2. **agent/request 拦截(当前会话立即恢复)**:对问题 provider 的请求,在发出前把 thinking 关掉——模型声明了 `off` 档位则设 `reasoningEffort: 'off'`,否则删除该字段。**无需重启。**
3. **RPC + 设置页 UI**:读写 `llm-pi-ai` 全部字段、一键补全、扫描全部补齐、查看错误日志。
## 功能
- 设置页新增「LLM 兼容」分区(`settings.section`,id=`llm-compat-healer`)
- 每个 provider 卡片:
- `thinkingFormat` / `reasoning` 下拉
- `compat` 开关组(openai-completions 14 项、responses、anthropic、bedrock 全部字段)
- 模型行 `reasoningEfforts` JSON 编辑 + 一键补全
- 顶部:「扫描全部补齐」「刷新」按钮
- 「未匹配错误」面板:显示插件检测到但不知如何修复的错误,一键复制
## 安装
1. 克隆到 `插件开发\dsh-llm-compat-healer\`(或任意目录)
2. 在 profile 的 `node_modules` 下建 junction:
```powershell
New-Item -ItemType Junction -Path "C:\Users\\.dsh\profiles\web\node_modules\dsh-llm-compat-healer" -Target "D:\plugins\dsh-llm-compat-healer"
```
3. 在 `cordis.patch.yml` 追加 insert 条目:
```yaml
- id: dsh-llm-compat-healer
name: dsh-llm-compat-healer
```
4. 重启 `dsh web`
## 开发
```bash
node test-unit.mjs # 28 项单元测试(规则匹配、补全幂等、深合并语义)
```
## 验证
- `shot-lch.cjs`:页面验收(UI 渲染、无 JS 错误)
- `shot-lch-scan.cjs`:scan-fix 功能验收(points 扫描全部补齐,settings.yaml 实际变化)
## 安全
- 事件监听器绝不原位修改 payload(经验库十七)
- `settings.update` 幂等补全:只增不改不删,不覆盖用户已有配置
- 未匹配错误只做记录,不做任何修改
## License
MIT
数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。