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]

fix mypy issue

Sameer Kankutedce95d3a03ce
diff --git a/litellm/utils.py b/litellm/utils.py
index 2ee2296ab6e..9216e1e53e0 100644
--- a/litellm/utils.py
+++ b/litellm/utils.py
@@ -927,9 +927,9 @@ def function_setup( # noqa: PLR0915
if "messages" in kwargs:
kwargs["messages"] = processed_messages
elif len(args) > 1:
- args = list(args)
- args[1] = processed_messages
- args = tuple(args)
+ args_list = list(args)
+ args_list[1] = processed_messages
+ args = tuple(args_list)
except Exception as e:
# Log the error but don't fail the request