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 use consistent naming (#7092)

Ishaan Jaff36e99ebce72c
diff --git a/litellm/__init__.py b/litellm/__init__.py
index 8101e1a4991..542ab89c915 100644
--- a/litellm/__init__.py
+++ b/litellm/__init__.py
@@ -1167,18 +1167,18 @@ from .llms.jina_ai.embedding.transformation import JinaAIEmbeddingConfig
from .llms.xai.chat.xai_transformation import XAIChatConfig
from .llms.volcengine import VolcEngineConfig
from .llms.text_completion_codestral import MistralTextCompletionConfig
-from .llms.AzureOpenAI.azure import (
+from .llms.azure.azure import (
AzureOpenAIError,
AzureOpenAIAssistantsAPIConfig,
)
-from .llms.AzureOpenAI.chat.gpt_transformation import AzureOpenAIConfig
+from .llms.azure.chat.gpt_transformation import AzureOpenAIConfig
from .llms.hosted_vllm.chat.transformation import HostedVLLMChatConfig
from .llms.deepseek.chat.transformation import DeepSeekChatConfig
from .llms.lm_studio.chat.transformation import LMStudioChatConfig
from .llms.lm_studio.embed.transformation import LmStudioEmbeddingConfig
from .llms.perplexity.chat.transformation import PerplexityChatConfig
-from .llms.AzureOpenAI.chat.o1_transformation import AzureOpenAIO1Config
+from .llms.azure.chat.o1_transformation import AzureOpenAIO1Config
from .llms.watsonx.completion.handler import IBMWatsonXAIConfig
from .llms.watsonx.chat.transformation import IBMWatsonXChatConfig
from .main import * # type: ignore
diff --git a/litellm/assistants/main.py b/litellm/assistants/main.py
index d9b4b648fe2..4c71554fa2e 100644
--- a/litellm/assistants/main.py
+++ b/litellm/assistants/main.py
@@ -12,7 +12,7 @@ from openai.types.beta.assistant import Assistant
from openai.types.beta.assistant_deleted import AssistantDeleted
import litellm
-from litellm.llms.AzureOpenAI import assistants
+from litellm.llms.azure import assistants
from litellm.types.router import GenericLiteLLMParams
from litellm.utils import (
exception_type,
@@ -21,7 +21,7 @@ from litellm.utils import (
supports_httpx_timeout,
)
-from ..llms.AzureOpenAI.assistants import AzureAssistantsAPI
+from ..llms.azure.assistants import AzureAssistantsAPI
from ..llms.OpenAI.openai import OpenAIAssistantsAPI
from ..types.llms.openai import *
from ..types.router import *
diff --git a/litellm/batches/main.py b/litellm/batches/main.py
index 4d04068a261..af449248010 100644
--- a/litellm/batches/main.py
+++ b/litellm/batches/main.py
@@ -20,7 +20,7 @@ import httpx
import litellm
from litellm import client
-from litellm.llms.AzureOpenAI.azure import AzureBatchesAPI
+from litellm.llms.azure.azure import AzureBatchesAPI
from litellm.llms.OpenAI.openai import OpenAIBatchesAPI
from litellm.llms.vertex_ai_and_google_ai_studio.batches.handler import (
VertexAIBatchPrediction,
diff --git a/litellm/cost_calculator.py b/litellm/cost_calculator.py
index 9b455604d5c..b9c67870e20 100644
--- a/litellm/cost_calculator.py
+++ b/litellm/cost_calculator.py
@@ -22,12 +22,12 @@ from litellm.litellm_core_utils.llm_cost_calc.utils import _generic_cost_per_cha
from litellm.llms.anthropic.cost_calculation import (
cost_per_token as anthropic_cost_per_token,
)
+from litellm.llms.azure.cost_calculation import (
+ cost_per_token as azure_openai_cost_per_token,
+)
from litellm.llms.azure_ai.cost_calculator import (
cost_per_query as azure_ai_rerank_cost_per_query,
)
-from litellm.llms.AzureOpenAI.cost_calculation import (
- cost_per_token as azure_openai_cost_per_token,
-)
from litellm.llms.bedrock.image.cost_calculator import (
cost_calculator as bedrock_image_cost_calculator,
)
diff --git a/litellm/llms/AzureOpenAI/assistants.py b/litellm/llms/azure/assistants.py
similarity index 100%
rename from litellm/llms/AzureOpenAI/assistants.py
rename to litellm/llms/azure/assistants.py
diff --git a/litellm/llms/AzureOpenAI/audio_transcriptions.py b/litellm/llms/azure/audio_transcriptions.py
similarity index 100%
rename from litellm/llms/AzureOpenAI/audio_transcriptions.py
rename to litellm/llms/azure/audio_transcriptions.py
diff --git a/litellm/llms/AzureOpenAI/azure.py b/litellm/llms/azure/azure.py
similarity index 100%
rename from litellm/llms/AzureOpenAI/azure.py
rename to litellm/llms/azure/azure.py
diff --git a/litellm/llms/AzureOpenAI/chat/gpt_transformation.py b/litellm/llms/azure/chat/gpt_transformation.py
similarity index 100%
rename from litellm/llms/AzureOpenAI/chat/gpt_transformation.py
rename to litellm/llms/azure/chat/gpt_transformation.py
diff --git a/litellm/llms/AzureOpenAI/chat/o1_handler.py b/litellm/llms/azure/chat/o1_handler.py
similarity index 100%
rename from litellm/llms/AzureOpenAI/chat/o1_handler.py
rename to litellm/llms/azure/chat/o1_handler.py
diff --git a/litellm/llms/AzureOpenAI/chat/o1_transformation.py b/litellm/llms/azure/chat/o1_transformation.py
similarity index 100%
rename from litellm/llms/AzureOpenAI/chat/o1_transformation.py
rename to litellm/llms/azure/chat/o1_transformation.py
diff --git a/litellm/llms/AzureOpenAI/common_utils.py b/litellm/llms/azure/common_utils.py
similarity index 100%
rename from litellm/llms/AzureOpenAI/common_utils.py
rename to litellm/llms/azure/common_utils.py
diff --git a/litellm/llms/AzureOpenAI/cost_calculation.py b/litellm/llms/azure/cost_calculation.py
similarity index 100%
rename from litellm/llms/AzureOpenAI/cost_calculation.py
rename to litellm/llms/azure/cost_calculation.py
diff --git a/litellm/llms/AzureOpenAI/realtime/handler.py b/litellm/llms/azure/realtime/handler.py
similarity index 100%
rename from litellm/llms/AzureOpenAI/realtime/handler.py
rename to litellm/llms/azure/realtime/handler.py
diff --git a/litellm/main.py b/litellm/main.py
index 3a8159c3f5d..29ee9015468 100644
--- a/litellm/main.py
+++ b/litellm/main.py
@@ -102,12 +102,12 @@ from .llms import (
from .llms.ai21 import completion as ai21
from .llms.anthropic.chat import AnthropicChatCompletion
from .llms.anthropic.completion import AnthropicTextCompletion
+from .llms.azure.audio_transcriptions import AzureAudioTranscription
+from .llms.azure.azure import AzureChatCompletion, _check_dynamic_azure_params
+from .llms.azure.chat.o1_handler import AzureOpenAIO1ChatCompletion
from .llms.azure_ai.chat import AzureAIChatCompletion
from .llms.azure_ai.embed import AzureAIEmbedding
from .llms.azure_text import AzureTextCompletion
-from .llms.AzureOpenAI.audio_transcriptions import AzureAudioTranscription
-from .llms.AzureOpenAI.azure import AzureChatCompletion, _check_dynamic_azure_params
-from .llms.AzureOpenAI.chat.o1_handler import AzureOpenAIO1ChatCompletion
from .llms.bedrock.chat import BedrockConverseLLM, BedrockLLM
from .llms.bedrock.embed.embedding import BedrockEmbedding
from .llms.bedrock.image.image_handler import BedrockImageGeneration
diff --git a/litellm/realtime_api/main.py b/litellm/realtime_api/main.py
index 9088a491c0d..b17662c62cd 100644
--- a/litellm/realtime_api/main.py
+++ b/litellm/realtime_api/main.py
@@ -9,7 +9,7 @@ from litellm.secret_managers.main import get_secret_str
from litellm.types.router import GenericLiteLLMParams
from ..litellm_core_utils.litellm_logging import Logging as LiteLLMLogging
-from ..llms.AzureOpenAI.realtime.handler import AzureOpenAIRealtime
+from ..llms.azure.realtime.handler import AzureOpenAIRealtime
from ..llms.OpenAI.realtime.handler import OpenAIRealtime
from ..utils import client as wrapper_client
diff --git a/litellm/router.py b/litellm/router.py
index 34143bd5000..c9cfab55568 100644
--- a/litellm/router.py
+++ b/litellm/router.py
@@ -54,7 +54,7 @@ from litellm.caching.caching import DualCache, InMemoryCache, RedisCache
from litellm.integrations.custom_logger import CustomLogger
from litellm.litellm_core_utils.core_helpers import _get_parent_otel_span_from_kwargs
from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLogging
-from litellm.llms.AzureOpenAI.azure import get_azure_ad_token_from_oidc
+from litellm.llms.azure.azure import get_azure_ad_token_from_oidc
from litellm.router_strategy.least_busy import LeastBusyLoggingHandler
from litellm.router_strategy.lowest_cost import LowestCostLoggingHandler
from litellm.router_strategy.lowest_latency import LowestLatencyLoggingHandler
diff --git a/litellm/router_utils/client_initalization_utils.py b/litellm/router_utils/client_initalization_utils.py
index db8f20ee6b7..8a11edce8f1 100644
--- a/litellm/router_utils/client_initalization_utils.py
+++ b/litellm/router_utils/client_initalization_utils.py
@@ -9,7 +9,7 @@ import openai
import litellm
from litellm import get_secret, get_secret_str
from litellm._logging import verbose_router_logger
-from litellm.llms.AzureOpenAI.azure import get_azure_ad_token_from_oidc
+from litellm.llms.azure.azure import get_azure_ad_token_from_oidc
from litellm.secret_managers.get_azure_ad_token_provider import (
get_azure_ad_token_provider,
)
@@ -359,7 +359,7 @@ class InitalizeOpenAISDKClient:
azure_client_params["azure_ad_token_provider"] = (
azure_ad_token_provider
)
- from litellm.llms.AzureOpenAI.azure import (
+ from litellm.llms.azure.azure import (
select_azure_base_url_or_endpoint,
)
diff --git a/tests/llm_translation/test_azure_openai.py b/tests/llm_translation/test_azure_openai.py
index 837714770f0..9bf16a5cf5b 100644
--- a/tests/llm_translation/test_azure_openai.py
+++ b/tests/llm_translation/test_azure_openai.py
@@ -6,7 +6,7 @@ sys.path.insert(
) # Adds the parent directory to the system path
import pytest
-from litellm.llms.AzureOpenAI.common_utils import process_azure_headers
+from litellm.llms.azure.common_utils import process_azure_headers
from httpx import Headers
@@ -172,7 +172,7 @@ def test_azure_extra_headers(input, call_type):
],
)
def test_process_azure_endpoint_url(api_base, model, expected_endpoint):
- from litellm.llms.AzureOpenAI.azure import AzureChatCompletion
+ from litellm.llms.azure.azure import AzureChatCompletion
azure_chat_completion = AzureChatCompletion()
input_args = {
diff --git a/tests/llm_translation/test_max_completion_tokens.py b/tests/llm_translation/test_max_completion_tokens.py
index 03eb638757b..363125a6038 100644
--- a/tests/llm_translation/test_max_completion_tokens.py
+++ b/tests/llm_translation/test_max_completion_tokens.py
@@ -231,7 +231,7 @@ def test_all_model_configs():
optional_params={},
) == {"max_tokens": 10}
- from litellm.llms.AzureOpenAI.chat.gpt_transformation import AzureOpenAIConfig
+ from litellm.llms.azure.chat.gpt_transformation import AzureOpenAIConfig
assert "max_completion_tokens" in AzureOpenAIConfig().get_supported_openai_params()
assert AzureOpenAIConfig().map_openai_params(
diff --git a/tests/local_testing/test_secret_manager.py b/tests/local_testing/test_secret_manager.py
index 1b95119a312..66f63809d9f 100644
--- a/tests/local_testing/test_secret_manager.py
+++ b/tests/local_testing/test_secret_manager.py
@@ -16,7 +16,7 @@ sys.path.insert(
) # Adds the parent directory to the system path
import pytest
import litellm
-from litellm.llms.AzureOpenAI.azure import get_azure_ad_token_from_oidc
+from litellm.llms.azure.azure import get_azure_ad_token_from_oidc
from litellm.llms.bedrock.chat import BedrockConverseLLM, BedrockLLM
from litellm.secret_managers.aws_secret_manager_v2 import AWSSecretsManagerV2
from litellm.secret_managers.main import (