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]

Merge upstream/main into litellm_staging_03_22_2026

Chesars67e4604284a3
diff --cc litellm/litellm_core_utils/streaming_handler.py
index d9de363d8c6,e402023d240..59dd1b7c076
--- a/litellm/litellm_core_utils/streaming_handler.py
+++ b/litellm/litellm_core_utils/streaming_handler.py
@@@ -831,11 -831,10 +831,15 @@@ class CustomStreamWrapper
"annotations" in model_response.choices[0].delta
and model_response.choices[0].delta.annotations is not None
)
+ or (
+ not self.sent_first_chunk
+ and hasattr(model_response.choices[0].delta, "role")
+ and model_response.choices[0].delta.role is not None
+ )
+ or (
+ getattr(model_response.choices[0].delta, "reasoning_items", None)
+ is not None
+ )
):
return True
else: