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: drop sensitive locals from re-raised error messages
Ryan Crabbea291cc60cf93
diff --git a/litellm/integrations/prompt_management_base.py b/litellm/integrations/prompt_management_base.pyindex 71da650dc48..ab6ef9e32d2 100644--- a/litellm/integrations/prompt_management_base.py+++ b/litellm/integrations/prompt_management_base.py@@ -88,7 +88,7 @@ class PromptManagementBase(ABC):messages = compiled_prompt_client["prompt_template"] + client_messagesexcept Exception as e:raise ValueError(- f"Error compiling prompt: {e}. Prompt id={prompt_id}, prompt_variables={prompt_variables}, client_messages={client_messages}, dynamic_callback_params={dynamic_callback_params}"+ f"Error compiling prompt: {e}. Prompt id={prompt_id}, prompt_variables={prompt_variables}, client_messages={client_messages}")compiled_prompt_client["completed_messages"] = messages@@ -117,7 +117,7 @@ class PromptManagementBase(ABC):messages = compiled_prompt_client["prompt_template"] + client_messagesexcept Exception as e:raise ValueError(- f"Error compiling prompt: {e}. Prompt id={prompt_id}, prompt_variables={prompt_variables}, client_messages={client_messages}, dynamic_callback_params={dynamic_callback_params}"+ f"Error compiling prompt: {e}. Prompt id={prompt_id}, prompt_variables={prompt_variables}, client_messages={client_messages}")compiled_prompt_client["completed_messages"] = messagesdiff --git a/litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.py b/litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.pyindex 78378faa262..5fd42fe0d36 100644--- a/litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.py+++ b/litellm/litellm_core_utils/llm_response_utils/convert_dict_to_response.py@@ -824,8 +824,6 @@ def convert_to_model_response_object( # noqa: PLR0915stream=stream,start_time=start_time,end_time=end_time,- hidden_params=hidden_params,- _response_headers=_response_headers,convert_tool_call_to_json_mode=convert_tool_call_to_json_mode,)raise Exception(