Skip to content

fix(ai): use supported minimum thinking for Gemini Flash - #1709

Open
boyntonj wants to merge 1 commit into
code-yeongyu:mainfrom
boyntonj:fix/gemini-38-flash-thinking-minimum
Open

boyntonj wants to merge 1 commit into
code-yeongyu:mainfrom
boyntonj:fix/gemini-38-flash-thinking-minimum

Conversation

@boyntonj

@boyntonj boyntonj commented Sep 15, 2026

Copy link
Copy Markdown

Summary

Automatic session titles on Gemini 3.7 and 3.8 Flash can fail with Thinking level MINIMAL is not supported even when chat succeeds. Titles omit reasoning, and the Google adapters translate that into a minimum-thinking request. These models require LOW, not MINIMAL.

Both Google and Vertex now use LOW for omitted, disabled, or minimal reasoning on those two model IDs. Explicit higher levels and older models keep their existing behavior. The model check is shared between adapters and doesn't assume what future models support.

Google documents the supported levels in its thinking guide.

Validation

  • bun run --cwd packages/ai test test/gemini-38-flash-thinking-minimum.test.ts test/mistral-google-thinking-matrix.test.ts test/google-thinking-level-map.test.ts: 30 tests passed, covering both adapters and neighboring models.
  • bun run check: passed, including TypeScript and browser smoke checks.
  • bun run build: passed across all build phases.
  • node .agents/skills/senpi-qa/scripts/mock-loop.mjs --self-test: exited successfully with local fake providers and unchanged credentials.
  • node .agents/skills/senpi-qa/scripts/cli-smoke.mjs --self-test: 8 checks passed.
  • Built title-generator driver through the real SDK with intercepted HTTP: one request sent LOW, kept the 64-token output limit, and parsed the returned title successfully.

No live Google requests were made. This change doesn't update an already installed CLI or alter credentials.


Summary by cubic

Fixes automatic session titles on Gemini 3.7 and 3.8 Flash failing with Thinking level MINIMAL is not supported. Chat succeeded, but title requests omit reasoning, and the Google adapters were translating that into MINIMAL, which these models reject.

  • Google and Vertex now send LOW for omitted, disabled, or minimal reasoning on gemini-3.7-flash and gemini-3.8-flash.
  • Explicit low, medium, and high levels, plus older Flash and Pro behavior, are unchanged.
  • The model check is shared between the Google and Vertex adapters, so direct SDK consumers and session-title requests get the same fix.

Written for commit d17efe9. Summary will update on new commits.

Review in cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants