Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions gateway/platforms/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3232,6 +3232,17 @@ async def _stop_typing_task() -> None:
except OSError:
pass

# Log a warning when the extract pipeline stripped a
# non-empty response to empty, and fall back to sending
# the raw response to prevent silent message loss.
if not text_content and response:
logger.warning(
"[%s] Response stripped to empty after extract pipeline "
"(orig=%d chars). Sending raw response as fallback.",
self.name, len(response),
)
text_content = response

# Send the text portion
if text_content and not _tts_caption_delivered:
logger.info("[%s] Sending response (%d chars) to %s", self.name, len(text_content), event.source.chat_id)
Expand Down
Loading