forked from phoenix/litellm-mirror
fix(proxy_server.py): linting fix
This commit is contained in:
parent
094f20121a
commit
b4684d5132
1 changed files with 12 additions and 4 deletions
|
@ -425,7 +425,7 @@ async def user_api_key_auth(
|
||||||
litellm_proxy_roles=jwt_handler.litellm_jwtauth,
|
litellm_proxy_roles=jwt_handler.litellm_jwtauth,
|
||||||
)
|
)
|
||||||
if is_allowed == False:
|
if is_allowed == False:
|
||||||
allowed_routes = jwt_handler.litellm_jwtauth.team_allowed_routes
|
allowed_routes = jwt_handler.litellm_jwtauth.team_allowed_routes # type: ignore
|
||||||
actual_routes = get_actual_routes(allowed_routes=allowed_routes)
|
actual_routes = get_actual_routes(allowed_routes=allowed_routes)
|
||||||
raise Exception(
|
raise Exception(
|
||||||
f"Team not allowed to access this route. Route={route}, Allowed Routes={actual_routes}"
|
f"Team not allowed to access this route. Route={route}, Allowed Routes={actual_routes}"
|
||||||
|
@ -2263,10 +2263,18 @@ class ProxyConfig:
|
||||||
_PROXY_AzureContentSafety,
|
_PROXY_AzureContentSafety,
|
||||||
)
|
)
|
||||||
|
|
||||||
azure_content_safety_params = litellm_settings["azure_content_safety_params"]
|
azure_content_safety_params = litellm_settings[
|
||||||
|
"azure_content_safety_params"
|
||||||
|
]
|
||||||
for k, v in azure_content_safety_params.items():
|
for k, v in azure_content_safety_params.items():
|
||||||
if v is not None and isinstance(v, str) and v.startswith("os.environ/"):
|
if (
|
||||||
azure_content_safety_params[k] = litellm.get_secret(v)
|
v is not None
|
||||||
|
and isinstance(v, str)
|
||||||
|
and v.startswith("os.environ/")
|
||||||
|
):
|
||||||
|
azure_content_safety_params[k] = (
|
||||||
|
litellm.get_secret(v)
|
||||||
|
)
|
||||||
|
|
||||||
azure_content_safety_obj = _PROXY_AzureContentSafety(
|
azure_content_safety_obj = _PROXY_AzureContentSafety(
|
||||||
**azure_content_safety_params,
|
**azure_content_safety_params,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue