dsh-model-switch 0.4.48 → 0.4.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,41 @@
1
+ ## v0.4.51
2
+
3
+ 两处幂等加固,消除对 profile 文档的冗余写入:
4
+
5
+ - 记忆蒸馏适配层在推送前先比对 live 配置:路由、空链与三层分层链都已一致时**不再推送**(`memoryLiveMatchesRoute`,5 个新单测)。此前每次激活都无条件推送,而 memory 插件的 settings-set 每次都会把 live 段落盘。
6
+ - auto-review 接管在 `loader/patch-context` 里对**组合期已禁用**的官方行不再执行 `Entry.update({disabled:true})`(启动扫描原本就有这个判断,监听器漏了)。
7
+
8
+ 已知未决问题(如实记录,不宣称已修复):lab 里启用可选 auto-review bundle + automode + memory 的组合曾观察到间歇性 recompose 抖动(automode 的 `boot` 决策记录 ~1.5 条/秒、profile 文档 mtime ~5-6 秒一跳)。二分显示:移除本插件后抖动消失(30 秒 0 跳);加入上述两处加固后**同一构建两次测量不一致**(一次 30 秒 6 跳、一次 25 秒快照窗口 0 次改写),写入者未能 conclusively 定位。详见 `docs/route-verification.md` 的 recompose churn 小节。
9
+
10
+
11
+ ## Unreleased
12
+
13
+ - **记忆蒸馏路由修复(已提交,未发版)**:`fix(memory): stop the pin and the live push from cancelling each other`(`8e59fda`)。适配层不再"推链 + 清空 legacy 对 + 写静态 pin"三者互相抵消:live RPC 被接受时只发 `distillChain: []` + `distillProvider`/`distillModel` + 分层链,静态 pin 降级为 RPC 不可用时的兜底。`src/`、`lib/` 与测试(586 通过)已更新;**npm 上的 0.4.48 不含此修复**。
14
+ - **发版前置条件**:在隔离 lab(全虚拟探针)里证明 L1/L2/L3 的蒸馏调用确实带着配置路由、且改动即时生效;通过后才恢复「记忆蒸馏模型」卡片(`MEMORY_CAPABILITY_UI`)并随 v0.4.49 发布。未通过则保持撤卡。
15
+ - **其余待做**:DSH `0.2.1-rc.4` 运行时验证;Auto review 与 automode 分类器的虚拟取证;计划审阅卡两张截图(需 answerer)。
16
+
17
+ ## v0.4.50
18
+
19
+ 设置页新增「审查超时」:自动审查请求的流式空闲超时可自定义、可取消、可恢复默认。
20
+
21
+ - 作用点:写入审查模型所在 provider 的 `streamIdleTimeoutMs`(`@deepseek-ai/dsh-llm-pi-ai` 的 provider profile)。上游没有 per-request 覆盖,这是唯一入口。
22
+ - 「取消超时」写上游硬上限 `2147483647ms`(≈24.8 天)——上游拒绝 0/负数/Infinity,所以它 **不是真正的无限**;死端点会一直等待,UI 文案已如实标注。
23
+ - 作用范围:该 provider 的**全部调用**(审查、主对话、其他路由),不只是审查请求。
24
+ - 生效时机:写入发生在启动过程中,**下一次启动**才读取新值(实测写入当次仍按旧的 300 秒);UI 已写明需重启一次。
25
+ - 恢复默认 = 删除该键(本插件是这条键的管理者);实测删除后回到上游默认行为。
26
+
27
+ 修复(本轮实测发现):
28
+
29
+ - `model-switch-review-timeout` 行在激活期 `await` 设置写入会拖死加载器:headless profile 直接起不来,CLI 以 `unsettled top-level await` 退出(exit 13)。改为 fire-and-forget + 延迟重试 + 串行化。
30
+ - 清空超时字段改用 `unset` 而不是 `set null`:字段是数字,null 会被 host schema 拒绝。
31
+
32
+ lab 实测(virtual / 零真实额度;本地虚拟端点 `tools/route-probe.mjs`,DSH 0.2.1-rc.3):
33
+
34
+ - 自定义 5 秒 + 探针挂起 8 秒 → 下次启动报 `TIMEOUT: pi-ai stream idle timeout after 5000ms`(写入当次仍成功,证明需重启);
35
+ - 取消超时 → 键写为 `2147483647`,同样 8 秒挂起后正常完成;
36
+ - 恢复默认 → 键被删除,后续启动正常完成(回到 300 秒语义)。
37
+ - 复现方式:`node tools/route-probe.mjs --preset ok --hang 8000`(挂起 8 秒不回字节),配合上面三种设置重启各一次即可复跑。
38
+
1
39
  ## v0.4.48
2
40
 
3
41
  兼容门限从「逐版本列举」改为「下界 + 区间」:
package/cordis.patch.yml CHANGED
@@ -87,3 +87,10 @@
87
87
  # "follow the default model" state.
88
88
  - id: model-switch-prime-memory-compat
89
89
  name: 'dsh-model-switch/prime-memory-compat'
90
+
91
+ # Write the configured reviewer stream idle timeout into the reviewer
92
+ # routes' pi-ai provider profiles (the only place the upstream watchdog
93
+ # reads it). The write lands in the profile document, so it takes effect on
94
+ # the next start — same channel as the memory static pin.
95
+ - id: model-switch-review-timeout
96
+ name: 'dsh-model-switch/review-timeout'