test(vertex_ai): pin gemini-3.1-flash-lite reasoning mapping#23090
test(vertex_ai): pin gemini-3.1-flash-lite reasoning mapping#23090vincentkoc wants to merge 5 commits intoBerriAI:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@Sameerlite this is a narrow follow-up to #22674 and #22920. It adds explicit |
Greptile SummaryThis PR adds a single parametrized regression test ( Key points:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| tests/test_litellm/llms/vertex_ai/gemini/test_vertex_and_google_ai_studio_gemini.py | Adds 6 parametrized regression tests for all reasoning_effort values for gemini-3.1-flash-lite-preview through the full map_openai_params integration layer; asserts thinkingLevel, includeThoughts, and absence of thinkingBudget. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["test_reasoning_effort_maps_to_thinking_level_gemini_31_flash_lite\n(parametrized × 6 effort values)"] --> B["VertexGeminiConfig.map_openai_params(\n model='gemini-3.1-flash-lite-preview'\n)"]
B --> C{"_is_gemini_3_or_newer?"}
C -- "Yes ('gemini-3' in model)" --> D["_map_reasoning_effort_to_thinking_level(effort, model)"]
D --> E{"is_gemini3flash?\n('gemini-3.1-flash' in model)"}
E -- "True" --> F["minimal → thinkingLevel='minimal'"]
E -- "True" --> G["low → thinkingLevel='low'"]
E -- "True" --> H["medium → thinkingLevel='medium'"]
E -- "True" --> I["high → thinkingLevel='high'"]
E -- "True" --> J["disable → thinkingLevel='minimal', includeThoughts=False"]
E -- "True" --> K["none → thinkingLevel='minimal', includeThoughts=False"]
F & G & H & I & J & K --> L["Assert thinkingConfig.thinkingLevel\nAssert thinkingConfig.includeThoughts\nAssert 'thinkingBudget' NOT in thinkingConfig"]
Last reviewed commit: 7d4bbcd
tests/test_litellm/llms/vertex_ai/gemini/test_vertex_and_google_ai_studio_gemini.py
Show resolved
Hide resolved
tests/test_litellm/llms/vertex_ai/gemini/test_vertex_and_google_ai_studio_gemini.py
Show resolved
Hide resolved
|
Addressed the Greptile follow-ups on the latest head:
The |
tests/test_litellm/llms/vertex_ai/gemini/test_vertex_and_google_ai_studio_gemini.py
Outdated
Show resolved
Hide resolved
…e_ai_studio_gemini.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Relevant issues
Related: #22674, #22920
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/test_litellm/directory, Adding at least 1 test is a hard requirement - see detailsmake test-unit@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewCI (LiteLLM team)
Branch creation CI run
Link:
CI run for the last commit
Link:
Merge / cherry-pick CI run
Links:
Type
✅ Test
Changes
tests/test_litellm/regression coverage forgemini-3.1-flash-lite-previewreasoning_effortvalues for this model:minimal,low,medium,high,disable,nonethinkingLevelpath and does not regress tothinkingBudgetincludeThoughtsstays aligned with the enabled vs disabled effort casesValidation
PYTEST_XDIST_WORKER=gw0 uv run pytest tests/test_litellm/llms/vertex_ai/gemini/test_vertex_and_google_ai_studio_gemini.py -k gemini_31_flash_lite -q6 passed, 87 deselecteduv run ruff check tests/test_litellm/llms/vertex_ai/gemini/test_vertex_and_google_ai_studio_gemini.pyReference