[GH-ISSUE #5447] [BUG]: Hitting Telegram limits #5093

Closed
opened 2026-06-05 14:51:58 -04:00 by yindo · 1 comment
Owner

Originally created by @deenle on GitHub (Apr 15, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5447

How are you running AnythingLLM?

All versions

What happened?

Hi!
@shatfield4 thanks for implementing Telegram bot support!

Unfortunately, I'm hitting Telegram limits while using it.

[backend] info: [89:807]: Edit error: ETELEGRAM: 429 Too Many Requests: retry after 137
[bg-worker][handle-telegram-chat-1776263235281] info: [89:807]: Edit error: ETELEGRAM: 429 Too Many Requests: retry after 137

Their website says:
https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this

  • In a single chat, avoid sending more than one message per second. We may allow short bursts that go over this limit, but eventually you'll begin receiving 429 errors.

Seems like it would be better if we increase STREAM_EDIT_INTERVAL to 1000-1500 ms.
Though, I'd rather send initial message e.g. Thinking and then provide a composed message due to inability to render Markdown while streaming.

https://github.com/Mintplex-Labs/anything-llm/blob/43e79d3b267ed551443dd5c09d0c42124c888eb6/server/utils/telegramBot/constants.js#L4

Are there known steps to reproduce?

No response

LLM Provider & Model (if applicable)

No response

Embedder Provider & Model (if applicable)

No response

Originally created by @deenle on GitHub (Apr 15, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5447 ### How are you running AnythingLLM? All versions ### What happened? Hi! @shatfield4 thanks for implementing Telegram bot support! Unfortunately, I'm hitting Telegram limits while using it. ``` [backend] info: [89:807]: Edit error: ETELEGRAM: 429 Too Many Requests: retry after 137 [bg-worker][handle-telegram-chat-1776263235281] info: [89:807]: Edit error: ETELEGRAM: 429 Too Many Requests: retry after 137 ``` Their website says: https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this - In a single chat, avoid sending more than **one message per second**. We may allow short bursts that go over this limit, but eventually you'll begin receiving 429 errors. Seems like it would be better if we increase `STREAM_EDIT_INTERVAL` to 1000-1500 ms. Though, I'd rather send initial message e.g. `Thinking` and then provide a composed message due to inability to render Markdown while streaming. https://github.com/Mintplex-Labs/anything-llm/blob/43e79d3b267ed551443dd5c09d0c42124c888eb6/server/utils/telegramBot/constants.js#L4 ### Are there known steps to reproduce? _No response_ ### LLM Provider & Model (if applicable) _No response_ ### Embedder Provider & Model (if applicable) _No response_
yindo added the possible bug label 2026-06-05 14:51:58 -04:00
yindo closed this issue 2026-06-05 14:51:58 -04:00
Author
Owner

@timothycarambat commented on GitHub (Apr 15, 2026):

Moved it to a higher interval since edits apparently count as sends as well

<!-- gh-comment-id:4254058960 --> @timothycarambat commented on GitHub (Apr 15, 2026): Moved it to a higher interval since edits apparently count as sends as well
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5093