From 97d948cc9e05c8e469c15209989bdde3a33e5433 Mon Sep 17 00:00:00 2001 From: "Bob.Hou" Date: Fri, 24 Jul 2026 10:43:52 -0400 Subject: [PATCH] fix(antigravity): add missing gemini-3.6-flash pricing rows to ag OAuth pricing (#8290) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit release/v3.8.49 already ships the Gemini 3.6 Flash catalog entries (AGY_PUBLIC_MODELS, ANTIGRAVITY_PUBLIC_MODELS, MODEL_SPECS with supportsThinking: false — Antigravity still rejects client-supplied thinking params) via #8013. What was still missing: the `ag` pricing rows in DEFAULT_PRICING_OAUTH, so getPricingForModel("ag", id) returned null for the three tiers and cost/quota calculations silently fell back to $0. Pricing: $1.50 input / $7.50 output / $0.15 cached per MTok (Google's 2026-07-21 announcement), matching the existing 3.5-flash schedule shape. Thinking tokens billed at output rate. Extends the existing pricing-ag-flash-tiers.test.ts (RED-first: all three tiers failed the "non-null pricing row" assertion before this change) rather than re-adding the already-shipped catalog/modelSpecs entries. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --- .../constants/pricing/oauth-subscriptions.ts | 27 +++++++++++++++++++ tests/unit/pricing-ag-flash-tiers.test.ts | 18 +++++++++++++ 2 files changed, 45 insertions(+) diff --git a/src/shared/constants/pricing/oauth-subscriptions.ts b/src/shared/constants/pricing/oauth-subscriptions.ts index 694b6ced05..bf7f2136c1 100644 --- a/src/shared/constants/pricing/oauth-subscriptions.ts +++ b/src/shared/constants/pricing/oauth-subscriptions.ts @@ -311,6 +311,33 @@ export const DEFAULT_PRICING_OAUTH = { reasoning: 27.0, cache_creation: 4.0, }, + // Gemini 3.6 Flash (released 2026-07-21) - three tier variants like 3.5 Flash + // (see ANTIGRAVITY_PUBLIC_MODELS / MODEL_SPECS which already carry the catalog + // entries). Without these rows, getPricingForModel("ag", id) returns null and + // downstream cost and quota calculations silently fall back to $0. + // Pricing: $1.50 input / $7.50 output / $0.15 cached per MTok. Thinking tokens + // billed at output rate. + "gemini-3.6-flash-low": { + input: 1.5, + output: 7.5, + cached: 0.15, + reasoning: 7.5, + cache_creation: 1.5, + }, + "gemini-3.6-flash-medium": { + input: 1.5, + output: 7.5, + cached: 0.15, + reasoning: 7.5, + cache_creation: 1.5, + }, + "gemini-3.6-flash-high": { + input: 1.5, + output: 7.5, + cached: 0.15, + reasoning: 7.5, + cache_creation: 1.5, + }, "claude-sonnet-4-6": { input: 3.0, output: 15.0, diff --git a/tests/unit/pricing-ag-flash-tiers.test.ts b/tests/unit/pricing-ag-flash-tiers.test.ts index 28b5cb66d8..90c2f574e4 100644 --- a/tests/unit/pricing-ag-flash-tiers.test.ts +++ b/tests/unit/pricing-ag-flash-tiers.test.ts @@ -37,3 +37,21 @@ test("ag/gemini-pro-agent matches the Gemini 3.1 Pro (High) tier", () => { assert.equal(p.reasoning, 27.0); assert.equal(p.cache_creation, 4.0); }); + +// Gemini 3.6 Flash (released 2026-07-21) ships three public client IDs in +// ANTIGRAVITY_PUBLIC_MODELS (`open-sse/config/antigravityModelAliases.ts`) and +// MODEL_SPECS (`src/shared/constants/modelSpecs.ts`), but was missing pricing +// rows in `ag` (DEFAULT_PRICING.ag) — cost / quota calculations silently fell +// back to $0. Pricing: $1.50 input / $7.50 output / $0.15 cached per MTok +// (Google's 2026-07-21 announcement). Thinking tokens billed at output rate. +for (const tier of ["low", "medium", "high"]) { + test(`ag/gemini-3.6-flash-${tier} has a non-null pricing row`, () => { + const p = getDefaultPricing().ag[`gemini-3.6-flash-${tier}`]; + assert.ok(p, `expected a pricing row for ag/gemini-3.6-flash-${tier}`); + assert.equal(p.input, 1.5); + assert.equal(p.output, 7.5); + assert.equal(p.cached, 0.15); + assert.equal(p.reasoning, 7.5); + assert.equal(p.cache_creation, 1.5); + }); +}