From 022f4f39b41d1db782d161ffae7707ddb6990dfe Mon Sep 17 00:00:00 2001 From: Tin Chi Lo Date: Mon, 14 Sep 2026 16:40:55 -0700 Subject: [PATCH] fix(router): satisfy V2 lint and API schema parity --- litellm/proxy/_lazy_openapi_snapshot.json | 2 +- litellm/router_strategy/complexity_router/llm_v2.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/_lazy_openapi_snapshot.json b/litellm/proxy/_lazy_openapi_snapshot.json index 4c4f2164a59..7a110eff080 100644 --- a/litellm/proxy/_lazy_openapi_snapshot.json +++ b/litellm/proxy/_lazy_openapi_snapshot.json @@ -18968,7 +18968,7 @@ } } }, - "description": "\nUnified rate-limit error.\n\nEvery rate-limit condition surfaced by litellm \u2014 whether it originated from\nan upstream LLM provider, a vendor batch endpoint, or one of litellm's own\nproxy-side limiters (parallel-requests, dynamic-rate, batch-rate, budget,\nmax-iterations, etc.) \u2014 is raised as an instance of this class.\n\nThe :attr:`category` attribute lets callers distinguish the source. See\n:class:`RateLimitErrorCategory` for the available values.\n" + "description": "\n Unified rate-limit error.\n\n Every rate-limit condition surfaced by litellm \u2014 whether it originated from\n an upstream LLM provider, a vendor batch endpoint, or one of litellm's own\n proxy-side limiters (parallel-requests, dynamic-rate, batch-rate, budget,\n max-iterations, etc.) \u2014 is raised as an instance of this class.\n\n The :attr:`category` attribute lets callers distinguish the source. See\n :class:`RateLimitErrorCategory` for the available values.\n " }, "500": { "content": { diff --git a/litellm/router_strategy/complexity_router/llm_v2.py b/litellm/router_strategy/complexity_router/llm_v2.py index 623437a024b..7d212bc940b 100644 --- a/litellm/router_strategy/complexity_router/llm_v2.py +++ b/litellm/router_strategy/complexity_router/llm_v2.py @@ -141,7 +141,7 @@ class LLMV2ProbabilityCalibration(BaseModel): offsets: tuple[LLMV2CalibrationOffset, ...] = Field(default=(), max_length=15) @model_validator(mode="after") - def _validate_unique_features(self) -> "LLMV2ProbabilityCalibration": + def _validate_unique_features(self) -> LLMV2ProbabilityCalibration: if len(frozenset(offset.feature for offset in self.offsets)) != len(self.offsets): raise ValueError("offsets must contain unique demand features") return self