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
style(vector_stores): cut the explanatory comments down to one line each
Yuneng Jiang1b47486724d1
diff --git a/litellm/llms/mongodb/common_utils.py b/litellm/llms/mongodb/common_utils.pyindex 460a2903c60..c2d081b8d8d 100644--- a/litellm/llms/mongodb/common_utils.py+++ b/litellm/llms/mongodb/common_utils.py@@ -60,9 +60,7 @@ SyncClientFactory: TypeAlias = Callable[..., "MongoClient"]AsyncClientFactory: TypeAlias = Callable[..., "AsyncMongoClient"]_AsyncClientCacheKey: TypeAlias = tuple[MongoClientKey, int]-# The entry carries a weak reference to the loop the client was built on: CPython recycles id()-# aggressively (measured: 200 of 200 fresh loops landed on an id already in this cache), so the-# id alone would hand a new loop a client bound to a closed one.+# CPython recycles id() aggressively, so the id alone would hand a new loop a closed loop's client_AsyncClientEntry: TypeAlias = tuple["weakref.ref[AbstractEventLoop]", "AsyncMongoClient"]_sync_clients: Final[dict[MongoClientKey, "MongoClient"]] = {} # mutable-ok: process-level client cache@@ -143,8 +141,7 @@ def reset_client_cache() -> None:_AUTHENTICATION_FAILED_CODE: Final = 18_UNAUTHORIZED_CODE: Final = 13-# Atlas reports a rejected user as code 8000 "AtlasError" rather than 18, so the-# message is the only reliable signal for a serverless or shared-tier deployment.+# Atlas reports a rejected user as code 8000 "AtlasError", not 18, so only the message is reliable_AUTHENTICATION_MESSAGE_MARKERS: Final = ("bad auth", "authentication failed", "not authorized")_RESOLUTION_TIMEOUT_MARKERS: Final = ("resolution lifetime expired", "dns operation timed out")_UNKNOWN_HOSTNAME_MARKERS: Final = ("dns query name does not exist", "name or service not known")diff --git a/litellm/proxy/vector_store_endpoints/management_endpoints.py b/litellm/proxy/vector_store_endpoints/management_endpoints.pyindex 6af2a8b7a6b..8b951556a14 100644--- a/litellm/proxy/vector_store_endpoints/management_endpoints.py+++ b/litellm/proxy/vector_store_endpoints/management_endpoints.py@@ -59,9 +59,6 @@ def _row_to_vector_store(row: "_VectorStoreRow") -> LiteLLM_ManagedVectorStore:return LiteLLM_ManagedVectorStore(**row.model_dump())-# "connection" covers wire-protocol providers whose whole credential is a URI-# (mongodb_connection_string embeds the username and password), which the-# default api_key/secret/token patterns do not match._LITELLM_PARAMS_MASKER: Final = SensitiveDataMasker(extra_sensitive_patterns=frozenset(("connection",)))