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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix mypy linting
Ishaan Jaffd78ed53cbbea
diff --git a/litellm/llms/databricks/chat/transformation.py b/litellm/llms/databricks/chat/transformation.pyindex 0f3530f85da..cda372470a4 100644--- a/litellm/llms/databricks/chat/transformation.py+++ b/litellm/llms/databricks/chat/transformation.py@@ -169,13 +169,14 @@ class DatabricksConfig(DatabricksBase, OpenAILikeChatConfig, AnthropicConfig):if tool is None:return None- kwags = {- "name":tool["name"],- "parameters":cast(dict, tool.get("input_schema") or {})+ kwags: dict = {+ "name": tool["name"],+ "parameters": cast(dict, tool.get("input_schema") or {})}- if tool.get("description"):- kwags["description"] = tool.get("description")+ description = tool.get("description")+ if description is not None:+ kwags["description"] = cast(Union[dict, str], description)return DatabricksTool(type="function",@@ -336,8 +337,8 @@ class DatabricksConfig(DatabricksBase, OpenAILikeChatConfig, AnthropicConfig):elif isinstance(content, list):content_str = ""for item in content:- if item["type"] == "text":- content_str += item["text"]+ if item.get("type") == "text":+ content_str += item.get("text", "")return content_strelse:raise Exception(f"Unsupported content type: {type(content)}")@@ -366,8 +367,9 @@ class DatabricksConfig(DatabricksBase, OpenAILikeChatConfig, AnthropicConfig):reasoning_content: Optional[str] = Noneif isinstance(content, list):for item in content:- if item["type"] == "reasoning":- for sum in item["summary"]:+ if item.get("type") == "reasoning":+ summary_list = item.get("summary", [])+ for sum in summary_list:if reasoning_content is None:reasoning_content = ""reasoning_content += sum["text"]