From 17747df8423e1c9a584a0cd27784adfcd625c7ce Mon Sep 17 00:00:00 2001 From: Ritel-T Date: Sun, 23 Aug 2026 18:58:55 +0900 Subject: [PATCH] Add the group Fast admin switch --- frontend/src/views/admin/GroupsView.vue | 95 +++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/frontend/src/views/admin/GroupsView.vue b/frontend/src/views/admin/GroupsView.vue index 612624904d..040cf22ef6 100644 --- a/frontend/src/views/admin/GroupsView.vue +++ b/frontend/src/views/admin/GroupsView.vue @@ -1581,6 +1581,45 @@ + +
+

+ {{ t("admin.groups.openaiFast.title") }} +

+
+ + +
+

+ {{ t("admin.groups.openaiFast.hint") }} +

+
+
+ +
+

+ {{ t("admin.groups.openaiFast.title") }} +

+
+ + +
+

+ {{ t("admin.groups.openaiFast.hint") }} +

+
+
{ createForm.video_price_1080p = null; createForm.video_model_prices = createVideoModelPricesForm(); createForm.long_context_pricing_enabled = true; + createForm.force_openai_fast = false; createForm.model_pricing = []; createForm.web_search_price_per_call = null; createForm.search_price_per_1k = null; @@ -5982,6 +6067,10 @@ const handleCreateGroup = async () => { // 构建请求数据,包含模型路由配置 const requestData = { ...createGroupForm, + force_openai_fast: normalizeGroupOpenAIFast( + createForm.platform, + createForm.force_openai_fast, + ), model_pricing: groupPricingToAPI( createForm.model_pricing, createForm.platform, @@ -6110,6 +6199,7 @@ const handleEdit = async (group: AdminGroup) => { editForm.monthly_limit_usd = group.monthly_limit_usd; editForm.long_context_pricing_enabled = group.long_context_pricing_enabled ?? true; + editForm.force_openai_fast = group.force_openai_fast ?? false; editForm.model_pricing = groupPricingFromAPI(group.model_pricing); editForm.allow_image_generation = group.allow_image_generation ?? false; editForm.allow_batch_image_generation = @@ -6216,6 +6306,7 @@ const closeEditModal = () => { editForm.video_price_1080p = null; editForm.video_model_prices = createVideoModelPricesForm(); editForm.long_context_pricing_enabled = true; + editForm.force_openai_fast = false; editForm.model_pricing = []; editForm.web_search_price_per_call = null; editForm.search_price_per_1k = null; @@ -6249,6 +6340,10 @@ const handleUpdateGroup = async () => { // 转换 fallback_group_id: null -> 0 (后端使用 0 表示清除) const payload = { ...editForm, + force_openai_fast: normalizeGroupOpenAIFast( + editForm.platform, + editForm.force_openai_fast, + ), model_pricing: groupPricingToAPI( editForm.model_pricing, editForm.platform,