From 057412ebee31b61b192bd627e18e116c7e040f4b Mon Sep 17 00:00:00 2001 From: majdyz Date: Sun, 12 Apr 2026 23:14:54 +0000 Subject: [PATCH] fix(copilot): allow exactly 30 pending calls per window Change >= to > so the 30th call (INCR returns 30) is accepted and only the 31st triggers the 429. --- autogpt_platform/backend/backend/api/features/chat/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogpt_platform/backend/backend/api/features/chat/routes.py b/autogpt_platform/backend/backend/api/features/chat/routes.py index 638ea64272..af3753865c 100644 --- a/autogpt_platform/backend/backend/api/features/chat/routes.py +++ b/autogpt_platform/backend/backend/api/features/chat/routes.py @@ -1170,7 +1170,7 @@ async def queue_pending_message( ), ) ) - if _call_count >= _PENDING_CALL_LIMIT: + if _call_count > _PENDING_CALL_LIMIT: raise HTTPException( status_code=429, detail=f"Too many pending messages: limit is {_PENDING_CALL_LIMIT} per {_PENDING_CALL_WINDOW_SECONDS}s",