25070,provide the databricks tool prompt cache

Signed-off-by: frank <frankzye@qq.com>
This commit is contained in:
frank 2026-04-05 21:37:09 +08:00
parent e2b26e4161
commit ff272ee623

View file

@ -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]