From dcf10d85b34b9c46ff8bf31747fd8e68ec0381de Mon Sep 17 00:00:00 2001 From: owen Date: Tue, 22 Sep 2026 23:02:09 -0500 Subject: [PATCH] assistant: reply 'images not supported' and skip images The cog's vision_model defaulted to the text-only llama3.2:3b, so any image in the message/reply was sent to a non-vision model, causing Ollama 400 'invalid image input'. Now the bot tells the user images aren't supported and continues with text-only, preserving normal chat. --- assistant/assistant.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/assistant/assistant.py b/assistant/assistant.py index e686125..f267d94 100644 --- a/assistant/assistant.py +++ b/assistant/assistant.py @@ -138,6 +138,16 @@ class Assistant(commands.Cog): if not content and not image_urls: return + # Vision is not supported by the configured text-only model. If the user + # sent image(s), tell them once and skip the images, continuing with any + # text so normal chat keeps working (avoids Ollama 400 "invalid image + # input" from sending images to a non-vision model). + if image_urls: + await message.reply("Images not supported at this time.") + image_urls = [] + if not content: + return + if question_mode and not content.rstrip().endswith("?"): if is_ping: await message.reply("Question mode is on - messages must end with **?**.")