Skip to content

Commit 3d3c4fe

Browse files
lidge-junjun
andauthored
feat(models): roll out Gemini 3.8 Flash across Antigravity, Google, and the sidecar (#3286)
* docs(devlog): Gemini 3.8 Flash rollout roadmap (260903_gemini_38_rollout wp0) Diff-level roadmap for rolling Gemini 3.8 Flash across every surface that currently names 3.6/3.7. Two findings shape the plan, both first-hand rather than inherited from the 3.7 unit: - Google documents 3.7 Flash as "remains fully supported", and a live CCA fetchAvailableModels call returns 3.5, 3.6, 3.7 and 3.8 together. So this is an ADDITIVE rollout with a default move, not the hard replacement the 3.6 to 3.7 migration performed. - CCA publishes gemini-3.8-flash-{low,medium,high} and no -tiered row, so 3.8 is structurally 3.6-shaped: it belongs in ANTIGRAVITY_EFFORT_WIRE_MAP, not in the single-wire thinkingLevel map 3.7 uses. Three adversarial audit rounds (independent gpt-5.6-sol reviewer at high effort) took this from FAIL to PASS. The two most valuable findings were confirmed against the live backend: the Claude SDK identity paragraph 429s on 3.8 exactly as on 3.7, so that strip guard must widen before 3.8 becomes the default; and static vs discovered effort resolution returned different request bodies for the same input. Docs only. No runtime change in this commit. * feat(antigravity): expose Gemini 3.8 Flash with its suffix effort ladder Google shipped Gemini 3.8 Flash on 2026-09-02 and CCA already returns it ranked first in the Recommended sort, but discovery published it as three uncollapsed rows with no effort ladder at all. Additive, not a replacement. The 3.6 generation vanished from CCA the moment 3.7 shipped, which is why RETIRED_FLASH_TIERS exists. 3.8 did not do that: Google documents 3.7 Flash as remaining fully supported, and a live fetchAvailableModels call returns 3.8, 3.7 and 3.6 together. So 3.7 stays picker-visible and every retirement mapping is left where it is. 3.8 tiers ride SUFFIX wire ids, unlike the single -tiered id 3.7 uses, so it is registered through ANTIGRAVITY_EFFORT_WIRE_MAP. Two consequences, each proven against the backend rather than assumed: - The suffix is the sole tier carrier. CCA accepts a -low wire id paired with a HIGH thinking level and returns 200, so a contradictory pair would run at an unknowable tier. ANTIGRAVITY_SUFFIX_TIER_MODELS suppresses the redundant level and makes static resolution byte-identical to the discovery path, which never emitted one. That divergence also swallowed clamped efforts: max/xhigh/ultra resolved differently before and after discovery ran. - The Claude SDK identity paragraph 429s on 3.8 exactly as on 3.7. The strip guard was an equality check on one model id; with 3.8 becoming the default it would have returned RESOURCE_EXHAUSTED for every Claude-Agent-shaped request while looking like a quota problem. Membership is now canonicalized so raw suffix selectors from a partial ladder are covered too. GEMINI_FLASH_WIRE_ID is renamed GEMINI_RETIRED_FLASH_TARGET_WIRE_ID: it holds the 3.7 redirect target, and after 3.8 became current the old name pointed readers at the wrong model. Verification: bun run typecheck, plus focused tests/google-antigravity-wire.test.ts, gemini-37-flash-migration.test.ts, google-adapter.test.ts, provider-registry-parity.test.ts - 166 pass, 0 fail. * feat(models): price and publish Gemini 3.8 Flash metadata Adds the google/gemini-3.8-flash source record (regenerated, never hand- edited) and the Antigravity + direct Google price rows. The source record deliberately omits `cost`. Bundled generated metadata is consulted before the expected-price overlay and returns status "verified", so copying the adjacent 3.6 record - which does carry a cost block - would make the Antigravity row unreachable and report CCA spend as a verified price. Google publishes Developer API prices; it does not publish that Cloud Code Assist charges them. The overlay is verified-derived for exactly that reason: the number is proven, the claim that Antigravity bills it is inferred. GEMINI_38_FLASH is its own constant despite matching 3.7 today, so a later re-verification of one cannot silently move the other. Nothing is retired here. Reconciliation refreshes capability records from the registry, so an existing user picks up 3.8 on the next start, and a user who deliberately chose 3.7 keeps it - Google still serves that model. The new reconcile case asserts that preservation directly; the pre-existing 3.5 case only exercised the opposite branch, where a retired default gets healed. Verification: bun run typecheck, plus focused usage-cost, model-metadata-sync, oauth-provider-reconcile and gemini-37-flash-migration - 137 pass, 0 fail. * feat(models): carry Gemini 3.8 Flash to the remaining surfaces Direct Google, the free-provider directory, the Gemini web-search sidecar default, a preemptive Cursor seed, and the sidecar docs row. The direct Google ladder omits `minimal` even though its 3.5/3.6/3.7 neighbours list it: Google documents `minimal` as a validation error for this generation. defaultModel stays gemini-3.5-flash - adding a model elsewhere must not silently move an existing API-key user's default. The free-directory Gemini row gets a row-specific lastVerified rather than a bumped shared constant, which would have stamped a 2026-09-03 check onto every other provider row that nobody re-checked. The Cursor seed follows the documented glm-5.3 precedent: Cursor has not announced 3.8, and the static catalog is intersected with the live roster, so the entry stays invisible until Cursor lists it. Left alone deliberately: GEMINI_DIRECT_WIRE_RENAMES gains no 3.8 entry, because no source anywhere proves a gemini-3.8-flash-tiered id exists, and the providers.md rename example keeps naming 3.7 for the same reason. Verification: bun run typecheck, plus 15 focused test files - 753 pass, 1 fail. The failure is pre-existing and unrelated: 'Antigravity live model discovery uses the CCA agent list' leaks a credential across files and fails on the clean tree too, while passing when that file runs alone. * fix(antigravity): strip the rejected paragraph by routed generation, not selector The maintainer review found a hole three audit rounds missed, and a live probe confirmed it: a saved gemini-3.6-flash selection does not call 3.6. Rule 0 redirects it onto gemini-3.7-flash-tiered, which rejects the Claude Agent SDK identity paragraph with a 429 that reads as quota exhaustion. The guard keyed on the selector through canonicalAntigravityUsageModel, which covers the collapsed base and the raw suffix rows. It cannot cover retired ids, because those deliberately keep their OWN identity for usage accounting - that is the rule protecting historical spend from being relabelled. Two individually correct mechanisms combined into a gap, and every saved 3.6/3.5 config would have kept 429ing after this rollout. Judging the routed wire id closes it, and naming a wire spelling once now covers every selector that can reach that generation rather than requiring the set to enumerate selectors that redirect into it. The old test asserting a 3.6 selection KEEPS the paragraph was asserting the bug; it is replaced by one proving the strip, plus a real control on claude-sonnet-4-6 - a model with no recorded rejection, where the paragraph is literally true. Also folds the review's second point: the direct google 3.7 row no longer advertises `minimal`. Google documents it as a validation error for that generation, which is the same evidence 3.8 relies on, and the line was already being edited here. 3.5 and 3.6 keep theirs - their pages still list it. Verification: bun run typecheck, plus 12 focused test files - 681 pass, 0 fail. --------- Co-authored-by: jun <[email protected]>
1 parent fd324dc commit 3d3c4fe

33 files changed

Lines changed: 1658 additions & 42 deletions
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Gemini 3.8 Flash rollout plan
2+
3+
- Date: 2026-09-03
4+
- Session: `01a062e6-43d4-7ad2-8236-c75a8fb66a12`
5+
- Work class: C3 — provider catalog, CCA wire routing, persisted config surface, usage pricing, generated metadata, docs and tests move together.
6+
- Status: P (wp0, docs-only roadmap cycle).
7+
8+
## Loop spec
9+
10+
- Archetype: satisfy-spec integration.
11+
- Trigger: Google shipped Gemini 3.8 Flash on 2026-09-02, and authenticated Antigravity discovery already returns three 3.8 wire ids ranked FIRST in the Recommended sort.
12+
- Goal: make Gemini 3.8 Flash the selectable, correctly tiered Antigravity Flash model, and carry the same spec to every other surface that already names 3.6/3.7 — without inventing anything the vendor has not published.
13+
- Non-goals: Vertex routing, OrcaRouter/OpenRouter seeding, widening request transport beyond `text`+`image`, hand-editing generated metadata, deleting historical price rows or usage attribution, any release or publish.
14+
- Verifier: focused `bun test <file>` runs on the touched subsystems plus `bun run typecheck`. **The repository-wide local suite is forbidden by the user** ("로컬스위트는 절대 돌리지 말고"); exact-head GitHub CI is the authoritative full gate.
15+
- Stop condition: 3.8 is picker-visible with a working low/medium/high ladder, every inventoried 3.6/3.7 surface is updated or carries a recorded reason not to be, focused tests and typecheck pass, CI is green on the exact head SHA, and the PR is merged into `dev` with ancestry proof.
16+
- Memory artifact: this unit folder.
17+
- Expected terminal outcomes: `DONE`; `BLOCKED` if CI or branch protection refuses for a reason outside this change; `NEEDS_HUMAN` if a pricing claim turns out unprovable.
18+
- Escalation: each A gate dispatches one independent read-only reviewer on `gpt-5.6-sol` at high reasoning effort. After two failed reviewer correction loops on the same packet, the main session stops and reports.
19+
20+
## The decision this plan turns on
21+
22+
The 3.6 to 3.7 rollout (`devlog/_fin/260814_overnight_triage_release/020_gemini_37_flash.md`) was a **replacement**: the maintainer's operational fact was that Google pulls the previous Antigravity Flash model almost immediately, so 3.6 had to be deprecated in the same commit that introduced 3.7.
23+
24+
**That premise does not hold for this launch, and both halves of the disproof are first-hand:**
25+
26+
1. Google's own `latest-model` guide says Gemini 3.7 Flash "remains fully supported" and still lists it as Stable (see `001`).
27+
2. A live CCA `:fetchAvailableModels` call on 2026-09-03 returns 3.5, 3.6, 3.7 **and** 3.8 wire ids simultaneously (see `002`).
28+
29+
So 3.8 lands **additively**: it becomes the default and the recommended Flash row, while 3.7 stays picker-visible and every existing retirement mapping is left exactly where it is. Copying the 3.7 unit's deprecation section would delete a model the backend is still serving.
30+
31+
## The second decision: wire shape
32+
33+
3.7 expresses its tiers as `thinkingLevel` against ONE wire id (`gemini-3.7-flash-tiered`). 3.8 does not: CCA publishes three suffixed wire ids and no `-tiered` row. That makes 3.8 structurally a **3.6-shaped** model, and it must be registered through `ANTIGRAVITY_EFFORT_WIRE_MAP` (rule 2/3), never through `ANTIGRAVITY_THINKING_LEVEL_MODELS` (rule 1b). Registering it the 3.7 way would send `thinkingLevel` against a nonexistent `gemini-3.8-flash-tiered` wire id.
34+
35+
## Work-phase map (dependency-ordered, PHASE-SPLIT-01)
36+
37+
| Phase | Doc | Consumes | Delivers |
38+
|---|---|---|---|
39+
| wp0 | this folder | — | research + diff-level roadmap |
40+
| wp1 | `010_wp1_antigravity_core.md` | wp0 | `antigravity-models.ts` catalog/ladder/routing + registry default |
41+
| wp2 | `020_wp2_metadata_pricing.md` | wp1 | expected-prices rows, metadata source + regen |
42+
| wp3 | `030_wp3_peripheral_surfaces.md` | wp2 | direct Google seed, free-directory, Cursor seed, sidecar default, docs |
43+
| wp4 | `040_wp4_delivery.md` | wp3 | branch, `--no-verify` push, PR, exact-head CI, merge |
44+
45+
wp1 is first because every later surface keys off the picker id and ladder it establishes. wp2 depends on wp1 because the price overlay is keyed by the picker id and the suffix wire ids wp1 introduces. wp3 is last among the code phases because it is the set of surfaces that merely *reference* the model rather than define it.
46+
47+
## Scope
48+
49+
### IN
50+
51+
- `src/providers/antigravity-models.ts`, `src/providers/registry.ts`
52+
- `src/usage/expected-prices.ts`, `scripts/model-metadata.source.json` (plus `bun run generate:model-metadata`)
53+
- `src/providers/free-directory.ts`, `src/adapters/cursor/effort-map.ts`, `src/adapters/cursor/catalog.ts`, `src/web-search/index.ts`
54+
- `docs-site/` provider and sidecar tables
55+
- focused tests beside the existing Antigravity/catalog/price tests
56+
57+
### OUT
58+
59+
- `src/adapters/google.ts` `GEMINI_DIRECT_WIRE_RENAMES`: no `gemini-3.8-flash-tiered` id is proven on any surface, so adding a rename would invent a wire id. Recorded in `030`.
60+
- `src/providers/model-rename-migration.ts`: nothing is retired by this change, so no new rename entry. The existing 3.6/3.5 to 3.7 entries stay, because 3.7 is still live.
61+
- `RETIRED_FLASH_TIERS` and `ANTIGRAVITY_USAGE_BASE_BY_ID`: unchanged for the same reason.
62+
- Vertex (`google-vertex` `defaultModel` stays frozen), OrcaRouter, OpenRouter, GitHub Copilot.
63+
64+
## Accept criteria (goalplan c-1 through c-7)
65+
66+
1. `gemini-3.8-flash` is one collapsed picker row, not three suffix rows.
67+
2. Each of `low`/`medium`/`high` resolves to its own `gemini-3.8-flash-{tier}` wire id.
68+
3. `gemini-3.7-flash` remains picker-visible and its `-tiered` routing is untouched.
69+
4. Retired 3.6/3.5 ids still route to 3.7 with their recorded tier and stay picker-invisible.
70+
5. Historical usage rows carrying 3.6/3.7 ids still aggregate under their own base.
71+
6. `bun run typecheck` exits 0; only focused test files are run locally.
72+
7. CI green on the exact head SHA and the PR merged into `dev`.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# 001 — Gemini 3.8 Flash: vendor claim ledger
2+
3+
Research snapshot 2026-09-03 (KST), collected by an independent read-only research lane on
4+
`gpt-5.6-sol` at high reasoning effort. Every row was verified by opening the linked official
5+
page. Unprovable fields say `NOT PROVEN` rather than borrowing 3.7's value.
6+
7+
| Claim | Value | Source | Page date |
8+
|-------|-------|--------|-----------|
9+
| Canonical Developer API id | `gemini-3.8-flash` | ai.google.dev/gemini-api/docs/models/gemini-3.8-flash | 2026-09-02 |
10+
| Published aliases | stable id only; `-preview`/dated/`-latest` NOT PROVEN | same + docs/models | 2026-09-02 |
11+
| Release date | 2026-09-02 | deepmind.google model card; docs.cloud.google.com | 2026-09-02 |
12+
| Availability | GA, production-ready (not Preview) | latest-model guide | 2026-09-02 |
13+
| Context window | 1,048,576 input tokens | model page | 2026-09-02 |
14+
| Max output | 65,536 tokens | model page | 2026-09-02 |
15+
| Input price | $0.75 / 1M through 2026-12-31, $1.50 / 1M from 2027-01-01 | Developer API pricing | 2026-09-02 |
16+
| Output price (incl. thinking) | $3.75 / 1M through 2026-12-31, $7.50 / 1M from 2027-01-01 | Developer API pricing | 2026-09-02 |
17+
| Separate thinking price | none — thinking billed as output | pricing | 2026-09-02 |
18+
| Cache read | $0.075 / 1M through 2026-12-31, then $0.15 | pricing | 2026-09-02 |
19+
| Cache storage | $0.50 / 1M tokens/hour through 2026-12-31, then $1.00 | pricing | 2026-09-02 |
20+
| Batch / Flex | half of standard input and output | pricing | 2026-09-02 |
21+
| Priority | $1.35 in / $6.75 out per 1M through 2026-12-31 | pricing | 2026-09-02 |
22+
| Thinking parameter | `generation_config.thinking_level` (replaces `thinking_budget`) | latest-model | 2026-09-02 |
23+
| Thinking values | `low` / `medium` / `high`, default `medium` | latest-model; Cloud guide | 2026-09-02 |
24+
| `minimal` | unsupported — setting it returns a validation error | model page; Cloud guide | 2026-09-02 |
25+
| Inputs | text, image, video, audio, PDF | model page | 2026-09-02 |
26+
| Outputs | text only (no image/audio generation, no Live API) | model page | 2026-09-02 |
27+
| Knowledge cutoff | March 2026 (some domains still January 2025) | DeepMind model card | 2026-09-02 |
28+
| Antigravity default | proven for the Managed Agents agent and the Antigravity SDK; the desktop/CCA backend default is NOT PROVEN | latest-model | 2026-09-02 |
29+
| Vertex / Agent Platform id | `gemini-3.8-flash`, `publishers/google/models/gemini-3.8-flash:generateContent` | Cloud developer guide | 2026-09-02 |
30+
| **3.7 Flash deprecated?** | **No — Google says 3.7 Flash "remains fully supported" and still lists it Stable** | latest-model; models catalog | 2026-09-02 |
31+
| CCA billing equivalence | NOT PROVEN — the listed prices are Developer API prices | pricing | 2026-09-02 |
32+
33+
## Other providers OpenCodex integrates
34+
35+
| Provider | 3.8 model id published? | Source |
36+
|---|---|---|
37+
| OpenRouter | YES — `google/gemini-3.8-flash` | openrouter.ai model page |
38+
| Cursor | NO — models page and changelog still stop at 3.7 Flash | cursor.com/docs/models-and-pricing; /changelog |
39+
| GitHub Copilot | NO — supported-model table lists 3.5/3.6/3.7 only | docs.github.com Copilot supported models |
40+
41+
## Unprovable fields
42+
43+
- 3.8-specific preview, dated, or `-latest` aliases.
44+
- A standalone `blog.google` launch post (the date rests on the DeepMind card and the Cloud record).
45+
- Cloud Code Assist billing equivalence to Developer API list prices.
46+
- Cursor and GitHub Copilot 3.8 model ids.
47+
48+
## Why the pricing row cannot be `verified` for Antigravity
49+
50+
OpenCodex routes this model through CCA, and the pricing page distinguishes Developer API,
51+
Enterprise Agent Platform, and managed Antigravity-agent pricing without proving equivalence
52+
for the Cloud Code Assist backend. This is exactly the provenance caveat the 3.7 unit already
53+
recorded, and `src/usage/expected-prices.ts` already has the right enum member for it:
54+
`verified-derived`. Only a `google`-provider row may claim `verified`.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# 002 — Live Cloud Code Assist evidence
2+
3+
Probes run 2026-09-03 from this worktree against `daily-cloudcode-pa.googleapis.com` using the
4+
already-stored local Antigravity OAuth credential and the repository's own
5+
`ANTIGRAVITY_REQUEST_UA`. No token, refresh token, or project id was printed or persisted; the
6+
probe scripts were removed after the run.
7+
8+
## `v1internal:fetchAvailableModels` — the 3.8 rows
9+
10+
| Wire id | displayName | maxTokens | maxOutputTokens | supportsThinking | thinkingBudget | minThinkingBudget | supportsImages | supportsVideo |
11+
|---|---|---:|---:|---|---:|---:|---|---|
12+
| `gemini-3.8-flash-low` | Gemini 3.8 Flash (Low) | 1048576 | 65536 | true | 1000 | 32 | true | true |
13+
| `gemini-3.8-flash-medium` | Gemini 3.8 Flash (Medium) | 1048576 | 65536 | true | 4000 | 32 | true | true |
14+
| `gemini-3.8-flash-high` | Gemini 3.8 Flash (High) | 1048576 | 65536 | true | -1 | 32 | true | true |
15+
16+
**There is no `gemini-3.8-flash-tiered` row.** The payload does contain
17+
`gemini-3.7-flash-tiered` and `gemini-3.6-flash-tiered`, so its absence for 3.8 is a fact about
18+
this generation, not a gap in the probe.
19+
20+
## `agentModelSorts` Recommended order (verbatim)
21+
22+
```
23+
gemini-3.8-flash-high, gemini-3.8-flash-medium, gemini-3.8-flash-low,
24+
gemini-3.7-flash-high, gemini-3.7-flash-medium, gemini-3.7-flash-low,
25+
gemini-3.6-flash-high, gemini-3.6-flash-medium, gemini-3.6-flash-low,
26+
gemini-pro-agent, gemini-3.1-pro-low, claude-sonnet-4-6,
27+
claude-opus-4-6-thinking, gpt-oss-120b-medium
28+
```
29+
30+
Two things follow. 3.8 outranks every other Flash generation, so it is the natural default. And
31+
**3.7 and 3.6 are both still being served** — the "previous Flash is pulled immediately"
32+
premise behind the 3.6 deprecation does not apply here.
33+
34+
## `v1internal:generateContent` — all three tiers accept inference
35+
36+
Minimal one-line prompts with `generationConfig.thinkingConfig.thinkingLevel` set to the
37+
matching tier:
38+
39+
| Wire model | HTTP | Output marker |
40+
|---|---:|---|
41+
| `gemini-3.8-flash-low` | 200 | `OK-LOW` |
42+
| `gemini-3.8-flash-medium` | 200 | `OK-MEDIUM` |
43+
| `gemini-3.8-flash-high` | 200 | `OK-HIGH` |
44+
45+
This is the same pre-exposure proof the 3.6 rollout recorded: all three ids accept inference
46+
before any catalog change ships, so the ladder in `010` cannot advertise a rung the backend
47+
would reject.
48+
49+
## What the running proxy does with them today
50+
51+
`ocx models live --provider google-antigravity` currently publishes the three 3.8 ids as
52+
**separate uncollapsed rows with `reasoningEfforts: []`** — the same broken shape #1897
53+
described. Discovery finds them, and no static rule knows they are one model, so they arrive as
54+
three effortless picker entries. That is the defect wp1 closes.
55+
56+
## Security boundary for these probes
57+
58+
- Assets: local Antigravity OAuth access token and discovered project id.
59+
- Trust boundary: local read of the existing credential store, then HTTPS to the fixed
60+
registry-owned base URL. Model text cannot choose the destination, headers, or credential.
61+
- Controls: nothing credential-bearing printed or written; probe files deleted after the run.
62+
- Blast radius: three minimal quota-consuming inference calls. No configuration mutated.

0 commit comments

Comments
 (0)