()
const { t } = useI18n()
diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts
index 6d1095cf..3e4ad4c4 100644
--- a/frontend/src/i18n/locales/en.ts
+++ b/frontend/src/i18n/locales/en.ts
@@ -1082,10 +1082,10 @@ export default {
stateWarningTitle: 'Note',
stateWarningDesc: 'Recommended: paste the full callback URL (includes code & state).',
oauthTypeLabel: 'OAuth Type',
- needsProjectId: 'For GCP Developers',
- needsProjectIdDesc: 'Requires GCP project',
- noProjectIdNeeded: 'For Regular Users',
- noProjectIdNeededDesc: 'Requires admin-configured OAuth client',
+ needsProjectId: 'Built-in OAuth (Code Assist)',
+ needsProjectIdDesc: 'Requires GCP project and Project ID',
+ noProjectIdNeeded: 'Custom OAuth (AI Studio)',
+ noProjectIdNeededDesc: 'Requires admin-configured OAuth client',
aiStudioNotConfiguredShort: 'Not configured',
aiStudioNotConfiguredTip:
'AI Studio OAuth is not configured: set GEMINI_OAUTH_CLIENT_ID / GEMINI_OAUTH_CLIENT_SECRET and add Redirect URI: http://localhost:1455/auth/callback (Consent screen scopes must include https://www.googleapis.com/auth/generative-language.retriever)',
@@ -1120,7 +1120,95 @@ export default {
modelPassthroughDesc:
'All model requests are forwarded directly to the Gemini API without model restrictions or mappings.',
baseUrlHint: 'Leave default for official Gemini API',
- apiKeyHint: 'Your Gemini API Key (starts with AIza)'
+ apiKeyHint: 'Your Gemini API Key (starts with AIza)',
+ accountType: {
+ oauthTitle: 'OAuth (Gemini)',
+ oauthDesc: 'Authorize with your Google account and choose an OAuth type.',
+ apiKeyTitle: 'API Key (AI Studio)',
+ apiKeyDesc: 'Fastest setup. Use an AIza API key.',
+ apiKeyNote:
+ 'Best for light testing. Free tier has strict rate limits and data may be used for training.',
+ apiKeyLink: 'Get API Key',
+ quotaLink: 'Quota guide'
+ },
+ oauthType: {
+ builtInTitle: 'Built-in OAuth (Gemini CLI / Code Assist)',
+ builtInDesc: 'Uses Google built-in client ID. No admin configuration required.',
+ builtInRequirement: 'Requires a GCP project and Project ID.',
+ gcpProjectLink: 'Create project',
+ customTitle: 'Custom OAuth (AI Studio OAuth)',
+ customDesc: 'Uses admin-configured OAuth client for org management.',
+ customRequirement: 'Admin must configure Client ID and add you as a test user.',
+ badges: {
+ recommended: 'Recommended',
+ highConcurrency: 'High concurrency',
+ noAdmin: 'No admin setup',
+ orgManaged: 'Org managed',
+ adminRequired: 'Admin required'
+ }
+ },
+ setupGuide: {
+ title: 'Gemini Setup Checklist',
+ checklistTitle: 'Checklist',
+ checklistItems: {
+ usIp: 'Use a US IP and ensure your account country is set to US.',
+ age: 'Account must be 18+.'
+ },
+ activationTitle: 'One-click Activation',
+ activationItems: {
+ geminiWeb: 'Activate Gemini Web to avoid User not initialized.',
+ gcpProject: 'Activate a GCP project and get the Project ID for Code Assist.'
+ },
+ links: {
+ countryCheck: 'Check country association',
+ geminiWebActivation: 'Activate Gemini Web',
+ gcpProject: 'Open GCP Console'
+ }
+ },
+ quotaPolicy: {
+ title: 'Gemini Quota & Limit Policy (Reference)',
+ note: 'Note: Gemini does not provide an official quota inquiry API. The "Daily Quota" shown here is an estimate simulated by the system based on account tiers for scheduling reference only. Please refer to official Google errors for actual limits.',
+ columns: {
+ channel: 'Auth Channel',
+ account: 'Account Status',
+ limits: 'Limit Policy',
+ docs: 'Official Docs'
+ },
+ docs: {
+ codeAssist: 'Code Assist Quotas',
+ aiStudio: 'AI Studio Pricing',
+ vertex: 'Vertex AI Quotas'
+ },
+ simulatedNote: 'Simulated quota, for reference only',
+ rows: {
+ cli: {
+ channel: 'Gemini CLI (Official Google Login / Code Assist)',
+ free: 'Free Google Account',
+ premium: 'Google One AI Premium',
+ limitsFree: 'RPD ~1000; RPM ~60 (soft)',
+ limitsPremium: 'RPD ~1500+; RPM ~60+ (priority queue)'
+ },
+ gcloud: {
+ channel: 'GCP Code Assist (gcloud auth)',
+ account: 'No Code Assist subscription',
+ limits: 'RPD ~1000; RPM ~60 (preview)'
+ },
+ aiStudio: {
+ channel: 'AI Studio API Key / OAuth',
+ free: 'No billing (free tier)',
+ paid: 'Billing enabled (pay-as-you-go)',
+ limitsFree: 'RPD 50; RPM 2 (Pro) / 15 (Flash)',
+ limitsPaid: 'RPD unlimited; RPM 1000+ (per model quota)'
+ },
+ customOAuth: {
+ channel: 'Custom OAuth Client (GCP)',
+ free: 'Project not billed',
+ paid: 'Project billed',
+ limitsFree: 'RPD 50; RPM 2 (project quota)',
+ limitsPaid: 'RPD unlimited; RPM 1000+ (project quota)'
+ }
+ }
+ }
},
// Re-Auth Modal
reAuthorizeAccount: 'Re-Authorize Account',
@@ -1186,6 +1274,9 @@ export default {
},
usageWindow: {
statsTitle: '5-Hour Window Usage Statistics',
+ statsTitleDaily: 'Daily Usage Statistics',
+ geminiProDaily: 'RPD Pro',
+ geminiFlashDaily: 'RPD Flash',
gemini3Pro: 'G3P',
gemini3Flash: 'G3F',
gemini3Image: 'G3I',
diff --git a/frontend/src/i18n/locales/zh.ts b/frontend/src/i18n/locales/zh.ts
index 97d57051..8124e440 100644
--- a/frontend/src/i18n/locales/zh.ts
+++ b/frontend/src/i18n/locales/zh.ts
@@ -985,6 +985,9 @@ export default {
},
usageWindow: {
statsTitle: '5小时窗口用量统计',
+ statsTitleDaily: '每日用量统计',
+ geminiProDaily: 'RPD Pro',
+ geminiFlashDaily: 'RPD Flash',
gemini3Pro: 'G3P',
gemini3Flash: 'G3F',
gemini3Image: 'G3I',
@@ -1217,10 +1220,10 @@ export default {
stateWarningTitle: '提示',
stateWarningDesc: '建议粘贴完整回调链接(包含 code 和 state)。',
oauthTypeLabel: 'OAuth 类型',
- needsProjectId: '适合 GCP 开发者',
- needsProjectIdDesc: '需 GCP 项目',
- noProjectIdNeeded: '适合普通用户',
- noProjectIdNeededDesc: '需管理员配置 OAuth Client',
+ needsProjectId: '内置授权(Code Assist)',
+ needsProjectIdDesc: '需要 GCP 项目与 Project ID',
+ noProjectIdNeeded: '自定义授权(AI Studio)',
+ noProjectIdNeededDesc: '需管理员配置 OAuth Client',
aiStudioNotConfiguredShort: '未配置',
aiStudioNotConfiguredTip: 'AI Studio OAuth 未配置:请先设置 GEMINI_OAUTH_CLIENT_ID / GEMINI_OAUTH_CLIENT_SECRET,并在 Google OAuth Client 添加 Redirect URI:http://localhost:1455/auth/callback(Consent Screen scopes 需包含 https://www.googleapis.com/auth/generative-language.retriever)',
aiStudioNotConfigured: 'AI Studio OAuth 未配置:请先设置 GEMINI_OAUTH_CLIENT_ID / GEMINI_OAUTH_CLIENT_SECRET,并在 Google OAuth Client 添加 Redirect URI:http://localhost:1455/auth/callback'
@@ -1252,7 +1255,94 @@ export default {
modelPassthrough: 'Gemini 直接转发模型',
modelPassthroughDesc: '所有模型请求将直接转发至 Gemini API,不进行模型限制或映射。',
baseUrlHint: '留空使用官方 Gemini API',
- apiKeyHint: '您的 Gemini API Key(以 AIza 开头)'
+ apiKeyHint: '您的 Gemini API Key(以 AIza 开头)',
+ accountType: {
+ oauthTitle: 'OAuth 授权(Gemini)',
+ oauthDesc: '使用 Google 账号授权,并选择 OAuth 子类型。',
+ apiKeyTitle: 'API 密钥(AI Studio)',
+ apiKeyDesc: '最快接入方式,使用 AIza API Key。',
+ apiKeyNote: '适合轻量测试。免费层限流严格,数据可能用于训练。',
+ apiKeyLink: '获取 API Key',
+ quotaLink: '配额说明'
+ },
+ oauthType: {
+ builtInTitle: '内置授权(Gemini CLI / Code Assist)',
+ builtInDesc: '使用 Google 内置客户端 ID,无需管理员配置。',
+ builtInRequirement: '需要 GCP 项目并填写 Project ID。',
+ gcpProjectLink: '创建项目',
+ customTitle: '自定义授权(AI Studio OAuth)',
+ customDesc: '使用管理员预设的 OAuth 客户端,适合组织管理。',
+ customRequirement: '需管理员配置 Client ID 并加入测试用户白名单。',
+ badges: {
+ recommended: '推荐',
+ highConcurrency: '高并发',
+ noAdmin: '无需管理员配置',
+ orgManaged: '组织管理',
+ adminRequired: '需要管理员'
+ }
+ },
+ setupGuide: {
+ title: 'Gemini 使用准备',
+ checklistTitle: '准备工作',
+ checklistItems: {
+ usIp: '使用美国 IP,并确保账号归属地为美国。',
+ age: '账号需满 18 岁。'
+ },
+ activationTitle: '服务激活',
+ activationItems: {
+ geminiWeb: '激活 Gemini Web,避免 User not initialized。',
+ gcpProject: '激活 GCP 项目,获取 Code Assist 所需 Project ID。'
+ },
+ links: {
+ countryCheck: '检查归属地',
+ geminiWebActivation: '激活 Gemini Web',
+ gcpProject: '打开 GCP 控制台'
+ }
+ },
+ quotaPolicy: {
+ title: 'Gemini 配额与限流政策(参考)',
+ note: '注意:Gemini 官方未提供用量查询接口。此处显示的“每日配额”是由系统根据账号等级模拟计算的估算值,仅供调度参考,请以 Google 官方实际报错为准。',
+ columns: {
+ channel: '授权通道',
+ account: '账号状态',
+ limits: '限流政策',
+ docs: '官方文档'
+ },
+ docs: {
+ codeAssist: 'Code Assist 配额',
+ aiStudio: 'AI Studio 定价',
+ vertex: 'Vertex AI 配额'
+ },
+ simulatedNote: '本地模拟配额,仅供参考',
+ rows: {
+ cli: {
+ channel: 'Gemini CLI(官方 Google 登录 / Code Assist)',
+ free: '免费 Google 账号',
+ premium: 'Google One AI Premium',
+ limitsFree: 'RPD ~1000;RPM ~60(软限制)',
+ limitsPremium: 'RPD ~1500+;RPM ~60+(优先队列)'
+ },
+ gcloud: {
+ channel: 'GCP Code Assist(gcloud 登录)',
+ account: '未购买 Code Assist 订阅',
+ limits: 'RPD ~1000;RPM ~60(预览期)'
+ },
+ aiStudio: {
+ channel: 'AI Studio API Key / OAuth',
+ free: '未绑卡(免费层)',
+ paid: '已绑卡(按量付费)',
+ limitsFree: 'RPD 50;RPM 2(Pro)/ 15(Flash)',
+ limitsPaid: 'RPD 不限;RPM 1000+(按模型配额)'
+ },
+ customOAuth: {
+ channel: 'Custom OAuth Client(GCP)',
+ free: '项目未绑卡',
+ paid: '项目已绑卡',
+ limitsFree: 'RPD 50;RPM 2(项目配额)',
+ limitsPaid: 'RPD 不限;RPM 1000+(项目配额)'
+ }
+ }
+ }
},
// Re-Auth Modal
reAuthorizeAccount: '重新授权账号',
diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts
index 85d07976..80488602 100644
--- a/frontend/src/types/index.ts
+++ b/frontend/src/types/index.ts
@@ -382,6 +382,8 @@ export interface AccountUsageInfo {
five_hour: UsageProgress | null
seven_day: UsageProgress | null
seven_day_sonnet: UsageProgress | null
+ gemini_pro_daily?: UsageProgress | null
+ gemini_flash_daily?: UsageProgress | null
}
// OpenAI Codex usage snapshot (from response headers)