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(streaming_utils.py): fix generic_chunk_has_all_required_fields

Krrish Dholakia9ba1b78a8f2d
diff --git a/litellm/litellm_core_utils/streaming_utils.py b/litellm/litellm_core_utils/streaming_utils.py
index 386842fe2dc..c41b4f64c4d 100644
--- a/litellm/litellm_core_utils/streaming_utils.py
+++ b/litellm/litellm_core_utils/streaming_utils.py
@@ -10,9 +10,5 @@ def generic_chunk_has_all_required_fields(chunk: dict) -> bool:
"""
_all_fields = GChunk.__annotations__
- # this is an optional field in GenericStreamingChunk, it's not required to be present
- _all_fields.pop("provider_specific_fields", None)
-
decision = all(key in _all_fields for key in chunk)
-
return decision