diff --git a/litellm/llms/sagemaker/sagemaker.py b/litellm/llms/sagemaker/sagemaker.py index 88a0adc1ef7..2e6c72ac80c 100644 --- a/litellm/llms/sagemaker/sagemaker.py +++ b/litellm/llms/sagemaker/sagemaker.py @@ -273,9 +273,9 @@ class SagemakerLLM(BaseAWSLLM): model_id = optional_params.get("model_id", None) if use_messages_api is True: - from litellm.llms.databricks.chat.handler import DatabricksChatCompletion + from litellm.llms.openai_like.chat.handler import OpenAILikeChatHandler - openai_like_chat_completions = DatabricksChatCompletion() + openai_like_chat_completions = OpenAILikeChatHandler() inference_params["stream"] = True if stream is True else False _data: Dict[str, Any] = { "model": model, diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/main.py b/litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/main.py index 62668f5b034..01e76ffd7d0 100644 --- a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/main.py +++ b/litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/main.py @@ -90,14 +90,13 @@ class VertexAIPartnerModels(VertexBase): from google.cloud import aiplatform from litellm.llms.anthropic.chat import AnthropicChatCompletion - from litellm.llms.databricks.chat.handler import DatabricksChatCompletion from litellm.llms.OpenAI.openai import OpenAIChatCompletion + from litellm.llms.openai_like.chat.handler import OpenAILikeChatHandler from litellm.llms.text_completion_codestral import CodestralTextCompletion from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import ( VertexLLM, ) except Exception: - raise VertexAIError( status_code=400, message="""vertexai import failed please run `pip install -U "google-cloud-aiplatform>=1.38"`""", @@ -120,7 +119,7 @@ class VertexAIPartnerModels(VertexBase): custom_llm_provider="vertex_ai", ) - openai_like_chat_completions = DatabricksChatCompletion() + openai_like_chat_completions = OpenAILikeChatHandler() codestral_fim_completions = CodestralTextCompletion() anthropic_chat_completions = AnthropicChatCompletion() @@ -133,10 +132,8 @@ class VertexAIPartnerModels(VertexBase): partner = VertexPartnerProvider.llama elif "mistral" in model or "codestral" in model: partner = VertexPartnerProvider.mistralai - optional_params["custom_endpoint"] = True elif "jamba" in model: partner = VertexPartnerProvider.ai21 - optional_params["custom_endpoint"] = True elif "claude" in model: partner = VertexPartnerProvider.claude @@ -233,6 +230,7 @@ class VertexAIPartnerModels(VertexBase): timeout=timeout, encoding=encoding, custom_llm_provider="vertex_ai", + custom_endpoint=True, ) except Exception as e: diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_model_garden/main.py b/litellm/llms/vertex_ai_and_google_ai_studio/vertex_model_garden/main.py index 4c467f7c71d..9dfc3efcc95 100644 --- a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_model_garden/main.py +++ b/litellm/llms/vertex_ai_and_google_ai_studio/vertex_model_garden/main.py @@ -76,8 +76,8 @@ class VertexAIModelGardenModels(VertexBase): from google.cloud import aiplatform from litellm.llms.anthropic.chat import AnthropicChatCompletion - from litellm.llms.databricks.chat.handler import DatabricksChatCompletion from litellm.llms.OpenAI.openai import OpenAIChatCompletion + from litellm.llms.openai_like.chat.handler import OpenAILikeChatHandler from litellm.llms.text_completion_codestral import CodestralTextCompletion from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import ( VertexLLM, @@ -106,7 +106,7 @@ class VertexAIModelGardenModels(VertexBase): custom_llm_provider="vertex_ai", ) - openai_like_chat_completions = DatabricksChatCompletion() + openai_like_chat_completions = OpenAILikeChatHandler() ## CONSTRUCT API BASE stream: bool = optional_params.get("stream", False) or False