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 issue when databrick use external model, the delta could be empty content (#10540)

frank0184fddbb707
diff --git a/litellm/llms/databricks/chat/transformation.py b/litellm/llms/databricks/chat/transformation.py
index 06f525719cf..fa41849addf 100644
--- a/litellm/llms/databricks/chat/transformation.py
+++ b/litellm/llms/databricks/chat/transformation.py
@@ -543,7 +543,7 @@ class DatabricksChatResponseIterator(BaseModelResponseIterator):
reasoning_content,
thinking_blocks,
) = DatabricksConfig.extract_reasoning_content(
- choice["delta"]["content"]
+ choice["delta"].get("content")
)
choice["delta"]["content"] = content_str