feat(telegram): honor config.yaml extra for inbound text batch delay - #86252
Open
Allenrcp wants to merge 1 commit into
Open
feat(telegram): honor config.yaml extra for inbound text batch delay#86252Allenrcp wants to merge 1 commit into
Allenrcp wants to merge 1 commit into
Conversation
Short bubbles were capped at 180ms even when the operator raised the batch delay, so multi-bubble input (file + instruction + follow-up) started a turn too early. Read platforms.telegram.extra.text_batch_delay_seconds (same key as WhatsApp) and skip the adaptive caps when that extra is set. Unset extra keeps the PR NousResearch#10388 low-latency default.
Contributor
feat(telegram): honor config.yaml extra for inbound text batch delay
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Telegram already batches inbound text, but short bubbles are hard-capped at 180ms / 240ms (
_TEXT_BATCH_FAST_DELAY_S/_TEXT_BATCH_SHORT_DELAY_S, PR #10388). RaisingHERMES_TELEGRAM_TEXT_BATCH_DELAY_SECONDScannot lift that cap (min(configured, 0.18)).Real users send context as several bubbles (file, then instruction, then a follow-up). The agent starts on the first fragment.
WhatsApp already exposes
platforms.whatsapp.extra.text_batch_delay_secondsand honors it. Telegram did not.Approach
platforms.telegram.extra.text_batch_delay_seconds/text_batch_split_delay_seconds/media_batch_delay_seconds(same keys as WhatsApp).text_batch_delay_secondsextra is set, skip the 180ms/240ms adaptive caps so the configured quiet period is the quiet period.config.yaml, not.env)._text_batch_quiet_secondsso tests hit production logic.Tests
_text_batch_quiet_seconds._extra_hasreadsPlatformConfig.extra.0.18 == 3.0).uv run --extra dev pytest tests/gateway/test_telegram_text_batch_perf.py tests/gateway/test_telegram_text_batching.py→ 12 passed.Docs
website/docs/user-guide/messaging/telegram.md— Message batching section, mirrored on WhatsApp.Risk
Closes nothing (no open issue for this exact gap; #2434 already shipped the original batcher).