diff --git a/backend/internal/service/gemini_token_provider.go b/backend/internal/service/gemini_token_provider.go index 5f369de5..0257d19f 100644 --- a/backend/internal/service/gemini_token_provider.go +++ b/backend/internal/service/gemini_token_provider.go @@ -118,6 +118,7 @@ func (p *GeminiTokenProvider) GetAccessToken(ctx context.Context, account *Accou return accessToken, nil } detected = strings.TrimSpace(detected) + tierID = strings.TrimSpace(tierID) if detected != "" { if account.Credentials == nil { account.Credentials = make(map[string]any) diff --git a/frontend/src/components/account/AccountQuotaInfo.vue b/frontend/src/components/account/AccountQuotaInfo.vue index 44fe1b41..52f1bae7 100644 --- a/frontend/src/components/account/AccountQuotaInfo.vue +++ b/frontend/src/components/account/AccountQuotaInfo.vue @@ -5,53 +5,24 @@ {{ tierLabel }} - - {{ quotaText }} - - -
-
-
-
- - - {{ isRateLimited ? '100%' : '0%' }} - - - - - ⚠️ {{ resetCountdown }} - - - - -
+ + + 未限流 + + + 限流 {{ resetCountdown }} + @@ -85,8 +56,8 @@ const tierLabel = computed(() => { const creds = props.account.credentials as GeminiCredentials | undefined const tierMap: Record = { LEGACY: 'Free', - PRO: 'Standard', - ULTRA: 'Enterprise' + PRO: 'Pro', + ULTRA: 'Ultra' } return tierMap[creds?.tier_id || ''] || 'Unknown' } @@ -110,20 +81,6 @@ const tierBadgeClass = computed(() => { ) }) -// 限额文本 -const quotaText = computed(() => { - if (isCodeAssist.value) { - const creds = props.account.credentials as GeminiCredentials | undefined - const limitMap: Record = { - LEGACY: '1000/day, 60/min', - PRO: '1500/day, 120/min', - ULTRA: '5000/day, 300/min' - } - return limitMap[creds?.tier_id || ''] || '-' - } - return 'RPM/RPD limits' -}) - // 是否限流 const isRateLimited = computed(() => { if (!props.account.rate_limit_reset_at) return false