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] Databricks: add provider prefix to response model name

Yuneng Jiange8519b310922
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"]))