litellm/tests/e2e/quota_management
Shivam Rawat d640ace6d8 fix(rate-limit): enforce token limits when the pre-call increment is zero
The atomic check-and-increment path skipped any counter whose increment
was <= 0. The dynamic rate limiter always passes a zero token increment
pre-call because usage lands on the counters post-response, so on a model
configured with only tpm the limiter evaluated no counters at all: no
model-wide TPM cap and no priority reservation, in either generous or
strict mode. Regressed in dd57ae6691 when the pre-call flow moved off the
read-only should_rate_limit check, which did evaluate token limits.

Keep zero-increment counters in the payload so they act as a pure check
(current + 0 > limit), matching the pre-regression semantics in both the
Lua and in-memory paths. Adds unit regressions at the primitive and hook
level plus a live e2e covering the priority_generous/priority_strict
registry rows.
2026-07-31 18:05:50 -07:00
..
budgets test(e2e): align budget e2e with the team-key budget hierarchy (#35276) 2026-07-30 21:09:50 +00:00
ratelimit fix(rate-limit): enforce token limits when the pre-call increment is zero 2026-07-31 18:05:50 -07:00
spend_tracking fix(e2e): poll for both spend rows before asserting the cache-hit contract (#34968) 2026-07-28 11:21:36 -07:00