mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-30 10:22:35 +00:00
* 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
30 lines
756 B
Python
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]
|