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
Code Quality Improvement - remove `file_apis`, `fine_tuning_apis` from `/llms` (#7156)
Ishaan Jaff1d8956a3d46b
diff --git a/litellm/files/main.py b/litellm/files/main.pyindex 666ad1f4aab..fbdf6206d27 100644--- a/litellm/files/main.py+++ b/litellm/files/main.py@@ -15,7 +15,7 @@ import httpximport litellmfrom litellm import client, get_secret_str-from litellm.llms.files_apis.azure import AzureOpenAIFilesAPI+from litellm.llms.azure.files.handler import AzureOpenAIFilesAPIfrom litellm.llms.openai.openai import FileDeleted, FileObject, OpenAIFilesAPIfrom litellm.llms.vertex_ai_and_google_ai_studio.files.handler import (VertexAIFilesHandler,diff --git a/litellm/fine_tuning/main.py b/litellm/fine_tuning/main.pyindex a4bdcadadd7..2d97eb21f4e 100644--- a/litellm/fine_tuning/main.py+++ b/litellm/fine_tuning/main.py@@ -18,9 +18,9 @@ import httpximport litellmfrom litellm._logging import verbose_logger-from litellm.llms.fine_tuning_apis.azure import AzureOpenAIFineTuningAPI+from litellm.llms.azure.fine_tuning.handler import AzureOpenAIFineTuningAPIfrom litellm.llms.openai.fine_tuning.handler import OpenAIFineTuningAPI, FineTuningJob, FineTuningJobCreate-from litellm.llms.fine_tuning_apis.vertex_ai import VertexFineTuningAPI+from litellm.llms.vertex_ai_and_google_ai_studio.fine_tuning.handler import VertexFineTuningAPIfrom litellm.secret_managers.main import get_secret_strfrom litellm.types.llms.openai import Hyperparametersfrom litellm.types.router import *diff --git a/litellm/llms/files_apis/azure.py b/litellm/llms/azure/files/handler.pysimilarity index 100%rename from litellm/llms/files_apis/azure.pyrename to litellm/llms/azure/files/handler.pydiff --git a/litellm/llms/fine_tuning_apis/azure.py b/litellm/llms/azure/fine_tuning/handler.pysimilarity index 98%rename from litellm/llms/fine_tuning_apis/azure.pyrename to litellm/llms/azure/fine_tuning/handler.pyindex 3e9c335e16f..f336efa3311 100644--- a/litellm/llms/fine_tuning_apis/azure.py+++ b/litellm/llms/azure/fine_tuning/handler.py@@ -7,7 +7,7 @@ from openai.types.fine_tuning import FineTuningJobfrom litellm._logging import verbose_loggerfrom litellm.llms.base import BaseLLM-from litellm.llms.files_apis.azure import get_azure_openai_client+from litellm.llms.azure.files.handler import get_azure_openai_clientfrom litellm.types.llms.openai import FineTuningJobCreatediff --git a/litellm/llms/fine_tuning_apis/vertex_ai.py b/litellm/llms/vertex_ai_and_google_ai_studio/fine_tuning/handler.pysimilarity index 99%rename from litellm/llms/fine_tuning_apis/vertex_ai.pyrename to litellm/llms/vertex_ai_and_google_ai_studio/fine_tuning/handler.pyindex fd418103e7c..f82d781c55a 100644--- a/litellm/llms/fine_tuning_apis/vertex_ai.py+++ b/litellm/llms/vertex_ai_and_google_ai_studio/fine_tuning/handler.py@@ -9,7 +9,6 @@ import litellmfrom litellm._logging import verbose_loggerfrom litellm.llms.base import BaseLLMfrom litellm.llms.custom_httpx.http_handler import (- AsyncHTTPHandler,HTTPHandler,get_async_httpx_client,)diff --git a/tests/local_testing/test_fine_tuning_api.py b/tests/local_testing/test_fine_tuning_api.pyindex 938c1b29514..e231117a19c 100644--- a/tests/local_testing/test_fine_tuning_api.py+++ b/tests/local_testing/test_fine_tuning_api.py@@ -20,7 +20,7 @@ from test_gcs_bucket import load_vertex_ai_credentialsfrom litellm import create_fine_tuning_jobfrom litellm._logging import verbose_logger-from litellm.llms.fine_tuning_apis.vertex_ai import (+from litellm.llms.vertex_ai_and_google_ai_studio.fine_tuning.handler import (FineTuningJobCreate,VertexFineTuningAPI,)