Skip to content

Commit 5b896d2

Browse files
committed
make model param optional
1 parent 5732303 commit 5b896d2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

litellm/llms/vertex_ai/vertex_llm_base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def _check_custom_proxy(
293293
stream: Optional[bool],
294294
auth_header: Optional[str],
295295
url: str,
296-
model: str,
296+
model: Optional[str] = None,
297297
) -> Tuple[Optional[str], str]:
298298
"""
299299
for cloudflare ai gateway - https://github.com/BerriAI/litellm/issues/4317
@@ -304,6 +304,10 @@ def _check_custom_proxy(
304304
if api_base:
305305
if custom_llm_provider == "gemini":
306306
# For Gemini (Google AI Studio), construct the full path like other providers
307+
if model is None:
308+
raise ValueError(
309+
"Model parameter is required for Gemini custom API base URLs"
310+
)
307311
url = "{}/models/{}:{}".format(api_base, model, endpoint)
308312
if gemini_api_key is None:
309313
raise ValueError(

0 commit comments

Comments
 (0)