(fix) use OpenAI organization in ahealth_check

This commit is contained in:
ishaan-jaff 2024-01-30 11:45:22 -08:00
parent 5c0f9f421c
commit e011c4a989
3 changed files with 7 additions and 2 deletions

View file

@ -1411,7 +1411,7 @@ class Router:
max_retries = litellm.get_secret(max_retries_env_name)
litellm_params["max_retries"] = max_retries
organization = litellm_params.pop("organization", None)
organization = litellm_params.get("organization", None)
if isinstance(organization, str) and organization.startswith("os.environ/"):
organization_env_name = organization.replace("os.environ/", "")
organization = litellm.get_secret(organization_env_name)