fix(google): broaden _is_gemini_3_flash_model to cover all Gemini 3 Flash variants#6210
fix(google): broaden _is_gemini_3_flash_model to cover all Gemini 3 Flash variants#6210balazssandor wants to merge 1 commit into
Conversation
…lash variants Previously only matched `gemini-3-flash` (exact substring), missing `gemini-3.5-flash` which uses dot notation. Now matches any model starting with `gemini-3` that contains `flash`, correctly covering gemini-3-flash-preview and gemini-3.5-flash. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| m = model.lower() | ||
| return m.startswith("gemini-3") and "flash" in m |
There was a problem hiding this comment.
🚩 New code now matches "gemini-3.5-flash" as a Gemini 3 Flash model (behavioral change)
The old code checked "gemini-3-flash" in model.lower() which would NOT match "gemini-3.5-flash" (the ".5" breaks the substring). The new code m.startswith("gemini-3") and "flash" in m DOES match "gemini-3.5-flash" since it starts with "gemini-3" and contains "flash". This model is actively used in the codebase (see livekit-plugins/livekit-plugins-google/livekit/plugins/google/models.py:207 and examples/other/cartesia.py:62). Previously it would get thinking level "low"; now it gets "minimal". This is likely intentional given the commit message says "broaden to cover all Gemini 3 Flash variants" and gemini-3.5-flash IS a flash model, but the test file at tests/test_google_thought_signatures.py doesn't cover this case, so it's worth confirming this is the desired behavior.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
_is_gemini_3_flash_modelpreviously checked for the substring"gemini-3-flash", which missedgemini-3.5-flash(dot notation)m.startswith("gemini-3") and "flash" in m— covers bothgemini-3-flash-previewandgemini-3.5-flash, while correctly excludinggemini-3-pro-previewstartswithbranch that was a subset of theincheckTest plan
gemini-3.5-flashreturnsTruegemini-3-flash-previewreturnsTruegemini-3-pro-previewreturnsFalsegemini-2.5-flashreturnsFalse🤖 Generated with Claude Code