Skip to content

feat(quota): show Claude model-scoped weekly limits - #716

Open
AsakuraMizu wants to merge 2 commits into
Willxup:mainfrom
sbga-tech:feat/claude-scoped-limits
Open

AsakuraMizu wants to merge 2 commits into
Willxup:mainfrom
sbga-tech:feat/claude-scoped-limits

Conversation

@AsakuraMizu

@AsakuraMizu AsakuraMizu commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Claude Max accounts now have a separate weekly limit for Fable (7d_oi in rate-limit headers). /api/oauth/usage has no top-level field for it; it only appears in limits[]:

{"kind":"weekly_scoped","percent":42,"resets_at":"…","scope":{"model":{"display_name":"Fable"}}}

Parse these entries into 7d <Model> model rows next to seven_day_opus / seven_day_sonnet. Entries scoped to a surface rather than a model are skipped, and models that already have a row are not duplicated.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T16:53:02.297677Z 56af9f0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 56af9f0333

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread internal/quota/payloads.go Outdated
if stringField(object, "kind") != "weekly_scoped" {
continue
}
model := objectField(objectField(object, "scope"), "model")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject model entries with a surface scope

When a weekly_scoped entry has both scope.model and a non-null scope.surface, this parser ignores the surface and emits a generic model-wide row. Such a limit applies only on that surface, so the card misrepresents it as the model's general weekly limit despite the intended surface-scope exclusion; check scope.surface before accepting the model (the new test only covers the easier model: null case).

Useful? React with 👍 / 👎.

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