The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(caching): clear strict-lint budget breaches in re-landed closer code
mateo-berriebc31f7e066e
diff --git a/litellm/caching/evicted_client_closer.py b/litellm/caching/evicted_client_closer.pyindex c895669be2b..eee7e2ea289 100644--- a/litellm/caching/evicted_client_closer.py+++ b/litellm/caching/evicted_client_closer.py@@ -34,6 +34,7 @@ alive anything the collector would have reclaimed first."""import asyncio+import contextlibimport inspectimport threadingimport time@@ -146,10 +147,8 @@ def _has_connection_in_flight(client: object) -> bool:async def _close_quietly(closing: Awaitable[object]) -> None:- try:+ with contextlib.suppress(Exception):await closing- except Exception: # noqa: BLE001 - a discarded client's close must never surface to callers- passclass EvictedClientCloser:diff --git a/litellm/caching/llm_caching_handler.py b/litellm/caching/llm_caching_handler.pyindex 6fa5963c99b..a89e43b78b4 100644--- a/litellm/caching/llm_caching_handler.py+++ b/litellm/caching/llm_caching_handler.py@@ -29,7 +29,7 @@ class LLMClientCache(InMemoryCache):default_ttl: int | None = 600,max_size_per_item: int | None = 1024,evicted_client_closer: EvictedClientCloser | None = None,- ):+ ) -> None:super().__init__(max_size_in_memory=max_size_in_memory,default_ttl=default_ttl,