feat: allow antigravity warmup intercept toggle

- Show warmup-intercept toggle for antigravity accounts in admin UI\n- Add unit tests verifying antigravity accounts are intercepted on /v1/messages
This commit is contained in:
liuxiongfeng
2026-02-12 18:56:55 +08:00
parent 24dcba1d72
commit 5e518f5fbd
3 changed files with 346 additions and 6 deletions

View File

@@ -1285,9 +1285,9 @@
</div>
</div>
<!-- Intercept Warmup Requests (Anthropic only) -->
<!-- Intercept Warmup Requests (Anthropic/Antigravity) -->
<div
v-if="form.platform === 'anthropic'"
v-if="form.platform === 'anthropic' || form.platform === 'antigravity'"
class="border-t border-gray-200 pt-4 dark:border-dark-600"
>
<div class="flex items-center justify-between">
@@ -2303,8 +2303,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
}
// Reset OAuth states

View File

@@ -602,9 +602,9 @@
</div>
</div>
<!-- Intercept Warmup Requests (Anthropic only) -->
<!-- Intercept Warmup Requests (Anthropic/Antigravity) -->
<div
v-if="account?.platform === 'anthropic'"
v-if="account?.platform === 'anthropic' || account?.platform === 'antigravity'"
class="border-t border-gray-200 pt-4 dark:border-dark-600"
>
<div class="flex items-center justify-between">