diff --git a/tests/batches_tests/test_fine_tuning_api.py b/tests/batches_tests/test_fine_tuning_api.py index 034f4e1b49..5dfbc0de71 100644 --- a/tests/batches_tests/test_fine_tuning_api.py +++ b/tests/batches_tests/test_fine_tuning_api.py @@ -406,29 +406,6 @@ def test_convert_basic_openai_request_to_vertex_request(): ) -@pytest.mark.asyncio() -@pytest.mark.skip(reason="skipping - we run mock tests for vertex ai") -async def test_create_vertex_fine_tune_jobs(): - verbose_logger.setLevel(logging.DEBUG) - # load_vertex_ai_credentials() - - vertex_credentials = os.getenv("GCS_PATH_SERVICE_ACCOUNT") - print("creating fine tuning job") - create_fine_tuning_response = await litellm.acreate_fine_tuning_job( - model="gemini-1.0-pro-002", - custom_llm_provider="vertex_ai", - training_file="gs://cloud-samples-data/ai-platform/generative_ai/sft_train_data.jsonl", - vertex_project="pathrise-convert-1606954137718", - vertex_location="us-central1", - vertex_credentials=vertex_credentials, - ) - print("vertex ai create fine tuning response=", create_fine_tuning_response) - - assert create_fine_tuning_response.id is not None - assert create_fine_tuning_response.model == "gemini-1.0-pro-002" - assert create_fine_tuning_response.object == "fine_tuning.job" - - @pytest.mark.asyncio async def test_mock_openai_create_fine_tune_job(): """Test that create_fine_tuning_job sends correct parameters to OpenAI""" @@ -536,7 +513,6 @@ async def test_mock_openai_retrieve_fine_tune_job(): except Exception as e: print("error=", e) - # Verify the request mock_retrieve.assert_called_once_with(fine_tuning_job_id="ft-123") @@ -544,7 +520,9 @@ async def test_mock_openai_retrieve_fine_tune_job(): @pytest.mark.asyncio async def test_mock_azure_create_fine_tune_job_with_azure_specific_params(): """Test that Azure-specific parameters are passed through extra_body""" - from openai.types.fine_tuning.fine_tuning_job import Hyperparameters as OAIHyperparameters + from openai.types.fine_tuning.fine_tuning_job import ( + Hyperparameters as OAIHyperparameters, + ) from litellm.types.utils import LiteLLMFineTuningJob mock_response = LiteLLMFineTuningJob( @@ -564,7 +542,9 @@ async def test_mock_azure_create_fine_tune_job_with_azure_specific_params(): async def mock_async_create(*args, **kwargs): return mock_response - with patch("litellm.llms.azure.fine_tuning.handler.AzureOpenAIFineTuningAPI.create_fine_tuning_job") as mock_create: + with patch( + "litellm.llms.azure.fine_tuning.handler.AzureOpenAIFineTuningAPI.create_fine_tuning_job" + ) as mock_create: mock_create.return_value = mock_async_create() response = await litellm.acreate_fine_tuning_job( @@ -575,10 +555,7 @@ async def test_mock_azure_create_fine_tune_job_with_azure_specific_params(): api_key="test-key", api_version="2025-04-01-preview", trainingType=1, - hyperparameters={ - "n_epochs": 3, - "prompt_loss_weight": 0.1 - }, + hyperparameters={"n_epochs": 3, "prompt_loss_weight": 0.1}, ) # Verify the request @@ -590,7 +567,7 @@ async def test_mock_azure_create_fine_tune_job_with_azure_specific_params(): assert create_data["model"] == "gpt-4.1-mini-2025-04-14" assert create_data["training_file"] == "file-123" assert create_data["hyperparameters"] == {"n_epochs": 3} - + # Azure-specific parameters should be in extra_body assert "extra_body" in create_data assert create_data["extra_body"]["trainingType"] == 1 diff --git a/tests/batches_tests/test_openai_batches_and_files.py b/tests/batches_tests/test_openai_batches_and_files.py index e4e1180eb1..0aed224c25 100644 --- a/tests/batches_tests/test_openai_batches_and_files.py +++ b/tests/batches_tests/test_openai_batches_and_files.py @@ -54,7 +54,7 @@ def load_vertex_ai_credentials(): print("loading vertex ai credentials") os.environ["GCS_FLUSH_INTERVAL"] = "1" filepath = os.path.dirname(os.path.abspath(__file__)) - vertex_key_path = filepath + "/pathrise-convert-1606954137718.json" + vertex_key_path = filepath + "/vertex_key.json" # Read the existing content of the file or create an empty dictionary try: diff --git a/tests/image_gen_tests/test_image_generation.py b/tests/image_gen_tests/test_image_generation.py index aca5c41de3..b22a18b49b 100644 --- a/tests/image_gen_tests/test_image_generation.py +++ b/tests/image_gen_tests/test_image_generation.py @@ -113,7 +113,7 @@ class TestVertexImageGeneration(BaseImageGenTest): litellm.in_memory_llm_clients_cache = InMemoryCache() return { "model": "vertex_ai/imagen-3.0-fast-generate-001", - "vertex_ai_project": "pathrise-convert-1606954137718", + "vertex_ai_project": "litellm-ci-cd", "vertex_ai_location": "us-central1", "n": 1, } @@ -129,7 +129,7 @@ class TestVertexAIGeminiImageGeneration(BaseImageGenTest): litellm.in_memory_llm_clients_cache = InMemoryCache() return { "model": "vertex_ai/gemini-2.5-flash-image", - "vertex_ai_project": "pathrise-convert-1606954137718", + "vertex_ai_project": "litellm-ci-cd", "vertex_ai_location": "us-central1", "n": 1, "size": "1024x1024", diff --git a/tests/litellm_utils_tests/test_secret_manager.py b/tests/litellm_utils_tests/test_secret_manager.py index 7569c673ec..a3e7a8496f 100644 --- a/tests/litellm_utils_tests/test_secret_manager.py +++ b/tests/litellm_utils_tests/test_secret_manager.py @@ -226,7 +226,7 @@ def test_google_secret_manager(): """ Test that we can get a secret from Google Secret Manager """ - os.environ["GOOGLE_SECRET_MANAGER_PROJECT_ID"] = "pathrise-convert-1606954137718" + os.environ["GOOGLE_SECRET_MANAGER_PROJECT_ID"] = "litellm-ci-cd" from litellm.secret_managers.google_secret_manager import GoogleSecretManager @@ -252,7 +252,7 @@ def test_google_secret_manager_read_in_memory(): from litellm.secret_managers.google_secret_manager import GoogleSecretManager load_vertex_ai_credentials() - os.environ["GOOGLE_SECRET_MANAGER_PROJECT_ID"] = "pathrise-convert-1606954137718" + os.environ["GOOGLE_SECRET_MANAGER_PROJECT_ID"] = "litellm-ci-cd" secret_manager = GoogleSecretManager() secret_manager.cache.cache_dict["UNIQUE_KEY"] = None secret_manager.cache.cache_dict["UNIQUE_KEY_2"] = "lite-llm" @@ -337,6 +337,7 @@ def test_get_secret_with_access_mode(): litellm._key_management_settings = KeyManagementSettings() del os.environ[test_secret_name] + def test_key_management_settings_defaults(): """ Test that KeyManagementSettings initializes with correct default values. diff --git a/tests/local_testing/test_exceptions.py b/tests/local_testing/test_exceptions.py index 123442d1cf..e02d9e2117 100644 --- a/tests/local_testing/test_exceptions.py +++ b/tests/local_testing/test_exceptions.py @@ -24,7 +24,7 @@ from litellm import ( # AuthenticationError,; RateLimitError,; ServiceUnavailab embedding, ) -litellm.vertex_project = "pathrise-convert-1606954137718" +litellm.vertex_project = "litellm-ci-cd" litellm.vertex_location = "us-central1" litellm.num_retries = 0 diff --git a/tests/old_proxy_tests/tests/test_vtx_sdk_embedding.py b/tests/old_proxy_tests/tests/test_vtx_sdk_embedding.py index ff7f835a8d..a71718a204 100644 --- a/tests/old_proxy_tests/tests/test_vtx_sdk_embedding.py +++ b/tests/old_proxy_tests/tests/test_vtx_sdk_embedding.py @@ -37,7 +37,7 @@ class CredentialsWrapper(Credentials): credentials = CredentialsWrapper(token=LITELLM_PROXY_API_KEY) vertexai.init( - project="pathrise-convert-1606954137718", + project="litellm-ci-cd", location="us-central1", api_endpoint=LITELLM_PROXY_BASE, credentials=credentials, diff --git a/tests/proxy_unit_tests/adroit-crow-413218-bc47f303efc9.json b/tests/proxy_unit_tests/adroit-crow-413218-bc47f303efc9.json deleted file mode 100644 index 7e02c82136..0000000000 --- a/tests/proxy_unit_tests/adroit-crow-413218-bc47f303efc9.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "service_account", - "project_id": "pathrise-convert-1606954137718", - "private_key_id": "", - "private_key": "", - "client_email": "test-adroit-crow@pathrise-convert-1606954137718.iam.gserviceaccount.com", - "client_id": "104886546564708740969", - "auth_uri": "https://accounts.google.com/o/oauth2/auth", - "token_uri": "https://oauth2.googleapis.com/token", - "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", - "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test-adroit-crow%40pathrise-convert-1606954137718.iam.gserviceaccount.com", - "universe_domain": "googleapis.com" -}