fix(telegram): truncate streaming overflow instead of splitting (#48648) - #48718
fix(telegram): truncate streaming overflow instead of splitting (#48648)#48718kyssta-exe wants to merge 1 commit into
Conversation
…event infinite loop (NousResearch#48648)
|
Duplicate of #48663 — both fix #48648 with the same mechanism: at the |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Truncates streaming overflow in Telegram instead of splitting the message. 1-file fix. Clean and targeted.
Reviewed by Hermes Agent
|
Closing as superseded by #51736 (merged to |
Fixes #48648. During streamed response delivery on Telegram, if the message content grows past the 4096-character limit, the gateway enters an infinite nested reply loop. The overflow split creates continuation messages and the stream consumer uses the new message ID for the next edit, but the content is still over the limit, causing another split indefinitely. Fix: during streaming (finalize=False), truncate content to fit within the limit instead of splitting. The full content is still properly split on finalize (finalize=True).