feat(gateway): configurable Telegram reply threading mode#2907
Merged
Conversation
Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR #855 by raulvidis.
3 tasks
InB4DevOps
pushed a commit
to InB4DevOps/hermes-agent
that referenced
this pull request
Mar 25, 2026
…ch#2907) Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR NousResearch#855 by raulvidis.
outsourc-e
pushed a commit
to outsourc-e/hermes-agent
that referenced
this pull request
Mar 26, 2026
…ch#2907) Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR NousResearch#855 by raulvidis.
StreamOfRon
pushed a commit
to StreamOfRon/hermes-agent
that referenced
this pull request
Mar 29, 2026
…ch#2907) Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR NousResearch#855 by raulvidis.
aashizpoudel
pushed a commit
to aashizpoudel/hermes-agent
that referenced
this pull request
Mar 30, 2026
…ch#2907) Add reply_to_mode setting (off/first/all) to control whether Telegram replies quote/thread to the user's original message. - 'off': Never thread replies (no quote bubble) - 'first': Only first chunk threads to user's message (default, preserves existing behavior) - 'all': All chunks in multi-part replies thread to user's message Configurable via: - reply_to_mode in platform config (gateway config YAML) - TELEGRAM_REPLY_TO_MODE env var Based on PR NousResearch#855 by raulvidis.
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.
Summary
Adds a
reply_to_modesetting to control whether Telegram replies quote/thread to the user's original message.off: Never thread replies — no quote bubble shownfirst: Only the first chunk threads to the user's message (default, preserves existing behavior)all: All chunks in multi-part replies thread to the user's messageConfiguration
Via gateway config YAML:
Via environment variable:
Changes
gateway/config.py— Addedreply_to_modefield toPlatformConfigwith serialization and env var overridegateway/platforms/telegram.py— Added_should_thread_reply()method, updatedsend()to use ittests/gateway/test_telegram_reply_mode.py— 25 tests covering all modes, config, serialization, and env var overridesCredit
Based on PR #855 by @raulvidis. Cherry-picked and adapted to current main (preserved retry logic, used explicit
@pytest.mark.asynciodecorators instead of globalasyncio_modechange).All 1428 gateway tests pass.