Summary
On the channels branch, src/channels/telegram-markdown-sanitize.ts works around the Telegram adapter hardcoding legacy parse_mode=Markdown. As of @chat-adapter/telegram@4.30.0 (published 2026-06-02) that's fixed upstream: the adapter now resolves parse_mode=MarkdownV2 and ships a context-aware converter (MARKDOWNV2_SPECIAL_CHARS / CODE_BLOCK_SPECIAL_CHARS / LINK_URL_SPECIAL_CHARS). The sanitizer's own header even names the pending fix (vercel/chat#367). It's now not just unnecessary but harmful — it mangles markdown (flattens lists, strips formatting on delimiter imbalance) before the adapter's correct converter runs.
Minimal fix
Bump @chat-adapter/telegram 4.26.0 → 4.30.0, delete telegram-markdown-sanitize.ts (+ test), and drop the transformOutboundText: sanitizeTelegramLegacyMarkdown line in telegram.ts.
Why I'm filing an issue, not a PR
The bridge's chat must move to 4.30.0 in lockstep, which bumps the whole vercel @chat-adapter/* suite — but four third-party adapters on this branch (@beeper/chat-adapter-matrix, @bitbasti/chat-adapter-webex, chat-adapter-imessage, @resend/chat-sdk-adapter) pin an older chat and don't move with it, splitting chat versions (the same skew that breaks a single adapter's ChatInstance typing). Resolving that cleanly is a coordinated-suite-bump decision you're better placed to make than a drive-by PR.
Verified
In a Telegram-only install I bumped chat + @chat-adapter/telegram to 4.30.0 and removed the sanitizer: MarkdownV2 renders correctly end-to-end (bold/italic/strike/code/blockquote/links, tables as aligned monospace, button cards) with zero can't parse entities errors.
Happy to PR the Telegram-side change if you advise on how you'd like to handle the suite / third-party-adapter versioning.
🤖 Filed with Claude Code
Summary
On the
channelsbranch,src/channels/telegram-markdown-sanitize.tsworks around the Telegram adapter hardcoding legacyparse_mode=Markdown. As of@chat-adapter/telegram@4.30.0(published 2026-06-02) that's fixed upstream: the adapter now resolvesparse_mode=MarkdownV2and ships a context-aware converter (MARKDOWNV2_SPECIAL_CHARS/CODE_BLOCK_SPECIAL_CHARS/LINK_URL_SPECIAL_CHARS). The sanitizer's own header even names the pending fix (vercel/chat#367). It's now not just unnecessary but harmful — it mangles markdown (flattens lists, strips formatting on delimiter imbalance) before the adapter's correct converter runs.Minimal fix
Bump
@chat-adapter/telegram4.26.0 → 4.30.0, deletetelegram-markdown-sanitize.ts(+ test), and drop thetransformOutboundText: sanitizeTelegramLegacyMarkdownline intelegram.ts.Why I'm filing an issue, not a PR
The bridge's
chatmust move to 4.30.0 in lockstep, which bumps the whole vercel@chat-adapter/*suite — but four third-party adapters on this branch (@beeper/chat-adapter-matrix,@bitbasti/chat-adapter-webex,chat-adapter-imessage,@resend/chat-sdk-adapter) pin an olderchatand don't move with it, splittingchatversions (the same skew that breaks a single adapter'sChatInstancetyping). Resolving that cleanly is a coordinated-suite-bump decision you're better placed to make than a drive-by PR.Verified
In a Telegram-only install I bumped
chat+@chat-adapter/telegramto 4.30.0 and removed the sanitizer: MarkdownV2 renders correctly end-to-end (bold/italic/strike/code/blockquote/links, tables as aligned monospace, button cards) with zerocan't parse entitieserrors.Happy to PR the Telegram-side change if you advise on how you'd like to handle the suite / third-party-adapter versioning.
🤖 Filed with Claude Code