mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-06 16:06:08 +00:00
Dashboard reads the materialized column instead of parsing raw quota JSON (design §3.3/§5.3): Provider computes snapshot-level limit_reached on quota writes, store persists it, Admin account_status and Dashboard both consume the same value. - QuotaObservation gains limit_reached; openai writes fact.exhausted() (429 always true), xai writes used_percent>=100 - compare_and_swap_provider_quota updates the column; get_quotas and ACCOUNT_SELECT read it back - ProviderAccountSummary carries quota_limit_reached; admin_account_status derives RateLimited from it (Unknown -> Invalid) - Dashboard provider_account_metrics reads quota_limit_reached instead of provider_quota_json->'rate_limit' - Migration 0003 adds the column with backfill (coalesce for NULL when rate_limit key is absent); 0004 fixes NULL backfill for already-applied environments Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>