diff --git a/litellm/llms/vertex_ai_anthropic.py b/litellm/llms/vertex_ai_anthropic.py index adedb647a5..4acfffa5b6 100644 --- a/litellm/llms/vertex_ai_anthropic.py +++ b/litellm/llms/vertex_ai_anthropic.py @@ -148,6 +148,7 @@ def completion( ): try: import vertexai + from anthropic import AnthropicVertex except: raise VertexAIError( status_code=400, @@ -162,7 +163,6 @@ def completion( message="""Upgrade vertex ai. Run `pip install "google-cloud-aiplatform>=1.38"`""", ) try: - from anthropic import AnthropicVertex ## Load Config config = litellm.VertexAIAnthropicConfig.get_config() diff --git a/litellm/tests/test_amazing_vertex_completion.py b/litellm/tests/test_amazing_vertex_completion.py index 4eec5c35d2..f7259be84b 100644 --- a/litellm/tests/test_amazing_vertex_completion.py +++ b/litellm/tests/test_amazing_vertex_completion.py @@ -85,6 +85,9 @@ async def get_response(): pytest.fail(f"An error occurred - {str(e)}") +@pytest.mark.skip( + reason="Local test. Vertex AI Quota is low. Leads to rate limit errors on ci/cd." +) def test_vertex_ai_anthropic(): load_vertex_ai_credentials()