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
resolve dependency cycle
harish8764e5e73955959
diff --git a/litellm/files/file_content_streaming_handler.py b/litellm/proxy/openai_files_endpoints/file_content_streaming_handler.pysimilarity index 99%rename from litellm/files/file_content_streaming_handler.pyrename to litellm/proxy/openai_files_endpoints/file_content_streaming_handler.pyindex dd39e1b0312..b22077e8c12 100644--- a/litellm/files/file_content_streaming_handler.py+++ b/litellm/proxy/openai_files_endpoints/file_content_streaming_handler.py@@ -6,10 +6,11 @@ import litellmfrom litellm.files.types import FileContentStreamingResultfrom litellm.proxy._types import UserAPIKeyAuthfrom litellm.proxy.common_request_processing import ProxyBaseLLMRequestProcessing+from litellm.proxy.utils import ProxyLogging+from litellm.proxy.openai_files_endpoints.common_utils import (prepare_data_with_credentials,)-from litellm.proxy.utils import ProxyLoggingclass FileContentStreamingHandler:diff --git a/litellm/proxy/openai_files_endpoints/files_endpoints.py b/litellm/proxy/openai_files_endpoints/files_endpoints.pyindex eefcd12ddbb..fb131f33ec3 100644--- a/litellm/proxy/openai_files_endpoints/files_endpoints.py+++ b/litellm/proxy/openai_files_endpoints/files_endpoints.py@@ -24,7 +24,7 @@ from fastapi import (import litellmfrom litellm import CreateFileRequest, get_secret_strfrom litellm._logging import verbose_proxy_logger-from litellm.files.file_content_streaming_handler import (+from litellm.proxy.openai_files_endpoints.file_content_streaming_handler import (FileContentStreamingHandler,)from litellm.llms.base_llm.files.transformation import BaseFileEndpoints@@ -49,14 +49,16 @@ from litellm.types.llms.openai import (OpenAIFilesPurpose,)-from .common_utils import (+from litellm.proxy.openai_files_endpoints.common_utils import (_is_base64_encoded_unified_file_id,encode_file_id_with_model,extract_file_creation_params,get_credentials_for_model,handle_model_based_routing,)-from .storage_backend_service import StorageBackendFileService+from litellm.proxy.openai_files_endpoints.storage_backend_service import (+ StorageBackendFileService,+)router = APIRouter()diff --git a/tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py b/tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.pyindex 47bcaa2dfc5..476b57d9f3b 100644--- a/tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py+++ b/tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py@@ -14,11 +14,13 @@ sys.path.insert(import litellmfrom litellm import Router-from litellm.files.file_content_streaming_handler import FileContentStreamingHandlerfrom litellm.files.types import FileContentStreamingResultfrom litellm.proxy._types import LiteLLM_UserTableFiltered, UserAPIKeyAuthfrom litellm.proxy.hooks import get_proxy_hookfrom litellm.proxy.management_endpoints.internal_user_endpoints import ui_view_users+from litellm.proxy.openai_files_endpoints.file_content_streaming_handler import (+ FileContentStreamingHandler,+)from litellm.proxy.proxy_server import appfrom litellm.types.llms.openai import OpenAIFileObject