Skip to content

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

Merged
kittors merged 1 commit into
devfrom
fix/xai-empty-plan-type-dev
Aug 13, 2026
Merged

fix(xai): keep SuperGrok plan when monthlyLimit is zero#886
kittors merged 1 commit into
devfrom
fix/xai-empty-plan-type-dev

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

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 c62796f into dev Aug 13, 2026
3 checks passed
@kittors
kittors deleted the fix/xai-empty-plan-type-dev branch August 13, 2026 01:38
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.

1 participant