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
Potential fix for code scanning alert no. 4046: Clear-text logging of sensitive information
Sameer Kankutea2e70a561d10
diff --git a/litellm/llms/openai/openai.py b/litellm/llms/openai/openai.pyindex 2f0e5e480b5..c6f502d3a25 100644--- a/litellm/llms/openai/openai.py+++ b/litellm/llms/openai/openai.py@@ -525,9 +525,15 @@ class OpenAIChatCompletion(BaseLLM, BaseOpenAILLM):callbacks = litellm.callbacks + (logging_obj.dynamic_success_callbacks or [])- print(f"🔥callbacks: {callbacks}")+ # Avoid logging full callback objects to prevent leaking sensitive data+ verbose_logger.debug(+ "LiteLLM.AgenticHooks: callbacks_count=%s", len(callbacks)+ )tools = optional_params.get("tools", [])- print(f"🔥tools: {tools}")+ # Avoid logging full tools payloads; they may contain sensitive parameters+ verbose_logger.debug(+ "LiteLLM.AgenticHooks: tools_count=%s", len(tools) if isinstance(tools, list) else 1 if tools else 0+ )# Get custom_llm_provider from litellm_paramscustom_llm_provider = litellm_params.get("custom_llm_provider", "openai")