Files
litellm/enterprise/enterprise_hooks/__init__.py
T
Krish DholakiaandGitHub 6cfb6e5253 Litellm dev 05 19 2025 p3 (#10965)
* feat(model_info_view.tsx): enable updating model info for existing models on UI

Fixes LIT-154

* fix(model_info_view.tsx): instantly show model info updates on UI

* feat(proxy_server.py): enable flag on `/models` to include model access groups

This enables admin to assign model access groups to keys/teams on UI

* feat(ui/): add model access groups on ui dropdown when creating teams + keys

* refactor(parallel_request_limiter_v2.py): Migrate multi instance rate limiting to OSS

Closes https://github.com/BerriAI/litellm/issues/10052
2025-05-19 20:49:21 -07:00

30 lines
756 B
Python

import os
from typing import Dict, Literal, Type, Union
from litellm.integrations.custom_logger import CustomLogger
from .managed_files import _PROXY_LiteLLMManagedFiles
ENTERPRISE_PROXY_HOOKS: Dict[str, Type[CustomLogger]] = {
"managed_files": _PROXY_LiteLLMManagedFiles,
}
def get_enterprise_proxy_hook(
hook_name: Union[
Literal[
"managed_files",
"max_parallel_requests",
],
str,
]
):
"""
Factory method to get a enterprise hook instance by name
"""
if hook_name not in ENTERPRISE_PROXY_HOOKS:
raise ValueError(
f"Unknown hook: {hook_name}. Available hooks: {list(ENTERPRISE_PROXY_HOOKS.keys())}"
)
return ENTERPRISE_PROXY_HOOKS[hook_name]