merge: 合并 main 分支到 test,解决 config 和 modelWhitelist 冲突
- config.go: 保留 Sora 配置,合入 SubscriptionCache 配置 - useModelWhitelist.ts: 同时保留 soraModels 和 antigravityModels Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -574,7 +574,10 @@ export interface Account {
|
||||
platform: AccountPlatform
|
||||
type: AccountType
|
||||
credentials?: Record<string, unknown>
|
||||
extra?: CodexUsageSnapshot & Record<string, unknown> // Extra fields including Codex usage
|
||||
// Extra fields including Codex usage and model-level rate limits (Antigravity smart retry)
|
||||
extra?: (CodexUsageSnapshot & {
|
||||
model_rate_limits?: Record<string, { rate_limited_at: string; rate_limit_reset_at: string }>
|
||||
} & Record<string, unknown>)
|
||||
proxy_id: number | null
|
||||
concurrency: number
|
||||
current_concurrency?: number // Real-time concurrency count from Redis
|
||||
@@ -742,6 +745,56 @@ export interface UpdateProxyRequest {
|
||||
status?: 'active' | 'inactive'
|
||||
}
|
||||
|
||||
export interface AdminDataPayload {
|
||||
type?: string
|
||||
version?: number
|
||||
exported_at: string
|
||||
proxies: AdminDataProxy[]
|
||||
accounts: AdminDataAccount[]
|
||||
}
|
||||
|
||||
export interface AdminDataProxy {
|
||||
proxy_key: string
|
||||
name: string
|
||||
protocol: ProxyProtocol
|
||||
host: string
|
||||
port: number
|
||||
username?: string | null
|
||||
password?: string | null
|
||||
status: 'active' | 'inactive'
|
||||
}
|
||||
|
||||
export interface AdminDataAccount {
|
||||
name: string
|
||||
notes?: string | null
|
||||
platform: AccountPlatform
|
||||
type: AccountType
|
||||
credentials: Record<string, unknown>
|
||||
extra?: Record<string, unknown>
|
||||
proxy_key?: string | null
|
||||
concurrency: number
|
||||
priority: number
|
||||
rate_multiplier?: number | null
|
||||
expires_at?: number | null
|
||||
auto_pause_on_expired?: boolean
|
||||
}
|
||||
|
||||
export interface AdminDataImportError {
|
||||
kind: 'proxy' | 'account'
|
||||
name?: string
|
||||
proxy_key?: string
|
||||
message: string
|
||||
}
|
||||
|
||||
export interface AdminDataImportResult {
|
||||
proxy_created: number
|
||||
proxy_reused: number
|
||||
proxy_failed: number
|
||||
account_created: number
|
||||
account_failed: number
|
||||
errors?: AdminDataImportError[]
|
||||
}
|
||||
|
||||
// ==================== Usage & Redeem Types ====================
|
||||
|
||||
export type RedeemCodeType = 'balance' | 'concurrency' | 'subscription' | 'invitation'
|
||||
|
||||
Reference in New Issue
Block a user