mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-07 01:47:47 +08:00
fix(codex): fence concurrent quota updates
This commit is contained in:
@@ -321,6 +321,7 @@ export async function refreshProviderQuota(
|
||||
|
||||
export interface ConsumeCodexResetCreditPayload {
|
||||
idempotency_key: string
|
||||
expected_credential_generation: string | null
|
||||
}
|
||||
|
||||
export interface ConsumeCodexResetCreditResult {
|
||||
@@ -331,6 +332,8 @@ export interface ConsumeCodexResetCreditResult {
|
||||
| 'already_redeemed'
|
||||
| 'nothing_to_reset'
|
||||
| 'no_credit'
|
||||
| 'historical_replay'
|
||||
| 'credential_changed'
|
||||
| 'unknown'
|
||||
| 'error'
|
||||
| string
|
||||
|
||||
@@ -323,6 +323,7 @@ export interface EndpointAPIKey {
|
||||
|
||||
// Codex 上游元数据类型
|
||||
export interface CodexUpstreamMetadata {
|
||||
credential_generation?: string
|
||||
updated_at?: number // 更新时间(Unix 时间戳)
|
||||
plan_type?: string // 套餐类型
|
||||
primary_used_percent?: number // 周限额窗口使用百分比
|
||||
@@ -348,6 +349,10 @@ export interface CodexUpstreamMetadata {
|
||||
has_credits?: boolean // 是否有积分
|
||||
credits_balance?: number // 积分余额
|
||||
reset_credits?: QuotaResetCreditsSnapshot | null // Codex earned rate-limit reset credits
|
||||
account_quota_reset_reservation?: {
|
||||
idempotency_key?: string | null
|
||||
generation?: number | null
|
||||
} | null
|
||||
}
|
||||
|
||||
export interface AntigravityModelQuota {
|
||||
|
||||
Reference in New Issue
Block a user