Skip to content

fix(quota): report GOAT plan limits as 20/50/100 - #12

Merged
peach0x33a merged 1 commit into
peach0x33a:masterfrom
HardeNNN:fix/goat-plan-limits
Nov 8, 2026
Merged

peach0x33a merged 1 commit into
peach0x33a:masterfrom
HardeNNN:fix/goat-plan-limits

Conversation

@HardeNNN

@HardeNNN HardeNNN commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

The GOAT plan publishes a \ monthly allowance with \ per 5 hours and \ per week. The credits endpoint reports the base per-model allowance () and scales its rolling windows from it (14/35), so the console showed stale limits.

Changes

  • Map the published GOAT caps explicitly (\individual-goat: 100 monthly, 20 per 5h, 50 weekly) and override the upstream rolling caps for known plans.
  • Normalize the remaining balance to plan cap minus billing-period spend, so a fresh GOAT account shows \ remaining instead of the upstream base .
  • Drive the monthly bar from the billing-period total as well.
  • Unknown plans keep the upstream values.

Verification

  • \go test ./...\ passes.
  • Live check against a GOAT account: \plan=GOAT plan_cap=100 remaining=100 5h=20 weekly=50.

The GOAT plan publishes a 100 USD monthly allowance with 20 USD per 5 hours and 50 USD per week. The credits endpoint reports the base per-model allowance (70 USD) and scales its rolling windows from it (14/35), so the console showed stale limits.

Map the published GOAT caps explicitly, normalize the remaining balance to plan cap minus billing-period spend, and drive the monthly bar from the billing-period total. Unknown plans keep the upstream values.
@peach0x33a
peach0x33a merged commit ab91c12 into peach0x33a:master Nov 8, 2026
3 checks passed
@peach0x33a

Copy link
Copy Markdown
Owner

Thanks you PR

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.

2 participants