From e8519b31092290e7317ef5a3233b8e792df369f4 Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Sat, 11 Apr 2026 12:16:31 -0700 Subject: [PATCH] [Fix] Databricks: add provider prefix to response model name DatabricksConfig.transform_response() was setting model_response.model to the raw API value (e.g. "dbrx-instruct-071224") without the "databricks/" prefix. This differs from OpenAILikeChatConfig which adds custom_llm_provider + "/" + model at lines 119-122. Previously hidden because databricks-sdk was not in the old poetry deps, so the test was always skipped with "Databricks SDK not installed". The uv migration's --all-extras pulls it in transitively. --- litellm/llms/databricks/chat/transformation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/llms/databricks/chat/transformation.py b/litellm/llms/databricks/chat/transformation.py index 8ae02bd65ed..91d6129c3fe 100644 --- a/litellm/llms/databricks/chat/transformation.py +++ b/litellm/llms/databricks/chat/transformation.py @@ -615,7 +615,9 @@ class DatabricksConfig(DatabricksBase, OpenAILikeChatConfig, AnthropicConfig): headers=response_headers, ) - model_response.model = completion_response["model"] + _custom_llm_provider = litellm_params.get("custom_llm_provider") or "databricks" + _response_model = completion_response.get("model") or "" + model_response.model = f"{_custom_llm_provider}/{_response_model}" model_response.id = completion_response["id"] model_response.created = completion_response["created"] setattr(model_response, "usage", Usage(**completion_response["usage"]))