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:
majdyz
2026-04-12 23:14:54 +00:00
parent f3f598daa3
commit 057412ebee

View File

@@ -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",