[Fix] Update gemini-2.0-flash to gemini-2.5-flash in test_gemini - #24817
Conversation
…gration tests gemini-2.0-flash is no longer available to new users, causing 404 errors in llm_translation_testing tests.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR updates three existing integration tests in
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| tests/llm_translation/test_gemini.py | Updates 3 occurrences of gemini/gemini-2.0-flash → gemini/gemini-2.5-flash in existing integration tests; no logic changes. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[test_gemini_with_grounding] -->|model param| B["gemini/gemini-2.5-flash\n(was gemini-2.0-flash)"]
C[test_gemini_with_empty_function_call_arguments] -->|model param| B
D[test_gemini_tool_use] -->|model param| B
B --> E[Gemini API Live Call]
E --> F{Response}
F -->|200 OK| G[Assertions pass]
F -->|404 Not Found\ngemini-2.0-flash removed| H[Test fails ❌]
Comments Outside Diff (1)
-
tests/llm_translation/test_gemini.py, line 534-574 (link)test_gemini_with_groundingandtest_gemini_with_empty_function_call_arguments(andtest_gemini_tool_useat line 806) calllitellm.completion()without any mocking, making live API requests to the Gemini network. The repo policy fortests/llm_translation/is that only mock tests should live here, to ensure reliable execution in CI and for all developers locally.While these tests were not introduced by this PR, updating them perpetuates the issue. Consider converting them to use
unittest.mock.patchor a similar approach (seetest_claude_tool_use_with_geminijust above as a good example of a properly mocked test in the same file).Rule Used: What: prevent any tests from being added here that... (source)
Reviews (1): Last reviewed commit: "[Fix] Update gemini-2.0-flash to gemini-..." | Re-trigger Greptile
[Fix] Update gemini-2.0-flash to gemini-2.5-flash in test_gemini
Summary
Failure Path (Before Fix)
Integration tests in
llm_translation_testing(test_gemini) usinggemini/gemini-2.0-flashfail with a 404 error becausegemini-2.0-flashis no longer available to new users.Fix
Updated all 3 instances of
gemini/gemini-2.0-flashtogemini/gemini-2.5-flashintests/llm_translation/test_gemini.py:test_gemini_with_grounding(streaming call)test_gemini_with_empty_function_call_argumentstest_gemini_tool_useTesting
llm_translation_testingwithtest_geminiType
🐛 Bug Fix
✅ Test