Merge pull request #4269 from catoncat/agent/sub2api-agent-identity

feat(openai): support Codex Agent Identity authentication
This commit is contained in:
Wesley Liddick
2026-07-15 09:47:00 +08:00
committed by GitHub
36 changed files with 2294 additions and 139 deletions
@@ -234,6 +234,7 @@
<div class="flex min-w-0 flex-col gap-1">
<div class="flex flex-wrap items-center gap-1">
<PlatformTypeBadge :platform="row.platform" :type="row.type"
:auth-mode="getOpenAIAuthMode(row)"
:plan-type="getAccountPlanType(row)"
:privacy-mode="row.extra?.privacy_mode || row.parent_privacy_mode"
:subscription-expires-at="row.credentials?.subscription_expires_at || row.parent_subscription_expires_at" />
@@ -1167,6 +1168,12 @@ function getAccountPlanType(row: any): string | undefined {
return row.credentials?.plan_type || row.parent_plan_type || undefined
}
function getOpenAIAuthMode(row: any): string | undefined {
if (!row || row.platform !== 'openai' || row.type !== 'oauth') return undefined
const authMode = row.credentials?.auth_mode
return typeof authMode === 'string' && authMode.trim() ? authMode : undefined
}
// Antigravity 订阅等级辅助函数
function getAntigravityTierFromRow(row: any): string | null {
if (row.platform !== 'antigravity') return null