Fix voice clone NotSupportedError and improve subscription services
This commit is contained in:
@@ -161,6 +161,7 @@ const defaultLimits = {
|
||||
video_calls: 0,
|
||||
image_edit_calls: 0,
|
||||
audio_calls: 0,
|
||||
wavespeed_calls: 0,
|
||||
gemini_tokens: 0,
|
||||
openai_tokens: 0,
|
||||
anthropic_tokens: 0,
|
||||
@@ -211,6 +212,7 @@ function coerceUsageStats(raw: any): UsageStats {
|
||||
video_calls: raw?.limits?.limits?.video_calls ?? 0,
|
||||
image_edit_calls: raw?.limits?.limits?.image_edit_calls ?? 0,
|
||||
audio_calls: raw?.limits?.limits?.audio_calls ?? 0,
|
||||
wavespeed_calls: raw?.limits?.limits?.wavespeed_calls ?? 0,
|
||||
gemini_tokens: raw?.limits?.limits?.gemini_tokens ?? 0,
|
||||
openai_tokens: raw?.limits?.limits?.openai_tokens ?? 0,
|
||||
anthropic_tokens: raw?.limits?.limits?.anthropic_tokens ?? 0,
|
||||
|
||||
@@ -786,6 +786,14 @@ export const podcastApi = {
|
||||
seed?: number;
|
||||
maskImageUrl?: string;
|
||||
}): Promise<{ taskId: string; status: string; message: string }> {
|
||||
// Preflight check for video generation
|
||||
await ensurePreflight({
|
||||
provider: 'video',
|
||||
model: 'kling-v2.5-turbo-5s',
|
||||
operation_type: 'video_generation',
|
||||
actual_provider_name: 'wavespeed',
|
||||
});
|
||||
|
||||
const response = await aiApiClient.post("/api/podcast/render/video", {
|
||||
project_id: params.projectId,
|
||||
scene_id: params.sceneId,
|
||||
@@ -884,6 +892,14 @@ export const podcastApi = {
|
||||
cost: number;
|
||||
image_prompt?: string;
|
||||
}> {
|
||||
// Preflight check for image generation
|
||||
await ensurePreflight({
|
||||
provider: 'stability',
|
||||
model: 'stability-ai',
|
||||
operation_type: 'image_generation',
|
||||
actual_provider_name: 'wavespeed',
|
||||
});
|
||||
|
||||
const response = await aiApiClient.post("/api/podcast/image", {
|
||||
scene_id: params.sceneId,
|
||||
scene_title: params.sceneTitle,
|
||||
|
||||
Reference in New Issue
Block a user