mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-30 03:00:41 -04:00
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.
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user