fix: include client_tools in streaming requires_approval_tools (#8230)

When streaming, the LLM adapter needs to know which tools require
approval so it can emit ApprovalRequestMessage instead of ToolCallMessage.
Client-side tools were being passed to the agent but not included in
the requires_approval_tools list passed to the streaming interface.

This caused the streaming interface to emit tool_call_message for
client tools, but the stop_reason was still requires_approval,
resulting in empty approvals arrays on the client side.

🤖 Generated with [Letta Code](https://letta.com)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-01-02 22:16:28 -08:00
committed by Caren Thomas
parent 3cf91d9dbc
commit 3cdee2e78f

View File

@@ -669,7 +669,8 @@ class LettaAgentV3(LettaAgentV2):
use_assistant_message=False, # NOTE: set to false
requires_approval_tools=self.tool_rules_solver.get_requires_approval_tools(
set([t["name"] for t in valid_tools])
),
)
+ [ct.name for ct in self.client_tools],
step_id=step_id,
actor=self.actor,
)