diff --git a/tests/pass_through_tests/test_gemini_with_spend.test.js b/tests/pass_through_tests/test_gemini_with_spend.test.js index 989bbc4b8e..b9a25d3a3e 100644 --- a/tests/pass_through_tests/test_gemini_with_spend.test.js +++ b/tests/pass_through_tests/test_gemini_with_spend.test.js @@ -32,7 +32,7 @@ describe('Gemini AI Tests', () => { }; const model = genAI.getGenerativeModel({ - model: 'gemini-2.5-flash-lite' + model: 'gemini-3.1-flash-lite' }, requestOptions); const prompt = 'Say "hello test" and nothing else'; @@ -83,7 +83,7 @@ describe('Gemini AI Tests', () => { }; const model = genAI.getGenerativeModel({ - model: 'gemini-2.5-flash-lite' + model: 'gemini-3.1-flash-lite' }, requestOptions); const prompt = 'Say "hello test" and nothing else'; diff --git a/tests/pass_through_tests/test_local_gemini.js b/tests/pass_through_tests/test_local_gemini.js index 0a72ca5cd7..dc033a51f1 100644 --- a/tests/pass_through_tests/test_local_gemini.js +++ b/tests/pass_through_tests/test_local_gemini.js @@ -1,13 +1,13 @@ const { GoogleGenerativeAI, ModelParams, RequestOptions } = require("@google/generative-ai"); const modelParams = { - model: 'gemini-2.5-flash-lite', + model: 'gemini-3.1-flash-lite', }; const requestOptions = { baseUrl: 'http://127.0.0.1:4000/gemini', customHeaders: { - "tags": "gemini-js-sdk,gemini-2.5-flash-lite" + "tags": "gemini-js-sdk,gemini-3.1-flash-lite" } }; diff --git a/tests/pass_through_tests/test_local_vertex.js b/tests/pass_through_tests/test_local_vertex.js index 149635e2d6..7cfe31db95 100644 --- a/tests/pass_through_tests/test_local_vertex.js +++ b/tests/pass_through_tests/test_local_vertex.js @@ -4,7 +4,7 @@ const { VertexAI, RequestOptions } = require('@google-cloud/vertexai'); const vertexAI = new VertexAI({ project: 'litellm-ci-cd', - location: 'us-central1', + location: 'global', apiEndpoint: "127.0.0.1:4000/vertex-ai" }); @@ -20,7 +20,7 @@ const requestOptions = { }; const generativeModel = vertexAI.getGenerativeModel( - { model: 'gemini-2.5-flash-lite' }, + { model: 'gemini-3.1-flash-lite' }, requestOptions ); diff --git a/tests/pass_through_tests/test_vertex.test.js b/tests/pass_through_tests/test_vertex.test.js index 7b5edf6acd..e0e879c289 100644 --- a/tests/pass_through_tests/test_vertex.test.js +++ b/tests/pass_through_tests/test_vertex.test.js @@ -56,6 +56,9 @@ beforeAll(() => { loadVertexAiCredentials(); }); +// Configure Jest to retry flaky tests up to 3 times (useful for 429 rate limiting) +jest.retryTimes(3); + // Non-streaming Vertex generateContent can exceed 5s in CI / under load const VERTEX_TEST_TIMEOUT_MS = 30000; @@ -65,7 +68,7 @@ describe('Vertex AI Tests', () => { async () => { const vertexAI = new VertexAI({ project: 'litellm-ci-cd', - location: 'us-central1', + location: 'global', apiEndpoint: "localhost:4000/vertex-ai" }); @@ -78,7 +81,7 @@ describe('Vertex AI Tests', () => { }; const generativeModel = vertexAI.getGenerativeModel( - { model: 'gemini-2.5-flash-lite' }, + { model: 'gemini-3.1-flash-lite' }, requestOptions ); @@ -108,13 +111,13 @@ describe('Vertex AI Tests', () => { async () => { const vertexAI = new VertexAI({ project: 'litellm-ci-cd', - location: 'us-central1', + location: 'global', apiEndpoint: "localhost:4000/vertex-ai" }); const customHeaders = new Headers({"x-litellm-api-key": "sk-1234"}); const requestOptions = {customHeaders: customHeaders}; const generativeModel = vertexAI.getGenerativeModel( - {model: 'gemini-2.5-flash-lite'}, + {model: 'gemini-3.1-flash-lite'}, requestOptions ); const request = {contents: [{role: 'user', parts: [{text: 'What is 2+2?'}]}]}; diff --git a/tests/pass_through_tests/test_vertex_ai.py b/tests/pass_through_tests/test_vertex_ai.py index 73bf03c500..bf1200489a 100644 --- a/tests/pass_through_tests/test_vertex_ai.py +++ b/tests/pass_through_tests/test_vertex_ai.py @@ -103,12 +103,12 @@ async def test_basic_vertex_ai_pass_through_with_spendlog(): vertexai.init( project="litellm-ci-cd", - location="us-central1", + location="global", api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex_ai", api_transport="rest", ) - model = GenerativeModel(model_name="gemini-2.5-flash-lite") + model = GenerativeModel(model_name="gemini-3.1-flash-lite") response = model.generate_content("hi") print("response", response) @@ -143,12 +143,12 @@ async def test_basic_vertex_ai_pass_through_streaming_with_spendlog(): vertexai.init( project="litellm-ci-cd", - location="us-central1", + location="global", api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex_ai", api_transport="rest", ) - model = GenerativeModel(model_name="gemini-2.5-flash-lite") + model = GenerativeModel(model_name="gemini-3.1-flash-lite") response = model.generate_content("hi", stream=True) for chunk in response: @@ -182,7 +182,7 @@ async def test_vertex_ai_pass_through_endpoint_context_caching(): vertexai.init( project="litellm-ci-cd", - location="us-central1", + location="global", api_endpoint=f"{LITE_LLM_ENDPOINT}/vertex_ai", api_transport="rest", ) @@ -204,7 +204,7 @@ async def test_vertex_ai_pass_through_endpoint_context_caching(): ] cached_content = caching.CachedContent.create( - model_name="gemini-2.5-flash-lite-001", + model_name="gemini-3.1-flash-lite", system_instruction=system_instruction, contents=contents, ttl=datetime.timedelta(minutes=60), diff --git a/tests/pass_through_tests/test_vertex_with_spend.test.js b/tests/pass_through_tests/test_vertex_with_spend.test.js index 142a1cec8f..4dee890dc7 100644 --- a/tests/pass_through_tests/test_vertex_with_spend.test.js +++ b/tests/pass_through_tests/test_vertex_with_spend.test.js @@ -71,7 +71,7 @@ describe('Vertex AI Tests', () => { test('should successfully generate non-streaming content with tags', async () => { const vertexAI = new VertexAI({ project: 'litellm-ci-cd', - location: 'us-central1', + location: 'global', apiEndpoint: "127.0.0.1:4000/vertex_ai" }); @@ -85,7 +85,7 @@ describe('Vertex AI Tests', () => { }; const generativeModel = vertexAI.getGenerativeModel( - { model: 'gemini-2.5-flash-lite' }, + { model: 'gemini-3.1-flash-lite' }, requestOptions ); @@ -130,7 +130,7 @@ describe('Vertex AI Tests', () => { test('should successfully generate streaming content with tags', async () => { const vertexAI = new VertexAI({ project: 'litellm-ci-cd', - location: 'us-central1', + location: 'global', apiEndpoint: "127.0.0.1:4000/vertex_ai" }); @@ -144,7 +144,7 @@ describe('Vertex AI Tests', () => { }; const generativeModel = vertexAI.getGenerativeModel( - { model: 'gemini-2.5-flash-lite' }, + { model: 'gemini-3.1-flash-lite' }, requestOptions );