forked from phoenix/litellm-mirror
fix(get_api_base): fix get_api_base to handle model with alias
This commit is contained in:
parent
4c8787f896
commit
4cfd988529
2 changed files with 10 additions and 2 deletions
|
@ -5934,6 +5934,8 @@ def get_api_base(model: str, optional_params: dict) -> Optional[str]:
|
|||
if _optional_params.api_base is not None:
|
||||
return _optional_params.api_base
|
||||
|
||||
if litellm.model_alias_map and model in litellm.model_alias_map:
|
||||
model = litellm.model_alias_map[model]
|
||||
try:
|
||||
model, custom_llm_provider, dynamic_api_key, dynamic_api_base = (
|
||||
get_llm_provider(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue