Skip to content

fix(xai): keep SuperGrok plan when monthlyLimit is zero - #885

Merged
kittors merged 3 commits into
mainfrom
fix/xai-empty-plan-type
Aug 13, 2026
Merged

fix(xai): keep SuperGrok plan when monthlyLimit is zero#885
kittors merged 3 commits into
mainfrom
fix/xai-empty-plan-type

Conversation

@kittors

@kittors kittors commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • xAI status refresh succeeded but resolveXAIPlan() only mapped monthlyLimit of exactly 15000 / 150000 cents.
  • Current billing still returns a monthly config plus weekly/product entitlement, just with $0.00 / $0.00 monthly credits, so plan_type was persisted empty and the SuperGrok badge disappeared.
  • Prefer an explicit plan/tier field when present, keep the legacy monthlyLimit mapping, and treat monthly billing + weekly entitlement as supergrok. Weekly-only free Grok stays unlabelled.

Fixes #881

Test plan

  • go test ./internal/management/aiaccountstatus/ -count=1
  • Regression covers zero monthly + weekly entitlement → supergrok, legacy 150000 → supergrok-heavy, explicit planType, weekly-only free Grok stays empty

kittors and others added 3 commits August 12, 2026 20:21
Status refresh succeeded but resolveXAIPlan only mapped the old
15000/150000 monthlyLimit cents. Current xAI billing still returns a
monthly config plus weekly/product entitlement, just with $0.00 monthly
credits, so plan_type was persisted as empty and the badge vanished.

Prefer an explicit plan/tier field when present, keep the legacy
monthlyLimit mapping, and treat monthly billing + weekly entitlement as
supergrok. Weekly-only free Grok stays unlabelled.

Fixes #881
@kittors
kittors merged commit c2c919b into main Aug 13, 2026
3 checks passed
@kittors
kittors deleted the fix/xai-empty-plan-type branch August 13, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: xAI quota refresh succeeds but plan_type is empty, so the SuperGrok badge disappears

1 participant