From 360a69b6ef1206d507fab79327ea1fb2e4fb22ba Mon Sep 17 00:00:00 2001 From: stvnksslr <9701252+stvnksslr@users.noreply.github.com> Date: Fri, 15 May 2026 11:09:40 -0400 Subject: [PATCH] refactor(vertex): simplify model garden api base check --- litellm/llms/vertex_ai/vertex_model_garden/main.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/litellm/llms/vertex_ai/vertex_model_garden/main.py b/litellm/llms/vertex_ai/vertex_model_garden/main.py index c6427ecee0b..2f8e249e052 100644 --- a/litellm/llms/vertex_ai/vertex_model_garden/main.py +++ b/litellm/llms/vertex_ai/vertex_model_garden/main.py @@ -121,11 +121,7 @@ class VertexAIModelGardenModels(VertexBase): stream: bool = optional_params.get("stream", False) or False optional_params["stream"] = stream - if api_base is not None: - # User provided a custom api_base (e.g. Model Garden mg-endpoint URL). - # Use it directly — OpenAILikeChatHandler appends /chat/completions. - pass - else: + if api_base is None: api_base = create_vertex_url( vertex_location=vertex_location or "us-central1", vertex_project=vertex_project or project_id,