Skip to content

v0.3.5

Choose a tag to compare

@thezillo thezillo released this 23 Sep 16:39
· 6 commits to main since this release

Per-account subscription quota metrics (#9).

What the Codex CLI's /status shows, per pool account

  • codexproxy_account_quota_used_percent{account, window} — share of the quota window used.
  • codexproxy_account_quota_reset_timestamp_seconds{account, window} — when the window resets (unix seconds; … - time() is the countdown).
  • codexproxy_account_state{account, state} — 1 for the state the account is in (ready, cooling, quota_held), 0 for the others.
  • codexproxy_account_credits_balance{account}, codexproxy_account_info{account, plan_type}.
  • codexproxy_account_quota_observed_timestamp_seconds{account} — how fresh the numbers above are.

window is the window's length (5h, 7d), not its slot: a pro account reports only a weekly window (as primary), a plus account a 5h and a weekly one. One "weekly > N%" alert covers both.

Where the numbers come from

The x-codex-* headers on every /responses answer, so an account serving traffic costs no extra upstream calls. The usage poller now also asks accounts with no report for one quota_check_interval_secs (every account at boot). An idle account found exhausted is held right away instead of costing the next request a 429 round-trip. Request-path account selection is unchanged.