Compare commits

...

2 Commits

Author SHA1 Message Date
James Hush
4150a514d9 docs: add CHANGELOG entry for skip_tts bug fix 2025-11-28 13:57:24 +01:00
James Hush
4f89c99199 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.
2025-11-28 13:54:57 +01:00
2 changed files with 8 additions and 1 deletions

View File

@@ -279,6 +279,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed an issue where `LLMTextFrame` with `skip_tts=True` would have its value
overwritten to `False` when passing through LLM services (e.g., `LLMSwitcher`).
The fix preserves frames that already have `skip_tts=True` set.
- Fixed an issue in `AWSBedrockLLMService` where the `aws_region` arg was
always set to `us-east-1`.

View File

@@ -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)