Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

fix: tool call dump for provider trace (#2852)

cthomas9e618bcc8547
diff --git a/letta/adapters/letta_llm_stream_adapter.py b/letta/adapters/letta_llm_stream_adapter.py
index 8985daa6c..98a3b46fd 100644
--- a/letta/adapters/letta_llm_stream_adapter.py
+++ b/letta/adapters/letta_llm_stream_adapter.py
@@ -149,7 +149,7 @@ class LettaLLMStreamAdapter(LettaLLMAdapter):
request_json=self.request_data,
response_json={
"content": {
- "tool_call": self.tool_call.model_dump_json(),
+ "tool_call": self.tool_call.model_dump_json() if self.tool_call else None,
"reasoning": [content.model_dump_json() for content in self.reasoning_content],
},
"id": self.interface.message_id,