fix(server): Grok accounts with no usage yet no longer vanish from Limits #12799
Mergedjakeleventhal(GitHub profile, opens in a new tab)merged 1 commit into
main fromrefs/pull/12799/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
- @@ -41,4 +41,11 @@4141 ) {4242 const usedPercent = response.config?.creditUsagePercent;4343 if (usedPercent === undefined || !Number.isFinite(usedPercent)) {44- return makeUnavailableUsageLimits({ checkedAt, reason: "unsupported" });44+ // A billing read that succeeded but carries no percentage is an account45+ // with nothing metered yet, not one that can never report: xAI omits the46+ // field entirely (rather than sending 0) until usage registers, then fills47+ // it in. Calling that `unsupported` would strand the account — the Limits48+ // view drops unsupported entries and deliberately mutes their notice, so a49+ // freshly signed-in Grok account would vanish with no explanation until it50+ // happened to be used, and `applyUsageLimitsUpdate` would refuse the51+ // mid-turn windows that could have recovered it.
juliusmarminge merged this0cab7d5
juliusmarminge closed this
Sign in to join this conversation.


Approvability#
Verdict: Approved at
81e95dcMacroscope's review found this PR approvable — This is a narrowly scoped Grok limits bug fix that changes only how successful responses with no metered usage are represented, keeping those accounts visible without altering valid usage or genuinely unsupported paths. The production change is covered by focused test expectations and introduces no schema, deployment, or static-analysis changes.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).