fix: remove duplicated message about Tool result (#2964)

We are currently inserting tool results into LLM messages twice, which may unnecessarily increase processing costs, especially for longer outputs.
This commit is contained in:
Lucas Gomide
2025-06-05 10:42:10 -03:00
committed by João Moura
parent 4c21711dbf
commit f0f0e3d7f8

View File

@@ -215,9 +215,6 @@ def handle_agent_action_core(
if show_logs:
show_logs(formatted_answer)
if messages is not None:
messages.append({"role": "assistant", "content": tool_result.result})
return formatted_answer