Provider-reported subscription quota telemetry for z.AI and GPT / Qtile #83

Open
opened 2026-09-14 14:15:57 +00:00 by nsaspy · 0 comments
Owner

Requested behavior

Expose one llm-log quota interface for two Qtile widgets labelled exactly z.AI and GPT. Each cycles through reported five-hour, weekly, and other applicable quota windows. Display percentage USED, green then yellow then red as consumption increases. Support any provider-reported plan, including GPT Pro, without hard-coded entitlement tables.

Contract

  • Keep subscription quota separate from captured token statistics and local scheduler admission budgets.
  • Use the authenticated provider's reported usage, limits, window durations, reset times, plan metadata and limit IDs. Missing, stale, malformed, unavailable, and explicitly unlimited states must remain distinct; never fabricate 0% or infinity.
  • GPT adapter should use the supported Codex App Server account/read and account/rateLimits/read interface, including rateLimitsByLimitId. Retain meter scope; Codex quota must not be labelled as every ChatGPT web/voice quota.
  • z.AI adapter must use a source-verified usage endpoint/schema with credentials supplied locally. No browser credential scraping, entitlement guessing, token-to-credit guesses, or secrets in Qtile/cache/API output.
  • Read-only localhost API and sanitized atomic snapshot for desktop consumers; bounded fetches, cached refresh, no network calls or subprocess execution in the Qtile render loop.
  • Green below 70%, yellow 70–89%, red from 90%, configurable; stale/unknown displayed explicitly in neutral color. Rotation every five seconds with manual cycle/pause controls and reset details.
  • Keep packaged Common Lisp forwarding and Python capture/analytics runtime boundaries explicit. Do not imply a merge updates the live host.

Validation

Regression tests for plan changes, 5h/week mapping, multiple GPT buckets, missing/invalid usage, reset expiry, provider errors, stale cache, secret redaction, percent bounds, widget color thresholds/rotation, and Org/generated parity. Use existing transport blocker #74 and rate work #75 separately; telemetry must not claim those gates are green.

## Requested behavior Expose one llm-log quota interface for two Qtile widgets labelled exactly `z.AI` and `GPT`. Each cycles through reported five-hour, weekly, and other applicable quota windows. Display percentage USED, green then yellow then red as consumption increases. Support any provider-reported plan, including GPT Pro, without hard-coded entitlement tables. ## Contract - Keep subscription quota separate from captured token statistics and local scheduler admission budgets. - Use the authenticated provider's reported usage, limits, window durations, reset times, plan metadata and limit IDs. Missing, stale, malformed, unavailable, and explicitly unlimited states must remain distinct; never fabricate 0% or infinity. - GPT adapter should use the supported Codex App Server account/read and account/rateLimits/read interface, including rateLimitsByLimitId. Retain meter scope; Codex quota must not be labelled as every ChatGPT web/voice quota. - z.AI adapter must use a source-verified usage endpoint/schema with credentials supplied locally. No browser credential scraping, entitlement guessing, token-to-credit guesses, or secrets in Qtile/cache/API output. - Read-only localhost API and sanitized atomic snapshot for desktop consumers; bounded fetches, cached refresh, no network calls or subprocess execution in the Qtile render loop. - Green below 70%, yellow 70–89%, red from 90%, configurable; stale/unknown displayed explicitly in neutral color. Rotation every five seconds with manual cycle/pause controls and reset details. - Keep packaged Common Lisp forwarding and Python capture/analytics runtime boundaries explicit. Do not imply a merge updates the live host. ## Validation Regression tests for plan changes, 5h/week mapping, multiple GPT buckets, missing/invalid usage, reset expiry, provider errors, stale cache, secret redaction, percent bounds, widget color thresholds/rotation, and Org/generated parity. Use existing transport blocker #74 and rate work #75 separately; telemetry must not claim those gates are green.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/llm-log#83
No description provided.