From 50a11743d8fe509b3dc5667c8070cce2c58ec66b Mon Sep 17 00:00:00 2001 From: Deepanshu Date: Tue, 11 Aug 2026 15:21:31 -0400 Subject: [PATCH] fix(rate-limiting): use an immutable tuple for TagRateLimitGroup.limits Pre-existing mutable list[TagRateLimitEntry] field newly tripped the type-discipline LIT001 ratchet after the rebase lowered its ceiling. No other code relies on list mutation here (the one reader already wraps it in tuple()), so switch to tuple[TagRateLimitEntry, ...]. --- litellm/types/router.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/types/router.py b/litellm/types/router.py index 5c721229cdf..0bdacb0b739 100644 --- a/litellm/types/router.py +++ b/litellm/types/router.py @@ -154,7 +154,7 @@ class TagRateLimitEntry(BaseModel): class TagRateLimitGroup(BaseModel): - limits: list[TagRateLimitEntry] = Field(default_factory=list) + limits: tuple[TagRateLimitEntry, ...] = () class TagRateLimits(BaseModel):