From b821dd2507a6b67df0f4017367d595ed92a59de8 Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Tue, 9 Dec 2025 12:12:55 -0500 Subject: [PATCH] Fix a bug in `AWSNovaSonicLLMService` where we would mishandle cancelled tool calls in context --- src/pipecat/services/aws/nova_sonic/llm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipecat/services/aws/nova_sonic/llm.py b/src/pipecat/services/aws/nova_sonic/llm.py index 25f32e819..a677a8772 100644 --- a/src/pipecat/services/aws/nova_sonic/llm.py +++ b/src/pipecat/services/aws/nova_sonic/llm.py @@ -486,7 +486,7 @@ class AWSNovaSonicLLMService(LLMService): async def _process_completed_function_calls(self, send_new_results: bool): # Check for set of completed function calls in the context for message in self._context.get_messages(): - if message.get("role") and message.get("content") != "IN_PROGRESS": + if message.get("role") and message.get("content") not in ["IN_PROGRESS", "CANCELLED"]: tool_call_id = message.get("tool_call_id") if tool_call_id and tool_call_id not in self._completed_tool_calls: # Found a newly-completed function call - send the result to the service