[高] Agent on_llm_invocation回调遗漏await导致协程未执行 #87

Closed
opened 2026-05-10 18:39:15 +08:00 by admin · 0 comments
Owner

结论: 非Bug

经代码审查确认,on_llm_invocation 回调实际为同步函数(见 workflow_engine.py:1937 定义 def _on_agent_llm()),调用方式 self.on_llm_invocation() 无需 await

类型注解 Callable[[], Any] 与同步调用一致。

## 结论: 非Bug 经代码审查确认,`on_llm_invocation` 回调实际为同步函数(见 `workflow_engine.py:1937` 定义 `def _on_agent_llm()`),调用方式 `self.on_llm_invocation()` 无需 `await`。 类型注解 `Callable[[], Any]` 与同步调用一致。
admin closed this issue 2026-05-10 18:54:01 +08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/aiagent#87