From f2d0aaacbcc3c0a8d6080f4f6e60bc256d87a126 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Thu, 13 Mar 2025 19:26:46 -0700 Subject: [PATCH] fix: fix linting errors --- .../management_endpoints/common_utils.py | 9 +------ .../model_management_endpoints.py | 24 +------------------ 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/litellm/proxy/management_endpoints/common_utils.py b/litellm/proxy/management_endpoints/common_utils.py index a09db75301..d80a06c597 100644 --- a/litellm/proxy/management_endpoints/common_utils.py +++ b/litellm/proxy/management_endpoints/common_utils.py @@ -1,18 +1,11 @@ -import uuid -from datetime import datetime, timezone -from typing import Any, Optional, Union +from typing import Any, Union -import litellm from litellm.proxy._types import ( - AUDIT_ACTIONS, GenerateKeyRequest, - LiteLLM_AuditLogs, LiteLLM_ManagementEndpoint_MetadataFields_Premium, LiteLLM_TeamTable, - LitellmTableNames, UserAPIKeyAuth, ) -from litellm.proxy.management_helpers.audit_logs import create_audit_log_for_update from litellm.proxy.utils import _premium_user_check diff --git a/litellm/proxy/management_endpoints/model_management_endpoints.py b/litellm/proxy/management_endpoints/model_management_endpoints.py index f6e3cad1d6..2a2b7eae24 100644 --- a/litellm/proxy/management_endpoints/model_management_endpoints.py +++ b/litellm/proxy/management_endpoints/model_management_endpoints.py @@ -13,19 +13,15 @@ model/{model_id}/update - PATCH endpoint for model update. import asyncio import json import uuid -from datetime import datetime, timezone from typing import Optional, cast from fastapi import APIRouter, Depends, HTTPException, Request, status from pydantic import BaseModel -import litellm from litellm._logging import verbose_proxy_logger from litellm.constants import LITELLM_PROXY_ADMIN_NAME from litellm.proxy._types import ( - AUDIT_ACTIONS, CommonProxyErrors, - LiteLLM_AuditLogs, LiteLLM_ProxyModelTable, LitellmTableNames, LitellmUserRoles, @@ -350,13 +346,7 @@ async def delete_model( model_info: ModelInfoDelete, user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), ): - from litellm.proxy.proxy_server import ( - general_settings, - llm_model_list, - llm_router, - proxy_config, - user_config_file_path, - ) + from litellm.proxy.proxy_server import llm_router try: """ @@ -457,19 +447,14 @@ async def add_new_model( ): from litellm.proxy.proxy_server import ( general_settings, - llm_model_list, - llm_router, - master_key, premium_user, prisma_client, proxy_config, proxy_logging_obj, store_model_in_db, - user_config_file_path, ) try: - import base64 if prisma_client is None: raise HTTPException( @@ -607,19 +592,12 @@ async def update_model( """ from litellm.proxy.proxy_server import ( LITELLM_PROXY_ADMIN_NAME, - general_settings, - llm_model_list, llm_router, - master_key, prisma_client, - proxy_config, - proxy_logging_obj, store_model_in_db, - user_config_file_path, ) try: - import base64 if prisma_client is None: raise HTTPException(