forked from phoenix/litellm-mirror
fix(utils.py): add new 'azure_ai/' route
supports azure's openai compatible api endpoint
This commit is contained in:
parent
318abde095
commit
88e567af2c
4 changed files with 33 additions and 4 deletions
|
@ -6612,6 +6612,12 @@ def get_llm_provider(
|
|||
or get_secret("TOGETHERAI_API_KEY")
|
||||
or get_secret("TOGETHER_AI_TOKEN")
|
||||
)
|
||||
elif custom_llm_provider == "azure_ai":
|
||||
api_base = (
|
||||
api_base
|
||||
or get_secret("AZURE_AI_API_BASE") # for Azure AI Mistral
|
||||
) # type: ignore
|
||||
dynamic_api_key = get_secret("AZURE_AI_API_KEY")
|
||||
if api_base is not None and not isinstance(api_base, str):
|
||||
raise Exception(
|
||||
"api base needs to be a string. api_base={}".format(api_base)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue