Skip to content

fix: keep telegram document failures out of agent input - #23063

Closed
sgtworkman wants to merge 1 commit into
NousResearch:mainfrom
sgtworkman:fix/telegram-document-failure-signal
Closed

sgtworkman wants to merge 1 commit into
NousResearch:mainfrom
sgtworkman:fix/telegram-document-failure-signal

Conversation

@sgtworkman

Copy link
Copy Markdown
Contributor

Summary

  • Reply in Telegram for unsupported document types instead of forging gateway error text as agent input.
  • Reply in Telegram when document download/cache fails, then stop instead of forwarding an empty/broken event.
  • Add regressions for unsupported document rejection and cache/download failure visibility.

Closes #23045

Test Plan

  • scripts/run_tests.sh tests/gateway/test_telegram_documents.py -q
  • scripts/run_tests.sh tests/gateway/test_telegram_documents.py tests/gateway/test_telegram_photo_interrupts.py tests/gateway/test_telegram_group_gating.py -q

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists platform/telegram Telegram bot adapter comp/gateway Gateway runner, session dispatch, delivery labels May 10, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

Competing fix with #23061 for #23045 — same Telegram document failure handling.

@teknium1

Copy link
Copy Markdown
Collaborator

Superseded by #53912 (merged: db16854), which fixes the still-live half of #23045 on current main.

Credit to you for the reply-to-user direction — #53912 builds on it. Note the code moved since you opened this: the Telegram adapter is now plugins/platforms/telegram/adapter.py, and the unsupported-document-type rejection your PR also touched no longer exists on main (the handler now accepts any file type, so there's nothing to reject). #53912 lands the cache-failure fix across all five media sites (photo, voice, audio, video, document) and surfaces the failure to both the user and the agent. Thanks!

@teknium1 teknium1 closed this Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/telegram Telegram bot adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Telegram gateway] Unsupported document types are sent to agent as fake user messages; cache failures silently lose the attachment

3 participants