Summary
Telegram Bot API 9.3 (Dec 31, 2025) introduced sendMessageDraft — a purpose-built method for streaming partial messages during generation. As of Bot API 9.5 (March 1, 2026), it's available to all bots.
Currently, OpenClaw's Telegram draft streaming uses the editMessageText approach: send a message, then repeatedly edit it as tokens arrive. This works but is throttled to ~1 update/second (DEFAULT_THROTTLE_MS = 1000 in src/telegram/draft-stream.ts) to stay within Telegram's rate limits on edits.
Request
Evaluate adopting sendMessageDraft as the streaming transport for Telegram channels when streaming: "partial" is configured. Since this is a dedicated streaming method (not a message edit), it may support faster update intervals than the current editMessageText workaround.
Additionally, consider exposing throttleMs as a configurable option under channels.telegram (e.g., channels.telegram.streamThrottleMs) so users can tune the tradeoff between responsiveness and rate-limit safety.
Context
Current behavior
src/telegram/draft-stream.ts uses sendMessage + editMessageText loop
DEFAULT_THROTTLE_MS = 1000 (hardcoded, not configurable)
TELEGRAM_STREAM_MAX_CHARS = 4096
- Config
channels.telegram.streaming: "partial" enables draft streaming but throttle is not tunable
Environment
- OpenClaw v2026.3.1
- Node 22.22.0
- macOS (LaunchAgent gateway)
Summary
Telegram Bot API 9.3 (Dec 31, 2025) introduced
sendMessageDraft— a purpose-built method for streaming partial messages during generation. As of Bot API 9.5 (March 1, 2026), it's available to all bots.Currently, OpenClaw's Telegram draft streaming uses the
editMessageTextapproach: send a message, then repeatedly edit it as tokens arrive. This works but is throttled to ~1 update/second (DEFAULT_THROTTLE_MS = 1000insrc/telegram/draft-stream.ts) to stay within Telegram's rate limits on edits.Request
Evaluate adopting
sendMessageDraftas the streaming transport for Telegram channels whenstreaming: "partial"is configured. Since this is a dedicated streaming method (not a message edit), it may support faster update intervals than the currenteditMessageTextworkaround.Additionally, consider exposing
throttleMsas a configurable option underchannels.telegram(e.g.,channels.telegram.streamThrottleMs) so users can tune the tradeoff between responsiveness and rate-limit safety.Context
sendMessageDraftparams:chat_id,text,parse_mode,entities,link_preview_options,reply_parameters,message_thread_id,reply_markupMessageCurrent behavior
src/telegram/draft-stream.tsusessendMessage+editMessageTextloopDEFAULT_THROTTLE_MS = 1000(hardcoded, not configurable)TELEGRAM_STREAM_MAX_CHARS = 4096channels.telegram.streaming: "partial"enables draft streaming but throttle is not tunableEnvironment