-
{{ t('subscriptionProgress.monthly') }}
-
+
{{ t('subscriptionProgress.monthly') }}
+
-
+
{{ formatUsage(subscription.monthly_usage_usd, subscription.group?.monthly_limit_usd) }}
diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts
index 330ecc2b..e3168863 100644
--- a/frontend/src/types/index.ts
+++ b/frontend/src/types/index.ts
@@ -316,6 +316,7 @@ export interface Account {
platform: AccountPlatform;
type: AccountType;
credentials?: Record
;
+ extra?: CodexUsageSnapshot & Record; // Extra fields including Codex usage
proxy_id: number | null;
concurrency: number;
priority: number;
@@ -361,6 +362,18 @@ export interface AccountUsageInfo {
seven_day_sonnet: UsageProgress | null;
}
+// OpenAI Codex usage snapshot (from response headers)
+export interface CodexUsageSnapshot {
+ codex_primary_used_percent?: number; // Weekly limit usage percentage
+ codex_primary_reset_after_seconds?: number; // Seconds until weekly reset
+ codex_primary_window_minutes?: number; // Weekly window in minutes
+ codex_secondary_used_percent?: number; // 5h limit usage percentage
+ codex_secondary_reset_after_seconds?: number; // Seconds until 5h reset
+ codex_secondary_window_minutes?: number; // 5h window in minutes
+ codex_primary_over_secondary_percent?: number; // Overflow ratio
+ codex_usage_updated_at?: string; // Last update timestamp
+}
+
export interface CreateAccountRequest {
name: string;
platform: AccountPlatform;