mirror of
https://github.com/deepseek-ai/awesome-deepseek-agent.git
synced 2026-11-05 01:07:37 +00:00
[GH-ISSUE #402] [Bug Report] DSH 界面重试导致模型选择回退 & run_code grep 大输出溢出崩溃 #125
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/awesome-deepseek-agent#125
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @928886540 on GitHub (Aug 24, 2026).
Original GitHub issue: https://github.com/deepseek-ai/awesome-deepseek-agent/issues/402
1. 消息重试失败后,UI 模型选择器回退到旧模型
问题描述
在 DSH 对话界面中,当用户针对一条失败消息点击「重试」时,如果重试再次失败,右下角 Composer 的模型选择器会自动回退到历史种子会话的模型(例如 AgentRouter),而丢失了用户在下拉框中显式选中的新模型(例如
gpt-5.6-sol)。根因分析
在
packages/host/apiproxy/src/api-proxy.ts中,fork 派生重放子会话时selectionFor(childAgent)没有继承父会话当前的动态模型选择parentSelection,回退使用了 Seed 事件中的初始模型。已验证修复分支
已在 Fork 分支完成单元测试验证:
https://github.com/928886540/deepseek-harness/tree/fix/preserve-model-selection-retry(Commit:9d9767ab29)2. run_code 中 tools.grep 在大输出时直接崩溃 (SEARCH_RAW_OUTPUT_OVERFLOW)
报错信息
根因分析
packages/fs/tool-fs-search/src/search-core.ts调用ctx.subprocess.spawn启动 ripgrep 时未配置SubprocessCollect.spill。当内存缓冲区超限时直接抛出未捕获的溢出异常,导致未能进入外层「取前 250 条 + 其余 Spill 到文件」的正常截断逻辑。已验证修复分支
已在 Fork 分支完成单元测试验证(增加 500MB 子进程 spill 流读取):
https://github.com/928886540/deepseek-harness/tree/fix/fs-search-spill-large-grep-results(Commit:79e4e96665)@PerryLink commented on GitHub (Sep 13, 2026):
在 master(dsh-v0.1.5-rc.2-139-gc291e7961a,2026-09-10)做了只读核对(报告未注明版本,以下结论以该树为准):
模型回退: 引用的 packages/host/apiproxy/src/api-proxy.ts 已不存在(该包已重构). 现行 fork 路径在 packages/api/session-controller/src/commands.ts:260-263 用 agentDefaultModel.currentSelection() 构造子会话模型, seed 取自 source.events.slice(0,cut); 父会话的动态选择若未持久化(没有 model/selection 事件落盘), 子会话就会回到 seed 里的初始模型 - 与观察到的回退一致. 已持久化的选择继承有测试覆盖(session-fork.host.spec.ts:271-303). 建议在最新版复测: 显式选择模型后确认有 model/selection 事件落盘, 再看 fork 后是否仍回退.
grep 溢出: 报错文本与 20MB 上限属实(search-core.ts:140,151-154), spawn 确未配置 spill(235-245). 但这是有意的结构化 SearchError, 不是未捕获崩溃: 设计为 fail-fast(search-core.ts:132-138), 原始 rg 输出有意不落 spill(194-196), 并有测试固化该行为(tools.spec.ts:616-640); "前 250 条+Spill" 只作用于解析后的匹配(grep.ts:29,317-362). 如需大输出, 建议收窄 pattern/path, 或由调用方提高 rawOutputMaxBytes.