mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
fix(router.py): only check /v1
for azure ai studio models
Fixes https://github.com/BerriAI/litellm/issues/3346
This commit is contained in:
parent
335d5a03fb
commit
66c5b5b9dd
1 changed files with 3 additions and 1 deletions
|
@ -1959,8 +1959,10 @@ class Router:
|
||||||
or "ft:gpt-3.5-turbo" in model_name
|
or "ft:gpt-3.5-turbo" in model_name
|
||||||
or model_name in litellm.open_ai_embedding_models
|
or model_name in litellm.open_ai_embedding_models
|
||||||
):
|
):
|
||||||
|
is_azure_ai_studio_model: bool = False
|
||||||
if custom_llm_provider == "azure":
|
if custom_llm_provider == "azure":
|
||||||
if litellm.utils._is_non_openai_azure_model(model_name):
|
if litellm.utils._is_non_openai_azure_model(model_name):
|
||||||
|
is_azure_ai_studio_model = True
|
||||||
custom_llm_provider = "openai"
|
custom_llm_provider = "openai"
|
||||||
# remove azure prefx from model_name
|
# remove azure prefx from model_name
|
||||||
model_name = model_name.replace("azure/", "")
|
model_name = model_name.replace("azure/", "")
|
||||||
|
@ -1990,7 +1992,7 @@ class Router:
|
||||||
if not, add it - https://github.com/BerriAI/litellm/issues/2279
|
if not, add it - https://github.com/BerriAI/litellm/issues/2279
|
||||||
"""
|
"""
|
||||||
if (
|
if (
|
||||||
custom_llm_provider == "openai"
|
is_azure_ai_studio_model == True
|
||||||
and api_base is not None
|
and api_base is not None
|
||||||
and not api_base.endswith("/v1/")
|
and not api_base.endswith("/v1/")
|
||||||
):
|
):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue