Skip to content

fix(agent): 修复输出协议重试与流式显示(develop) - #4023

Merged
WMC001 merged 9 commits into
developfrom
fix/model-attempt-stream-ui-develop
Sep 28, 2026
Merged

WMC001 merged 9 commits into
developfrom
fix/model-attempt-stream-ui-develop

Conversation

@JasonW404

@JasonW404 JasonW404 commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

修改内容

  • 为普通 code_action Agent 增加可配置的严格协议与重试路径。开启时,动作生成请求加入请求专用的格式提醒;裸文本先作为思考步骤续跑,格式不合规则有限重试。重试耗尽后,符合兜底条件的最后一次可见输出作为最终答案处理。
  • 关闭开关时恢复原有 Agent Runtime 的输出解析与处理路径;空响应不触发严格模式重试,并在界面给出轻量提示。final_answer_envelope 路径保持原有行为。
  • 修复模型重试时的流式显示:保留步骤标签,失败轮次回滚,成功轮次持续展示并提交;统一 SSE、会话历史和重连后的内容,避免丢失或重复显示。
  • 修复请求专用尾部提醒影响 guardrail 判断真实用户输入的问题,并补充协议、续跑、流式和回归测试。

验证结果

  • 当前提交 e61520855 面向 develop。GitHub Actions 全量 UT:18,467 通过,0 失败;类型检查、代码分析及镜像构建检查均通过。
  • 下表和截图为同一功能方案在移植到 develop 前的实机验证记录,供模型行为对照;它们不表示当前提交重新执行了表中全部模型测试。
模型 开关 完整会话 用户请求 首轮完成/合规 修复后成功 裸文本兜底 错误/未知 兜底含工具语法
Qwen/Qwen3-VL-32B-Instruct off 20 60 60 0 0 0 0
Qwen/Qwen3-VL-32B-Instruct on 20 60 40 20 0 0 0
Pro/zai-org/GLM-5.1 off 20 60 60 0 0 0 0
Pro/zai-org/GLM-5.1 on 20 60 57 3 0 0 0
Qwen/Qwen3.5-27B off 20 60 60 0 0 0 0
Qwen/Qwen3.5-27B on 20 60 51 8 0 1 0
Qwen/Qwen3-8B off 20 60 60 0 0 0 0
Qwen/Qwen3-8B on 20 60 42 14 4 0 3
Qwen/Qwen2.5-72B-Instruct off 20 60 60 0 0 0 0
Qwen/Qwen2.5-72B-Instruct on 20 60 59 1 0 0 0
deepseek-v4-flash off 20 60 60 0 0 0 0
deepseek-v4-flash on 20 60 45 15 0 0 0
glm-5.2 off 20 60 60 0 0 0 0
glm-5.2 on 20 60 55 5 0 0 0
glm-5.3 off 20 60 60 0 0 0 0
glm-5.3 on 20 60 42 13 5 0 5
glm-5.3-flash off 20 60 60 0 0 0 0
glm-5.3-flash on 20 60 17 15 28 0 20
MiniMax-M3 off 20 60 59 0 0 1 0
MiniMax-M3 on 20 60 29 29 2 0 0
qwen3.7-max off 20 60 60 0 0 0 0
qwen3.7-max on 20 60 55 5 0 0 0
qwen3.7-plus off 20 60 60 0 0 0 0
qwen3.7-plus on 20 60 50 10 0 0 0
qwen3.8-flash off 20 60 60 0 0 0 0
qwen3.8-flash on 20 60 51 9 0 0 0
qwen3.8-max off 20 60 60 0 0 0 0
qwen3.8-max on 20 60 59 1 0 0 0

关闭态的“首轮”表示旧链路完成,不代表严格协议格式合规;CSV 中的 legacy_direct 记录了其中的裸文本次数。开启态的“首轮”表示通过代码动作解析并得到最终答案。每个完整会话包含三条连续用户请求。

image image

@JasonW404 JasonW404 closed this Sep 28, 2026
@JasonW404 JasonW404 reopened this Sep 28, 2026
@JasonW404 JasonW404 changed the title fix(agent): port PR #4005 output protocol and streaming to develop fix(agent): 修复输出协议重试与流式显示(develop) Sep 28, 2026
@codecov

codecov Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.79612% with 75 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
sdk/nexent/core/agents/core_agent.py 83.77% 27 Missing and 16 partials ⚠️
sdk/nexent/core/utils/observer.py 64.83% 26 Missing and 6 partials ⚠️

📢 Thoughts on this report? Let us know!

@WMC001
WMC001 merged commit b84fae3 into develop Sep 28, 2026
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants