Skip to content

Commit e8d3075

Browse files
authored
fix(antigravity): recognize Gemini 4 Carbon and its quota (#33991)
1 parent 71a1c49 commit e8d3075

3 files changed

Lines changed: 38 additions & 9 deletions

File tree

‎apps/server/src/provider/antigravityUsageLimits.test.ts‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ describe("Antigravity subscription limits", () => {
514514
}).pipe(Effect.scoped, Effect.provide(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))),
515515
);
516516

517-
it.effect("labels Argon's weekly quota apart from the default Gemini weekly quota", () =>
517+
it.effect("labels Argon and Carbon quotas apart from the default Gemini quota", () =>
518518
Effect.gen(function* () {
519519
const { probe } = yield* fixture({
520520
summary: {
@@ -526,13 +526,25 @@ describe("Antigravity subscription limits", () => {
526526
{ bucketId: "gemini-argon-wtu-weekly", window: "weekly", remainingFraction: 0.6 },
527527
],
528528
},
529+
{
530+
displayName: "Gemini 4 Carbon",
531+
buckets: [
532+
{ bucketId: "gemini-carbon-wtu-weekly", window: "weekly", remainingFraction: 0.4 },
533+
],
534+
},
535+
{
536+
displayName: " ",
537+
buckets: [{ bucketId: "gemini-carbon-5h", window: "5h", remainingFraction: 0.8 }],
538+
},
529539
],
530540
},
531541
});
532542
const limits = yield* probe;
533543
const byId = new Map(limits.windows.map((window) => [window.id, window]));
534544
expect(byId.get("gemini-weekly")?.label).toBe("Gemini · Weekly");
535545
expect(byId.get("gemini-argon-wtu-weekly")?.label).toBe("Gemini 4 Argon · Weekly");
546+
expect(byId.get("gemini-carbon-wtu-weekly")?.label).toBe("Gemini 4 Carbon · Weekly");
547+
expect(byId.get("gemini-carbon-5h")?.label).toBe("Gemini Carbon · 5-hour");
536548
}).pipe(Effect.scoped, Effect.provide(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))),
537549
);
538550

‎apps/server/src/provider/antigravityUsageLimits.ts‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,16 @@ function summaryWindows(summary: typeof Summary.Type, requestedAt: number) {
128128
for (const group of groups ?? []) {
129129
for (const bucket of group.buckets ?? []) {
130130
if (bucket.disabled) continue;
131-
// Argon is metered apart from the default Gemini buckets; keep its group name.
131+
// Argon and Carbon are metered separately from the default Gemini buckets.
132132
const family = bucket.bucketId.startsWith("gemini-argon-")
133133
? group.displayName?.trim() || "Gemini Argon"
134-
: bucket.bucketId.startsWith("gemini-")
135-
? "Gemini"
136-
: bucket.bucketId.startsWith("3p-")
137-
? "Claude & GPT (shared)"
138-
: group.displayName?.trim() || bucket.bucketId;
134+
: bucket.bucketId.startsWith("gemini-carbon-")
135+
? group.displayName?.trim() || "Gemini Carbon"
136+
: bucket.bucketId.startsWith("gemini-")
137+
? "Gemini"
138+
: bucket.bucketId.startsWith("3p-")
139+
? "Claude & GPT (shared)"
140+
: group.displayName?.trim() || bucket.bucketId;
139141
const weekly = bucket.window === "weekly";
140142
const session = bucket.window === "5h";
141143
const windowDurationMins = SUMMARY_WINDOW_MINS.get(bucket.window ?? "");

‎apps/server/src/provider/model-manifest.json‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"version": 1,
3-
"updatedAt": "2026-11-09T19:07:56Z",
3+
"updatedAt": "2026-11-10T17:25:47Z",
44
"compatibility": [
55
{
66
"driver": "codex",
@@ -126,7 +126,14 @@
126126
"gpt-daybreak-red-latest"
127127
],
128128
"claudeAgent": ["claude-fable-5-2", "claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5"],
129-
"antigravity": ["gemini-3.8-flash-high", "gemini-3.8-flash-medium", "gemini-3.8-flash-low"]
129+
"antigravity": [
130+
"gemini-4-carbon",
131+
"gemini-4-argon",
132+
"gemini-3.8-flash",
133+
"gemini-3.8-flash-high",
134+
"gemini-3.8-flash-medium",
135+
"gemini-3.8-flash-low"
136+
]
130137
},
131138
"providers": {
132139
"codex": {
@@ -875,6 +882,14 @@
875882
},
876883
"profiles": {},
877884
"models": [
885+
{
886+
"slug": "gemini-4-carbon",
887+
"name": "Gemini 4 Carbon",
888+
"status": "current",
889+
"releasedAt": "2026-11-10"
890+
},
891+
{ "slug": "gemini-4-argon", "name": "Gemini 4 Argon", "status": "current" },
892+
{ "slug": "gemini-3.8-flash", "name": "Gemini 3.8 Flash", "status": "current" },
878893
{
879894
"slug": "gemini-3.8-flash-high",
880895
"name": "Gemini 3.8 Flash (High)",

0 commit comments

Comments
 (0)