diff --git a/frontend/src/views/admin/GroupsView.vue b/frontend/src/views/admin/GroupsView.vue index 040cf22ef6..62bb9998ca 100644 --- a/frontend/src/views/admin/GroupsView.vue +++ b/frontend/src/views/admin/GroupsView.vue @@ -1618,6 +1618,35 @@
{{ t("admin.groups.openaiFast.hint") }}
++ {{ t("admin.groups.openaiFast.freeHint") }} +
@@ -3385,6 +3414,35 @@{{ t("admin.groups.openaiFast.hint") }}
++ {{ t("admin.groups.openaiFast.freeHint") }} +
@@ -5130,6 +5188,7 @@ const createForm = reactive({ monthly_limit_usd: null as number | null, long_context_pricing_enabled: true, force_openai_fast: false, + free_openai_fast: false, model_pricing: [] as PricingFormEntry[], // 图片生成计费配置 allow_image_generation: false, @@ -5492,6 +5551,7 @@ const editForm = reactive({ monthly_limit_usd: null as number | null, long_context_pricing_enabled: true, force_openai_fast: false, + free_openai_fast: false, model_pricing: [] as PricingFormEntry[], // 图片生成计费配置 allow_image_generation: false, @@ -5967,6 +6027,7 @@ const closeCreateModal = () => { createForm.video_model_prices = createVideoModelPricesForm(); createForm.long_context_pricing_enabled = true; createForm.force_openai_fast = false; + createForm.free_openai_fast = false; createForm.model_pricing = []; createForm.web_search_price_per_call = null; createForm.search_price_per_1k = null; @@ -6071,6 +6132,10 @@ const handleCreateGroup = async () => { createForm.platform, createForm.force_openai_fast, ), + free_openai_fast: normalizeGroupOpenAIFast( + createForm.platform, + createForm.free_openai_fast, + ), model_pricing: groupPricingToAPI( createForm.model_pricing, createForm.platform, @@ -6200,6 +6265,7 @@ const handleEdit = async (group: AdminGroup) => { editForm.long_context_pricing_enabled = group.long_context_pricing_enabled ?? true; editForm.force_openai_fast = group.force_openai_fast ?? false; + editForm.free_openai_fast = group.free_openai_fast ?? false; editForm.model_pricing = groupPricingFromAPI(group.model_pricing); editForm.allow_image_generation = group.allow_image_generation ?? false; editForm.allow_batch_image_generation = @@ -6307,6 +6373,7 @@ const closeEditModal = () => { editForm.video_model_prices = createVideoModelPricesForm(); editForm.long_context_pricing_enabled = true; editForm.force_openai_fast = false; + editForm.free_openai_fast = false; editForm.model_pricing = []; editForm.web_search_price_per_call = null; editForm.search_price_per_1k = null; @@ -6344,6 +6411,10 @@ const handleUpdateGroup = async () => { editForm.platform, editForm.force_openai_fast, ), + free_openai_fast: normalizeGroupOpenAIFast( + editForm.platform, + editForm.free_openai_fast, + ), model_pricing: groupPricingToAPI( editForm.model_pricing, editForm.platform, diff --git a/frontend/src/views/admin/__tests__/groupsOpenAIFast.spec.ts b/frontend/src/views/admin/__tests__/groupsOpenAIFast.spec.ts index e94ee5a36c..a0333e0a5a 100644 --- a/frontend/src/views/admin/__tests__/groupsOpenAIFast.spec.ts +++ b/frontend/src/views/admin/__tests__/groupsOpenAIFast.spec.ts @@ -26,11 +26,15 @@ describe("groupsOpenAIFast", () => { title: expect.any(String), force: expect.any(String), hint: expect.stringContaining("service_tier=priority"), + free: expect.any(String), + freeHint: expect.stringContaining("Standard"), }); expect(en.groups.openaiFast).toMatchObject({ title: expect.any(String), force: expect.any(String), hint: expect.stringContaining("service_tier=priority"), + free: expect.any(String), + freeHint: expect.stringContaining("Standard"), }); }); });