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 - use `vertex_ai/` as folder name for vertexAI (#7166)
Ishaan Jaff21003c43378a
diff --git a/litellm/__init__.py b/litellm/__init__.pyindex c8fa8f3c363..c53fddedf8d 100644--- a/litellm/__init__.py+++ b/litellm/__init__.py@@ -1085,7 +1085,7 @@ from .llms.deprecated_providers.palm import (from .llms.nlp_cloud.chat.handler import NLPCloudConfigfrom .llms.aleph_alpha import AlephAlphaConfigfrom .llms.petals import PetalsConfig-from .llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+from .llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (VertexGeminiConfig,GoogleAIStudioGeminiConfig,VertexAIConfig,@@ -1093,19 +1093,19 @@ from .llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gem)-from .llms.vertex_ai_and_google_ai_studio.vertex_embeddings.transformation import (+from .llms.vertex_ai.vertex_embeddings.transformation import (VertexAITextEmbeddingConfig,)vertexAITextEmbeddingConfig = VertexAITextEmbeddingConfig()-from .llms.vertex_ai_and_google_ai_studio.vertex_ai_partner_models.anthropic.transformation import (+from .llms.vertex_ai.vertex_ai_partner_models.anthropic.transformation import (VertexAIAnthropicConfig,)-from .llms.vertex_ai_and_google_ai_studio.vertex_ai_partner_models.llama3.transformation import (+from .llms.vertex_ai.vertex_ai_partner_models.llama3.transformation import (VertexAILlama3Config,)-from .llms.vertex_ai_and_google_ai_studio.vertex_ai_partner_models.ai21.transformation import (+from .llms.vertex_ai.vertex_ai_partner_models.ai21.transformation import (VertexAIAi21Config,)diff --git a/litellm/batches/main.py b/litellm/batches/main.pyindex 23673cd6d32..555ec62ad58 100644--- a/litellm/batches/main.py+++ b/litellm/batches/main.py@@ -22,7 +22,7 @@ import litellmfrom litellm import clientfrom litellm.llms.azure.azure import AzureBatchesAPIfrom litellm.llms.openai.openai import OpenAIBatchesAPI-from litellm.llms.vertex_ai_and_google_ai_studio.batches.handler import (+from litellm.llms.vertex_ai.batches.handler import (VertexAIBatchPrediction,)from litellm.secret_managers.main import get_secret, get_secret_strdiff --git a/litellm/cost_calculator.py b/litellm/cost_calculator.pyindex 943fcf38b73..4f6bf5c19c4 100644--- a/litellm/cost_calculator.py+++ b/litellm/cost_calculator.py@@ -46,7 +46,7 @@ from litellm.llms.openai.cost_calculation import (from litellm.llms.openai.cost_calculation import cost_per_token as openai_cost_per_tokenfrom litellm.llms.openai.cost_calculation import cost_router as openai_cost_routerfrom litellm.llms.together_ai.cost_calculator import get_model_params_and_category-from litellm.llms.vertex_ai_and_google_ai_studio.image_generation.cost_calculator import (+from litellm.llms.vertex_ai.image_generation.cost_calculator import (cost_calculator as vertex_ai_image_cost_calculator,)from litellm.types.llms.openai import HttpxBinaryResponseContentdiff --git a/litellm/files/main.py b/litellm/files/main.pyindex fbdf6206d27..8637c624c08 100644--- a/litellm/files/main.py+++ b/litellm/files/main.py@@ -17,7 +17,7 @@ import litellmfrom litellm import client, get_secret_strfrom litellm.llms.azure.files.handler import AzureOpenAIFilesAPIfrom litellm.llms.openai.openai import FileDeleted, FileObject, OpenAIFilesAPI-from litellm.llms.vertex_ai_and_google_ai_studio.files.handler import (+from litellm.llms.vertex_ai.files.handler import (VertexAIFilesHandler,)from litellm.types.llms.openai import (diff --git a/litellm/fine_tuning/main.py b/litellm/fine_tuning/main.pyindex 2d97eb21f4e..e5620a40e91 100644--- a/litellm/fine_tuning/main.py+++ b/litellm/fine_tuning/main.py@@ -20,7 +20,7 @@ import litellmfrom litellm._logging import verbose_loggerfrom litellm.llms.azure.fine_tuning.handler import AzureOpenAIFineTuningAPIfrom litellm.llms.openai.fine_tuning.handler import OpenAIFineTuningAPI, FineTuningJob, FineTuningJobCreate-from litellm.llms.vertex_ai_and_google_ai_studio.fine_tuning.handler import VertexFineTuningAPI+from litellm.llms.vertex_ai.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/integrations/gcs_bucket/gcs_bucket.py b/litellm/integrations/gcs_bucket/gcs_bucket.pyindex 0cbd61ffa1c..b9de271b598 100644--- a/litellm/integrations/gcs_bucket/gcs_bucket.py+++ b/litellm/integrations/gcs_bucket/gcs_bucket.py@@ -24,7 +24,7 @@ from litellm.types.utils import ()if TYPE_CHECKING:- from litellm.llms.vertex_ai_and_google_ai_studio.vertex_llm_base import VertexBase+ from litellm.llms.vertex_ai.vertex_llm_base import VertexBaseelse:VertexBase = Anydiff --git a/litellm/integrations/gcs_bucket/gcs_bucket_base.py b/litellm/integrations/gcs_bucket/gcs_bucket_base.pyindex 79dcd9cefc9..3bec1c6b9fe 100644--- a/litellm/integrations/gcs_bucket/gcs_bucket_base.py+++ b/litellm/integrations/gcs_bucket/gcs_bucket_base.py@@ -22,7 +22,7 @@ from litellm.types.utils import ()if TYPE_CHECKING:- from litellm.llms.vertex_ai_and_google_ai_studio.vertex_llm_base import VertexBase+ from litellm.llms.vertex_ai.vertex_llm_base import VertexBaseelse:VertexBase = AnyIAM_AUTH_KEY = "IAM_AUTH"@@ -190,7 +190,7 @@ class GCSBucketBase(CustomBatchLogger):This function is used to get the Vertex instance for the GCS Bucket Logger.It checks if the Vertex instance is already created and cached, if not it creates a new instance and caches it."""- from litellm.llms.vertex_ai_and_google_ai_studio.vertex_llm_base import (+ from litellm.llms.vertex_ai.vertex_llm_base import (VertexBase,)diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/batches/Readme.md b/litellm/llms/vertex_ai/batches/Readme.mdsimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/batches/Readme.mdrename to litellm/llms/vertex_ai/batches/Readme.mddiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/batches/handler.py b/litellm/llms/vertex_ai/batches/handler.pysimilarity index 97%rename from litellm/llms/vertex_ai_and_google_ai_studio/batches/handler.pyrename to litellm/llms/vertex_ai/batches/handler.pyindex 32c1b35ef27..8d4f215dbcb 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/batches/handler.py+++ b/litellm/llms/vertex_ai/batches/handler.py@@ -10,7 +10,7 @@ from litellm.llms.custom_httpx.http_handler import (_get_httpx_client,get_async_httpx_client,)-from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (VertexAIError,VertexLLM,)diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/batches/transformation.py b/litellm/llms/vertex_ai/batches/transformation.pysimilarity index 98%rename from litellm/llms/vertex_ai_and_google_ai_studio/batches/transformation.pyrename to litellm/llms/vertex_ai/batches/transformation.pyindex 0edacc5c773..157f6094ade 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/batches/transformation.py+++ b/litellm/llms/vertex_ai/batches/transformation.py@@ -1,7 +1,7 @@import uuidfrom typing import Any, Dict, Literal-from litellm.llms.vertex_ai_and_google_ai_studio.common_utils import (+from litellm.llms.vertex_ai.common_utils import (_convert_vertex_datetime_to_openai_datetime,)from litellm.types.llms.openai import Batch, BatchJobStatus, CreateBatchRequestdiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/common_utils.py b/litellm/llms/vertex_ai/common_utils.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/common_utils.pyrename to litellm/llms/vertex_ai/common_utils.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/context_caching/transformation.py b/litellm/llms/vertex_ai/context_caching/transformation.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/context_caching/transformation.pyrename to litellm/llms/vertex_ai/context_caching/transformation.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/context_caching/vertex_ai_context_caching.py b/litellm/llms/vertex_ai/context_caching/vertex_ai_context_caching.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/context_caching/vertex_ai_context_caching.pyrename to litellm/llms/vertex_ai/context_caching/vertex_ai_context_caching.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/files/handler.py b/litellm/llms/vertex_ai/files/handler.pysimilarity index 95%rename from litellm/llms/vertex_ai_and_google_ai_studio/files/handler.pyrename to litellm/llms/vertex_ai/files/handler.pyindex abcddc7e43a..9b2cf9c11d6 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/files/handler.py+++ b/litellm/llms/vertex_ai/files/handler.py@@ -15,10 +15,10 @@ from litellm.llms.custom_httpx.http_handler import (_get_httpx_client,get_async_httpx_client,)-from litellm.llms.vertex_ai_and_google_ai_studio.common_utils import (+from litellm.llms.vertex_ai.common_utils import (_convert_vertex_datetime_to_openai_datetime,)-from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (VertexAIError,VertexLLM,)diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/files/transformation.py b/litellm/llms/vertex_ai/files/transformation.pysimilarity index 96%rename from litellm/llms/vertex_ai_and_google_ai_studio/files/transformation.pyrename to litellm/llms/vertex_ai/files/transformation.pyindex 9d41c8cc686..0bffa363cd8 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/files/transformation.py+++ b/litellm/llms/vertex_ai/files/transformation.py@@ -2,13 +2,13 @@ import jsonimport uuidfrom typing import Any, Dict, List, Optional, Tuple, Union-from litellm.llms.vertex_ai_and_google_ai_studio.common_utils import (+from litellm.llms.vertex_ai.common_utils import (_convert_vertex_datetime_to_openai_datetime,)-from litellm.llms.vertex_ai_and_google_ai_studio.gemini.transformation import (+from litellm.llms.vertex_ai.gemini.transformation import (_transform_request_body,)-from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (VertexGeminiConfig,)from litellm.types.llms.openai import (diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/fine_tuning/handler.py b/litellm/llms/vertex_ai/fine_tuning/handler.pysimilarity index 99%rename from litellm/llms/vertex_ai_and_google_ai_studio/fine_tuning/handler.pyrename to litellm/llms/vertex_ai/fine_tuning/handler.pyindex f82d781c55a..230c9d766fa 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/fine_tuning/handler.py+++ b/litellm/llms/vertex_ai/fine_tuning/handler.py@@ -12,7 +12,7 @@ from litellm.llms.custom_httpx.http_handler import (HTTPHandler,get_async_httpx_client,)-from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (VertexLLM,)from litellm.types.llms.openai import FineTuningJobCreatediff --git a/litellm/llms/vertex_ai_and_google_ai_studio/gemini/transformation.py b/litellm/llms/vertex_ai/gemini/transformation.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/gemini/transformation.pyrename to litellm/llms/vertex_ai/gemini/transformation.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/gemini/vertex_and_google_ai_studio_gemini.py b/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/gemini/vertex_and_google_ai_studio_gemini.pyrename to litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/gemini_embeddings/batch_embed_content_handler.py b/litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_handler.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/gemini_embeddings/batch_embed_content_handler.pyrename to litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_handler.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/gemini_embeddings/batch_embed_content_transformation.py b/litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_transformation.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/gemini_embeddings/batch_embed_content_transformation.pyrename to litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_transformation.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/image_generation/cost_calculator.py b/litellm/llms/vertex_ai/image_generation/cost_calculator.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/image_generation/cost_calculator.pyrename to litellm/llms/vertex_ai/image_generation/cost_calculator.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/image_generation/image_generation_handler.py b/litellm/llms/vertex_ai/image_generation/image_generation_handler.pysimilarity index 98%rename from litellm/llms/vertex_ai_and_google_ai_studio/image_generation/image_generation_handler.pyrename to litellm/llms/vertex_ai/image_generation/image_generation_handler.pyindex 6cb5771e6ef..7c288da70b7 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/image_generation/image_generation_handler.py+++ b/litellm/llms/vertex_ai/image_generation/image_generation_handler.py@@ -10,7 +10,7 @@ from litellm.llms.custom_httpx.http_handler import (HTTPHandler,get_async_httpx_client,)-from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (VertexLLM,)diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/multimodal_embeddings/embedding_handler.py b/litellm/llms/vertex_ai/multimodal_embeddings/embedding_handler.pysimilarity index 99%rename from litellm/llms/vertex_ai_and_google_ai_studio/multimodal_embeddings/embedding_handler.pyrename to litellm/llms/vertex_ai/multimodal_embeddings/embedding_handler.pyindex 27b77fdd95e..81708530a2c 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/multimodal_embeddings/embedding_handler.py+++ b/litellm/llms/vertex_ai/multimodal_embeddings/embedding_handler.py@@ -10,7 +10,7 @@ from litellm.llms.custom_httpx.http_handler import (HTTPHandler,get_async_httpx_client,)-from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (VertexAIError,VertexLLM,)diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/text_to_speech/text_to_speech_handler.py b/litellm/llms/vertex_ai/text_to_speech/text_to_speech_handler.pysimilarity index 98%rename from litellm/llms/vertex_ai_and_google_ai_studio/text_to_speech/text_to_speech_handler.pyrename to litellm/llms/vertex_ai/text_to_speech/text_to_speech_handler.pyindex 0cfe5cbe254..18ebaee1eda 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/text_to_speech/text_to_speech_handler.py+++ b/litellm/llms/vertex_ai/text_to_speech/text_to_speech_handler.py@@ -14,7 +14,7 @@ from litellm.llms.custom_httpx.http_handler import (get_async_httpx_client,)from litellm.llms.openai.openai import HttpxBinaryResponseContent-from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (VertexLLM,)diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_non_gemini.py b/litellm/llms/vertex_ai/vertex_ai_non_gemini.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_non_gemini.pyrename to litellm/llms/vertex_ai/vertex_ai_non_gemini.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/ai21/transformation.py b/litellm/llms/vertex_ai/vertex_ai_partner_models/ai21/transformation.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/ai21/transformation.pyrename to litellm/llms/vertex_ai/vertex_ai_partner_models/ai21/transformation.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/anthropic/transformation.py b/litellm/llms/vertex_ai/vertex_ai_partner_models/anthropic/transformation.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/anthropic/transformation.pyrename to litellm/llms/vertex_ai/vertex_ai_partner_models/anthropic/transformation.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/llama3/transformation.py b/litellm/llms/vertex_ai/vertex_ai_partner_models/llama3/transformation.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/llama3/transformation.pyrename to litellm/llms/vertex_ai/vertex_ai_partner_models/llama3/transformation.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/main.py b/litellm/llms/vertex_ai/vertex_ai_partner_models/main.pysimilarity index 98%rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/main.pyrename to litellm/llms/vertex_ai/vertex_ai_partner_models/main.pyindex 541f7937d85..947a91f5a79 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/main.py+++ b/litellm/llms/vertex_ai/vertex_ai_partner_models/main.py@@ -94,7 +94,7 @@ class VertexAIPartnerModels(VertexBase):from litellm.llms.openai.openai import OpenAIChatCompletionfrom litellm.llms.openai_like.chat.handler import OpenAILikeChatHandlerfrom litellm.llms.text_completion_codestral import CodestralTextCompletion- from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+ from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (VertexLLM,)except Exception:diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_embeddings/embedding_handler.py b/litellm/llms/vertex_ai/vertex_embeddings/embedding_handler.pysimilarity index 98%rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_embeddings/embedding_handler.pyrename to litellm/llms/vertex_ai/vertex_embeddings/embedding_handler.pyindex 26741ff4f2a..d3621f411be 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_embeddings/embedding_handler.py+++ b/litellm/llms/vertex_ai/vertex_embeddings/embedding_handler.py@@ -15,10 +15,10 @@ from litellm.llms.custom_httpx.http_handler import (_get_httpx_client,get_async_httpx_client,)-from litellm.llms.vertex_ai_and_google_ai_studio.vertex_ai_non_gemini import (+from litellm.llms.vertex_ai.vertex_ai_non_gemini import (VertexAIError,)-from litellm.llms.vertex_ai_and_google_ai_studio.vertex_llm_base import VertexBase+from litellm.llms.vertex_ai.vertex_llm_base import VertexBasefrom litellm.types.llms.vertex_ai import *from litellm.utils import Usagediff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_embeddings/transformation.py b/litellm/llms/vertex_ai/vertex_embeddings/transformation.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_embeddings/transformation.pyrename to litellm/llms/vertex_ai/vertex_embeddings/transformation.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_embeddings/types.py b/litellm/llms/vertex_ai/vertex_embeddings/types.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_embeddings/types.pyrename to litellm/llms/vertex_ai/vertex_embeddings/types.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_llm_base.py b/litellm/llms/vertex_ai/vertex_llm_base.pysimilarity index 100%rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_llm_base.pyrename to litellm/llms/vertex_ai/vertex_llm_base.pydiff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_model_garden/main.py b/litellm/llms/vertex_ai/vertex_model_garden/main.pysimilarity index 97%rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_model_garden/main.pyrename to litellm/llms/vertex_ai/vertex_model_garden/main.pyindex 99aabea5ff2..75db56dc6cd 100644--- a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_model_garden/main.py+++ b/litellm/llms/vertex_ai/vertex_model_garden/main.py@@ -79,7 +79,7 @@ class VertexAIModelGardenModels(VertexBase):from litellm.llms.openai.openai import OpenAIChatCompletionfrom litellm.llms.openai_like.chat.handler import OpenAILikeChatHandlerfrom litellm.llms.text_completion_codestral import CodestralTextCompletion- from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+ from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (VertexLLM,)except Exception:diff --git a/litellm/main.py b/litellm/main.pyindex e524a3b73ce..43158331d3c 100644--- a/litellm/main.py+++ b/litellm/main.py@@ -125,29 +125,29 @@ from .llms.replicate.chat.handler import completion as replicate_chat_completionfrom .llms.text_completion_codestral import CodestralTextCompletionfrom .llms.together_ai.completion.handler import TogetherAITextCompletionfrom .llms.triton import TritonChatCompletion-from .llms.vertex_ai_and_google_ai_studio import vertex_ai_non_gemini-from .llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+from .llms.vertex_ai import vertex_ai_non_gemini+from .llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (VertexLLM,)-from .llms.vertex_ai_and_google_ai_studio.gemini_embeddings.batch_embed_content_handler import (+from .llms.vertex_ai.gemini_embeddings.batch_embed_content_handler import (GoogleBatchEmbeddings,)-from .llms.vertex_ai_and_google_ai_studio.image_generation.image_generation_handler import (+from .llms.vertex_ai.image_generation.image_generation_handler import (VertexImageGeneration,)-from .llms.vertex_ai_and_google_ai_studio.multimodal_embeddings.embedding_handler import (+from .llms.vertex_ai.multimodal_embeddings.embedding_handler import (VertexMultimodalEmbedding,)-from .llms.vertex_ai_and_google_ai_studio.text_to_speech.text_to_speech_handler import (+from .llms.vertex_ai.text_to_speech.text_to_speech_handler import (VertexTextToSpeechAPI,)-from .llms.vertex_ai_and_google_ai_studio.vertex_ai_partner_models.main import (+from .llms.vertex_ai.vertex_ai_partner_models.main import (VertexAIPartnerModels,)-from .llms.vertex_ai_and_google_ai_studio.vertex_embeddings.embedding_handler import (+from .llms.vertex_ai.vertex_embeddings.embedding_handler import (VertexEmbedding,)-from .llms.vertex_ai_and_google_ai_studio.vertex_model_garden.main import (+from .llms.vertex_ai.vertex_model_garden.main import (VertexAIModelGardenModels,)from .llms.vllm.completion import handler as vllm_handlerdiff --git a/litellm/proxy/pass_through_endpoints/llm_provider_handlers/vertex_passthrough_logging_handler.py b/litellm/proxy/pass_through_endpoints/llm_provider_handlers/vertex_passthrough_logging_handler.pyindex 0d2b2f9afe1..a6c9046b327 100644--- a/litellm/proxy/pass_through_endpoints/llm_provider_handlers/vertex_passthrough_logging_handler.py+++ b/litellm/proxy/pass_through_endpoints/llm_provider_handlers/vertex_passthrough_logging_handler.py@@ -11,7 +11,7 @@ from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingfrom litellm.litellm_core_utils.litellm_logging import (get_standard_logging_object_payload,)-from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (ModelResponseIterator as VertexModelResponseIterator,)from litellm.proxy._types import PassThroughEndpointLoggingTypedDict@@ -71,7 +71,7 @@ class VertexPassthroughLoggingHandler:}elif "predict" in url_route:- from litellm.llms.vertex_ai_and_google_ai_studio.image_generation.image_generation_handler import (+ from litellm.llms.vertex_ai.image_generation.image_generation_handler import (VertexImageGeneration,)from litellm.types.utils import PassthroughCallTypesdiff --git a/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py b/litellm/proxy/pass_through_endpoints/pass_through_endpoints.pyindex 53c4a55c370..a7c93feb18e 100644--- a/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py+++ b/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py@@ -23,7 +23,7 @@ from litellm._logging import verbose_proxy_loggerfrom litellm.integrations.custom_logger import CustomLoggerfrom litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObjfrom litellm.llms.custom_httpx.http_handler import get_async_httpx_client-from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (ModelResponseIterator,)from litellm.proxy._types import (diff --git a/litellm/proxy/pass_through_endpoints/streaming_handler.py b/litellm/proxy/pass_through_endpoints/streaming_handler.pyindex adfd49c7857..285151af6fc 100644--- a/litellm/proxy/pass_through_endpoints/streaming_handler.py+++ b/litellm/proxy/pass_through_endpoints/streaming_handler.py@@ -13,7 +13,7 @@ from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingfrom litellm.llms.anthropic.chat.handler import (ModelResponseIterator as AnthropicIterator,)-from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (ModelResponseIterator as VertexAIIterator,)from litellm.proxy._types import PassThroughEndpointLoggingResultValuesdiff --git a/litellm/proxy/pass_through_endpoints/success_handler.py b/litellm/proxy/pass_through_endpoints/success_handler.pyindex 725ac1fd6f5..ec0fcf378e8 100644--- a/litellm/proxy/pass_through_endpoints/success_handler.py+++ b/litellm/proxy/pass_through_endpoints/success_handler.py@@ -12,7 +12,7 @@ from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingfrom litellm.litellm_core_utils.litellm_logging import (get_standard_logging_object_payload,)-from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (VertexLLM,)from litellm.proxy._types import PassThroughEndpointLoggingResultValuesdiff --git a/litellm/types/integrations/gcs_bucket.py b/litellm/types/integrations/gcs_bucket.pyindex 18636ae1ff4..a4fd8a6a11c 100644--- a/litellm/types/integrations/gcs_bucket.py+++ b/litellm/types/integrations/gcs_bucket.py@@ -3,7 +3,7 @@ from typing import TYPE_CHECKING, Any, Dict, Optional, TypedDictfrom litellm.types.utils import StandardLoggingPayloadif TYPE_CHECKING:- from litellm.llms.vertex_ai_and_google_ai_studio.vertex_llm_base import VertexBase+ from litellm.llms.vertex_ai.vertex_llm_base import VertexBaseelse:VertexBase = Anydiff --git a/litellm/utils.py b/litellm/utils.pyindex 2d99ac51881..52cc983cb24 100644--- a/litellm/utils.py+++ b/litellm/utils.py@@ -4086,7 +4086,7 @@ def get_api_base(_optional_params.vertex_location is not Noneand _optional_params.vertex_project is not None):- from litellm.llms.vertex_ai_and_google_ai_studio.vertex_ai_partner_models.main import (+ from litellm.llms.vertex_ai.vertex_ai_partner_models.main import (VertexPartnerProvider,create_vertex_url,)diff --git a/tests/llm_translation/test_max_completion_tokens.py b/tests/llm_translation/test_max_completion_tokens.pyindex 1676c912b8e..31937e4aa98 100644--- a/tests/llm_translation/test_max_completion_tokens.py+++ b/tests/llm_translation/test_max_completion_tokens.py@@ -135,10 +135,10 @@ async def test_anthropic_api_max_completion_tokens(model: str):def test_all_model_configs():- from litellm.llms.vertex_ai_and_google_ai_studio.vertex_ai_partner_models.ai21.transformation import (+ from litellm.llms.vertex_ai.vertex_ai_partner_models.ai21.transformation import (VertexAIAi21Config,)- from litellm.llms.vertex_ai_and_google_ai_studio.vertex_ai_partner_models.llama3.transformation import (+ from litellm.llms.vertex_ai.vertex_ai_partner_models.llama3.transformation import (VertexAILlama3Config,)@@ -325,7 +325,7 @@ def test_all_model_configs():optional_params={},) == {"max_tokens": 10}- from litellm.llms.vertex_ai_and_google_ai_studio.vertex_ai_partner_models.anthropic.transformation import (+ from litellm.llms.vertex_ai.vertex_ai_partner_models.anthropic.transformation import (VertexAIAnthropicConfig,)@@ -343,7 +343,7 @@ def test_all_model_configs():drop_params=False,) == {"max_tokens": 10}- from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+ from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (VertexAIConfig,GoogleAIStudioGeminiConfig,VertexGeminiConfig,diff --git a/tests/llm_translation/test_prompt_factory.py b/tests/llm_translation/test_prompt_factory.pyindex 735deb84cef..ca4a4bd35cd 100644--- a/tests/llm_translation/test_prompt_factory.py+++ b/tests/llm_translation/test_prompt_factory.py@@ -25,7 +25,7 @@ from litellm.litellm_core_utils.prompt_templates.factory import (from litellm.litellm_core_utils.prompt_templates.common_utils import (get_completion_messages,)-from litellm.llms.vertex_ai_and_google_ai_studio.gemini.transformation import (+from litellm.llms.vertex_ai.gemini.transformation import (_gemini_convert_messages_with_history,)from unittest.mock import AsyncMock, MagicMock, patchdiff --git a/tests/llm_translation/test_vertex.py b/tests/llm_translation/test_vertex.pyindex 425b6f9f419..aa1fdc7d049 100644--- a/tests/llm_translation/test_vertex.py+++ b/tests/llm_translation/test_vertex.py@@ -95,7 +95,7 @@ def test_completion_pydantic_obj_2():def test_build_vertex_schema():- from litellm.llms.vertex_ai_and_google_ai_studio.common_utils import (+ from litellm.llms.vertex_ai.common_utils import (_build_vertex_schema,)import json@@ -1121,7 +1121,7 @@ def test_logprobs():def test_process_gemini_image():"""Test the _process_gemini_image function for different image sources"""- from litellm.llms.vertex_ai_and_google_ai_studio.gemini.transformation import (+ from litellm.llms.vertex_ai.gemini.transformation import (_process_gemini_image,)from litellm.types.llms.vertex_ai import PartType, FileDataType, BlobType@@ -1171,7 +1171,7 @@ def test_process_gemini_image():def test_get_image_mime_type_from_url():"""Test the _get_image_mime_type_from_url function for different image URLs"""- from litellm.llms.vertex_ai_and_google_ai_studio.gemini.transformation import (+ from litellm.llms.vertex_ai.gemini.transformation import (_get_image_mime_type_from_url,)@@ -1226,7 +1226,7 @@ def test_vertex_embedding_url(model, expected_url):When a fine-tuned embedding model is used, the URL is different from the standard one."""- from litellm.llms.vertex_ai_and_google_ai_studio.common_utils import _get_vertex_url+ from litellm.llms.vertex_ai.common_utils import _get_vertex_urlurl, endpoint = _get_vertex_url(mode="embedding",diff --git a/tests/local_testing/test_amazing_vertex_completion.py b/tests/local_testing/test_amazing_vertex_completion.pyindex 2e5e71041f1..38dc3439223 100644--- a/tests/local_testing/test_amazing_vertex_completion.py+++ b/tests/local_testing/test_amazing_vertex_completion.py@@ -32,10 +32,10 @@ from litellm import (completion_cost,embedding,)-from litellm.llms.vertex_ai_and_google_ai_studio.gemini.transformation import (+from litellm.llms.vertex_ai.gemini.transformation import (_gemini_convert_messages_with_history,)-from litellm.llms.vertex_ai_and_google_ai_studio.vertex_llm_base import VertexBase+from litellm.llms.vertex_ai.vertex_llm_base import VertexBaselitellm.num_retries = 3@@ -2338,7 +2338,7 @@ def test_prompt_factory_nested():def test_get_token_url():- from litellm.llms.vertex_ai_and_google_ai_studio.gemini.vertex_and_google_ai_studio_gemini import (+ from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (VertexLLM,)@@ -2927,7 +2927,7 @@ def test_gemini_function_call_parameter_in_messages():def test_gemini_function_call_parameter_in_messages_2():litellm.set_verbose = True- from litellm.llms.vertex_ai_and_google_ai_studio.gemini.transformation import (+ from litellm.llms.vertex_ai.gemini.transformation import (_gemini_convert_messages_with_history,)diff --git a/tests/local_testing/test_completion.py b/tests/local_testing/test_completion.pyindex c95932bc55c..e494c2aba5c 100644--- a/tests/local_testing/test_completion.py+++ b/tests/local_testing/test_completion.py@@ -24,7 +24,7 @@ from litellm import RateLimitError, Timeout, completion, completion_cost, embeddfrom litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler, HTTPHandlerfrom litellm.litellm_core_utils.prompt_templates.factory import anthropic_messages_pt-# litellm.num_retries=3+# litellm.num_retries = 3litellm.cache = Nonelitellm.success_callback = []diff --git a/tests/local_testing/test_fine_tuning_api.py b/tests/local_testing/test_fine_tuning_api.pyindex e231117a19c..5e81251e6f0 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.vertex_ai_and_google_ai_studio.fine_tuning.handler import (+from litellm.llms.vertex_ai.fine_tuning.handler import (FineTuningJobCreate,VertexFineTuningAPI,)