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 handle case when key based logging vars are set as os.environ/ vars
Ishaan Jaff6e97bc44044d
diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.pyindex 2e874a487b6..1915176e1e3 100644--- a/litellm/litellm_core_utils/litellm_logging.py+++ b/litellm/litellm_core_utils/litellm_logging.py@@ -353,6 +353,8 @@ class Logging:checks if langfuse_secret_key, gcs_bucket_name in kwargs and sets the corresponding attributes in StandardCallbackDynamicParams"""+ from litellm.secret_managers.main import get_secret_str+standard_callback_dynamic_params = StandardCallbackDynamicParams()if kwargs:_supported_callback_params = (@@ -360,7 +362,10 @@ class Logging:)for param in _supported_callback_params:if param in kwargs:- standard_callback_dynamic_params[param] = kwargs.pop(param) # type: ignore+ _param_value = kwargs.pop(param)+ if "os.environ/" in _param_value:+ _param_value = get_secret_str(secret_name=_param_value)+ standard_callback_dynamic_params[param] = _param_value # type: ignorereturn standard_callback_dynamic_paramsdef update_environment_variables(