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 is_sensitive_key
Ishaan Jafferaac1129761ce
diff --git a/litellm/litellm_core_utils/sensitive_data_masker.py b/litellm/litellm_core_utils/sensitive_data_masker.pyindex 985f17e92fd..05f1a37ca12 100644--- a/litellm/litellm_core_utils/sensitive_data_masker.py+++ b/litellm/litellm_core_utils/sensitive_data_masker.py@@ -44,7 +44,14 @@ class SensitiveDataMasker:def is_sensitive_key(self, key: str) -> bool:key_lower = str(key).lower()- result = any(pattern in key_lower for pattern in self.sensitive_patterns)+ # Split on underscores and check if any segment matches the pattern+ # This avoids false positives like "max_tokens" matching "token"+ # but still catches "api_key", "access_token", etc.+ key_segments = key_lower.replace('-', '_').split('_')+ result = any(+ pattern in key_segments+ for pattern in self.sensitive_patterns+ )return resultdef mask_dict(