From fd798ce027b62931eccded91c650a80fc174ad17 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Sun, 22 Feb 2026 16:55:07 -0500 Subject: [PATCH] Silently log LLM failures instead of replying to user When the LLM is offline, post to #bcs-log instead of sending the "brain offline" message in chat. Co-Authored-By: Claude Opus 4.6 --- cogs/chat.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cogs/chat.py b/cogs/chat.py index a8fbb2e..a59eec3 100644 --- a/cogs/chat.py +++ b/cogs/chat.py @@ -119,7 +119,17 @@ class ChatCog(commands.Cog): await typing_ctx.__aexit__(None, None, None) if response is None: - response = "I'd roast you but my brain is offline. Try again later." + log_channel = discord.utils.get(message.guild.text_channels, name="bcs-log") + if log_channel: + try: + await log_channel.send( + f"**LLM OFFLINE** | Failed to generate reply to " + f"{message.author.mention} in #{message.channel.name}" + ) + except discord.HTTPException: + pass + logger.warning("LLM returned no response for %s in #%s", message.author, message.channel.name) + return if not image_attachment: self._chat_history[ch_id].append(