From 9bb83d1298ae4ce63117a4a287ee8a4f41d208e1 Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:34:39 +0530 Subject: [PATCH] fix(gateway): downgrade empty/None response log from WARNING to DEBUG This warning fires on every successful streamed response (streaming delivers the text, handler returns None via already_sent=True) and on every queued message during active processing. Both are expected behavior, not error conditions. Downgrade to DEBUG to reduce log noise. --- gateway/platforms/base.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gateway/platforms/base.py b/gateway/platforms/base.py index 6b9c97c3c..c33c2924a 100644 --- a/gateway/platforms/base.py +++ b/gateway/platforms/base.py @@ -1115,9 +1115,12 @@ class BasePlatformAdapter(ABC): # Call the handler (this can take a while with tool calls) response = await self._message_handler(event) - # Send response if any + # Send response if any. A None/empty response is normal when + # streaming already delivered the text (already_sent=True) or + # when the message was queued behind an active agent. Log at + # DEBUG to avoid noisy warnings for expected behavior. if not response: - logger.warning("[%s] Handler returned empty/None response for %s", self.name, event.source.chat_id) + logger.debug("[%s] Handler returned empty/None response for %s", self.name, event.source.chat_id) if response: # Extract MEDIA: tags (from TTS tool) before other processing media_files, response = self.extract_media(response)