Skip to content

feat(telegram): forward inbound images as attachments#4

Merged
alexk-dev merged 5 commits intomainfrom
feat/telegram-image-inputs
Mar 8, 2026
Merged

feat(telegram): forward inbound images as attachments#4
alexk-dev merged 5 commits intomainfrom
feat/telegram-image-inputs

Conversation

@alexk-dev
Copy link
Owner

@alexk-dev alexk-dev commented Mar 8, 2026

Summary

  • forward inbound Telegram photos as metadata.attachments using the same base64 attachment contract as web image uploads
  • forward inbound Telegram image documents (image/* or common image extensions) through the same attachment pipeline
  • use Telegram captions as message content when a photo/document message has no text body
  • keep tier routing unchanged; this PR does not introduce any fallback tier behavior

Details

Telegram inbound messages can now reach multimodal models through the existing host-side image attachment pipeline without requiring Telegram-specific routing logic.

The adapter now:

  • downloads the largest Telegram photo variant
  • downloads image documents sent as files
  • emits attachments entries with type, mimeType, dataBase64, and name
  • preserves normal slash-command routing for text messages
  • leaves non-image documents untouched

Testing

  • mvn -f golemcore/telegram formatter:format
  • mvn test -pl golemcore/telegram -Dtest=TelegramAdapterHandleMessageTest,TelegramAdapterAuthTest,TelegramAdapterVoiceTest,TelegramAdapterCallbackTest,TelegramAdapterMessageTest,TelegramAdapterRetryTest -Dsurefire.failIfNoSpecifiedTests=false -am

@alexk-dev alexk-dev merged commit a55b997 into main Mar 8, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant