fix: Double write tool call deltas [LET-5545] (#5461)

* Double write tool call deltas

* Fix
This commit is contained in:
Matthew Zhou
2025-10-15 13:41:54 -07:00
committed by Caren Thomas
parent 458088a4a2
commit 643ec8fe2f

View File

@@ -300,6 +300,7 @@ class SimpleAnthropicStreamingInterface:
id=self.letta_message_id,
# Do not emit placeholder arguments here to avoid UI duplicates
tool_call=ToolCallDelta(name=name, tool_call_id=call_id),
tool_calls=ToolCallDelta(name=name, tool_call_id=call_id),
date=datetime.now(timezone.utc).isoformat(),
otid=Message.generate_otid_from_id(self.letta_message_id, message_index),
run_id=self.run_id,
@@ -397,6 +398,7 @@ class SimpleAnthropicStreamingInterface:
tool_call_msg = ToolCallMessage(
id=self.letta_message_id,
tool_call=ToolCallDelta(name=name, tool_call_id=call_id, arguments=delta.partial_json),
tool_calls=ToolCallDelta(name=name, tool_call_id=call_id, arguments=delta.partial_json),
date=datetime.now(timezone.utc).isoformat(),
otid=Message.generate_otid_from_id(self.letta_message_id, message_index),
run_id=self.run_id,