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
add Vertex_AI llm credentials sensitive keywords "vertex_credentials" (#19551)
ruanjiefeng324f1f4682c8
diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.pyindex d3bcfe8200e..d512893465c 100644--- a/litellm/litellm_core_utils/litellm_logging.py+++ b/litellm/litellm_core_utils/litellm_logging.py@@ -3296,6 +3296,7 @@ def _get_masked_values("token","key","secret",+ "vertex_credentials",]return {k: (diff --git a/tests/test_litellm/litellm_core_utils/test_litellm_logging.py b/tests/test_litellm/litellm_core_utils/test_litellm_logging.pyindex e035e193fe1..1f3f558a498 100644--- a/tests/test_litellm/litellm_core_utils/test_litellm_logging.py+++ b/tests/test_litellm/litellm_core_utils/test_litellm_logging.py@@ -787,11 +787,13 @@ def test_get_masked_values():"presidio_ad_hoc_recognizers": None,"aws_bedrock_runtime_endpoint": None,"presidio_anonymizer_api_base": None,+ "vertex_credentials": "{sensitive_api_key}",}masked_values = _get_masked_values(sensitive_object, unmasked_length=4, number_of_asterisks=4)assert masked_values["presidio_anonymizer_api_base"] is None+ assert masked_values["vertex_credentials"] == "{s****y}"@pytest.mark.asyncio