Skip to content

🤖 feat: make Gemini 3.8 Flash the default Gemini Flash model - #4060

Merged
ThomasK33 merged 3 commits into
mainfrom
gemini-38-flash-prep
Sep 2, 2026
Merged

🤖 feat: make Gemini 3.8 Flash the default Gemini Flash model#4060
ThomasK33 merged 3 commits into
mainfrom
gemini-38-flash-prep

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

Repoints the gemini-flash alias to Gemini 3.8 Flash (gemini-3.8-flash, GA September 2, 2026), following the same blueprint as the Gemini 3.7 Flash upgrade (#3845). Older Flash tiers remain usable as custom model strings (e.g. google:gemini-3.7-flash, google:gemini-3.6-flash).

Note

This PR was prepared ahead of the release behind a merge gate. Google released Gemini 3.8 Flash on 2026-09-02; the assumptions were then verified against the live API and Google's docs, and two of them turned out to be wrong and were corrected (see Launch-day corrections). The gate is lifted.

Implementation

  • knownModels.tsGEMINI_FLASH.providerModelIdgemini-3.8-flash (alias gemini-flash, tokenizer override google/gemini-2.5-pro unchanged)
  • thinking/policy.tsisGeminiFlashThinkingLevelModelName recognizes gemini-3.8-flash (excluding a future -lite); new isGeminiFlashMinimalRejectingModelName gives 3.8 Flash a low/medium/high policy (no off, see below)
  • providerOptions.ts — Google adapter clamps a bypassed off to thinkingLevel: "low" for 3.8 Flash instead of "minimal"
  • modelParameterOverrides.tsmodelRejectsSamplingParameters strips deprecated temperature/topP/topK for gemini-3.8-flash
  • models-extra.ts — new stats entry: 1M context, 65K max output, intro pricing $0.75/M input, $3.75/M output (incl. thinking), $0.075/M cached input; the gemini-3.7-flash and gemini-3.6-flash entries are retained
  • Docs/CIdocs/config/models.mdx model table and nightly-terminal-bench.yml default matrix updated to google/gemini-3.8-flash
  • GeneratedbuiltInSkillContent.generated.ts regenerated from the docs

Gateway stream normalization, the provider model factory, DEFAULT_MODEL_FALLBACKS, and LEGACY_TOKENIZER_MODEL_OVERRIDES need no changes (generic over the google/ prefix; Gemini Flash participates in neither fallback chains nor legacy tokenizer overrides).

Launch-day corrections

Assumption (pre-release) Verified at launch Change
off → Google thinkingLevel: "minimal" like 3–3.7 Flash 3.8 Flash rejects MINIMAL: live API returns 400 INVALID_ARGUMENT "Thinking level MINIMAL is not supported for this model"; Google Cloud docs list only LOW/MEDIUM/HIGH Policy is ["low","medium","high"] so off clamps to low (same pattern as Grok 4.6 / Mythos, whose reasoning cannot be disabled); provider adapter also clamps defensively
Standard list rates $1.50/$7.50/$0.15 Google bills a half-off introductory rate through Dec 31, 2026 Encode the billed intro rate like #3845 did, with a TODO(2027-01-01) to restore list rates
Stable id gemini-3.8-flash, 1M context, 65K output, sampling params rejected, full multimodal + reasoning Confirmed (modelVersion: "gemini-3.8-flash" in API responses; model card lists 1M/64K) none

Validation

  • 352 tests pass across the 6 touched suites: alias resolution, model stats (3.8 intro pricing + google:gemini-3.7-flash still resolvable as a custom model string), thinking policy (gateway/OpenRouter/versioned/-lite variants; offlow and xhighhigh clamps; medium default floor; new predicate), sampling rejection incl. gateway-routed and mappedToModel entries, provider options (off clamp vs 3.7's minimal, low/medium/high, gateway routing), model filter
  • streamManager.test.ts multi-hop fallback tests (reference KNOWN_MODELS.GEMINI_FLASH.id symbolically) still pass; make static-check green
  • Live API probe (generateContent on gemini-3.8-flash): thinkingLevel=MINIMAL → 400 as above; thinkingLevel=LOW → 200, modelVersion: "gemini-3.8-flash", 77 thought tokens
  • Dogfood in a make dev-server-sandbox instance driven with agent-browser (screenshots + recording in the PR comment below): gemini-flash search resolves to "Gemini 3.8 Flash"; the reasoning-effort menu offers no "Off"; a real message round-trips through the Google API with thinkingConfig: { includeThoughts: true, thinkingLevel: "medium" } (server debug log), the Context panel shows the 1.0M window, and the Cost panel shows $0.03 for 40.2k input tokens (= the $0.75/M intro rate)

Risks

Low, additive metadata plus an alias repoint. Prior Flash tiers keep their entries and predicates, so explicit google:gemini-3.7-flash / google:gemini-3.6-flash model strings are unaffected. Behavior change for users on the gemini-flash alias: thinking can no longer be turned fully off (the API does not allow it); a persisted off preference clamps to low via enforceThinkingPolicy rather than failing the request.


Generated with xum • Model: anthropic:claude-fable-5-1 • Thinking: xhigh

@mintlify

mintlify Bot commented Sep 2, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Mux 🟢 Ready View Preview Sep 2, 2026, 12:09 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8392202fae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/common/constants/knownModels.ts
@chatgpt-codex-connector

This comment has been minimized.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Please take another look. The single P1 (alias repoint ahead of release) is by design and covered by the explicit merge gate in the PR description — see the thread reply for the rationale; no code changed.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 8392202fae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

This comment has been minimized.

Repoints the gemini-flash alias to gemini-3.8-flash ahead of Google's
release, following the 3.7 Flash upgrade (#3845): known-model registry,
thinking-level policy, sampling-parameter rejection, models-extra stats
(1M ctx / 65K out, $1.50/$7.50/$0.15 standard list rates), docs table,
nightly bench matrix, and regenerated built-in skill content. Older Flash
tiers stay usable as custom model strings.

---

_Generated with `xum` • Model: `anthropic:claude-fable-5-1` • Thinking: `xhigh`_

<!-- mux-attribution: model=anthropic:claude-fable-5-1 thinking=xhigh -->
Google released gemini-3.8-flash on 2026-09-02. Live-probing the API shows
thinkingLevel MINIMAL is rejected with a 400 ("Thinking level MINIMAL is not
supported for this model"), so the thinking policy drops "off" (clamps to
"low") and buildProviderOptions defensively sends low instead of minimal.
Pricing follows the 3.7 Flash precedent: encode the billed introductory rate
($0.75/$3.75/$0.075 per M) with a TODO to restore list rates on 2027-01-01.
@ThomasK33 ThomasK33 changed the title 🤖 feat: prepare Gemini 3.8 Flash as the default Gemini Flash model 🤖 feat: make Gemini 3.8 Flash the default Gemini Flash model Sep 2, 2026
@ThomasK33
ThomasK33 force-pushed the gemini-38-flash-prep branch from 8392202 to ef17e10 Compare September 2, 2026 18:21
@ThomasK33

Copy link
Copy Markdown
Member Author

Dogfood evidence (head ef17e107e)

Isolated make dev-server-sandbox instance built from this branch (v0.28.3-nightly.148-28-gef17e107e), seeded with a real Google provider key and driven with agent-browser.

1. gemini-flash alias resolves to Gemini 3.8 Flash in the model selector

Model selector search for gemini-flash shows Gemini 3.8 Flash

2. Reasoning-effort menu for Gemini 3.8 Flash offers no "Off" (Low is hidden by the default medium floor shared by all recognized reasoning models; the previous xhigh selection was clamped to high)

Thinking-level menu shows Medium and High only

3. Live round-trip through the Google API — response attributed to Gemini 3.8 Flash, Context panel shows the 1.0M window, Cost panel shows $0.03 for 40.2k input tokens (= $0.75/M intro rate). Server debug log for this request: buildProviderOptions: Google options {"google":{"thinkingConfig":{"includeThoughts":true,"thinkingLevel":"medium"}}}

Gemini 3.8 Flash live response with cost and context stats

4. Direct API probe (why off had to go):

$ curl …/models/gemini-3.8-flash:generateContent  thinkingLevel=MINIMAL
{"code":400,"message":"Thinking level MINIMAL is not supported for this model. Please retry with other thinking level.","status":"INVALID_ARGUMENT"}

$ curl …/models/gemini-3.8-flash:generateContent  thinkingLevel=LOW
{"modelVersion":"gemini-3.8-flash","text":"pong","usage":{"promptTokenCount":5,"candidatesTokenCount":1,"thoughtsTokenCount":77}}

Recording of the full session (2 min):

gemini-38-dogfood.webm

Unrelated observation (pre-existing, not touched here): after the first scratch-chat message created the chat, the composer's model chip fell back to the default model (Fable 5.1) rather than keeping the scratch selection.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Rebased onto main and added a launch-day follow-up commit: Gemini 3.8 Flash shipped today and the live API rejects thinkingLevel: "minimal", so the 3.8 policy drops off (clamps to low) with a matching defensive clamp in the Google adapter; pricing now encodes the billed intro rate like #3845. See the updated PR description and the dogfood evidence comment.

@chatgpt-codex-connector

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef17e107e8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/common/utils/ai/providerOptions.ts
…fectiveThinkingLevel

Codex P2: TurnRequestBuilder seeds initial requests with enforceMinimum:false,
so an unset level stayed "off" in the request envelope/debug snapshot while the
Google adapter sent "low". Treat 3.8 Flash like Mythos/GLM in the
forced-thinking path so the tracked level is "low" before those artifacts exist.
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Addressed the P2 in 37b7cb8: Gemini 3.8 Flash now joins the forced-thinking set in resolveEffectiveThinkingLevel, so the tracked level is low (never off) before any request artifacts are built.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 37b7cb8f12

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

This comment has been minimized.

@ThomasK33
ThomasK33 added this pull request to the merge queue Sep 2, 2026
Merged via the queue into main with commit 8834977 Sep 2, 2026
36 of 39 checks passed
@ThomasK33
ThomasK33 deleted the gemini-38-flash-prep branch September 2, 2026 19:21
asm pushed a commit to asm/mux that referenced this pull request Sep 2, 2026
## Summary

Version bump for the v0.28.4 patch release. The headline change since
v0.28.3 is Gemini 3.8 Flash becoming the default Gemini Flash model
(coder#4060). The release also carries browser Login with Coder on remote Xum
servers (coder#4047), the opt-in project bundle for settings backup (coder#4043),
the connection-indicator slow-response surfacing (coder#4059), send-queue and
terminal-wake fixes (coder#4053, coder#4052), and the Effect Phase 11 runtime
refactors.

## Implementation

Bumped with `node ./scripts/set-package-version.js 0.28.4` so the root
`package.json` and the legacy `packages/mux-compat` forwarding package
stay version-locked (the v0.28.3 bump missed the compat package and
broke `Test / Unit` on main, fixed in coder#4048).
`src/common/compat/productIdentity.test.ts` passes locally.

After this PR merges, the `v0.28.4` tag will be applied to the squash
commit and the GitHub Release published to trigger the
desktop/npm/docker pipelines.

---

_Generated with `xum` • Model: `anthropic:claude-fable-5-1` • Thinking:
`medium` • Cost: `$0.00`_

<!-- mux-attribution: model=anthropic:claude-fable-5-1 thinking=medium
costs=0.00 -->
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.

1 participant