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: use precise tuple[str, str] type annotation for _PRESERVED_NONE_FIELDS

Ryan Crabbef976a01fcef5
diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py
index 0ad081a107e..9243fb7f582 100644
--- a/litellm/proxy/utils.py
+++ b/litellm/proxy/utils.py
@@ -4565,7 +4565,7 @@ def validate_model_access(
)
-_PRESERVED_NONE_FIELDS: List[tuple] = [
+_PRESERVED_NONE_FIELDS: List[tuple[str, str]] = [
("message", "content"), # null when tool_calls present (issue #6677)
("message", "role"), # always required by OpenAI spec
("delta", "content"), # null in streaming chunks