Skip to content

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]

(proxy perf improvement) - remove redundant `.copy()` operation (#7564)

Ishaan Jaff819079f23bd2
diff --git a/litellm/proxy/litellm_pre_call_utils.py b/litellm/proxy/litellm_pre_call_utils.py
index ad7371e84dd..5944d0248c2 100644
--- a/litellm/proxy/litellm_pre_call_utils.py
+++ b/litellm/proxy/litellm_pre_call_utils.py
@@ -286,7 +286,6 @@ class LiteLLMProxyRequestSetup:
def add_key_level_controls(
key_metadata: dict, data: dict, _metadata_variable_name: str
):
- data = data.copy()
if "cache" in key_metadata:
data["cache"] = {}
if isinstance(key_metadata["cache"], dict):