Repository navigation
fix(sse): mark gemini-3.5-flash as thinking-capable - #10450
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
|
Reviewed PR #10450 against release/v3.8.50. No verified defects found. The override is correctly limited to the native gemini-3.5-flash MODEL_SPECS entry; GEMINI_35_FLASH_MODEL_SPEC remains false for Antigravity tier IDs, and gemini-web's explicit supportsReasoning:false remains authoritative. The regression test covers both resolved capability and reasoning-routing policy. I could not execute the test in a checkout with PR-head path aliases, so this is merge-ready with PLAUSIBLE confidence rather than a confirmed runtime result. Base-red #9985 is inherited and not attributed to this PR. |
|
Validated in local merge-train /srv/omniroute-train/.claude/worktrees/merge-train-20260817-084218-suite.log on tomni-proxmox-113 @ 24d32c994a9dfb0b7019d9450428f2fba1ce73c5 (FAST gates green: static + changed tests + vitest; the daily full-suite gate remains required). |
…k the release PR The living release PR #8875 was CONFLICTING, which makes GitHub skip EVERY pull_request workflow silently (no ci.yml, no semgrep, no DAST). Back-merging main restores a computable merge ref. Strategy `-s ours`: main is a stale snapshot of the release line (PR #11088 was merged into main from a release-tip base, dragging ~5094 files). All 7 main-only commits were verified as already represented on this branch: - #11088 ollama capability routing -> ported here as #11271 (6d4c484) - #11075 shared passthrough providers -> ported here as #11165 (92ef3c7) - #10055 getModelsDevPricing memoization -> present (modelsDevSync.ts) - #10026 hide health-check excluded models -> present and extended (catalog.ts) - /_tasks anchored gitignore hardening -> present (.gitignore:288) - nanoid/dompurify Dependabot bumps -> identical versions main-only files intentionally NOT carried over: - changelog.d/fixes/10286-gemini-3-5-flash-thinking.md + its regression test: the fix landed here as #10450 and was then deliberately superseded by 2764812 "eliminate Gemini 3.5 Flash". The test fails on this branch by design. - public/providers/hackclub.svg: provider removed here (migration 162). - docs/superpowers/**/2026-08-23-qdrant-*: planning artifacts belong in _tasks/ (AGENTS.md), never under docs/.
…e#10450) 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 cheaper-inference#10286 Co-authored-by: adevwithpurpose <adevwithpurpose@users.noreply.github.com>
…k the release PR The living release PR cheaper-inference#8875 was CONFLICTING, which makes GitHub skip EVERY pull_request workflow silently (no ci.yml, no semgrep, no DAST). Back-merging main restores a computable merge ref. Strategy `-s ours`: main is a stale snapshot of the release line (PR cheaper-inference#11088 was merged into main from a release-tip base, dragging ~5094 files). All 7 main-only commits were verified as already represented on this branch: - cheaper-inference#11088 ollama capability routing -> ported here as cheaper-inference#11271 (ec959d8) - cheaper-inference#11075 shared passthrough providers -> ported here as cheaper-inference#11165 (4813c32) - cheaper-inference#10055 getModelsDevPricing memoization -> present (modelsDevSync.ts) - cheaper-inference#10026 hide health-check excluded models -> present and extended (catalog.ts) - /_tasks anchored gitignore hardening -> present (.gitignore:288) - nanoid/dompurify Dependabot bumps -> identical versions main-only files intentionally NOT carried over: - changelog.d/fixes/10286-gemini-3-5-flash-thinking.md + its regression test: the fix landed here as cheaper-inference#10450 and was then deliberately superseded by bc825a1 "eliminate Gemini 3.5 Flash". The test fails on this branch by design. - public/providers/hackclub.svg: provider removed here (migration 162). - docs/superpowers/**/2026-08-23-qdrant-*: planning artifacts belong in _tasks/ (AGENTS.md), never under docs/.
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.