The /api/oauth/usage endpoint now includes a limits array, and per-model weekly caps only appear there — the legacy seven_day_opus / seven_day_sonnet fields are always null now. Since the monitor parses only five_hour and seven_day, users on plans with a model-scoped weekly cap can hit rate limiting while the widget shows a comfortable all-models weekly.
Real example from my account today: all-models weekly at 26%, but Fable weekly at 43% with is_active: true — the binding limit was invisible in the widget.
Trimmed real response:
{
"five_hour": { "utilization": 29.0, "resets_at": "..." },
"seven_day": { "utilization": 26.0, "resets_at": "..." },
"seven_day_opus": null,
"seven_day_sonnet": null,
"limits": [
{ "kind": "session", "percent": 29, "resets_at": "...", "scope": null, "is_active": false },
{ "kind": "weekly_all", "percent": 26, "resets_at": "...", "scope": null, "is_active": false },
{ "kind": "weekly_scoped", "percent": 43, "resets_at": "...",
"scope": { "model": { "id": null, "display_name": "Fable" } }, "is_active": true }
]
}
Suggested handling: parse limits[] entries with kind: "weekly_scoped", take the label from scope.model.display_name, and treat is_active as "this is the currently binding limit".
I've implemented this in my own (heavily diverged, private) fork and it works well — happy to send a PR adapted to your codebase if you'd like one. Thanks for building this!
The
/api/oauth/usageendpoint now includes alimitsarray, and per-model weekly caps only appear there — the legacyseven_day_opus/seven_day_sonnetfields are alwaysnullnow. Since the monitor parses onlyfive_hourandseven_day, users on plans with a model-scoped weekly cap can hit rate limiting while the widget shows a comfortable all-models weekly.Real example from my account today: all-models weekly at 26%, but Fable weekly at 43% with
is_active: true— the binding limit was invisible in the widget.Trimmed real response:
{ "five_hour": { "utilization": 29.0, "resets_at": "..." }, "seven_day": { "utilization": 26.0, "resets_at": "..." }, "seven_day_opus": null, "seven_day_sonnet": null, "limits": [ { "kind": "session", "percent": 29, "resets_at": "...", "scope": null, "is_active": false }, { "kind": "weekly_all", "percent": 26, "resets_at": "...", "scope": null, "is_active": false }, { "kind": "weekly_scoped", "percent": 43, "resets_at": "...", "scope": { "model": { "id": null, "display_name": "Fable" } }, "is_active": true } ] }Suggested handling: parse
limits[]entries withkind: "weekly_scoped", take the label fromscope.model.display_name, and treatis_activeas "this is the currently binding limit".I've implemented this in my own (heavily diverged, private) fork and it works well — happy to send a PR adapted to your codebase if you'd like one. Thanks for building this!