From ff272ee623bbb8620ded29ca6cb6606b383cd3b4 Mon Sep 17 00:00:00 2001 From: frank Date: Sun, 5 Apr 2026 21:37:09 +0800 Subject: [PATCH] 25070,provide the databricks tool prompt cache Signed-off-by: frank --- .../llms/databricks/chat/transformation.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/litellm/llms/databricks/chat/transformation.py b/litellm/llms/databricks/chat/transformation.py index a4a1d3a1136..a8790bc1866 100644 --- a/litellm/llms/databricks/chat/transformation.py +++ b/litellm/llms/databricks/chat/transformation.py @@ -357,6 +357,29 @@ class DatabricksConfig(DatabricksBase, OpenAILikeChatConfig, AnthropicConfig): return False + def transform_request( + self, + model: str, + messages: List[AllMessageValues], + optional_params: dict, + litellm_params: dict, + headers: dict, + ) -> dict: + """ + Transform the overall request to be sent to the API. + + Returns: + dict: The transformed request. Sent as the body of the API call. + """ + messages = self._transform_messages(messages=messages, model=model) + optional_params.pop("max_retries", None) + + return { + "model": model, + "messages": messages, + **optional_params, + } + @overload def _transform_messages( self, messages: List[AllMessageValues], model: str, is_async: Literal[True]