diff --git a/frontend/src/components/account/BulkEditAccountModal.vue b/frontend/src/components/account/BulkEditAccountModal.vue index 856aa6a361..b1ca533031 100644 --- a/frontend/src/components/account/BulkEditAccountModal.vue +++ b/frontend/src/components/account/BulkEditAccountModal.vue @@ -599,6 +599,48 @@ + +
+
+
+ +

+ {{ t('admin.accounts.allowOveragesTooltip') }} +

+
+ +
+
+ +
+
+
@@ -843,6 +885,11 @@ const appStore = useAppStore() // Platform awareness const isMixedPlatform = computed(() => props.selectedPlatforms.length > 1) +// 是否全部为 Antigravity 平台(allow_overages 仅在此条件下显示) +const allAntigravity = computed(() => + props.selectedPlatforms.length === 1 && props.selectedPlatforms[0] === 'antigravity' +) + // 是否全部为 Anthropic OAuth/SetupToken(RPM 配置仅在此条件下显示) const allAnthropicOAuthOrSetupToken = computed(() => { return ( @@ -887,6 +934,7 @@ const enableRateMultiplier = ref(false) const enableStatus = ref(false) const enableGroups = ref(false) const enableRpmLimit = ref(false) +const enableAllowOverages = ref(false) // State - field values const submitting = ref(false) @@ -912,6 +960,7 @@ const bulkBaseRpm = ref(null) const bulkRpmStrategy = ref<'tiered' | 'sticky_exempt'>('tiered') const bulkRpmStickyBuffer = ref(null) const userMsgQueueMode = ref(null) +const allowOverages = ref(false) const umqModeOptions = computed(() => [ { value: '', label: t('admin.accounts.quotaControl.rpmLimit.umqModeOff') }, { value: 'throttle', label: t('admin.accounts.quotaControl.rpmLimit.umqModeThrottle') }, @@ -1120,6 +1169,13 @@ const buildUpdatePayload = (): Record | null => { umqExtra.user_msg_queue_enabled = false // 清理旧字段(JSONB merge) } + // Allow overages (Antigravity only) + if (enableAllowOverages.value) { + if (!updates.extra) updates.extra = {} + const overagesExtra = updates.extra as Record + overagesExtra.allow_overages = allowOverages.value + } + return Object.keys(updates).length > 0 ? updates : null } @@ -1182,6 +1238,7 @@ const handleSubmit = async () => { enableStatus.value || enableGroups.value || enableRpmLimit.value || + enableAllowOverages.value || userMsgQueueMode.value !== null if (!hasAnyFieldEnabled) { @@ -1273,6 +1330,7 @@ watch( enableStatus.value = false enableGroups.value = false enableRpmLimit.value = false + enableAllowOverages.value = false // Reset all values baseUrl.value = '' @@ -1294,6 +1352,7 @@ watch( bulkRpmStrategy.value = 'tiered' bulkRpmStickyBuffer.value = null userMsgQueueMode.value = null + allowOverages.value = false // Reset mixed channel warning state showMixedChannelWarning.value = false