From d00ad1dfb90223c7bc7bb465c17df88d725c9a87 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 12 May 2026 03:46:41 +0000 Subject: [PATCH] fix(mypy): silence base-class status_code conflict on ProxyHTTPRateLimitError HTTPException declares 'status_code: int' while openai.RateLimitError (via APIStatusError) declares 'status_code: Literal[429] = 429'. Mypy flags the multi-base override as [misc] in CI lint. The runtime semantics are fine (we set self.status_code in __init__), so silence the class-level annotation conflict with a targeted ignore. Co-authored-by: Mateo Wang --- litellm/proxy/hooks/rate_limiter_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/hooks/rate_limiter_utils.py b/litellm/proxy/hooks/rate_limiter_utils.py index df81abd4361..0ba3df448e5 100644 --- a/litellm/proxy/hooks/rate_limiter_utils.py +++ b/litellm/proxy/hooks/rate_limiter_utils.py @@ -56,7 +56,7 @@ def resolve_llm_provider_for_rate_limit( return model, PROXY_LLM_PROVIDER_FALLBACK -class ProxyHTTPRateLimitError(HTTPException, RateLimitError): +class ProxyHTTPRateLimitError(HTTPException, RateLimitError): # type: ignore[misc] """ HTTPException raised by proxy-side rate-limit hooks that *also* exposes ``model`` and ``llm_provider`` attributes.