mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-21 00:21:49 +00:00
Merge PR #20013 into litellm_pr_review_000004
This commit is contained in:
commit
66d5de8697
1 changed files with 7 additions and 0 deletions
|
|
@ -28,6 +28,13 @@ def get_api_base(
|
|||
```
|
||||
"""
|
||||
|
||||
# Fast path: if api_base is already in the dict, return it directly
|
||||
# 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:
|
||||
return _api_base
|
||||
|
||||
try:
|
||||
if isinstance(optional_params, LiteLLM_Params):
|
||||
_optional_params = optional_params
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue