mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
(feat) proxy: config - azure allow users to pass in base_url
This commit is contained in:
parent
908c32c9c1
commit
97ff0caf70
1 changed files with 2 additions and 0 deletions
|
@ -842,6 +842,8 @@ class Router:
|
|||
api_key = os.getenv(api_key_env_name)
|
||||
|
||||
api_base = litellm_params.get("api_base")
|
||||
base_url = litellm_params.get("base_url")
|
||||
api_base = api_base or base_url # allow users to pass in `api_base` or `base_url` for azure
|
||||
if api_base and api_base.startswith("os.environ/"):
|
||||
api_base_env_name = api_base.replace("os.environ/", "")
|
||||
api_base = os.getenv(api_base_env_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue