From 4f89c991990708115704567f3182217bf6a3f30e Mon Sep 17 00:00:00 2001 From: James Hush Date: Fri, 28 Nov 2025 13:54:57 +0100 Subject: [PATCH] fix: preserve skip_tts flag when frames pass through LLM services Only set skip_tts=True when _skip_tts is configured, rather than unconditionally overwriting the frame's skip_tts value. This preserves frames that already have skip_tts=True when passing through LLM services. Fixes issue where LLMTextFrame with skip_tts=True would exit LLMSwitcher with skip_tts=False. --- src/pipecat/services/llm_service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pipecat/services/llm_service.py b/src/pipecat/services/llm_service.py index 272df1762..7dd44ec87 100644 --- a/src/pipecat/services/llm_service.py +++ b/src/pipecat/services/llm_service.py @@ -292,8 +292,11 @@ class LLMService(AIService): frame: The frame to push. direction: The direction of frame pushing. """ + # Only set skip_tts=True when configured, to preserve frames that already + # have skip_tts=True. This avoids overwriting frames passing through. if isinstance(frame, (LLMTextFrame, LLMFullResponseStartFrame, LLMFullResponseEndFrame)): - frame.skip_tts = self._skip_tts + if self._skip_tts: + frame.skip_tts = True await super().push_frame(frame, direction)