refactor(vertex): simplify model garden api base check

This commit is contained in:
stvnksslr 2026-05-15 11:09:40 -04:00
parent 90c089582b
commit 360a69b6ef
No known key found for this signature in database

View file

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