Bug report + fix: image-bearing session deadlocks when switching to a text-only model (Web GUI) #3561
Replies: 1 comment
|
这个死锁成立,你的修法方向也和上游后来走的路一致——而且我手上有一条你可能会想先核一下的实测事实,它有可能让你这个 25 文件的补丁瘦一大圈。 0.1.1 的 dispatch 已经不再拒绝了,它做的是"可见降级"我们是 DSH 的外部插件(Pi 生态兼容层),因此必须同时兼容 rc.8 和 0.1.1 两代,两代的差异都钉在契约测试里。其中一条正是文本模型收到图片时会发生什么:
我们的测试对这两代做能力探测(探 两件事值得你注意:
我没验的那一半(重要)我验的是 dispatch 层(llm 分发时对模态不匹配怎么处理)。我没有验 但这件事你花十分钟就能自己确认,而结论直接决定你补丁的体量:
那个 zod 修复是本帖第二贵的发现,而且它属于一个反复出现的类
这是我这两天在社区里见到的第三例同形状缺陷:
共同点:中间有一层"归一化/校验"用了白名单或默认剥离,而这个白名单没有跟着上游 schema 一起长。三处的表现都是"字段在源头有、在终点没有、中间没有任何报错"。 我觉得这比三个独立 bug 更值得提给维护者——修法可以是统一的(归一化白名单与 schema 同源、zod 用 边界我们不修 DSH 自家组件——Web GUI、 利益相关:我维护 pi2dsh。这条不推销:你要的是这个补丁被上游合入,装什么第三方插件都不解决"外部 PR 还没开放"这件事。 |
Uh oh!
There was an error while loading. Please reload this page.
Hi team 👋
I hit a real deadlock in the Web GUI (rc8) and implemented a fix on my fork. Since external PRs aren't open yet, I'm sharing it here per the contributing guide.
The bug
model-unavailable: ...session already contains images.The fix
A new
session.removeImagesRPC strips every image block from the model-visible surface (rewritinguser/messageandtool/resultnodes, keeping the append-origin events in the log) and from pending inbox items. The composer model seat then intercepts themodel-unavailablerefusal carryingreason: 'session-contains-images'and offers a "Remove images and switch" dialog — confirming strips the images and retries the exact refused selection; cancelling leaves the session untouched.Design notes
surfaceOp: replaceevents, so origin history is preserved.[image removed …]placeholder; surrounding text survives.selectModelkeeps its authoritative image-admission fence — the dialog is the client-side way through it.rpc.schema.tswas stripping thereasonfield frommodel-unavailabledetails (zod default strips unknown fields), so the client could never see the fence reason — the schema now carries it.Where
Fork
staryu5463/deepseek-harness, branchfix/session-image-switch-recovery(1 commit, 25 files, +860/−106): https://github.com/staryu5463/deepseek-harness/tree/fix/session-image-switch-recoveryVerification (all green locally)
Happy to rebase, adjust, or walk through any part of it once PRs open up. Thanks for the project!
中文简述:带图片的会话在切换到纯文本模型时会被拒绝且没有任何出路(Web GUI 卡死,重启丢对话)。修复方案:新增 session.removeImages RPC 从模型可见表层移除图片(保留日志原文),座位菜单弹出“移除图片并切换”对话框;同时修复了 rpc.schema.ts 剥掉拒绝原因字段的问题。改动已提交在 fork staryu5463/deepseek-harness 的 fix/session-image-switch-recovery 分支,测试与实测均通过。
All reactions