Plugin API: session.usage().rateLimits omits the per-model weekly window that /usage shows
Summary
/usage reports a per-model weekly window (e.g. Current week (Fable): 77% used) alongside the 5-hour and 7-day all-models windows, but the plugin hooks API's session.usage() returns only five_hour, seven_day and the gateway spend_limit in rateLimits. A plugin that draws rate-limit bars (mine: a docked side panel, https://github.com/wesleystagg/claude-sidebar) therefore can't show the limit a user is most likely to hit first on a Max plan.
What I see
Claude Code 2.1.296, macOS. The usage endpoint already returns rate_limits.seven_day_opus and rate_limits.model_scoped[] = { display_name, utilization, resets_at }, and /usage renders it. The rateLimits projection for session.usage() builds from five_hour / seven_day / overage only, so the model-scoped bucket never reaches plugins (nor the statusline JSON's rate_limits, which documents the same three).
Request
Pass the model-scoped weekly window(s) through session.usage().rateLimits (and ideally the statusline rate_limits) as additional entries, e.g. { kind: "seven_day_model", label: "Fable", percentUsed, resetsAt }, or expose model_scoped as its own field. The workaround today is shelling out to claude -p /usage and parsing the text, which breaks on any wording change.
Environment
- Claude Code 2.1.296, native binary, macOS 27.2, Max subscription