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] Security - Filter secret fields form Langfuse (#16842)
Alexsander Hamir0a131145367e
diff --git a/litellm/integrations/arize/_utils.py b/litellm/integrations/arize/_utils.pyindex 10597d6e713..c9a1531b5d4 100644--- a/litellm/integrations/arize/_utils.py+++ b/litellm/integrations/arize/_utils.py@@ -208,7 +208,10 @@ def set_attributes()try:+ # Remove secret_fields to prevent leaking sensitive data (e.g., authorization headers)optional_params = kwargs.get("optional_params", {})+ if isinstance(optional_params, dict):+ optional_params.pop("secret_fields", None)litellm_params = kwargs.get("litellm_params", {})standard_logging_payload: Optional[StandardLoggingPayload] = kwargs.get("standard_logging_object"diff --git a/litellm/integrations/langfuse/langfuse.py b/litellm/integrations/langfuse/langfuse.pyindex c2a2cc77950..12eb00efa9e 100644--- a/litellm/integrations/langfuse/langfuse.py+++ b/litellm/integrations/langfuse/langfuse.py@@ -228,6 +228,8 @@ class LangFuseLogger:functions = optional_params.pop("functions", None)tools = optional_params.pop("tools", None)+ # Remove secret_fields to prevent leaking sensitive data (e.g., authorization headers)+ optional_params.pop("secret_fields", None)if functions is not None:prompt["functions"] = functionsif tools is not None: