DeepTutor icon indicating copy to clipboard operation
DeepTutor copied to clipboard

[Bug]: Editing a persisted message silently reuses stale model and reply-language settings

Open QuanHongnan opened this issue 1 month ago • 2 comments

Do you need to file an issue?

  • [x] I have searched the existing issues and this bug is not already filed.
  • [x] I believe this is a legitimate bug, not just a question or feature request.

Describe the bug

版本:v1.6.15;核对提交a31d82624c27d75f4e771d4fcb78dce16470b383。

复现步骤

  1. 使用模型配置A发送并保存一条普通问题,例如“解释二分查找”。
  2. 在模型菜单切换到配置B。
  3. 编辑已保存问题为“解释二分查找并给出边界条件”,点击发送,建立新分支。
  4. 检查新请求的llm_selection与实际执行模型。
  5. 同样验证历史请求为en、当前会话明确回复语言为zh的情况。

实际行为

editMessage复制原消息的requestSnapshot并替换content,没有把当前模型或明确回复语言写入新的快照。发送路径将该快照作为精确重放,因此新分支可能继续使用A和历史语言。

预期与建议

区分需要继承的内容上下文(原问题资料、附件等)与用户当前选择的生成设置。编辑产生新的请求时,应使用当前模型和明确回复语言;如果采用“编辑保留原生成设置”的产品设计,也应在界面明确展示实际将使用的设置,避免静默忽略模型菜单。

验收应覆盖:

  • 新分支使用B及合法的显式推理设置。
  • 明确语言覆盖为zh时,新请求的language为zh。
  • 原资料引用、附件与分支父节点正确保留。
  • 未送达请求的编辑/替换继续遵守submission幂等协议,不直接复用不匹配参数的原操作身份。

验证依据:修复前前端回归测试显示新分支仍发出旧模型和旧语言;局部修复后,真实网页编辑请求快照与中文输出均已核对。

上游源码

  • 编辑入口
  • 同文件editMessage内的requestSnapshotOverride构造,以及sendMessage对精确快照的设置优先级。

Steps to reproduce

  1. 使用模型A发送并保存普通问题。
  2. 在同一会话的模型菜单切换到B。
  3. 编辑已保存的问题,修改文字并发送以创建新分支。
  4. 检查start_turn.llm_selection;对历史en、当前明确回复语言zh做同样测试。

Expected Behavior

新分支保留原问题资料与附件,但采用当前明确的生成设置;或者在界面明确展示“沿用原设置”,避免静默忽略当前模型选择。

Related Module

Frontend/Web

Configuration Used

测试模型A/B,ID不同;不要求任何真实账号或凭据。本条针对已持久化消息,不是尚未送达的负ID本地草稿。

Logs and screenshots

修复前前端回归测试:已切换到B,但编辑后start_turn仍采用A;明确zh覆盖时仍发出旧语言。局部修复后真实网页编辑请求已确认新模型/推理参数和language=zh,输出为中文。

Additional Information

v1.6.15 / a31d82624c27d75f4e771d4fcb78dce16470b383。dev@9ce7ba9059e3d2ae0aa5fa9427b112a4148abce0的editMessage函数与发布版一致。Related: #2105(Resend的对应入口);#1944针对未送达草稿的生命周期,本条是已保存消息新分支的生成设置选择,复现条件不同。验证环境含局部修复,不是上游全量CI。

QuanHongnan avatar Oct 28 '26 07:10 QuanHongnan

Fixed by #2124 (merged 2026-10-28), which makes editMessage build the new branch from the live model and explicit reply-language selection instead of replaying the old request_snapshot verbatim. The issue's acceptance points (new branch uses the current model, explicit zh language override, original materials/attachments preserved) are covered there. This can be closed.

Antonio-Faure avatar Oct 31 '26 12:10 Antonio-Faure

@QuanHongnan — #2124 (merged 2026-10-28) explicitly says Closes #2106, and the fix is in v1.7.1.

Could you retest on v1.7.1 and close this if the symptom is gone? If it still reproduces, a short note with the current behavior would help.

Antonio-Faure avatar Nov 06 '26 10:11 Antonio-Faure