From 819079f23bd22541c95b8feb5a88f8be6380c65a Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 6 Jan 2025 20:36:47 -0800 Subject: [PATCH] (proxy perf improvement) - remove redundant `.copy()` operation (#7564) * latency fix proxy * remove useless copy in add_key_level_controls --- litellm/proxy/litellm_pre_call_utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/litellm/proxy/litellm_pre_call_utils.py b/litellm/proxy/litellm_pre_call_utils.py index ad7371e84d..5944d0248c 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):