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
rename `llms/OpenAI/` -> `llms/openai/` (#7154)
Ishaan Jaffbfb6891eb770
diff --git a/litellm/__init__.py b/litellm/__init__.pyindex 2a0d1f4e715..6be6f73c17b 100644--- a/litellm/__init__.py+++ b/litellm/__init__.py@@ -1134,26 +1134,26 @@ from .llms.bedrock.embed.amazon_titan_v2_transformation import ()from .llms.cohere.chat.transformation import CohereChatConfigfrom .llms.bedrock.embed.cohere_transformation import BedrockCohereEmbeddingConfig-from .llms.OpenAI.openai import (+from .llms.openai.openai import (OpenAIConfig,MistralEmbeddingConfig,DeepInfraConfig,)-from litellm.llms.OpenAI.completion.transformation import OpenAITextCompletionConfig+from litellm.llms.openai.completion.transformation import OpenAITextCompletionConfigfrom .llms.groq.chat.transformation import GroqChatConfigfrom .llms.azure_ai.chat.transformation import AzureAIStudioConfigfrom .llms.mistral.mistral_chat_transformation import MistralConfig-from .llms.OpenAI.chat.o1_transformation import (+from .llms.openai.chat.o1_transformation import (OpenAIO1Config,)openAIO1Config = OpenAIO1Config()-from .llms.OpenAI.chat.gpt_transformation import (+from .llms.openai.chat.gpt_transformation import (OpenAIGPTConfig,)openAIGPTConfig = OpenAIGPTConfig()-from .llms.OpenAI.chat.gpt_audio_transformation import (+from .llms.openai.chat.gpt_audio_transformation import (OpenAIGPTAudioConfig,)diff --git a/litellm/assistants/main.py b/litellm/assistants/main.pyindex 4c71554fa2e..76222ca787e 100644--- a/litellm/assistants/main.py+++ b/litellm/assistants/main.py@@ -22,7 +22,7 @@ from litellm.utils import ()from ..llms.azure.assistants import AzureAssistantsAPI-from ..llms.OpenAI.openai import OpenAIAssistantsAPI+from ..llms.openai.openai import OpenAIAssistantsAPIfrom ..types.llms.openai import *from ..types.router import *from .utils import get_optional_params_add_messagediff --git a/litellm/batches/main.py b/litellm/batches/main.pyindex af449248010..23673cd6d32 100644--- a/litellm/batches/main.py+++ b/litellm/batches/main.py@@ -21,7 +21,7 @@ import httpximport litellmfrom litellm import clientfrom litellm.llms.azure.azure import AzureBatchesAPI-from litellm.llms.OpenAI.openai import OpenAIBatchesAPI+from litellm.llms.openai.openai import OpenAIBatchesAPIfrom litellm.llms.vertex_ai_and_google_ai_studio.batches.handler import (VertexAIBatchPrediction,)diff --git a/litellm/cost_calculator.py b/litellm/cost_calculator.pyindex b9c67870e20..943fcf38b73 100644--- a/litellm/cost_calculator.py+++ b/litellm/cost_calculator.py@@ -40,11 +40,11 @@ from litellm.llms.databricks.cost_calculator import (from litellm.llms.fireworks_ai.cost_calculator import (cost_per_token as fireworks_ai_cost_per_token,)-from litellm.llms.OpenAI.cost_calculation import (+from litellm.llms.openai.cost_calculation import (cost_per_second as openai_cost_per_second,)-from litellm.llms.OpenAI.cost_calculation import cost_per_token as openai_cost_per_token-from litellm.llms.OpenAI.cost_calculation import cost_router as openai_cost_router+from litellm.llms.openai.cost_calculation import cost_per_token as openai_cost_per_token+from litellm.llms.openai.cost_calculation import cost_router as openai_cost_routerfrom litellm.llms.together_ai.cost_calculator import get_model_params_and_categoryfrom litellm.llms.vertex_ai_and_google_ai_studio.image_generation.cost_calculator import (cost_calculator as vertex_ai_image_cost_calculator,diff --git a/litellm/files/main.py b/litellm/files/main.pyindex 651d09c274d..666ad1f4aab 100644--- a/litellm/files/main.py+++ b/litellm/files/main.py@@ -16,7 +16,7 @@ import httpximport litellmfrom litellm import client, get_secret_strfrom litellm.llms.files_apis.azure import AzureOpenAIFilesAPI-from litellm.llms.OpenAI.openai import FileDeleted, FileObject, OpenAIFilesAPI+from 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 e7ce539e167..a4bdcadadd7 100644--- a/litellm/fine_tuning/main.py+++ b/litellm/fine_tuning/main.py@@ -19,11 +19,7 @@ import httpximport litellmfrom litellm._logging import verbose_loggerfrom litellm.llms.fine_tuning_apis.azure import AzureOpenAIFineTuningAPI-from litellm.llms.fine_tuning_apis.openai import (- FineTuningJob,- FineTuningJobCreate,- OpenAIFineTuningAPI,-)+from litellm.llms.openai.fine_tuning.handler import OpenAIFineTuningAPI, FineTuningJob, FineTuningJobCreatefrom litellm.llms.fine_tuning_apis.vertex_ai import VertexFineTuningAPIfrom litellm.secret_managers.main import get_secret_strfrom litellm.types.llms.openai import Hyperparametersdiff --git a/litellm/llms/azure/assistants.py b/litellm/llms/azure/assistants.pyindex a4dc9f0baeb..55f1e8a196c 100644--- a/litellm/llms/azure/assistants.py+++ b/litellm/llms/azure/assistants.py@@ -476,7 +476,7 @@ class AzureAssistantsAPI(BaseLLM):"""Here's an example:```- from litellm.llms.OpenAI.openai import OpenAIAssistantsAPI, MessageData+ from litellm.llms.openai.openai import OpenAIAssistantsAPI, MessageData# create threadmessage: MessageData = {"role": "user", "content": "Hey, how's it going?"}diff --git a/litellm/llms/azure/chat/o1_transformation.py b/litellm/llms/azure/chat/o1_transformation.pyindex e1677f68113..2ba8841d0ad 100644--- a/litellm/llms/azure/chat/o1_transformation.py+++ b/litellm/llms/azure/chat/o1_transformation.py@@ -18,7 +18,7 @@ from typing import Any, List, Optional, Unionimport litellmfrom litellm.types.llms.openai import AllMessageValues, ChatCompletionUserMessage-from ...OpenAI.chat.o1_transformation import OpenAIO1Config+from ...openai.chat.o1_transformation import OpenAIO1Configclass AzureOpenAIO1Config(OpenAIO1Config):diff --git a/litellm/llms/azure_ai/chat/handler.py b/litellm/llms/azure_ai/chat/handler.pyindex ce270d8f66f..711d31b2da6 100644--- a/litellm/llms/azure_ai/chat/handler.py+++ b/litellm/llms/azure_ai/chat/handler.py@@ -3,7 +3,7 @@ from typing import Any, Callable, List, Optional, Unionfrom httpx._config import Timeoutfrom litellm.llms.bedrock.chat.invoke_handler import MockResponseIterator-from litellm.llms.OpenAI.openai import OpenAIChatCompletion+from litellm.llms.openai.openai import OpenAIChatCompletionfrom litellm.types.utils import ModelResponsefrom litellm.utils import CustomStreamWrapperdiff --git a/litellm/llms/azure_ai/chat/transformation.py b/litellm/llms/azure_ai/chat/transformation.pyindex d8924fbb947..e32e8f1685f 100644--- a/litellm/llms/azure_ai/chat/transformation.py+++ b/litellm/llms/azure_ai/chat/transformation.py@@ -2,7 +2,7 @@ from typing import List, Optional, Tupleimport litellmfrom litellm._logging import verbose_logger-from litellm.llms.OpenAI.openai import OpenAIConfig+from litellm.llms.openai.openai import OpenAIConfigfrom litellm.llms.prompt_templates.common_utils import (_audio_or_image_in_message_content,convert_content_list_to_str,diff --git a/litellm/llms/azure_ai/embed/handler.py b/litellm/llms/azure_ai/embed/handler.pyindex 933be7eb810..5b86f0b255d 100644--- a/litellm/llms/azure_ai/embed/handler.py+++ b/litellm/llms/azure_ai/embed/handler.py@@ -16,7 +16,7 @@ from litellm.llms.custom_httpx.http_handler import (_get_httpx_client,get_async_httpx_client,)-from litellm.llms.OpenAI.openai import OpenAIChatCompletion+from litellm.llms.openai.openai import OpenAIChatCompletionfrom litellm.types.llms.azure_ai import ImageEmbeddingRequestfrom litellm.types.utils import Embedding, EmbeddingResponsefrom litellm.utils import convert_to_model_response_object, is_base64_encodeddiff --git a/litellm/llms/azure_text.py b/litellm/llms/azure_text.pyindex 9f52f214d70..f72accfb605 100644--- a/litellm/llms/azure_text.py+++ b/litellm/llms/azure_text.py@@ -20,8 +20,8 @@ from litellm.utils import ()from .base import BaseLLM-from .OpenAI.completion.handler import OpenAITextCompletion-from .OpenAI.completion.transformation import OpenAITextCompletionConfig+from .openai.completion.handler import OpenAITextCompletion+from .openai.completion.transformation import OpenAITextCompletionConfigfrom .prompt_templates.factory import custom_prompt, prompt_factoryopenai_text_completion_config = OpenAITextCompletionConfig()diff --git a/litellm/llms/databricks/chat/transformation.py b/litellm/llms/databricks/chat/transformation.pyindex 8a1b468a820..05470f14c82 100644--- a/litellm/llms/databricks/chat/transformation.py+++ b/litellm/llms/databricks/chat/transformation.py@@ -10,7 +10,7 @@ from pydantic import BaseModelfrom litellm.types.llms.openai import AllMessageValuesfrom litellm.types.utils import ProviderField-from ...OpenAI.chat.gpt_transformation import OpenAIGPTConfig+from ...openai.chat.gpt_transformation import OpenAIGPTConfigfrom ...prompt_templates.common_utils import (handle_messages_with_content_list_to_str_conversion,strip_name_from_messages,diff --git a/litellm/llms/deepseek/chat/transformation.py b/litellm/llms/deepseek/chat/transformation.pyindex 5785bdd5095..650bae07738 100644--- a/litellm/llms/deepseek/chat/transformation.py+++ b/litellm/llms/deepseek/chat/transformation.py@@ -12,7 +12,7 @@ from litellm.secret_managers.main import get_secret_strfrom litellm.types.llms.openai import AllMessageValues, ChatCompletionAssistantMessagefrom ....utils import _remove_additional_properties, _remove_strict_from_schema-from ...OpenAI.chat.gpt_transformation import OpenAIGPTConfig+from ...openai.chat.gpt_transformation import OpenAIGPTConfigfrom ...prompt_templates.common_utils import (handle_messages_with_content_list_to_str_conversion,)diff --git a/litellm/llms/fireworks_ai/chat/transformation.py b/litellm/llms/fireworks_ai/chat/transformation.pyindex d1a49b605fd..2d22a564d8a 100644--- a/litellm/llms/fireworks_ai/chat/transformation.py+++ b/litellm/llms/fireworks_ai/chat/transformation.py@@ -3,7 +3,7 @@ from typing import Literal, Optional, Tuple, Unionfrom litellm.secret_managers.main import get_secret_str-from ...OpenAI.chat.gpt_transformation import OpenAIGPTConfig+from ...openai.chat.gpt_transformation import OpenAIGPTConfigfrom ..embed.fireworks_ai_transformation import FireworksAIEmbeddingConfigdiff --git a/litellm/llms/groq/chat/transformation.py b/litellm/llms/groq/chat/transformation.pyindex a728d6e96d9..267d5276182 100644--- a/litellm/llms/groq/chat/transformation.py+++ b/litellm/llms/groq/chat/transformation.py@@ -17,7 +17,7 @@ from litellm.types.llms.openai import (ChatCompletionToolParamFunctionChunk,)-from ...OpenAI.chat.gpt_transformation import OpenAIGPTConfig+from ...openai.chat.gpt_transformation import OpenAIGPTConfigclass GroqChatConfig(OpenAIGPTConfig):diff --git a/litellm/llms/hosted_vllm/chat/transformation.py b/litellm/llms/hosted_vllm/chat/transformation.pyindex a1e2cc839eb..a48a845a25d 100644--- a/litellm/llms/hosted_vllm/chat/transformation.py+++ b/litellm/llms/hosted_vllm/chat/transformation.py@@ -12,7 +12,7 @@ from litellm.secret_managers.main import get_secret_strfrom litellm.types.llms.openai import AllMessageValues, ChatCompletionAssistantMessagefrom ....utils import _remove_additional_properties, _remove_strict_from_schema-from ...OpenAI.chat.gpt_transformation import OpenAIGPTConfig+from ...openai.chat.gpt_transformation import OpenAIGPTConfigclass HostedVLLMChatConfig(OpenAIGPTConfig):diff --git a/litellm/llms/lm_studio/chat/transformation.py b/litellm/llms/lm_studio/chat/transformation.pyindex 7d305f8ca49..62dd4dbd7b9 100644--- a/litellm/llms/lm_studio/chat/transformation.py+++ b/litellm/llms/lm_studio/chat/transformation.py@@ -12,7 +12,7 @@ from litellm.secret_managers.main import get_secret_strfrom litellm.types.llms.openai import AllMessageValues, ChatCompletionAssistantMessagefrom ....utils import _remove_additional_properties, _remove_strict_from_schema-from ...OpenAI.chat.gpt_transformation import OpenAIGPTConfig+from ...openai.chat.gpt_transformation import OpenAIGPTConfigclass LMStudioChatConfig(OpenAIGPTConfig):diff --git a/litellm/llms/OpenAI/chat/gpt_audio_transformation.py b/litellm/llms/openai/chat/gpt_audio_transformation.pysimilarity index 100%rename from litellm/llms/OpenAI/chat/gpt_audio_transformation.pyrename to litellm/llms/openai/chat/gpt_audio_transformation.pydiff --git a/litellm/llms/OpenAI/chat/gpt_transformation.py b/litellm/llms/openai/chat/gpt_transformation.pysimilarity index 100%rename from litellm/llms/OpenAI/chat/gpt_transformation.pyrename to litellm/llms/openai/chat/gpt_transformation.pydiff --git a/litellm/llms/OpenAI/chat/o1_handler.py b/litellm/llms/openai/chat/o1_handler.pysimilarity index 96%rename from litellm/llms/OpenAI/chat/o1_handler.pyrename to litellm/llms/openai/chat/o1_handler.pyindex 5ff53a896da..e8515ac2265 100644--- a/litellm/llms/OpenAI/chat/o1_handler.py+++ b/litellm/llms/openai/chat/o1_handler.py@@ -10,7 +10,7 @@ from typing import Any, Callable, List, Optional, Unionfrom httpx._config import Timeoutfrom litellm.llms.bedrock.chat.invoke_handler import MockResponseIterator-from litellm.llms.OpenAI.openai import OpenAIChatCompletion+from litellm.llms.openai.openai import OpenAIChatCompletionfrom litellm.types.utils import ModelResponsefrom litellm.utils import CustomStreamWrapperdiff --git a/litellm/llms/OpenAI/chat/o1_transformation.py b/litellm/llms/openai/chat/o1_transformation.pysimilarity index 100%rename from litellm/llms/OpenAI/chat/o1_transformation.pyrename to litellm/llms/openai/chat/o1_transformation.pydiff --git a/litellm/llms/OpenAI/common_utils.py b/litellm/llms/openai/common_utils.pysimilarity index 100%rename from litellm/llms/OpenAI/common_utils.pyrename to litellm/llms/openai/common_utils.pydiff --git a/litellm/llms/OpenAI/completion/handler.py b/litellm/llms/openai/completion/handler.pysimilarity index 100%rename from litellm/llms/OpenAI/completion/handler.pyrename to litellm/llms/openai/completion/handler.pydiff --git a/litellm/llms/OpenAI/completion/transformation.py b/litellm/llms/openai/completion/transformation.pysimilarity index 100%rename from litellm/llms/OpenAI/completion/transformation.pyrename to litellm/llms/openai/completion/transformation.pydiff --git a/litellm/llms/OpenAI/completion/utils.py b/litellm/llms/openai/completion/utils.pysimilarity index 100%rename from litellm/llms/OpenAI/completion/utils.pyrename to litellm/llms/openai/completion/utils.pydiff --git a/litellm/llms/OpenAI/cost_calculation.py b/litellm/llms/openai/cost_calculation.pysimilarity index 100%rename from litellm/llms/OpenAI/cost_calculation.pyrename to litellm/llms/openai/cost_calculation.pydiff --git a/litellm/llms/fine_tuning_apis/openai.py b/litellm/llms/openai/fine_tuning/handler.pysimilarity index 98%rename from litellm/llms/fine_tuning_apis/openai.pyrename to litellm/llms/openai/fine_tuning/handler.pyindex 7ce8c353670..00099608c14 100644--- a/litellm/llms/fine_tuning_apis/openai.py+++ b/litellm/llms/openai/fine_tuning/handler.py@@ -6,11 +6,10 @@ from openai.pagination import AsyncCursorPagefrom openai.types.fine_tuning import FineTuningJobfrom litellm._logging import verbose_logger-from litellm.llms.base import BaseLLMfrom litellm.types.llms.openai import FineTuningJobCreate-class OpenAIFineTuningAPI(BaseLLM):+class OpenAIFineTuningAPI:"""OpenAI methods to support for batches"""diff --git a/litellm/llms/OpenAI/openai.py b/litellm/llms/openai/openai.pysimilarity index 100%rename from litellm/llms/OpenAI/openai.pyrename to litellm/llms/openai/openai.pydiff --git a/litellm/llms/OpenAI/realtime/handler.py b/litellm/llms/openai/realtime/handler.pysimilarity index 100%rename from litellm/llms/OpenAI/realtime/handler.pyrename to litellm/llms/openai/realtime/handler.pydiff --git a/litellm/llms/OpenAI/audio_transcriptions.py b/litellm/llms/openai/transcriptions/handler.pysimilarity index 99%rename from litellm/llms/OpenAI/audio_transcriptions.pyrename to litellm/llms/openai/transcriptions/handler.pyindex d4523754c6c..9e779c683dc 100644--- a/litellm/llms/OpenAI/audio_transcriptions.py+++ b/litellm/llms/openai/transcriptions/handler.py@@ -9,8 +9,7 @@ from litellm.litellm_core_utils.audio_utils.utils import get_audio_file_namefrom litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObjfrom litellm.types.utils import FileTypesfrom litellm.utils import TranscriptionResponse, convert_to_model_response_object--from .openai import OpenAIChatCompletion+from ..openai import OpenAIChatCompletionclass OpenAIAudioTranscription(OpenAIChatCompletion):diff --git a/litellm/llms/openai_like/chat/transformation.py b/litellm/llms/openai_like/chat/transformation.pyindex 2be71596aae..d60c70a378b 100644--- a/litellm/llms/openai_like/chat/transformation.py+++ b/litellm/llms/openai_like/chat/transformation.py@@ -14,7 +14,7 @@ from litellm.types.llms.openai import AllMessageValues, ChatCompletionAssistantMfrom litellm.types.utils import ModelResponsefrom ....utils import _remove_additional_properties, _remove_strict_from_schema-from ...OpenAI.chat.gpt_transformation import OpenAIGPTConfig+from ...openai.chat.gpt_transformation import OpenAIGPTConfigclass OpenAILikeChatConfig(OpenAIGPTConfig):diff --git a/litellm/llms/perplexity/chat/transformation.py b/litellm/llms/perplexity/chat/transformation.pyindex 6d17de76693..6b709e7fc30 100644--- a/litellm/llms/perplexity/chat/transformation.py+++ b/litellm/llms/perplexity/chat/transformation.py@@ -12,7 +12,7 @@ from litellm.secret_managers.main import get_secret_strfrom litellm.types.llms.openai import AllMessageValues, ChatCompletionAssistantMessagefrom ....utils import _remove_additional_properties, _remove_strict_from_schema-from ...OpenAI.chat.gpt_transformation import OpenAIGPTConfig+from ...openai.chat.gpt_transformation import OpenAIGPTConfigclass PerplexityChatConfig(OpenAIGPTConfig):diff --git a/litellm/llms/together_ai/chat.py b/litellm/llms/together_ai/chat.pyindex 54b7e486809..51933196ed5 100644--- a/litellm/llms/together_ai/chat.py+++ b/litellm/llms/together_ai/chat.py@@ -10,7 +10,7 @@ from typing import Optionalfrom litellm import get_model_info, verbose_logger-from ..OpenAI.chat.gpt_transformation import OpenAIGPTConfig+from ..openai.chat.gpt_transformation import OpenAIGPTConfigclass TogetherAIConfig(OpenAIGPTConfig):diff --git a/litellm/llms/together_ai/completion/handler.py b/litellm/llms/together_ai/completion/handler.pyindex fac87944733..2574cb871ab 100644--- a/litellm/llms/together_ai/completion/handler.py+++ b/litellm/llms/together_ai/completion/handler.py@@ -12,7 +12,7 @@ from litellm.litellm_core_utils.litellm_logging import Loggingfrom litellm.types.llms.openai import AllMessageValues, OpenAITextCompletionUserMessagefrom litellm.utils import ModelResponse-from ...OpenAI.completion.handler import OpenAITextCompletion+from ...openai.completion.handler import OpenAITextCompletionfrom .transformation import TogetherAITextCompletionConfigtogether_ai_text_completion_global_config = TogetherAITextCompletionConfig()diff --git a/litellm/llms/together_ai/completion/transformation.py b/litellm/llms/together_ai/completion/transformation.pyindex 6ec855de8ba..ec3523932bb 100644--- a/litellm/llms/together_ai/completion/transformation.py+++ b/litellm/llms/together_ai/completion/transformation.py@@ -8,14 +8,14 @@ Docs: https://docs.together.ai/reference/completions-1from typing import List, Union, cast-from litellm.llms.OpenAI.completion.utils import is_tokens_or_list_of_tokens+from litellm.llms.openai.completion.utils import is_tokens_or_list_of_tokensfrom litellm.types.llms.openai import (AllMessageValues,AllPromptValues,OpenAITextCompletionUserMessage,)-from ...OpenAI.completion.transformation import OpenAITextCompletionConfig+from ...openai.completion.transformation import OpenAITextCompletionConfigclass TogetherAITextCompletionConfig(OpenAITextCompletionConfig):diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/context_caching/vertex_ai_context_caching.py b/litellm/llms/vertex_ai_and_google_ai_studio/context_caching/vertex_ai_context_caching.pyindex b9be8a3bd56..991d29d3404 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/context_caching/vertex_ai_context_caching.py+++ b/litellm/llms/vertex_ai_and_google_ai_studio/context_caching/vertex_ai_context_caching.py@@ -11,7 +11,7 @@ from litellm.llms.custom_httpx.http_handler import (HTTPHandler,get_async_httpx_client,)-from litellm.llms.OpenAI.openai import AllMessageValues+from litellm.llms.openai.openai import AllMessageValuesfrom litellm.types.llms.vertex_ai import (CachedContentListAllResponseBody,RequestBody,diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/text_to_speech/text_to_speech_handler.py b/litellm/llms/vertex_ai_and_google_ai_studio/text_to_speech/text_to_speech_handler.pyindex 170c2765dd2..0cfe5cbe254 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/text_to_speech/text_to_speech_handler.py+++ b/litellm/llms/vertex_ai_and_google_ai_studio/text_to_speech/text_to_speech_handler.py@@ -13,7 +13,7 @@ from litellm.llms.custom_httpx.http_handler import (_get_httpx_client,get_async_httpx_client,)-from litellm.llms.OpenAI.openai import HttpxBinaryResponseContent+from litellm.llms.openai.openai import HttpxBinaryResponseContentfrom litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (VertexLLM,)diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/main.py b/litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/main.pyindex fa2f9f7ff14..541f7937d85 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/main.py+++ b/litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/main.py@@ -91,7 +91,7 @@ class VertexAIPartnerModels(VertexBase):from google.cloud import aiplatformfrom litellm.llms.anthropic.chat import AnthropicChatCompletion- from litellm.llms.OpenAI.openai import OpenAIChatCompletion+ from litellm.llms.openai.openai import OpenAIChatCompletionfrom litellm.llms.openai_like.chat.handler import OpenAILikeChatHandlerfrom litellm.llms.text_completion_codestral import CodestralTextCompletionfrom litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_model_garden/main.py b/litellm/llms/vertex_ai_and_google_ai_studio/vertex_model_garden/main.pyindex 9dfc3efcc95..99aabea5ff2 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_model_garden/main.py+++ b/litellm/llms/vertex_ai_and_google_ai_studio/vertex_model_garden/main.py@@ -76,7 +76,7 @@ class VertexAIModelGardenModels(VertexBase):from google.cloud import aiplatformfrom litellm.llms.anthropic.chat import AnthropicChatCompletion- from litellm.llms.OpenAI.openai import OpenAIChatCompletion+ from litellm.llms.openai.openai import OpenAIChatCompletionfrom litellm.llms.openai_like.chat.handler import OpenAILikeChatHandlerfrom litellm.llms.text_completion_codestral import CodestralTextCompletionfrom litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (diff --git a/litellm/llms/watsonx/chat/transformation.py b/litellm/llms/watsonx/chat/transformation.pyindex 13fd516037a..6e9dbe733c1 100644--- a/litellm/llms/watsonx/chat/transformation.py+++ b/litellm/llms/watsonx/chat/transformation.py@@ -14,7 +14,7 @@ from litellm.secret_managers.main import get_secret_strfrom litellm.types.llms.openai import AllMessageValues, ChatCompletionAssistantMessagefrom ....utils import _remove_additional_properties, _remove_strict_from_schema-from ...OpenAI.chat.gpt_transformation import OpenAIGPTConfig+from ...openai.chat.gpt_transformation import OpenAIGPTConfigclass IBMWatsonXChatConfig(OpenAIGPTConfig):diff --git a/litellm/llms/xai/chat/transformation.py b/litellm/llms/xai/chat/transformation.pyindex ac3c4236511..64dd52bd11f 100644--- a/litellm/llms/xai/chat/transformation.py+++ b/litellm/llms/xai/chat/transformation.py@@ -3,7 +3,7 @@ from typing import Literal, Optional, Tuple, Unionfrom litellm.secret_managers.main import get_secret_str-from ...OpenAI.chat.gpt_transformation import OpenAIGPTConfig+from ...openai.chat.gpt_transformation import OpenAIGPTConfigXAI_API_BASE = "https://api.x.ai/v1"diff --git a/litellm/main.py b/litellm/main.pyindex e61fb2385e8..66f91df3314 100644--- a/litellm/main.py+++ b/litellm/main.py@@ -115,10 +115,10 @@ from .llms.databricks.chat.handler import DatabricksChatCompletionfrom .llms.databricks.embed.handler import DatabricksEmbeddingHandlerfrom .llms.groq.chat.handler import GroqChatCompletionfrom .llms.huggingface_restapi import Huggingface-from .llms.OpenAI.audio_transcriptions import OpenAIAudioTranscription-from .llms.OpenAI.chat.o1_handler import OpenAIO1ChatCompletion-from .llms.OpenAI.completion.handler import OpenAITextCompletion-from .llms.OpenAI.openai import OpenAIChatCompletion+from .llms.openai.transcriptions.handler import OpenAIAudioTranscription+from .llms.openai.chat.o1_handler import OpenAIO1ChatCompletion+from .llms.openai.completion.handler import OpenAITextCompletion+from .llms.openai.openai import OpenAIChatCompletionfrom .llms.openai_like.embedding.handler import OpenAILikeEmbeddingHandlerfrom .llms.predibase import PredibaseChatCompletionfrom .llms.prompt_templates.common_utils import get_completion_messagesdiff --git a/litellm/realtime_api/main.py b/litellm/realtime_api/main.pyindex b17662c62cd..3d17c4819a7 100644--- a/litellm/realtime_api/main.py+++ b/litellm/realtime_api/main.py@@ -10,7 +10,7 @@ from litellm.types.router import GenericLiteLLMParamsfrom ..litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingfrom ..llms.azure.realtime.handler import AzureOpenAIRealtime-from ..llms.OpenAI.realtime.handler import OpenAIRealtime+from ..llms.openai.realtime.handler import OpenAIRealtimefrom ..utils import client as wrapper_clientazure_realtime = AzureOpenAIRealtime()diff --git a/tests/local_testing/test_assistants.py b/tests/local_testing/test_assistants.pyindex 266bf65f4d7..cf6d88b23af 100644--- a/tests/local_testing/test_assistants.py+++ b/tests/local_testing/test_assistants.py@@ -20,15 +20,15 @@ from typing_extensions import overrideimport litellmfrom litellm import create_thread, get_thread-from litellm.llms.OpenAI.openai import (+from litellm.llms.openai.openai import (AssistantEventHandler,AsyncAssistantEventHandler,AsyncCursorPage,MessageData,OpenAIAssistantsAPI,)-from litellm.llms.OpenAI.openai import OpenAIMessage as Message-from litellm.llms.OpenAI.openai import SyncCursorPage, Thread+from litellm.llms.openai.openai import OpenAIMessage as Message+from litellm.llms.openai.openai import SyncCursorPage, Thread"""V0 Scope:diff --git a/tests/local_testing/test_audio_speech.py b/tests/local_testing/test_audio_speech.pyindex ac37b1b0ce3..9c96a3727fd 100644--- a/tests/local_testing/test_audio_speech.py+++ b/tests/local_testing/test_audio_speech.py@@ -60,7 +60,7 @@ async def test_audio_speech_litellm(sync_mode, model, api_base, api_key):optional_params={},)- from litellm.llms.OpenAI.openai import HttpxBinaryResponseContent+ from litellm.llms.openai.openai import HttpxBinaryResponseContentassert isinstance(response, HttpxBinaryResponseContent)else:@@ -78,7 +78,7 @@ async def test_audio_speech_litellm(sync_mode, model, api_base, api_key):optional_params={},)- from litellm.llms.OpenAI.openai import HttpxBinaryResponseContent+ from litellm.llms.openai.openai import HttpxBinaryResponseContentassert isinstance(response, HttpxBinaryResponseContent)@@ -109,7 +109,7 @@ async def test_audio_speech_litellm_vertex(sync_mode):from types import SimpleNamespace- from litellm.llms.OpenAI.openai import HttpxBinaryResponseContent+ from litellm.llms.openai.openai import HttpxBinaryResponseContentresponse.stream_to_file(speech_file_path)diff --git a/tests/local_testing/test_config.py b/tests/local_testing/test_config.pyindex 3d73ad000a4..353fcd28eb5 100644--- a/tests/local_testing/test_config.py+++ b/tests/local_testing/test_config.py@@ -294,7 +294,7 @@ def test_provider_config_manager():from litellm import LITELLM_CHAT_PROVIDERS, LlmProvidersfrom litellm.utils import ProviderConfigManagerfrom litellm.llms.base_llm.transformation import BaseConfig- from litellm.llms.OpenAI.chat.gpt_transformation import OpenAIGPTConfig+ from litellm.llms.openai.chat.gpt_transformation import OpenAIGPTConfigfor provider in LITELLM_CHAT_PROVIDERS:if provider == LlmProviders.TRITON or provider == LlmProviders.PREDIBASE:diff --git a/tests/router_unit_tests/test_router_endpoints.py b/tests/router_unit_tests/test_router_endpoints.pyindex 19949ddba32..0d13b9c6107 100644--- a/tests/router_unit_tests/test_router_endpoints.py+++ b/tests/router_unit_tests/test_router_endpoints.py@@ -178,7 +178,7 @@ async def test_audio_speech_router(mode):optional_params={},)- from litellm.llms.OpenAI.openai import HttpxBinaryResponseContent+ from litellm.llms.openai.openai import HttpxBinaryResponseContentassert isinstance(response, HttpxBinaryResponseContent)