diff --git a/apps/web/src/api/template-editor/aiFeatures.ts b/apps/web/src/api/template-editor/aiFeatures.ts index 9f38bb928..05ce3526b 100644 --- a/apps/web/src/api/template-editor/aiFeatures.ts +++ b/apps/web/src/api/template-editor/aiFeatures.ts @@ -24,7 +24,7 @@ export async function generateCover( data: GenerateCoverRequest, ): Promise { const response = await apiClient.post(`/templates/${templateId}/editor/generate-cover`, data, { - timeout: 180000, // 封面生成涉及 MediaKit 抽帧,最长 180 秒 + timeout: 180000, // 封面生成涉及 MediaKit 抽帧,最长 180 秒 }) return response.data } diff --git a/packages/shared/ai_service.py b/packages/shared/ai_service.py index b61efc250..eb55d92fa 100755 --- a/packages/shared/ai_service.py +++ b/packages/shared/ai_service.py @@ -438,10 +438,10 @@ def _call_ai_cover_service( # 封面生成失败 - 不再降级到 stub,直接报错 raise RuntimeError( - f"封面生成失败: plan_id={plan_id}, MediaKit 不可用或抽帧失败。" - f"请检查 primary_video_url 是否可访问。" + f"封面生成失败: plan_id={plan_id}, MediaKit 不可用或抽帧失败。" f"请检查 primary_video_url 是否可访问。" ) + # ── 公共入口 ────────────────────────────────────────────────────────────────