Expand description
On-demand subscription usage for managed provider accounts.
Answers “how much of this account’s plan is left” by asking the provider
directly: Claude through its OAuth usage endpoint (refreshing the stored
token when it has expired), Codex through a one-shot codex app-server
JSON-RPC exchange against the account’s home. Results are persisted to
provider_account_limits by live auth status. Cached auth reads
never poll; lf usage separately reports Run token/cost evidence.
Structs§
- Rate
Limit Reset Credit - Rate
Limit Reset Credits - Wire fields from
account/rateLimits/read. Missing details are not an empty list. - Subscription
Usage - The freshly observed subscription state of one account.
Enums§
- Subscription
Error - Why an account’s subscription state could not be read.
NeedsLoginis an answer, not a failure: the account exists but its credential was revoked or expired beyond refresh, and onlylf auth connectfixes that.
Functions§
- poll_
account - Poll one managed account’s provider for its live subscription state.