Skip to content

[Feature]: Support Telegram Bot API 10.1 Rich Messages and rich draft streaming #44428

@Destinyrrj

Description

@Destinyrrj

Problem or Use Case

Telegram Bot API 10.1 introduced Rich Messages:

https://core.telegram.org/bots/api-changelog#june-11-2026

This adds RichMessage, InputRichMessage, sendRichMessage, sendRichMessageDraft, and rich blocks for headings, lists, tables, quotes, details blocks, LaTeX, media blocks, maps, collages, slideshows, etc.

This seems highly relevant for Hermes' Telegram gateway, especially streaming AI replies. Right now Telegram output still has to choose between plain/MarkdownV2 messages, edit-based streaming, and sendMessageDraft. With the new API, Hermes could render structured agent replies much more cleanly and stream them without the current Markdown/edit-message limitations.

Proposed Solution

Suggested scope:

  • Add Telegram adapter support for sendRichMessage.
  • Add support for sendRichMessageDraft as a richer streaming transport.
  • Map existing Hermes stream events into rich blocks where possible:
    • assistant text → paragraphs
    • headings/lists/code blocks → native rich blocks
    • tool progress / thinking state → suitable rich blocks, possibly RichBlockThinking
    • tables → native rich tables instead of degraded plain text
    • LaTeX → native mathematical expression blocks
  • Keep graceful fallback to existing transports:
    • rich draft → regular draft → editMessageText → final sendMessage
  • Add a config option or transport mode, e.g.:
    • streaming.transport: rich
    • or let auto prefer rich drafts when the Bot API/client library supports them.

Alternatives Considered

No response

Feature Type

Gateway / messaging improvement

Scope

Medium (few files, < 300 lines)

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/gatewayGateway runner, session dispatch, deliveryplatform/telegramTelegram bot adaptertype/featureNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions