Skip to content

fix(telegram): route image documents (.png/.jpg/.webp/.gif) through vision pipeline#28519

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-6063e704
May 19, 2026
Merged

fix(telegram): route image documents (.png/.jpg/.webp/.gif) through vision pipeline#28519
teknium1 merged 2 commits into
mainfrom
hermes/hermes-6063e704

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvage of #24815 (@kiranvk-2011). When users send images as documents (Telegram file picker instead of photo button), they were rejected with 'Unsupported document type' because SUPPORTED_DOCUMENT_TYPES only includes text/office formats.

Authorship preserved via cherry-pick. Follow-up commit stubs the new fail-closed callback auth in the test fixture (added by #28494). 41/41 documents tests passing.

kiranvk-2011 and others added 2 commits May 18, 2026 22:36
…ision pipeline

When users send images as documents (Telegram file picker), they were
rejected with "Unsupported document type" because SUPPORTED_DOCUMENT_TYPES
only includes text/office formats. Add SUPPORTED_IMAGE_DOCUMENT_TYPES
to base.py and handle them in telegram.py before the document check.

- Add SUPPORTED_IMAGE_DOCUMENT_TYPES constant to base.py
- Add MIME reverse-lookup for image types in telegram.py
- Route image documents through cache_image_from_bytes + vision pipeline
- Handle media groups for image documents

Closes: #20128, #18620
@teknium1 teknium1 merged commit 1d37860 into main May 19, 2026
@teknium1 teknium1 deleted the hermes/hermes-6063e704 branch May 19, 2026 05:37
@alt-glitch alt-glitch added type/bug Something isn't working platform/telegram Telegram bot adapter comp/gateway Gateway runner, session dispatch, delivery tool/vision Vision analysis and image generation P2 Medium — degraded but workaround exists labels May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/telegram Telegram bot adapter tool/vision Vision analysis and image generation type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants