diff --git a/backend/internal/domain/constants.go b/backend/internal/domain/constants.go index 53658270..e674facb 100644 --- a/backend/internal/domain/constants.go +++ b/backend/internal/domain/constants.go @@ -93,14 +93,15 @@ var DefaultAntigravityModelMapping = map[string]string{ "gemini-3-pro-high": "gemini-3.1-pro-high", "gemini-3-pro-low": "gemini-3.1-pro-low", "gemini-3-pro-image": "gemini-3-pro-image", - // Gemini 3.1 透传 - "gemini-3.1-pro-high": "gemini-3.1-pro-high", - "gemini-3.1-pro-low": "gemini-3.1-pro-low", - "gemini-3.1-pro-preview": "gemini-3.1-pro-high", // Gemini 3 preview 映射 "gemini-3-flash-preview": "gemini-3-flash", "gemini-3-pro-preview": "gemini-3.1-pro-high", "gemini-3-pro-image-preview": "gemini-3-pro-image", + // Gemini 3.1 白名单 + "gemini-3.1-pro-high": "gemini-3.1-pro-high", + "gemini-3.1-pro-low": "gemini-3.1-pro-low", + // Gemini 3.1 preview 映射 + "gemini-3.1-pro-preview": "gemini-3.1-pro-high", // 其他官方模型 "gpt-oss-120b-medium": "gpt-oss-120b-medium", "tab_flash_lite_preview": "tab_flash_lite_preview", diff --git a/backend/internal/handler/gateway_handler.go b/backend/internal/handler/gateway_handler.go index d78f83a6..fe40e9d2 100644 --- a/backend/internal/handler/gateway_handler.go +++ b/backend/internal/handler/gateway_handler.go @@ -650,11 +650,6 @@ func (h *GatewayHandler) Messages(c *gin.Context) { ).Error("gateway.record_usage_failed", zap.Error(err)) } }) - reqLog.Debug("gateway.request_completed", - zap.Int64("account_id", account.ID), - zap.Int("switch_count", fs.SwitchCount), - zap.Bool("fallback_used", fallbackUsed), - ) return } if !retryWithFallback { diff --git a/frontend/src/components/account/CreateAccountModal.vue b/frontend/src/components/account/CreateAccountModal.vue index 83b65159..25100c82 100644 --- a/frontend/src/components/account/CreateAccountModal.vue +++ b/frontend/src/components/account/CreateAccountModal.vue @@ -916,8 +916,8 @@

{{ t('admin.accounts.gemini.tier.aiStudioHint') }}

- -
+ +
- -
-
-
- - - -
-

- {{ t('admin.accounts.gemini.modelPassthrough') }} -

-

- {{ t('admin.accounts.gemini.modelPassthroughDesc') }} -

-
-
-
-
@@ -1378,9 +1350,9 @@
- +
@@ -2562,8 +2534,8 @@ watch( antigravityModelMappings.value = [] antigravityModelRestrictionMode.value = 'mapping' } - // Reset Anthropic-specific settings when switching to other platforms - if (newPlatform !== 'anthropic') { + // Reset Anthropic/Antigravity-specific settings when switching to other platforms + if (newPlatform !== 'anthropic' && newPlatform !== 'antigravity') { interceptWarmupRequests.value = false } if (newPlatform === 'sora') { @@ -3117,15 +3089,8 @@ const handleSubmit = async () => { applyInterceptWarmup(credentials, interceptWarmupRequests.value, 'create') - submitting.value = true - try { - const extra = mixedScheduling.value ? { mixed_scheduling: true } : undefined - await createAccountAndFinish(form.platform, 'apikey', credentials, extra) - } catch (error: any) { - appStore.showError(error.response?.data?.detail || t('admin.accounts.failedToCreate')) - } finally { - submitting.value = false - } + const extra = mixedScheduling.value ? { mixed_scheduling: true } : undefined + await createAccountAndFinish(form.platform, 'apikey', credentials, extra) return } diff --git a/frontend/src/components/account/EditAccountModal.vue b/frontend/src/components/account/EditAccountModal.vue index c29aa54b..32508132 100644 --- a/frontend/src/components/account/EditAccountModal.vue +++ b/frontend/src/components/account/EditAccountModal.vue @@ -65,8 +65,8 @@

{{ t('admin.accounts.leaveEmptyToKeep') }}

- -
+ +
- -
-
-
- - - -
-

- {{ t('admin.accounts.gemini.modelPassthrough') }} -

-

- {{ t('admin.accounts.gemini.modelPassthroughDesc') }} -

-
-
-
-
@@ -641,9 +613,9 @@
- +
diff --git a/frontend/src/types/index.ts b/frontend/src/types/index.ts index 70fe5a27..a54cfcef 100644 --- a/frontend/src/types/index.ts +++ b/frontend/src/types/index.ts @@ -581,6 +581,7 @@ export interface GeminiCredentials { token_type?: string scope?: string expires_at?: string + model_mapping?: Record } export interface TempUnschedulableRule {