Replies: 1 comment
|
Thanks for the write-up — the call chain you quoted is the whole story, and it points at a seam that a plugin can occupy. Two things I can add from reading both releases: what makes the second switch fail mechanically, and a shipped plugin that answers the offending write. The failing write is the deployment-wide one, and it is not on the picker's per-request path
this.agents.selectForNextRequest(agent, selected) // session-local — correct
await this.ctx.agentDefaultModel.saveSelection(selected) // deployment-wide — the escalationOnly the second one is the regression. Your local patch (drop the second call, keep the first) is the minimal fix at the call site. Where a plugin can standThe upstream fix belongs in core. In the meantime the seam is plugin-mountable, because the escalation is an ordinary service method on I published the plugin I built for this: Default behaviour is Two design notes that came out of building it:
One migration note for anyone on the 0.1.7 lineThe plugin writes a durable user-role notice when it suppresses a write. On the Compatibility as I measured it — behaviour suite green on Finally, the expectation in your last section is the same one #3398 and #7179 already asked for: a session-scoped pick must not rewrite the deployment default. So the guard is a temporary stand-in for that semantics, not a different opinion about it — when core drops the deployment-wide write from |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
问题概述
在
@deepseek-ai/dsh@0.1.7-rc.1Web 端,推理档位在进程启动后只能成功切换一次。再次切换时会报错:这不是会话损坏。第一次切换已经成功,并在会话日志中持久写入了
model/selection事件。问题发生在第一次成功切换触发“全局默认模型”配置写入及配置重载之后。复现步骤
high。high切换为low:model/selection { reasoningEffort: "low" }。sessionController不可用;页面中的“重新加载”无法恢复。重启 DSH 后服务会暂时恢复,但同样的问题会再次出现:第一次切换成功,之后的切换全部失败。
已确认的服务端调用链
SessionCommandController.selectModel()同时执行了两件事:第一步正确地记录了会话级模型选择;第二步却通过
configEditor.edit()改写部署级默认配置并触发整个 profile 的配置协调/重载。重载过程中session-controller被卸载,之后未能恢复为可用状态,所以后续的session/modelCatalog和模型选择请求都会失败。在同一进程中的直接验证结果:
session/modelCatalog成功;session/selectModel(... reasoningEffort: "low")成功;session/modelCatalog返回gateway/service-unavailable;仅在客户端增加模型目录重试无法解决,因为服务端的
sessionController没有恢复。已验证的临时修复
从
selectModel中移除部署级默认配置写入,只保留会话级选择:修改后,在同一进程、同一会话中连续执行以下切换均成功,并且每次切换后
session/modelCatalog都保持可用:这也符合该方法自身的注释:“Validate and install one Session-local model selection.”
期望行为
sessionController都应保持可用。相关讨论
agentDefaultModel.saveSelection将会话选择与全局默认配置错误绑定。本报告补充了
0.1.7-rc.1中可稳定复现的具体回归:配置重载后sessionController持续不可用,导致模型/推理档位选择器在每次进程启动后只能成功使用一次。环境
0.1.7-rc.1v22.23.2deepseek-flash)All reactions