Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix: default missing remainingFraction to 1 instead of 0

Chris Staley508312877492
diff --git a/open-sse/services/usage.ts b/open-sse/services/usage.ts
index 698e65fdc0..0e2c5fc9b8 100644
--- a/open-sse/services/usage.ts
+++ b/open-sse/services/usage.ts
@@ -703,8 +703,10 @@ async function getAntigravityUsage(accessToken, providerSpecificData) {
continue;
}
- const remainingFraction = toNumber(quotaInfo.remainingFraction, 0);
+ const rawFraction = toNumber(quotaInfo.remainingFraction, -1);
const resetAt = parseResetTime(quotaInfo.resetTime);
+ // Default to 100% when the API doesn't report a fraction
+ const remainingFraction = rawFraction < 0 ? 1 : rawFraction;
// Models with no resetTime and full remaining are unlimited (e.g. tab-completion models)
const isUnlimited = !resetAt && remainingFraction >= 1;
const remainingPercentage = remainingFraction * 100;