use directories for importing new endpoints

This commit is contained in:
Ishaan Jaff 2024-06-15 13:35:21 -07:00
parent c6986c66cc
commit 349724a630
5 changed files with 12 additions and 6 deletions

View file

@ -168,9 +168,11 @@ from litellm.scheduler import Scheduler, FlowItem, DefaultPriorities
## Import All Misc routes here ##
from litellm.proxy.caching_routes import router as caching_router
from litellm.proxy.team_endpoints import router as team_router
from litellm.proxy.spend_management_endpoints import router as spend_management_router
from litellm.proxy.health_endpoints import router as health_router
from litellm.proxy.management_endpoints.team_endpoints import router as team_router
from litellm.proxy.spend_reporting_endpoints.spend_management_endpoints import (
router as spend_management_router,
)
from litellm.proxy.health_endpoints.health_endpoints import router as health_router
try:
from litellm._version import version
@ -5748,7 +5750,7 @@ async def new_user(data: NewUserRequest):
# Admin UI Logic
# if team_id passed add this user to the team
if data_json.get("team_id", None) is not None:
from litellm.proxy.team_endpoints import team_member_add
from litellm.proxy.management_endpoints.team_endpoints import team_member_add
await team_member_add(
data=TeamMemberAddRequest(

View file

@ -57,8 +57,12 @@ from litellm.proxy.proxy_server import (
model_list,
LitellmUserRoles,
)
from litellm.proxy.team_endpoints import team_info, new_team, update_team
from litellm.proxy.spend_management_endpoints import (
from litellm.proxy.management_endpoints.team_endpoints import (
team_info,
new_team,
update_team,
)
from litellm.proxy.spend_reporting_endpoints.spend_management_endpoints import (
spend_user_fn,
spend_key_fn,
view_spend_logs,