feat: combine usage quota and pool stats updates

This commit is contained in:
fawney19
2026-05-07 01:26:42 +08:00
parent 012f8bcdf7
commit 1f5b294bd0
35 changed files with 3472 additions and 122 deletions

View File

@@ -348,10 +348,30 @@ export interface KiroUpstreamMetadata {
banned_at?: number // 封禁时间Unix 时间戳,秒)
}
export interface ChatGPTWebUpstreamMetadata {
updated_at?: number // Unix 时间戳(秒)
plan_type?: string | null
default_model_slug?: string | null
blocked_features?: string[] | null
image_quota_feature_name?: string | null
image_quota_remaining?: number | null
image_quota_total?: number | null
image_quota_used?: number | null
image_quota_reset_at?: number | null
image_quota_reset_after?: string | null
image_quota_blocked?: boolean | null
limits_progress?: Array<Record<string, unknown>> | null
email?: string | null
account_id?: string | null
account_user_id?: string | null
user_id?: string | null
}
export interface UpstreamMetadata {
codex?: CodexUpstreamMetadata
antigravity?: AntigravityUpstreamMetadata
kiro?: KiroUpstreamMetadata
chatgpt_web?: ChatGPTWebUpstreamMetadata
}
// 按格式的健康度数据

View File

@@ -18,6 +18,12 @@ export interface AccountStatusSnapshot {
recoverable?: boolean
}
export interface QuotaWindowUsageSnapshot {
request_count?: number | null
total_tokens?: number | null
total_cost_usd?: number | string | null
}
export interface QuotaWindowSnapshot {
code: string
label?: string | null
@@ -33,6 +39,7 @@ export interface QuotaWindowSnapshot {
reset_seconds?: number | null
window_minutes?: number | null
is_exhausted?: boolean | null
usage?: QuotaWindowUsageSnapshot | null
}
export interface QuotaCreditsSnapshot {