fix LlmProviders.AZURE.value

This commit is contained in:
Ishaan Jaffer 2026-01-13 17:05:57 -08:00
parent eba991583a
commit 6a55ef3ef4

View file

@ -25,6 +25,7 @@ from litellm.types.utils import (
)
from litellm.types.utils import GenericStreamingChunk as GChunk
from litellm.types.utils import (
LlmProviders,
ModelResponse,
ModelResponseStream,
StreamingChoices,
@ -1301,7 +1302,7 @@ class CustomStreamWrapper:
if response_obj["is_finished"]:
self.received_finish_reason = response_obj["finish_reason"]
else: # openai / azure chat model
if self.custom_llm_provider == "azure":
if self.custom_llm_provider in [LlmProviders.AZURE.value, LlmProviders.AZURE_AI.value]:
if isinstance(chunk, BaseModel) and hasattr(chunk, "model"):
# for azure, we need to pass the model from the original chunk
self.model = getattr(chunk, "model", self.model)