File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -293,7 +293,7 @@ def _check_custom_proxy(
293
293
stream : Optional [bool ],
294
294
auth_header : Optional [str ],
295
295
url : str ,
296
- model : str ,
296
+ model : Optional [ str ] = None ,
297
297
) -> Tuple [Optional [str ], str ]:
298
298
"""
299
299
for cloudflare ai gateway - https://github.com/BerriAI/litellm/issues/4317
@@ -304,6 +304,10 @@ def _check_custom_proxy(
304
304
if api_base :
305
305
if custom_llm_provider == "gemini" :
306
306
# 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
+ )
307
311
url = "{}/models/{}:{}" .format (api_base , model , endpoint )
308
312
if gemini_api_key is None :
309
313
raise ValueError (
You can’t perform that action at this time.
0 commit comments