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]

add provider_specific_fields to GenericStreamingChunk

Ishaan Jaff740d1fdb1c76
diff --git a/litellm/types/utils.py b/litellm/types/utils.py
index 354f0f03f82..c78cc2edcf8 100644
--- a/litellm/types/utils.py
+++ b/litellm/types/utils.py
@@ -88,6 +88,9 @@ class GenericStreamingChunk(TypedDict, total=False):
usage: Optional[ChatCompletionUsageBlock]
index: int
+ # use this dict if you want to return any provider specific fields in the response
+ provider_specific_fields: Optional[Dict[str, Any]]
+
from enum import Enum