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 linter errors: remove unused imports and variables
Ephrim Stanley103633c79485
diff --git a/tests/enterprise/litellm_enterprise/proxy/hooks/test_managed_files.py b/tests/enterprise/litellm_enterprise/proxy/hooks/test_managed_files.pyindex 82c6821eb02..9a6e153a22b 100644--- a/tests/enterprise/litellm_enterprise/proxy/hooks/test_managed_files.py+++ b/tests/enterprise/litellm_enterprise/proxy/hooks/test_managed_files.py@@ -1,18 +1,14 @@import json-import os-import sysfrom unittest.mock import AsyncMock, MagicMock, patchimport pytestfrom fastapi import HTTPException-from fastapi.testclient import TestClientfrom litellm_enterprise.proxy.hooks.managed_files import _PROXY_LiteLLMManagedFilesfrom litellm.caching import DualCachefrom litellm.proxy.openai_files_endpoints.common_utils import (_is_base64_encoded_unified_file_id,)-from litellm.types.utils import SpecialEnumsdef test_get_file_ids_from_messages():@@ -255,7 +251,7 @@ async def test_can_user_call_unified_file_id(call_type):)unified_file_id = "bGl0ZWxsbV9wcm94eTphcHBsaWNhdGlvbi9vY3RldC1zdHJlYW07dW5pZmllZF9pZCxmMTNlNDAzZS01YWM3LTRhZjktOGQzNS0wNDgwZDMxOTgyYTg7dGFyZ2V0X21vZGVsX25hbWVzLGdwdC00by1taW5pLW9wZW5haTtsbG1fb3V0cHV0X2ZpbGVfaWQsZmlsZS1Ib3UxZDFXc3c1SDNKcjFMYllpZDJiO2xsbV9vdXRwdXRfZmlsZV9tb2RlbF9pZCxmODBiNWU2NzQ1NzdkNjkyMjM4YmVhNTIxZDdiMGI5ZGYyY2FmMTEwMTU2YmU5YzBjM2NjMmNkNTBjOTM1ZDI0"- with pytest.raises(HTTPException) as e:+ with pytest.raises(HTTPException):await proxy_managed_files.async_pre_call_hook(user_api_key_dict=UserAPIKeyAuth(user_id="456", parent_otel_span=MagicMock()@@ -310,7 +306,7 @@ async def test_router_acreate_batch_only_selects_from_file_id_mapping(monkeypatclitellm, "acreate_batch", return_value=AsyncMock()) as mock_acreate_batch:for _ in range(1000):- response = await router.acreate_batch(+ await router.acreate_batch(model="gpt-3.5-turbo",input_file_id=file_id,model_file_id_mapping=model_file_id_mapping,@@ -329,7 +325,6 @@ async def test_output_file_id_for_batch_retrieve():from openai.types.batch import BatchRequestCounts- from litellm.proxy._types import UserAPIKeyAuthfrom litellm.types.utils import LiteLLMBatchbatch = LiteLLMBatch(@@ -381,8 +376,6 @@ async def test_output_file_id_for_batch_retrieve():@pytest.mark.asyncioasync def test_async_post_call_success_hook_twice_assert_no_unique_violation():import asyncio- from litellm.proxy.proxy_server import proxy_logging_obj- from litellm.proxy.utils import PrismaClientfrom litellm.types.utils import LiteLLMBatchfrom litellm.proxy._types import UserAPIKeyAuthfrom openai.types.batch import BatchRequestCounts