🎬 火宝短剧 - 基于AI的一站式短剧生成平台 《一句话生成完整短剧,从剧本到成片全自动化》 Huobao Drama - An AI-Powered End-to-End Short Drama Generator "One Sentence to Complete Drama: Fully Automated from Script to Final Video"
TypeScript
refactor(settings): 快捷配置 API 域名迁移至 api.firemux.com
Connor60d294192c36
diff --git a/backend/tests/official-provider-adapters.test.mjs b/backend/tests/official-provider-adapters.test.mjsindex f708ac1..4ccc236 100644--- a/backend/tests/official-provider-adapters.test.mjs+++ b/backend/tests/official-provider-adapters.test.mjs@@ -21,7 +21,7 @@ test('backend provider registry does not expose ChatFire as a model provider', (assert.doesNotMatch(registry, /chatfire/i)assert.doesNotMatch(ai, /chatfire/i)assert.doesNotMatch(ai, /openrouter/i)- assert.doesNotMatch(aiConfigRoute, /api\.chatfire\.site/i)+ assert.doesNotMatch(aiConfigRoute, /api\.firemux\.com/i)assert.doesNotMatch(aiConfigRoute, /provider:\s*'chatfire'/i)assert.doesNotMatch(aiConfigRoute, /openrouter/i)assert.doesNotMatch(aiConfigRoute, /\/huobao-preset/)@@ -70,7 +70,7 @@ test('backend rejects unsupported providers at DB and route boundaries', () => {assert.match(route, /isOfficialProvider/)assert.match(route, /isOfficialProvider\(body\.service_type,\s*body\.provider\)/)assert.match(route, /isOfficialProvider\(serviceType,\s*provider\)/)- assert.match(route, /Unsupported service_type\/provider/)+ assert.match(route, /不支持的 service_type\/provider/)})test('AI config routes reject unsupported service/provider pairs in create, test, and update paths', () => {@@ -81,18 +81,18 @@ test('AI config routes reject unsupported service/provider pairs in create, testassert.match(createRoute, /if \(!body\.service_type \|\| !body\.provider\)/)assert.match(createRoute, /isOfficialProvider\(body\.service_type,\s*body\.provider\)/)- assert.match(createRoute, /badRequest\(c,\s*'Unsupported service_type\/provider'\)/)+ assert.match(createRoute, /badRequest\(c,\s*'不支持的 service_type\/provider'\)/)assert.match(testRoute, /if \(!body\.service_type \|\| !body\.provider \|\| !body\.base_url\)/)assert.match(testRoute, /isOfficialProvider\(body\.service_type,\s*body\.provider\)/)- assert.match(testRoute, /badRequest\(c,\s*'Unsupported service_type\/provider'\)/)+ assert.match(testRoute, /badRequest\(c,\s*'不支持的 service_type\/provider'\)/)assert.match(updateRoute, /const serviceType = 'service_type' in body \? body\.service_type : existing\.serviceType/)assert.match(updateRoute, /const provider = 'provider' in body \? body\.provider : existing\.provider/)assert.doesNotMatch(updateRoute, /body\.service_type \|\| existing\.serviceType/)assert.doesNotMatch(updateRoute, /body\.provider \|\| existing\.provider/)assert.match(updateRoute, /isOfficialProvider\(serviceType,\s*provider\)/)- assert.match(updateRoute, /badRequest\(c,\s*'Unsupported service_type\/provider'\)/)+ assert.match(updateRoute, /badRequest\(c,\s*'不支持的 service_type\/provider'\)/)})test('AI config update route persists service type changes after validation', () => {@@ -178,7 +178,7 @@ test('new image and video models use their current API shapes', () => {assert.match(geminiImage, /\/v1beta'[\s\S]*'\/interactions'/)assert.match(geminiImage, /response_format/)assert.doesNotMatch(geminiImage, /Authorization': `Bearer/)- assert.match(volcVideo, /doubao-seedance-2-0-fast-260128/)+ assert.match(volcVideo, /doubao-seedance-2-0-mini-260615/)// Seedance 2.0 多模态能力assert.match(volcVideo, /SEEDANCE2_MODEL_PREFIX/)assert.match(volcVideo, /startsWith\(SEEDANCE2_MODEL_PREFIX\)/)diff --git a/frontend/app/pages/settings.vue b/frontend/app/pages/settings.vueindex a0110cb..45bd263 100644--- a/frontend/app/pages/settings.vue+++ b/frontend/app/pages/settings.vue@@ -100,7 +100,7 @@</div><p class="setup-desc">{{ t('settings.ai.quickDesc') }}- <a class="huobao-site-link" href="https://api.chatfire.site" target="_blank" rel="noopener noreferrer">+ <a class="huobao-site-link" href="https://api.firemux.com" target="_blank" rel="noopener noreferrer">{{ t('settings.ai.getKey') }}<ExternalLink :size="12" :stroke-width="1.8" /></a>@@ -726,13 +726,13 @@ const providerPresets = {},}const huobaoQuickConfigs = [- { service_type: 'text', provider: 'gemini', name: '火宝文本服务 · Gemini', base_url: 'https://api.chatfire.site', model: ['gemini-3.1-pro-preview', 'gemini-3.5-flash', 'gemini-3-flash-preview'], priority: 100 },- { service_type: 'text', provider: 'openai', name: '火宝文本服务 · OpenAI', base_url: 'https://api.chatfire.site', model: ['deepseek-v4-pro', 'deepseek-v4-flash', 'gpt-5.6-terra'], priority: 101 },- { service_type: 'image', provider: 'openai', name: '火宝图片服务 · OpenAI', base_url: 'https://api.chatfire.site', model: ['gpt-image-2'], priority: 99 },- { service_type: 'image', provider: 'gemini', name: '火宝图片服务 · Gemini', base_url: 'https://api.chatfire.site', model: ['gemini-3-pro-image', 'gemini-3.1-flash-image'], priority: 97 },- { service_type: 'video', provider: 'volcengine', name: '火宝视频服务 · Seedance', base_url: 'https://api.chatfire.site/volcengine', model: ['doubao-seedance-2-0-mini-260615', 'doubao-seedance-2-0-fast-260128', 'doubao-seedance-2-0-260128'], priority: 98 },- { service_type: 'video', provider: 'aliyun', name: '火宝视频服务 · Wan 3.0', base_url: 'https://api.chatfire.site/qwen', model: ['wan3.0-video-prime', 'wan3.0-video'], priority: 97 },- { service_type: 'video', provider: 'minimax', name: '火宝视频服务 · MiniMax', base_url: 'https://api.chatfire.site/minimax', model: ['MiniMax-H3'], priority: 96 },+ { service_type: 'text', provider: 'gemini', name: '火宝文本服务 · Gemini', base_url: 'https://api.firemux.com', model: ['gemini-3.1-pro-preview', 'gemini-3.5-flash', 'gemini-3-flash-preview'], priority: 100 },+ { service_type: 'text', provider: 'openai', name: '火宝文本服务 · OpenAI', base_url: 'https://api.firemux.com', model: ['deepseek-v4-pro', 'deepseek-v4-flash', 'gpt-5.6-terra'], priority: 101 },+ { service_type: 'image', provider: 'openai', name: '火宝图片服务 · OpenAI', base_url: 'https://api.firemux.com', model: ['gpt-image-2'], priority: 99 },+ { service_type: 'image', provider: 'gemini', name: '火宝图片服务 · Gemini', base_url: 'https://api.firemux.com', model: ['gemini-3-pro-image', 'gemini-3.1-flash-image'], priority: 97 },+ { service_type: 'video', provider: 'volcengine', name: '火宝视频服务 · Seedance', base_url: 'https://api.firemux.com/volcengine', model: ['doubao-seedance-2-0-mini-260615', 'doubao-seedance-2-0-fast-260128', 'doubao-seedance-2-0-260128'], priority: 98 },+ { service_type: 'video', provider: 'aliyun', name: '火宝视频服务 · Wan 3.0', base_url: 'https://api.firemux.com/qwen', model: ['wan3.0-video-prime', 'wan3.0-video'], priority: 97 },+ { service_type: 'video', provider: 'minimax', name: '火宝视频服务 · MiniMax', base_url: 'https://api.firemux.com/minimax', model: ['MiniMax-H3'], priority: 96 },]function byType(t) { return cfgs.value.filter(c => c.service_type === t) }diff --git a/frontend/tests/official-provider-settings.test.mjs b/frontend/tests/official-provider-settings.test.mjsindex 84e2a6a..3cc5396 100644--- a/frontend/tests/official-provider-settings.test.mjs+++ b/frontend/tests/official-provider-settings.test.mjs@@ -22,7 +22,7 @@ test('settings page exposes official provider templates only', () => {assert.doesNotMatch(settingsPage, /huobaoPreset/i)assert.doesNotMatch(settingsPage, /applyHuobaoPreset/i)assert.doesNotMatch(settingsPage, /\/huobao-preset/)- assert.doesNotMatch(useApi, /api\.chatfire\.site/i)+ assert.doesNotMatch(useApi, /api\.firemux\.com/i)assert.doesNotMatch(useApi, /applyHuobaoPreset/i)assert.doesNotMatch(useApi, /openrouter/i)assert.doesNotMatch(useApi, /huobaoPreset/i)@@ -38,7 +38,7 @@ test('settings page exposes official provider templates only', () => {assert.doesNotMatch(settingsPage, /https:\/\/api\.vidu\.com/)assert.doesNotMatch(settingsPage, /\['ali'|'ali',|, 'ali'\]/)assert.match(settingsPage, /火宝快捷配置/)- assert.match(settingsPage, /https:\/\/api\.chatfire\.site/)+ assert.match(settingsPage, /https:\/\/api\.firemux\.com/)assert.match(settingsPage, /applyHuobaoQuickConfig/)assert.doesNotMatch(settingsPage, /https:\/\/api\.minimax\.io/)})@@ -74,7 +74,7 @@ test('settings page offers official default model IDs', () => {})test('only text service configs expose the connection test button', () => {- assert.match(settingsPage, /v-if="st\.type === 'text'" class="btn btn-ghost btn-sm" @click="testExistingCfg\(c\)">测试/)+ assert.match(settingsPage, /v-if="st\.type === 'text'" class="btn btn-ghost btn-sm" @click="testExistingCfg\(c\)">\{\{ t\('settings\.ai\.test'\) \}\}/)})test('settings page offers the supported official provider presets', () => {@@ -93,6 +93,6 @@ test('Huobao quick config includes Wan 3.0 through the Qwen gateway route', () =assert.notEqual(quickStart, -1)const quickConfigs = settingsPage.slice(quickStart, settingsPage.indexOf('\n]', quickStart) + 2)assert.match(quickConfigs, /provider:\s*'aliyun'/)- assert.match(quickConfigs, /base_url:\s*'https:\/\/api\.chatfire\.site\/qwen'/)+ assert.match(quickConfigs, /base_url:\s*'https:\/\/api\.firemux\.com\/qwen'/)assert.match(quickConfigs, /model:\s*\['wan3\.0-video-prime', 'wan3\.0-video'\]/)})diff --git a/frontend/tests/video-direct-generation-config.test.mjs b/frontend/tests/video-direct-generation-config.test.mjsindex 6446e17..28fac7a 100644--- a/frontend/tests/video-direct-generation-config.test.mjs+++ b/frontend/tests/video-direct-generation-config.test.mjs@@ -19,7 +19,7 @@ test('video presets use official provider endpoints', () => {const presetsStart = settingsPage.indexOf('const providerPresets = {')const quickStart = settingsPage.indexOf('const huobaoQuickConfigs = [')const providerPresets = settingsPage.slice(presetsStart, quickStart)- assert.doesNotMatch(providerPresets, /api\.chatfire\.site/)+ assert.doesNotMatch(providerPresets, /api\.firemux\.com/)assert.match(settingsPage, /https:\/\/ark\.cn-beijing\.volces\.com/)assert.match(providerPresets, /https:\/\/\{WorkspaceId\}\.cn-beijing\.maas\.aliyuncs\.com/)assert.doesNotMatch(settingsPage, /https:\/\/dashscope\.aliyuncs\.com/)@@ -29,5 +29,5 @@ test('video presets use official provider endpoints', () => {test('Wan 3.0 quick preset targets the Qwen gateway namespace', () => {const quickStart = settingsPage.indexOf('const huobaoQuickConfigs = [')const quickConfigs = settingsPage.slice(quickStart)- assert.match(quickConfigs, /provider:\s*'aliyun'.*base_url:\s*'https:\/\/api\.chatfire\.site\/qwen'.*wan3\.0-video-prime.*wan3\.0-video/s)+ assert.match(quickConfigs, /provider:\s*'aliyun'.*base_url:\s*'https:\/\/api\.firemux\.com\/qwen'.*wan3\.0-video-prime.*wan3\.0-video/s)})