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
test fixes
Ishaan Jaffer62d3cab965b0
diff --git a/litellm/proxy/guardrails/guardrail_hooks/presidio.py b/litellm/proxy/guardrails/guardrail_hooks/presidio.pyindex b3cc9236b1d..29d57ee4734 100644--- a/litellm/proxy/guardrails/guardrail_hooks/presidio.py+++ b/litellm/proxy/guardrails/guardrail_hooks/presidio.py@@ -385,6 +385,9 @@ class _OPTIONAL_PresidioPIIMasking(CustomGuardrail):)continuereturn final_results+ except GuardrailRaisedException:+ # Re-raise GuardrailRaisedException without wrapping+ raiseexcept Exception as e:# Sanitize exception to avoid leaking the original text (which may# contain API keys or other secrets) in error responses.diff --git a/litellm/proxy/management_endpoints/common_utils.py b/litellm/proxy/management_endpoints/common_utils.pyindex d6f6d1337a3..34a17f6c274 100644--- a/litellm/proxy/management_endpoints/common_utils.py+++ b/litellm/proxy/management_endpoints/common_utils.py@@ -1,4 +1,4 @@-from typing import Any, Dict, Optional, Union, TYPE_CHECKING+from typing import TYPE_CHECKING, Any, Dict, Optional, Unionfrom litellm._logging import verbose_proxy_loggerfrom litellm.caching import DualCache@@ -402,7 +402,7 @@ def _update_metadata_fields(updated_kv: dict) -> None:updated_kv: The key-value dict being used for the update"""for field in LiteLLM_ManagementEndpoint_MetadataFields_Premium:- if field in updated_kv and _has_non_empty_value(updated_kv[field]):+ if field in updated_kv and updated_kv[field] is not None:_update_metadata_field(updated_kv=updated_kv, field_name=field)for field in LiteLLM_ManagementEndpoint_MetadataFields: