fix(sse): mark gemini-3.5-flash as thinking-capable - #10450
Open
diegosouzapw wants to merge 1 commit into
Open
Conversation
The base gemini-3.5-flash entry spread the shared GEMINI_35_FLASH_MODEL_SPEC constant, which has supportsThinking:false because it is also spread into several Antigravity flash-tier aliases that reject client-supplied thinking params. That made the reasoning-routing policy resolve reasoning_effort as "unsupported" for the base Google AI Studio model, producing a spurious pre-provider HTTP 400 even though the model supports reasoning (it has an effort-tier alias gemini-3.5-flash-high). Set supportsThinking:true as an explicit override on the base gemini-3.5-flash entry only, leaving the shared spec and the Antigravity tier aliases unchanged. Closes #10286
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10286
Root cause
src/shared/constants/modelSpecs.tsdeclares the sharedGEMINI_35_FLASH_MODEL_SPECconstant with
supportsThinking: false. The base"gemini-3.5-flash"entry spreadsthat spec, so
getResolvedModelCapabilities()reports the base Google AI Studio modelas thinking-incapable, which makes
capabilityFor()(
src/lib/reasoningRouting/policy.ts) resolve to"unsupported"for anyreasoning_effort, andapplyDecision()(src/sse/handlers/reasoningRouting.ts)turns that into a pre-provider HTTP 400 — even though the base model supports
reasoning (it has an effort-tier alias
gemini-3.5-flash-high, and the reporterindependently verified flipping the flag to
trueworks end-to-end).The same shared
GEMINI_35_FLASH_MODEL_SPECconstant is also spread into severalAntigravity flash-tier aliases (
gemini-3.5-flash-low,gemini-3.5-flash-extra-low,gemini-3-flash-agent,gemini-3.6-flash-*), and those tier ids are documented asrejecting client-supplied thinking params (the model id itself selects the reasoning
tier upstream). So the fix does not flip the shared constant — it sets
supportsThinking: trueas an explicit override on the base"gemini-3.5-flash"entry only, leaving
GEMINI_35_FLASH_MODEL_SPECand all the Antigravity tier aliasesunchanged (still
false).Fix
src/shared/constants/modelSpecs.ts: addedsupportsThinking: trueoverride on thebase
"gemini-3.5-flash"entry (after the...GEMINI_35_FLASH_MODEL_SPECspread).Regression test
tests/unit/gemini-3-5-flash-thinking.test.ts— TDD, fails on unfixed code(
AssertionError: false !== true/ decision.capability'unsupported'vs'supported'), passes after the fix:Asserts both:
getResolvedModelCapabilities({provider:"gemini", model:"gemini-3.5-flash"}).supportsThinking === truereasoning_effort:"high"ongemini-3.5-flashtocapability
"supported"(not the pre-provider 400).Gates run
npm run typecheck:core— exit 0npx eslint --suppressions-location config/quality/eslint-suppressions.json <changed files>— cleannode scripts/check/check-file-size.mjs— no new violation onmodelSpecs.tsnode scripts/check/check-complexity.mjs— OK (2456 violations, baseline 2774)node scripts/check/check-cognitive-complexity.mjs— OK (1104 violations, baseline 1223)node scripts/check/check-test-discovery.mjs— OK, new test file discoverednpm run test:unit— started full suite; 614/4565 test files completed with 0failures before the run stalled to near-zero throughput under severe 13-way
parallel devbox contention (13 concurrent fan-out agents running the identical
full suite on shared hardware — not specific to this change). No regression
signal in the portion that ran. CI runs on isolated runners and is the
authoritative full-suite gate for this PR.