Skip to content

fix(types): UsageQuota matches what GET /usage/quota returns - #43

Merged
safenestdev merged 1 commit into
mainfrom
fix/usage-quota-type
Sep 21, 2026
Merged

safenestdev merged 1 commit into
mainfrom
fix/usage-quota-type

Conversation

@safenestdev

Copy link
Copy Markdown
Contributor

The UsageQuota type declared flat rate_limit / remaining / reset_in_seconds fields the API never sent, so every consumer reading them got undefined (the MCP server's get_usage_quota tool rendered "undefined/min", "[object Object]" and "undefineds"; customer report, 2026-09-21).

The corrected type is the wire shape: tier, limits.{requestsPerMinute,requestsPerMonth,requestsPerDay}, current.{requestsThisMinute,requestsToday}, remaining.{requestsThisMinute,requestsToday}, plus resetsInSeconds, which the API gained on 2026-09-21 and is optional for older deployments. README example updated. Breaking only for code typed against the old fields, which were always undefined at runtime.

The type declared flat rate_limit / remaining / reset_in_seconds fields the
API never sent; every consumer reading them got undefined (the MCP server's
quota tool printed "undefined/min" and "[object Object]"). The nested
limits / current / remaining shape is what is on the wire, plus the
resetsInSeconds field the API added on 2026-09-21.
@safenestdev
safenestdev merged commit 41bdab8 into main Sep 21, 2026
6 checks passed
@safenestdev
safenestdev deleted the fix/usage-quota-type branch September 21, 2026 09:26
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