From 698a2dd382f59face841ba387ae9d40ed41f47bc Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 11 Sep 2025 20:12:01 -0700 Subject: [PATCH] fix: convert_anthropic_tool_to_databricks_tool --- litellm/llms/databricks/chat/transformation.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/litellm/llms/databricks/chat/transformation.py b/litellm/llms/databricks/chat/transformation.py index 4852f2e710..a137007423 100644 --- a/litellm/llms/databricks/chat/transformation.py +++ b/litellm/llms/databricks/chat/transformation.py @@ -169,18 +169,20 @@ class DatabricksConfig(DatabricksBase, OpenAILikeChatConfig, AnthropicConfig): if tool is None: return None - kwags: dict = { + # Build DatabricksFunction explicitly to avoid parameter conflicts + function_params: DatabricksFunction = { "name": tool["name"], "parameters": cast(dict, tool.get("input_schema") or {}) } - + + # Only add description if it exists description = tool.get("description") if description is not None: - kwags["description"] = cast(Union[dict, str], description) + function_params["description"] = cast(Union[dict, str], description) return DatabricksTool( type="function", - function=DatabricksFunction(name=tool["name"], **kwags), + function=function_params, ) def _map_openai_to_dbrx_tool(self, model: str, tools: List) -> List[DatabricksTool]: