Skip to content
Source
Sign inSign up
pingdotgg/t3code

Show Antigravity Gemini quota when the summary omits it #26582

Closedducan-ne(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/26582/headopened View on GitHub

Showing 1 changed file with 15 additions and 7 deletions.

x
0 of 1 viewed, 1 left
15 additions and 7 deletionsapps/server/src/provider/antigravityUsageLimits.tsModified
View file
@@ -96,6 +96,8 @@
};
​
+const isGeminiBucket = (bucketId: string) => bucketId.startsWith("gemini-");
+​
function summaryWindows(summary: typeof Summary.Type) {
const windows = new Map<string, ServerProviderUsageWindow>();
const groups = summary.groups?.some((group) => group.buckets?.length)
@@ -104,7 +106,7 @@
for (const group of groups ?? []) {
for (const bucket of group.buckets ?? []) {
if (bucket.disabled) continue;
- const family = bucket.bucketId.startsWith("gemini-")
+ const family = isGeminiBucket(bucket.bucketId)
? "Gemini"
: bucket.bucketId.startsWith("3p-")
? "Claude & GPT (shared)"
@@ -125,7 +127,7 @@
​
/** Older accounts expose model quotas without a window length. Do not invent a reset cadence. */
-function modelWindows(models: typeof Models.Type) {
+function modelWindows(models: typeof Models.Type, onlyFamily?: "Gemini") {
const windows = new Map<string, ServerProviderUsageWindow>();
for (const [modelId, model] of Object.entries(models.models)) {
const family =