[高] Agent _llm_invocations计数器在多次run()之间不重置 #84
Reference in New Issue
Block a user
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?
问题描述
backend/app/agent_runtime/core.py 第112行初始化 _llm_invocations 为0,但第170行 run() 方法中未重置此计数器。同一 Agent 实例多次调用 run() 时,计数器累加导致 budget 提前耗尽。
涉及文件
修复建议
在 run() 方法开始时重置 _llm_invocations = 0。
严重程度
高 - 资源控制逻辑错误