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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix: fix linting errors
Krrish Dholakiaf2d0aaacbcc3
diff --git a/litellm/proxy/management_endpoints/common_utils.py b/litellm/proxy/management_endpoints/common_utils.pyindex 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 litellmfrom 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_updatefrom litellm.proxy.utils import _premium_user_checkdiff --git a/litellm/proxy/management_endpoints/model_management_endpoints.py b/litellm/proxy/management_endpoints/model_management_endpoints.pyindex 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 asyncioimport jsonimport uuid-from datetime import datetime, timezonefrom typing import Optional, castfrom fastapi import APIRouter, Depends, HTTPException, Request, statusfrom pydantic import BaseModel-import litellmfrom litellm._logging import verbose_proxy_loggerfrom litellm.constants import LITELLM_PROXY_ADMIN_NAMEfrom 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_routertry:"""@@ -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 base64if 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 base64if prisma_client is None:raise HTTPException(