diff --git a/changelog.d/features/13318-gemini-3.8-flash.md b/changelog.d/features/13318-gemini-3.8-flash.md new file mode 100644 index 0000000000..8a0d95531a --- /dev/null +++ b/changelog.d/features/13318-gemini-3.8-flash.md @@ -0,0 +1 @@ +- **feat(models):** add Gemini 3.8 Flash tiers to Antigravity and AGY catalogs ([#13318](https://github.com/diegosouzapw/OmniRoute/pull/13318)) — thanks @tuandinh0801, with credit to #12499 (@Abhishekchhetri020) diff --git a/open-sse/services/antigravityVersion.ts b/open-sse/services/antigravityVersion.ts index 6a8e5c7cc8..7914674109 100644 --- a/open-sse/services/antigravityVersion.ts +++ b/open-sse/services/antigravityVersion.ts @@ -5,8 +5,8 @@ const ANTIGRAVITY_CLI_RELEASE_URL = export const ANTIGRAVITY_VERSION_CACHE_TTL_MS = 6 * 60 * 60 * 1000; export const ANTIGRAVITY_VERSION_FETCH_TIMEOUT_MS = 5_000; -export const ANTIGRAVITY_IDE_FALLBACK_VERSION = "2.1.1"; -export const ANTIGRAVITY_CLI_FALLBACK_VERSION = "1.1.5"; +export const ANTIGRAVITY_IDE_FALLBACK_VERSION = "2.5.5"; +export const ANTIGRAVITY_CLI_FALLBACK_VERSION = "1.1.24"; type VersionCache = { fetchedAt: number; diff --git a/src/shared/constants/cliTools.ts b/src/shared/constants/cliTools.ts index 01401ea986..87ea13ce2c 100644 --- a/src/shared/constants/cliTools.ts +++ b/src/shared/constants/cliTools.ts @@ -242,6 +242,9 @@ export const CLI_TOOLS: Record = { acpSpawnable: false, baseUrlSupport: "none", modelAliases: [ + "gemini-3.8-flash-high", + "gemini-3.8-flash-medium", + "gemini-3.8-flash-low", "gemini-3.7-flash-high", "gemini-3.7-flash-medium", "gemini-3.7-flash-low", @@ -252,6 +255,9 @@ export const CLI_TOOLS: Record = { "gpt-oss-120b-medium", ], defaultModels: [ + createCliModel("gemini-3.8-flash-high", "Gemini 3.8 Flash High"), + createCliModel("gemini-3.8-flash-medium", "Gemini 3.8 Flash Medium"), + createCliModel("gemini-3.8-flash-low", "Gemini 3.8 Flash Low"), createCliModel("gemini-3.7-flash-high", "Gemini 3.7 Flash High"), createCliModel("gemini-3.7-flash-medium", "Gemini 3.7 Flash Medium"), createCliModel("gemini-3.7-flash-low", "Gemini 3.7 Flash Low"), diff --git a/src/shared/constants/pricing/oauth-subscriptions.ts b/src/shared/constants/pricing/oauth-subscriptions.ts index a6e68896ba..678ec95dc9 100644 --- a/src/shared/constants/pricing/oauth-subscriptions.ts +++ b/src/shared/constants/pricing/oauth-subscriptions.ts @@ -15,6 +15,9 @@ import { } from "./shared-tiers"; const ANTIGRAVITY_GEMINI_3_7_PRICING = { + "gemini-3.8-flash-low": GEMINI_3_7_FLASH_PROMO_PRICING, + "gemini-3.8-flash-medium": GEMINI_3_7_FLASH_PROMO_PRICING, + "gemini-3.8-flash-high": GEMINI_3_7_FLASH_PROMO_PRICING, "gemini-3.7-flash-low": GEMINI_3_7_FLASH_PROMO_PRICING, "gemini-3.7-flash-medium": GEMINI_3_7_FLASH_PROMO_PRICING, "gemini-3.7-flash-high": GEMINI_3_7_FLASH_PROMO_PRICING, diff --git a/tests/unit/antigravity-version.test.ts b/tests/unit/antigravity-version.test.ts index cf94ab6adf..174f947157 100644 --- a/tests/unit/antigravity-version.test.ts +++ b/tests/unit/antigravity-version.test.ts @@ -24,29 +24,29 @@ test.afterEach(() => { test("IDE and CLI start with independent captured fallback versions", () => { assert.equal(getCachedAntigravityIdeVersion(), ANTIGRAVITY_IDE_FALLBACK_VERSION); assert.equal(getCachedAntigravityCliVersion(), ANTIGRAVITY_CLI_FALLBACK_VERSION); - assert.equal(ANTIGRAVITY_IDE_FALLBACK_VERSION, "2.1.1"); - assert.equal(ANTIGRAVITY_CLI_FALLBACK_VERSION, "1.1.5"); + assert.equal(ANTIGRAVITY_IDE_FALLBACK_VERSION, "2.5.5"); + assert.equal(ANTIGRAVITY_CLI_FALLBACK_VERSION, "1.1.24"); }); test("IDE resolver reads the official updater feed and caches only the IDE version", async () => { const urls: string[] = []; const fetchMock = async (url: string | URL | Request) => { urls.push(String(url)); - return new Response(JSON.stringify([{ version: "2.2.0", execution_id: "ide-release" }]), { + return new Response(JSON.stringify([{ version: "2.6.0", execution_id: "ide-release" }]), { status: 200, headers: { "Content-Type": "application/json" }, }); }; - assert.equal(await resolveAntigravityIdeVersion(fetchMock as typeof fetch), "2.2.0"); - assert.equal(await resolveAntigravityIdeVersion(fetchMock as typeof fetch), "2.2.0"); + assert.equal(await resolveAntigravityIdeVersion(fetchMock as typeof fetch), "2.6.0"); + assert.equal(await resolveAntigravityIdeVersion(fetchMock as typeof fetch), "2.6.0"); assert.equal(urls.length, 1); assert.equal( urls[0], "https://antigravity-auto-updater-974169037036.us-central1.run.app/releases" ); - assert.equal(getCachedAntigravityIdeVersion(), "2.2.0"); - assert.equal(getCachedAntigravityCliVersion(), "1.1.5"); + assert.equal(getCachedAntigravityIdeVersion(), "2.6.0"); + assert.equal(getCachedAntigravityCliVersion(), ANTIGRAVITY_CLI_FALLBACK_VERSION); }); test("IDE resolver selects the newest feed entry and never falls below its version floor", async () => { @@ -54,14 +54,14 @@ test("IDE resolver selects the newest feed entry and never falls below its versi new Response( JSON.stringify([ { version: "2.0.0" }, - { version: "2.4.0" }, - { version: "2.2.0" }, + { version: "2.6.0" }, + { version: "2.6.0" }, { version: "invalid" }, ]), { status: 200, headers: { "Content-Type": "application/json" } } ); - assert.equal(await resolveAntigravityIdeVersion(mixedFeedFetch as typeof fetch), "2.4.0"); + assert.equal(await resolveAntigravityIdeVersion(mixedFeedFetch as typeof fetch), "2.6.0"); clearAntigravityVersionCaches(); const staleFeedFetch = async () => @@ -80,7 +80,7 @@ test("IDE resolver selects the newest feed entry and never falls below its versi test("IDE resolver keeps a newer cached version when a later feed response is older", async () => { let now = 1_000; Date.now = () => now; - seedAntigravityIdeVersionCache("2.5.0", now); + seedAntigravityIdeVersionCache("2.6.0", now); now += ANTIGRAVITY_VERSION_CACHE_TTL_MS + 1; const olderFeedFetch = async () => @@ -89,8 +89,8 @@ test("IDE resolver keeps a newer cached version when a later feed response is ol headers: { "Content-Type": "application/json" }, }); - assert.equal(await resolveAntigravityIdeVersion(olderFeedFetch as typeof fetch), "2.5.0"); - assert.equal(getCachedAntigravityIdeVersion(), "2.5.0"); + assert.equal(await resolveAntigravityIdeVersion(olderFeedFetch as typeof fetch), "2.6.0"); + assert.equal(getCachedAntigravityIdeVersion(), "2.6.0"); }); test("CLI resolver reads the official Google GitHub release and caches only the CLI version", async () => { @@ -111,7 +111,7 @@ test("CLI resolver reads the official Google GitHub release and caches only the "https://api.github.com/repos/google-antigravity/antigravity-cli/releases/latest" ); assert.equal(getCachedAntigravityCliVersion(), "1.2.0"); - assert.equal(getCachedAntigravityIdeVersion(), "2.1.1"); + assert.equal(getCachedAntigravityIdeVersion(), ANTIGRAVITY_IDE_FALLBACK_VERSION); }); test("IDE and CLI TTL refreshes are independent", async () => { @@ -120,19 +120,19 @@ test("IDE and CLI TTL refreshes are independent", async () => { seedAntigravityCliVersionCache("1.1.5", now); const firstFetch = async () => - new Response(JSON.stringify([{ version: "2.2.0" }]), { + new Response(JSON.stringify([{ version: "2.6.0" }]), { status: 200, headers: { "Content-Type": "application/json" }, }); const secondFetch = async () => - new Response(JSON.stringify([{ version: "2.3.0" }]), { + new Response(JSON.stringify([{ version: "2.7.0" }]), { status: 200, headers: { "Content-Type": "application/json" }, }); - assert.equal(await resolveAntigravityIdeVersion(firstFetch as typeof fetch), "2.2.0"); + assert.equal(await resolveAntigravityIdeVersion(firstFetch as typeof fetch), "2.6.0"); now += ANTIGRAVITY_VERSION_CACHE_TTL_MS + 1; - assert.equal(await resolveAntigravityIdeVersion(secondFetch as typeof fetch), "2.3.0"); + assert.equal(await resolveAntigravityIdeVersion(secondFetch as typeof fetch), "2.7.0"); assert.equal(getCachedAntigravityCliVersion(), "1.1.5"); }); @@ -150,9 +150,9 @@ test("each resolver falls back only to its own last known good version", async ( ANTIGRAVITY_CLI_FALLBACK_VERSION ); - seedAntigravityIdeVersionCache("2.4.0", 0); + seedAntigravityIdeVersionCache("2.6.0", 0); seedAntigravityCliVersionCache("1.3.0", 0); - assert.equal(await resolveAntigravityIdeVersion(failingFetch as typeof fetch), "2.4.0"); + assert.equal(await resolveAntigravityIdeVersion(failingFetch as typeof fetch), "2.6.0"); assert.equal(await resolveAntigravityCliVersion(failingFetch as typeof fetch), "1.3.0"); }); @@ -171,7 +171,7 @@ test("concurrent requests coalesce within each product without crossing products const ideFetch = async () => { ideCalls += 1; await ideGate; - return new Response(JSON.stringify([{ version: "2.5.0" }]), { status: 200 }); + return new Response(JSON.stringify([{ version: "2.6.0" }]), { status: 200 }); }; const cliFetch = async () => { cliCalls += 1; @@ -186,7 +186,7 @@ test("concurrent requests coalesce within each product without crossing products releaseIde?.(); releaseCli?.(); - assert.deepEqual(await Promise.all([ideOne, ideTwo]), ["2.5.0", "2.5.0"]); + assert.deepEqual(await Promise.all([ideOne, ideTwo]), ["2.6.0", "2.6.0"]); assert.deepEqual(await Promise.all([cliOne, cliTwo]), ["1.4.0", "1.4.0"]); assert.equal(ideCalls, 1); assert.equal(cliCalls, 1);