Repository navigation
Conversation
pcerypeng
commented
Jul 23, 2026
- OpenAIModel 新增 use_responses_api 参数,使用 client.responses.create 替代 Chat Completions
- 支持 responses_api_params 透传 store、reasoning、truncation 等待有参数
- AgentNodeAction 支持 LongRunningEvent 中断并传播到父 Graph
- 支持多轮 HITL 交互及服务重启后正确恢复
- 新增 is_tool_execution_error() 函数,区分 Provider 参数解析错误和 HITL 检查点
- 更新 Graph 和 Model 中英文文档
- 升级 openai 最低版本依赖至 1.66.0
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #227 +/- ##
==========================================
Coverage ? 87.95475%
==========================================
Files ? 482
Lines ? 45437
Branches ? 0
==========================================
Hits ? 39964
Misses ? 5473
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request |
AI Code Review现在我已经掌握了所需的所有信息,让我来撰写审查意见。 发现的问题🚨 Critical
|
AI Code Review我已经完全理解了。让我整理一下审查意见。 基于我对 diff 和仓库上下文的彻底分析,以下是我的发现: 发现的问题🚨 Critical
|
|
|
||
| child_scope = self.event_scope or self.agent.name | ||
| child_branch = f"{parent_ctx.branch}.{child_scope}" if parent_ctx.branch else child_scope | ||
| child_user_input = child_state.get(STATE_KEY_USER_INPUT, "") |
There was a problem hiding this comment.
恢复时重放已完成轮次的 interrupt() 会阻塞图恢复
在 pending_hitl 恢复路径中对 completed 列表里的每个历史轮次都调用 interrupt(),而 _extract_resume_command 每次只构造单条 Command(resume=...),无法填满多个 interrupt() 调用,导致恢复卡住或错位。建议仅对 current 轮发起 interrupt,已完成轮次直接回放 child state/事件。
新增功能: - OpenAI Responses API 适配 (非流式/流式), 支持 reasoning、tool calls、logprobs - Agent 节点多轮 HITL 机制, 通过 interrupt bridge 桥接子 agent LongRunningEvent - AG-UI GraphAgent checkpoint 保护, 防止工具结果恢复时覆盖 LangGraph checkpoint 代码修复 (代码审查): - _constants.py: 将 STATE_KEY_PENDING_AGENT_NODE_HITL 加入 UNSAFE_STATE_KEYS, 防止含敏感工具参数的 child_state 通过 completion 事件对外暴露 - _openai_model.py: 非流式 Responses 路径分离 http_options 传参, 与流式路径 保持一致, 修复 extra_body 被误传为 responses.create 顶层参数的 Bug - _llm_agent.py: 删除重复的 logger.debug 行; 在长运行工具与并行工具批混用时 发出警告, 提示同批其它工具结果不会被 LLM 进一步处理 - _long_running_tool.py: 提取 TOOL_ERROR_CODE_* 共享常量, 消除与 _tools_processor.py 中的硬编码字符串重复 - _agui_agent.py: 优化 GraphAgent checkpoint 检测——复用 _ensure_session_exists 返回的 session 消除额外 DB 查询, 用模块级常量替代硬编码前缀, 改为同步方法 - _session_manager.py: 新增 session_service 公共属性, 消除私有成员访问 新增测试: - AgentNode HITL 中断后进程重启恢复场景 (SqlSessionService) - STATE_KEY_PENDING_AGENT_NODE_HITL unsafe 归类验证 - 多轮 HITL 客户端使用过期 function_call.id 提交 resume 时不静默完成 - 非流式 Responses 路径 http_options 含 extra_body/extra_headers/timeout 时参数分离 - GraphAgent checkpoint 保护测试 - test_constants.py 更新覆盖新增 unsafe key