diff --git a/litellm/__init__.py b/litellm/__init__.py index c8fa8f3c36..c53fddedf8 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 NLPCloudConfig from .llms.aleph_alpha import AlephAlphaConfig from .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.py index 23673cd6d3..555ec62ad5 100644 --- a/litellm/batches/main.py +++ b/litellm/batches/main.py @@ -22,7 +22,7 @@ import litellm from litellm import client 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 ( +from litellm.llms.vertex_ai.batches.handler import ( VertexAIBatchPrediction, ) from litellm.secret_managers.main import get_secret, get_secret_str diff --git a/litellm/cost_calculator.py b/litellm/cost_calculator.py index 943fcf38b7..4f6bf5c19c 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_token from litellm.llms.openai.cost_calculation import cost_router as openai_cost_router from 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 HttpxBinaryResponseContent diff --git a/litellm/files/main.py b/litellm/files/main.py index fbdf6206d2..8637c624c0 100644 --- a/litellm/files/main.py +++ b/litellm/files/main.py @@ -17,7 +17,7 @@ import litellm from litellm import client, get_secret_str from litellm.llms.azure.files.handler import AzureOpenAIFilesAPI from 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.py index 2d97eb21f4..e5620a40e9 100644 --- a/litellm/fine_tuning/main.py +++ b/litellm/fine_tuning/main.py @@ -20,7 +20,7 @@ import litellm from litellm._logging import verbose_logger from litellm.llms.azure.fine_tuning.handler import AzureOpenAIFineTuningAPI from 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 VertexFineTuningAPI from litellm.secret_managers.main import get_secret_str from litellm.types.llms.openai import Hyperparameters from litellm.types.router import * diff --git a/litellm/integrations/gcs_bucket/gcs_bucket.py b/litellm/integrations/gcs_bucket/gcs_bucket.py index 0cbd61ffa1..b9de271b59 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 VertexBase else: VertexBase = Any diff --git a/litellm/integrations/gcs_bucket/gcs_bucket_base.py b/litellm/integrations/gcs_bucket/gcs_bucket_base.py index 79dcd9cefc..3bec1c6b9f 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 VertexBase else: VertexBase = Any IAM_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.md similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/batches/Readme.md rename to litellm/llms/vertex_ai/batches/Readme.md diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/batches/handler.py b/litellm/llms/vertex_ai/batches/handler.py similarity index 97% rename from litellm/llms/vertex_ai_and_google_ai_studio/batches/handler.py rename to litellm/llms/vertex_ai/batches/handler.py index 32c1b35ef2..8d4f215dbc 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.py similarity index 98% rename from litellm/llms/vertex_ai_and_google_ai_studio/batches/transformation.py rename to litellm/llms/vertex_ai/batches/transformation.py index 0edacc5c77..157f6094ad 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 uuid from 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, CreateBatchRequest diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/common_utils.py b/litellm/llms/vertex_ai/common_utils.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/common_utils.py rename to litellm/llms/vertex_ai/common_utils.py diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/context_caching/transformation.py b/litellm/llms/vertex_ai/context_caching/transformation.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/context_caching/transformation.py rename to litellm/llms/vertex_ai/context_caching/transformation.py diff --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.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/context_caching/vertex_ai_context_caching.py rename to litellm/llms/vertex_ai/context_caching/vertex_ai_context_caching.py diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/files/handler.py b/litellm/llms/vertex_ai/files/handler.py similarity index 95% rename from litellm/llms/vertex_ai_and_google_ai_studio/files/handler.py rename to litellm/llms/vertex_ai/files/handler.py index abcddc7e43..9b2cf9c11d 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.py similarity index 96% rename from litellm/llms/vertex_ai_and_google_ai_studio/files/transformation.py rename to litellm/llms/vertex_ai/files/transformation.py index 9d41c8cc68..0bffa363cd 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 json import uuid from 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.py similarity index 99% rename from litellm/llms/vertex_ai_and_google_ai_studio/fine_tuning/handler.py rename to litellm/llms/vertex_ai/fine_tuning/handler.py index f82d781c55..230c9d766f 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 FineTuningJobCreate diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/gemini/transformation.py b/litellm/llms/vertex_ai/gemini/transformation.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/gemini/transformation.py rename to litellm/llms/vertex_ai/gemini/transformation.py diff --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.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/gemini/vertex_and_google_ai_studio_gemini.py rename to litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py diff --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.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/gemini_embeddings/batch_embed_content_handler.py rename to litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_handler.py diff --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.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/gemini_embeddings/batch_embed_content_transformation.py rename to litellm/llms/vertex_ai/gemini_embeddings/batch_embed_content_transformation.py diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/image_generation/cost_calculator.py b/litellm/llms/vertex_ai/image_generation/cost_calculator.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/image_generation/cost_calculator.py rename to litellm/llms/vertex_ai/image_generation/cost_calculator.py diff --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.py similarity index 98% rename from litellm/llms/vertex_ai_and_google_ai_studio/image_generation/image_generation_handler.py rename to litellm/llms/vertex_ai/image_generation/image_generation_handler.py index 6cb5771e6e..7c288da70b 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.py similarity index 99% rename from litellm/llms/vertex_ai_and_google_ai_studio/multimodal_embeddings/embedding_handler.py rename to litellm/llms/vertex_ai/multimodal_embeddings/embedding_handler.py index 27b77fdd95..81708530a2 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.py similarity index 98% rename from litellm/llms/vertex_ai_and_google_ai_studio/text_to_speech/text_to_speech_handler.py rename to litellm/llms/vertex_ai/text_to_speech/text_to_speech_handler.py index 0cfe5cbe25..18ebaee1ed 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.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_non_gemini.py rename to litellm/llms/vertex_ai/vertex_ai_non_gemini.py diff --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.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/ai21/transformation.py rename to litellm/llms/vertex_ai/vertex_ai_partner_models/ai21/transformation.py diff --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.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/anthropic/transformation.py rename to litellm/llms/vertex_ai/vertex_ai_partner_models/anthropic/transformation.py diff --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.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/llama3/transformation.py rename to litellm/llms/vertex_ai/vertex_ai_partner_models/llama3/transformation.py diff --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.py similarity index 98% rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_ai_partner_models/main.py rename to litellm/llms/vertex_ai/vertex_ai_partner_models/main.py index 541f7937d8..947a91f5a7 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 OpenAIChatCompletion from litellm.llms.openai_like.chat.handler import OpenAILikeChatHandler from 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.py similarity index 98% rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_embeddings/embedding_handler.py rename to litellm/llms/vertex_ai/vertex_embeddings/embedding_handler.py index 26741ff4f2..d3621f411b 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 VertexBase from litellm.types.llms.vertex_ai import * from litellm.utils import Usage diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_embeddings/transformation.py b/litellm/llms/vertex_ai/vertex_embeddings/transformation.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_embeddings/transformation.py rename to litellm/llms/vertex_ai/vertex_embeddings/transformation.py diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_embeddings/types.py b/litellm/llms/vertex_ai/vertex_embeddings/types.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_embeddings/types.py rename to litellm/llms/vertex_ai/vertex_embeddings/types.py diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_llm_base.py b/litellm/llms/vertex_ai/vertex_llm_base.py similarity index 100% rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_llm_base.py rename to litellm/llms/vertex_ai/vertex_llm_base.py diff --git a/litellm/llms/vertex_ai_and_google_ai_studio/vertex_model_garden/main.py b/litellm/llms/vertex_ai/vertex_model_garden/main.py similarity index 97% rename from litellm/llms/vertex_ai_and_google_ai_studio/vertex_model_garden/main.py rename to litellm/llms/vertex_ai/vertex_model_garden/main.py index 99aabea5ff..75db56dc6c 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 OpenAIChatCompletion from litellm.llms.openai_like.chat.handler import OpenAILikeChatHandler from 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.py index e524a3b73c..43158331d3 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -125,29 +125,29 @@ from .llms.replicate.chat.handler import completion as replicate_chat_completion from .llms.text_completion_codestral import CodestralTextCompletion from .llms.together_ai.completion.handler import TogetherAITextCompletion from .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_handler diff --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.py index 0d2b2f9afe..a6c9046b32 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 LiteLLMLogging from 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 PassthroughCallTypes diff --git a/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py b/litellm/proxy/pass_through_endpoints/pass_through_endpoints.py index 53c4a55c37..a7c93feb18 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_logger from litellm.integrations.custom_logger import CustomLogger from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLoggingObj from 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.py index adfd49c785..285151af6f 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 LiteLLMLogging from 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 PassThroughEndpointLoggingResultValues diff --git a/litellm/proxy/pass_through_endpoints/success_handler.py b/litellm/proxy/pass_through_endpoints/success_handler.py index 725ac1fd6f..ec0fcf378e 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 LiteLLMLogging from 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 PassThroughEndpointLoggingResultValues diff --git a/litellm/types/integrations/gcs_bucket.py b/litellm/types/integrations/gcs_bucket.py index 18636ae1ff..a4fd8a6a11 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, TypedDict from litellm.types.utils import StandardLoggingPayload 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 VertexBase else: VertexBase = Any diff --git a/litellm/utils.py b/litellm/utils.py index 2d99ac5188..52cc983cb2 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -4086,7 +4086,7 @@ def get_api_base( _optional_params.vertex_location is not None and _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.py index 1676c912b8..31937e4aa9 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.py index 735deb84ce..ca4a4bd35c 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, patch diff --git a/tests/llm_translation/test_vertex.py b/tests/llm_translation/test_vertex.py index 425b6f9f41..aa1fdc7d04 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_url url, 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.py index 2e5e71041f..38dc343922 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 VertexBase litellm.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.py index c95932bc55..e494c2aba5 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, embedd from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler, HTTPHandler from litellm.litellm_core_utils.prompt_templates.factory import anthropic_messages_pt -# litellm.num_retries=3 +# litellm.num_retries = 3 litellm.cache = None litellm.success_callback = [] diff --git a/tests/local_testing/test_fine_tuning_api.py b/tests/local_testing/test_fine_tuning_api.py index e231117a19..5e81251e6f 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_credentials from litellm import create_fine_tuning_job from 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, )