@devries-cameron20 / t3code Mirror · read-only / commits / 79f1fadfc6
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 09:30 UTC

fix(server): bump Antigravity quota probe UA to hub/2.24.0 so Gemini limits appear (#28090)

Gemini quota buckets are now returned, and Argon weekly quota keeps its own label. Co-authored-by: whoisaldo <whois.younes@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

LVC-Chakresh committed Oct 31, 2026 at 16:47 UTC 79f1fadfc6020b820d541ca4691d2feebb15dd1b
2 files changed +32 -6
apps/server/src/provider/antigravityUsageLimits.test.ts
+23
@@ -110,6 +110,7 @@ const fixture = Effect.fn("AntigravityUsageTest.fixture")(function* (
110 );
111 }
112 expect(JSON.parse(body)).toEqual({ project: "project-id" });
113 + expect(request.headers["user-agent"]).toMatch(/^antigravity\/hub\/2\.24\.0 /);
114 return HttpClientResponse.fromWeb(
115 request,
116 request.url.endsWith(":retrieveUserQuotaSummary")
@@ -475,6 +476,28 @@ describe("Antigravity subscription limits", () => {
476 }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
477 );
478
479 + it.effect("labels Argon's weekly quota apart from the default Gemini weekly quota", () =>
480 + Effect.gen(function* () {
481 + const { probe } = yield* fixture({
482 + summary: {
483 + groups: [
484 + ...summary.groups,
485 + {
486 + displayName: "Gemini 4 Argon",
487 + buckets: [
488 + { bucketId: "gemini-argon-wtu-weekly", window: "weekly", remainingFraction: 0.6 },
489 + ],
490 + },
491 + ],
492 + },
493 + });
494 + const limits = yield* probe;
495 + const byId = new Map(limits.windows.map((window) => [window.id, window]));
496 + expect(byId.get("gemini-weekly")?.label).toBe("Gemini · Weekly");
497 + expect(byId.get("gemini-argon-wtu-weekly")?.label).toBe("Gemini 4 Argon · Weekly");
498 + }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
499 + );
500 +
501 it.effect("keeps one endpoint's quotas when the other fails", () =>
502 Effect.gen(function* () {
503 const { probe } = yield* fixture({
apps/server/src/provider/antigravityUsageLimits.ts
+9 -6
@@ -124,11 +124,14 @@ function summaryWindows(summary: typeof Summary.Type, requestedAt: number) {
124 for (const group of groups ?? []) {
125 for (const bucket of group.buckets ?? []) {
126 if (bucket.disabled) continue;
127 - const family = bucket.bucketId.startsWith("gemini-")
128 - ? "Gemini"
129 - : bucket.bucketId.startsWith("3p-")
130 - ? "Claude & GPT (shared)"
131 - : group.displayName?.trim() || bucket.bucketId;
127 + // Argon is metered apart from the default Gemini buckets; keep its group name.
128 + const family = bucket.bucketId.startsWith("gemini-argon-")
129 + ? group.displayName?.trim() || "Gemini Argon"
130 + : bucket.bucketId.startsWith("gemini-")
131 + ? "Gemini"
132 + : bucket.bucketId.startsWith("3p-")
133 + ? "Claude & GPT (shared)"
134 + : group.displayName?.trim() || bucket.bucketId;
135 const weekly = bucket.window === "weekly";
136 const session = bucket.window === "5h";
137 const windowDurationMins = SUMMARY_WINDOW_MINS.get(bucket.window ?? "");
@@ -284,7 +287,7 @@ export const makeAntigravityUsageProbe = Effect.fn("makeAntigravityUsageProbe")(
287 HttpClientRequest.post(`${endpoint}/v1internal:${operation}`).pipe(
288 HttpClientRequest.setHeaders({
289 Authorization: `Bearer ${accessToken}`,
287 - "User-Agent": `antigravity/hub/1.0.0 (aidev_client; os_type=${platform}; arch=${architecture}; cl=963137146)`,
290 + "User-Agent": `antigravity/hub/2.24.0 (aidev_client; os_type=${platform}; arch=${architecture}; cl=963137146)`,
291 }),
292 HttpClientRequest.bodyJsonUnsafe(
293 token.project_id ? { project: token.project_id } : {},