From 5766504c609bf0d1c75945079e9e7257df2c8826 Mon Sep 17 00:00:00 2001 From: EloquentBrush0x <283442588+EloquentBrush0x@users.noreply.github.com> Date: Mon, 18 May 2026 19:33:48 -0700 Subject: [PATCH] fix(gateway): align kanban artifact _IMAGE_EXTS with response dispatch _deliver_kanban_artifacts used a broader _IMAGE_EXTS that included .bmp, .tiff, and .svg. These three extensions are absent from the equivalent set in _deliver_media_from_response (line 10661), which intentionally routes them through send_document rather than send_multiple_images (comment near line 10522 notes that Telegram sendPhoto recompresses and rejects non-raster formats). Routing .svg (XML text), .bmp, or .tiff through the photo API causes send_multiple_images to raise on most platforms; the exception is caught and logged as a warning, silently dropping the artifact. Aligning the two sets ensures kanban deliverables with these extensions follow the same send_document path as regular agent responses. No behaviour change for .png/.jpg/.jpeg/.gif/.webp. --- gateway/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/run.py b/gateway/run.py index de4bf9fe7fd..81a2466b736 100644 --- a/gateway/run.py +++ b/gateway/run.py @@ -4680,7 +4680,7 @@ class GatewayRunner: if not candidates: return - _IMAGE_EXTS = {".png", ".jpg", ".jpeg", ".gif", ".webp", ".bmp", ".tiff", ".svg"} + _IMAGE_EXTS = {".png", ".jpg", ".jpeg", ".gif", ".webp"} _VIDEO_EXTS = {".mp4", ".mov", ".avi", ".mkv", ".webm", ".3gp"} from urllib.parse import quote as _quote