[高] Agent畸形工具参数被静默替换为空对象 #82

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

问题描述

backend/app/agent_runtime/core.py 第376-377行,当 LLM 生成的工具调用参数 JSON 解析失败时,静默替换为 {}。工具以错误参数执行,产生不可预期结果。

涉及文件

  • backend/app/agent_runtime/core.py:376-377

修复建议

  1. JSON解析失败时应返回错误给LLM让其重试
  2. 记录警告日志便于排查

严重程度

高 - 工具调用正确性问题

## 问题描述 backend/app/agent_runtime/core.py 第376-377行,当 LLM 生成的工具调用参数 JSON 解析失败时,静默替换为 {}。工具以错误参数执行,产生不可预期结果。 ## 涉及文件 - backend/app/agent_runtime/core.py:376-377 ## 修复建议 1. JSON解析失败时应返回错误给LLM让其重试 2. 记录警告日志便于排查 ## 严重程度 高 - 工具调用正确性问题
admin closed this issue 2026-05-10 18:54:00 +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#82