mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix: add isinstance(str) check to get_api_base fast path
Ensures non-string api_base values (e.g. int, list) fall through to Pydantic validation instead of being returned directly.
This commit is contained in:
parent
f655f47d84
commit
769d1777fc
1 changed files with 1 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ def get_api_base(
|
|||
# without constructing a full LiteLLM_Params Pydantic model.
|
||||
if isinstance(optional_params, dict):
|
||||
_api_base = optional_params.get("api_base")
|
||||
if _api_base is not None:
|
||||
if isinstance(_api_base, str):
|
||||
return _api_base
|
||||
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue