Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix: fix linting errors

Krrish Dholakiaf2d0aaacbcc3
diff --git a/litellm/proxy/management_endpoints/common_utils.py b/litellm/proxy/management_endpoints/common_utils.py
index a09db753010..d80a06c597c 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 f6e3cad1d66..2a2b7eae244 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(