@shop-os/modelkit 0.26.1 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/catalog.cjs +165 -22
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.js +165 -22
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +234 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +234 -57
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/catalog.js
CHANGED
|
@@ -5415,10 +5415,119 @@ var TEXT_MODELS = [
|
|
|
5415
5415
|
})
|
|
5416
5416
|
];
|
|
5417
5417
|
|
|
5418
|
-
// src/catalog/video-
|
|
5419
|
-
var VIDEO_USAGE = { unit: "seconds" };
|
|
5418
|
+
// src/catalog/video-avatars.ts
|
|
5420
5419
|
var MB = 1024 * 1024;
|
|
5421
5420
|
var KLING_LOGO = "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/kling-color.png";
|
|
5421
|
+
var VEED_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/d540d2bb-0022-4371-8889-48aefaf46bbe.png";
|
|
5422
|
+
var SYNC_LOGO2 = "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/sync.png";
|
|
5423
|
+
var KIT_AUDIO_CAP_SECONDS = 300;
|
|
5424
|
+
function avatar(row2) {
|
|
5425
|
+
const { min, max, formats, maxBytes } = row2.audio;
|
|
5426
|
+
return {
|
|
5427
|
+
id: row2.id,
|
|
5428
|
+
aliases: row2.aliases,
|
|
5429
|
+
label: row2.label,
|
|
5430
|
+
type: "video",
|
|
5431
|
+
adapter: "fal",
|
|
5432
|
+
providerModelId: row2.providerModelId,
|
|
5433
|
+
lifecycle: "active",
|
|
5434
|
+
exposure: ["cowork", "space_builder"],
|
|
5435
|
+
constraints: {
|
|
5436
|
+
...row2.resolutions !== void 0 && { resolutions: [...row2.resolutions] },
|
|
5437
|
+
references: {
|
|
5438
|
+
images: 1,
|
|
5439
|
+
videos: 0,
|
|
5440
|
+
audios: 1,
|
|
5441
|
+
audioOnly: false,
|
|
5442
|
+
audioSeconds: { ...min !== void 0 && { min }, max },
|
|
5443
|
+
audioFormats: formats,
|
|
5444
|
+
...maxBytes !== void 0 && { audioMaxBytes: maxBytes },
|
|
5445
|
+
min: { images: 1, audios: 1 }
|
|
5446
|
+
},
|
|
5447
|
+
requires: ["references"],
|
|
5448
|
+
supports: [],
|
|
5449
|
+
...row2.promptMaxChars === void 0 ? { noPrompt: true } : { prompt: { referenceSyntax: "descriptive", maxChars: row2.promptMaxChars } },
|
|
5450
|
+
audio: "always"
|
|
5451
|
+
},
|
|
5452
|
+
defaults: row2.resolutions === void 0 ? {} : { resolution: row2.resolutions[0] },
|
|
5453
|
+
usage: { unit: "seconds" },
|
|
5454
|
+
pricingKind: "video_per_second",
|
|
5455
|
+
display: {
|
|
5456
|
+
provider: row2.provider,
|
|
5457
|
+
...row2.logo !== void 0 && { logo: row2.logo },
|
|
5458
|
+
description: row2.description
|
|
5459
|
+
},
|
|
5460
|
+
capabilities: {}
|
|
5461
|
+
};
|
|
5462
|
+
}
|
|
5463
|
+
function heygenAvatar6(tier) {
|
|
5464
|
+
const turbo = tier === "turbo";
|
|
5465
|
+
return avatar({
|
|
5466
|
+
id: turbo ? "heygen-avatar-6-turbo" : "heygen-avatar-6",
|
|
5467
|
+
aliases: [],
|
|
5468
|
+
label: turbo ? "HeyGen Avatar 6 Turbo" : "HeyGen Avatar 6",
|
|
5469
|
+
providerModelId: turbo ? "heygen/avatar-6/turbo/image-to-video" : "heygen/avatar-6/image-to-video",
|
|
5470
|
+
provider: "heygen",
|
|
5471
|
+
description: turbo ? "HeyGen Avatar 6 Turbo: the lower-cost tier; turns one photo of a person and a speech clip of up to 5 minutes into a talking video as long as the speech, at 1080p or 2K, with an optional motion prompt." : "HeyGen Avatar 6: turns one photo of a person and a speech clip of up to 5 minutes into a talking video as long as the speech, at 1080p or 2K, with an optional motion prompt.",
|
|
5472
|
+
audio: { max: KIT_AUDIO_CAP_SECONDS, formats: ["wav", "mp3"], maxBytes: 50 * MB },
|
|
5473
|
+
resolutions: ["1080p", "2k"],
|
|
5474
|
+
promptMaxChars: 1200
|
|
5475
|
+
});
|
|
5476
|
+
}
|
|
5477
|
+
function klingAvatar(tier) {
|
|
5478
|
+
const label = tier === "pro" ? "Pro" : "Standard";
|
|
5479
|
+
return avatar({
|
|
5480
|
+
id: `kling-ai-avatar-v2-${tier}`,
|
|
5481
|
+
aliases: [],
|
|
5482
|
+
label: `Kling AI Avatar 2.0 ${label}`,
|
|
5483
|
+
providerModelId: `fal-ai/kling-video/ai-avatar/v2/${tier}`,
|
|
5484
|
+
provider: "kuaishou",
|
|
5485
|
+
logo: KLING_LOGO,
|
|
5486
|
+
description: `Kuaishou Kling AI Avatar 2.0 (${label}): turns one image of a person, animal or character and a 2-300 second audio clip into a talking video as long as the audio.`,
|
|
5487
|
+
audio: { min: 2, max: 300, formats: ["mp3", "wav", "m4a", "aac"], maxBytes: 5 * MB },
|
|
5488
|
+
promptMaxChars: 2500
|
|
5489
|
+
});
|
|
5490
|
+
}
|
|
5491
|
+
function veedFabric(tier) {
|
|
5492
|
+
const fast = tier === "fast";
|
|
5493
|
+
return avatar({
|
|
5494
|
+
id: fast ? "veed-fabric-1.0-fast" : "veed-fabric-1.0",
|
|
5495
|
+
aliases: [fast ? "veed/fabric-1.0/fast" : "veed/fabric-1.0"],
|
|
5496
|
+
label: fast ? "VEED Fabric 1.0 Fast" : "VEED Fabric 1.0",
|
|
5497
|
+
providerModelId: fast ? "veed/fabric-1.0/fast" : "veed/fabric-1.0",
|
|
5498
|
+
provider: "veed",
|
|
5499
|
+
logo: VEED_LOGO,
|
|
5500
|
+
description: fast ? "VEED Fabric 1.0 Fast: the quicker tier; turns one image and a speech clip into a lip-synced talking video as long as the speech, at 480p or 720p." : "VEED Fabric 1.0: turns one image and a speech clip into a lip-synced talking video as long as the speech, at 480p or 720p.",
|
|
5501
|
+
audio: { max: KIT_AUDIO_CAP_SECONDS, formats: ["mp3", "ogg", "wav", "m4a", "aac"] },
|
|
5502
|
+
resolutions: ["720p", "480p"]
|
|
5503
|
+
});
|
|
5504
|
+
}
|
|
5505
|
+
var VIDEO_AVATAR_MODELS = [
|
|
5506
|
+
heygenAvatar6("regular"),
|
|
5507
|
+
heygenAvatar6("turbo"),
|
|
5508
|
+
klingAvatar("standard"),
|
|
5509
|
+
klingAvatar("pro"),
|
|
5510
|
+
veedFabric("regular"),
|
|
5511
|
+
veedFabric("fast"),
|
|
5512
|
+
// https://fal.ai/models/fal-ai/sync-lipsync/v3/image-to-video/api: image_url and audio_url
|
|
5513
|
+
// only; the video matches the audio's length. sync takes WAV or MP3
|
|
5514
|
+
// (https://sync.so/docs/quickstart); the length is the kit cap.
|
|
5515
|
+
avatar({
|
|
5516
|
+
id: "sync-3-image-to-video",
|
|
5517
|
+
aliases: ["fal-ai/sync-lipsync/v3/image-to-video"],
|
|
5518
|
+
label: "Sync 3 Avatar",
|
|
5519
|
+
providerModelId: "fal-ai/sync-lipsync/v3/image-to-video",
|
|
5520
|
+
provider: "sync",
|
|
5521
|
+
logo: SYNC_LOGO2,
|
|
5522
|
+
description: "Sync 3 (sync-3) image-to-video: animates the face in one image so it lip-syncs to a speech clip, as long as the speech.",
|
|
5523
|
+
audio: { max: KIT_AUDIO_CAP_SECONDS, formats: ["wav", "mp3"] }
|
|
5524
|
+
})
|
|
5525
|
+
];
|
|
5526
|
+
|
|
5527
|
+
// src/catalog/video-families.ts
|
|
5528
|
+
var VIDEO_USAGE = { unit: "seconds" };
|
|
5529
|
+
var MB2 = 1024 * 1024;
|
|
5530
|
+
var KLING_LOGO2 = "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/kling-color.png";
|
|
5422
5531
|
var MINIMAX_LOGO4 = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/f4c2e906-28b7-4a4a-b491-df8fef7808ed.png";
|
|
5423
5532
|
var BYTEDANCE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png";
|
|
5424
5533
|
var XAI_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/858b7fcc-9bd5-411d-aea1-a7b35ecfffab_compressed.png";
|
|
@@ -5476,7 +5585,7 @@ function klingMotionControl(tier) {
|
|
|
5476
5585
|
pricingKind: "video_per_second",
|
|
5477
5586
|
display: {
|
|
5478
5587
|
provider: "kuaishou",
|
|
5479
|
-
logo:
|
|
5588
|
+
logo: KLING_LOGO2,
|
|
5480
5589
|
description: `Kuaishou Kling 3.0 Motion Control (${label}): a character image performs the motion of a 3-30 second reference video, keeping its timing and sound.`
|
|
5481
5590
|
},
|
|
5482
5591
|
capabilities: {}
|
|
@@ -5509,7 +5618,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5509
5618
|
pricingKind: "video_per_second",
|
|
5510
5619
|
display: {
|
|
5511
5620
|
provider: "kuaishou",
|
|
5512
|
-
logo:
|
|
5621
|
+
logo: KLING_LOGO2,
|
|
5513
5622
|
description: "Kuaishou Kling O3 Pro: text, start/end frames and up to 7 reference images in one 3-15 second clip with consistent characters and optional native audio."
|
|
5514
5623
|
},
|
|
5515
5624
|
capabilities: { lastFrameRequiresFirstFrame: true }
|
|
@@ -5540,7 +5649,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5540
5649
|
pricingKind: "video_per_second",
|
|
5541
5650
|
display: {
|
|
5542
5651
|
provider: "kuaishou",
|
|
5543
|
-
logo:
|
|
5652
|
+
logo: KLING_LOGO2,
|
|
5544
5653
|
description: "Kuaishou Kling O3 Pro video edit: change a 3-15 second clip with a prompt and up to 4 reference images while keeping its motion and timing."
|
|
5545
5654
|
},
|
|
5546
5655
|
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
@@ -5552,7 +5661,9 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5552
5661
|
// start frame included (fal: "counts toward the image reference limit"), 300 px min.
|
|
5553
5662
|
// Reference videos: 5, 3-30.05 s each and 30 s combined, 700 px min, 23.9-60.05 fps.
|
|
5554
5663
|
// The prompt names references as @Image1, @Video1 (no space; @Element1 for elements,
|
|
5555
|
-
// which the kit does not send). No sound switch on any endpoint.
|
|
5664
|
+
// which the kit does not send). No sound switch on any endpoint. 4K since 2026-11-19;
|
|
5665
|
+
// the endpoints also take `hdr` (10-bit, 1080p and 4K, billed per output second on top),
|
|
5666
|
+
// which the kit does not send: no price row can carry that fee yet (ENG-4272).
|
|
5556
5667
|
id: "kling-4.0",
|
|
5557
5668
|
aliases: ["kling-4", "kling-v4"],
|
|
5558
5669
|
label: "Kling 4.0",
|
|
@@ -5564,7 +5675,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5564
5675
|
constraints: {
|
|
5565
5676
|
inputBilling: "kling-v4",
|
|
5566
5677
|
aspectRatios: ["adaptive", "16:9", "9:16", "1:1", "21:9"],
|
|
5567
|
-
resolutions: ["720p", "1080p"],
|
|
5678
|
+
resolutions: ["720p", "1080p", "4k"],
|
|
5568
5679
|
durations: { min: 3, max: 30 },
|
|
5569
5680
|
durationPresets: [5, 10, 15, 30],
|
|
5570
5681
|
references: {
|
|
@@ -5584,8 +5695,8 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5584
5695
|
pricingKind: "video_per_second",
|
|
5585
5696
|
display: {
|
|
5586
5697
|
provider: "kuaishou",
|
|
5587
|
-
logo:
|
|
5588
|
-
description: "Kuaishou Kling 4.0: text-to-video, start/end frames, or reference-to-video from up to 10 images and 5 videos (30 seconds combined), up to 30 seconds at 720p or 1080p. Prompts name references @Image1, @Video1."
|
|
5698
|
+
logo: KLING_LOGO2,
|
|
5699
|
+
description: "Kuaishou Kling 4.0: text-to-video, start/end frames, or reference-to-video from up to 10 images and 5 videos (30 seconds combined), up to 30 seconds at 720p or 1080p and up to 15 seconds at 4K. Prompts name references @Image1, @Video1."
|
|
5589
5700
|
},
|
|
5590
5701
|
capabilities: { lastFrameRequiresFirstFrame: true }
|
|
5591
5702
|
},
|
|
@@ -5603,7 +5714,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5603
5714
|
exposure: ["cowork", "space_builder"],
|
|
5604
5715
|
constraints: {
|
|
5605
5716
|
inputBilling: "kling-v4",
|
|
5606
|
-
resolutions: ["720p", "1080p"],
|
|
5717
|
+
resolutions: ["720p", "1080p", "4k"],
|
|
5607
5718
|
durations: { min: 3, max: 30 },
|
|
5608
5719
|
references: { ...NO_REFERENCES, images: 10 },
|
|
5609
5720
|
requires: ["sourceVideo"],
|
|
@@ -5618,8 +5729,8 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5618
5729
|
pricingKind: "video_per_second",
|
|
5619
5730
|
display: {
|
|
5620
5731
|
provider: "kuaishou",
|
|
5621
|
-
logo:
|
|
5622
|
-
description: "Kuaishou Kling 4.0 video edit: change a 3-30 second clip with a prompt and up to 10 reference images, at 720p or
|
|
5732
|
+
logo: KLING_LOGO2,
|
|
5733
|
+
description: "Kuaishou Kling 4.0 video edit: change a 3-30 second clip with a prompt and up to 10 reference images, at 720p, 1080p or 4K (up to 15 seconds at 4K), as long as the source or a set 3-30 seconds. Prompts name the source @Video1 and images @Image1."
|
|
5623
5734
|
},
|
|
5624
5735
|
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5625
5736
|
},
|
|
@@ -5659,7 +5770,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5659
5770
|
pricingKind: "video_per_second",
|
|
5660
5771
|
display: {
|
|
5661
5772
|
provider: "kuaishou",
|
|
5662
|
-
logo:
|
|
5773
|
+
logo: KLING_LOGO2,
|
|
5663
5774
|
description: "Kuaishou Kling 4.0 Flash: fast text-to-video, a start frame, or reference-to-video from up to 10 images and 5 videos (20 seconds combined), 3 to 20 seconds at 720p. Prompts name references @Image1, @Video1."
|
|
5664
5775
|
}
|
|
5665
5776
|
},
|
|
@@ -5699,7 +5810,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5699
5810
|
pricingKind: "video_per_second",
|
|
5700
5811
|
display: {
|
|
5701
5812
|
provider: "kuaishou",
|
|
5702
|
-
logo:
|
|
5813
|
+
logo: KLING_LOGO2,
|
|
5703
5814
|
description: "Kuaishou Kling 4.0 Flash video edit: change a 3-20 second clip with a prompt, up to 10 reference images and 4 reference videos (20 seconds in all with the source), at 720p, as long as the source or a set 3-20 seconds. Prompts name the source @Video1."
|
|
5704
5815
|
},
|
|
5705
5816
|
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
@@ -5726,7 +5837,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5726
5837
|
...NO_REFERENCES,
|
|
5727
5838
|
audios: 1,
|
|
5728
5839
|
audioSeconds: { min: 2 },
|
|
5729
|
-
audioMaxBytes: 15 *
|
|
5840
|
+
audioMaxBytes: 15 * MB2
|
|
5730
5841
|
},
|
|
5731
5842
|
supports: ["seed", "promptExpansion", "lastFrame", "safetyChecker"],
|
|
5732
5843
|
prompt: H3_PROMPT,
|
|
@@ -5925,7 +6036,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5925
6036
|
audioOnly: false,
|
|
5926
6037
|
audioSeconds: { min: 3, max: 12 },
|
|
5927
6038
|
audioFormats: ["mp3"],
|
|
5928
|
-
audioMaxBytes: 50 *
|
|
6039
|
+
audioMaxBytes: 50 * MB2
|
|
5929
6040
|
},
|
|
5930
6041
|
// Sound (dialogue and effects) is a reference-to-video option; image-to-video is silent.
|
|
5931
6042
|
supports: ["seed", "generateAudio", "safetyChecker"],
|
|
@@ -5966,7 +6077,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5966
6077
|
audioOnly: false,
|
|
5967
6078
|
audioSeconds: { min: 4, max: 300 },
|
|
5968
6079
|
audioFormats: ["wav", "mp3"],
|
|
5969
|
-
audioMaxBytes: 15 *
|
|
6080
|
+
audioMaxBytes: 15 * MB2,
|
|
5970
6081
|
min: { images: 1, audios: 1 }
|
|
5971
6082
|
},
|
|
5972
6083
|
requires: ["references"],
|
|
@@ -7069,6 +7180,7 @@ var VIDEO_MODELS = [
|
|
|
7069
7180
|
capabilities: {}
|
|
7070
7181
|
},
|
|
7071
7182
|
...VIDEO_FAMILY_MODELS,
|
|
7183
|
+
...VIDEO_AVATAR_MODELS,
|
|
7072
7184
|
...LUMA_VIDEO_MODELS
|
|
7073
7185
|
];
|
|
7074
7186
|
|
|
@@ -9885,6 +9997,15 @@ var KLING_O3_IMAGE_CAP = 7;
|
|
|
9885
9997
|
var KLING_V4_IMAGE_CAP = 10;
|
|
9886
9998
|
var TURBO_AUDIO_MIN_SECONDS = 2;
|
|
9887
9999
|
var OMNIHUMAN_AUDIO_SECONDS = { min: 4, max: 300 };
|
|
10000
|
+
var AVATAR_AUDIO = [
|
|
10001
|
+
["heygen/avatar-6/image-to-video", { max: 300 }],
|
|
10002
|
+
["heygen/avatar-6/turbo/image-to-video", { max: 300 }],
|
|
10003
|
+
["fal-ai/kling-video/ai-avatar/v2/standard", { min: 2, max: 300 }],
|
|
10004
|
+
["fal-ai/kling-video/ai-avatar/v2/pro", { min: 2, max: 300 }],
|
|
10005
|
+
["veed/fabric-1.0", { max: 300, urlOnly: true }],
|
|
10006
|
+
["veed/fabric-1.0/fast", { max: 300, urlOnly: true }],
|
|
10007
|
+
["fal-ai/sync-lipsync/v3/image-to-video", { max: 300, urlOnly: true }]
|
|
10008
|
+
];
|
|
9888
10009
|
function missing(message) {
|
|
9889
10010
|
return { code: "missing_input", message };
|
|
9890
10011
|
}
|
|
@@ -9941,7 +10062,17 @@ function o3Reference(req) {
|
|
|
9941
10062
|
function hasReferences(req) {
|
|
9942
10063
|
return count(req.referenceImages) + count(req.referenceVideos) > 0;
|
|
9943
10064
|
}
|
|
10065
|
+
var KLING_V4_4K_MAX_SECONDS = 15;
|
|
10066
|
+
function klingV4FourK(seconds3, req) {
|
|
10067
|
+
if (req.resolution !== "4k") return void 0;
|
|
10068
|
+
if (seconds3 === void 0) {
|
|
10069
|
+
return missing(`needs a measured source video of up to ${KLING_V4_4K_MAX_SECONDS} s at 4K`);
|
|
10070
|
+
}
|
|
10071
|
+
return seconds3 > KLING_V4_4K_MAX_SECONDS ? unsupported2(`renders at most ${KLING_V4_4K_MAX_SECONDS} s at 4K`) : void 0;
|
|
10072
|
+
}
|
|
9944
10073
|
function klingV4(req) {
|
|
10074
|
+
const fourK = klingV4FourK(req.durationSeconds ?? 5, req);
|
|
10075
|
+
if (fourK !== void 0) return fourK;
|
|
9945
10076
|
if (hasReferences(req)) {
|
|
9946
10077
|
if (req.lastFrame !== void 0) {
|
|
9947
10078
|
return unsupported2("takes an end frame only without reference images or videos");
|
|
@@ -10018,7 +10149,10 @@ function viduQ4(req) {
|
|
|
10018
10149
|
}
|
|
10019
10150
|
return req.firstFrame === void 0 ? missing("needs a start frame or reference images") : void 0;
|
|
10020
10151
|
}
|
|
10021
|
-
function
|
|
10152
|
+
function isPublicUrl(ref) {
|
|
10153
|
+
return "url" in ref && !ref.url.startsWith("data:");
|
|
10154
|
+
}
|
|
10155
|
+
function imageAndAudio(req, audioSeconds) {
|
|
10022
10156
|
const frames = noFrames(req);
|
|
10023
10157
|
if (frames !== void 0) return frames;
|
|
10024
10158
|
if (count(req.referenceVideos) > 0) return unsupported2("takes no reference videos");
|
|
@@ -10030,16 +10164,22 @@ function omnihuman(req) {
|
|
|
10030
10164
|
if (extraImages.length > 0 || extraAudios.length > 0) {
|
|
10031
10165
|
return unsupported2("takes exactly one image and one audio clip");
|
|
10032
10166
|
}
|
|
10033
|
-
|
|
10167
|
+
if (audioSeconds.urlOnly === true && !(isPublicUrl(image) && isPublicUrl(audio))) {
|
|
10168
|
+
return unsupported2("takes its image and audio as public URLs, not inline bytes");
|
|
10169
|
+
}
|
|
10170
|
+
return inputSeconds("audio", audio, audioSeconds);
|
|
10034
10171
|
}
|
|
10035
|
-
var RULES =
|
|
10172
|
+
var RULES = new Map([
|
|
10036
10173
|
[MOTION_PRO, motionControl],
|
|
10037
10174
|
[MOTION_STANDARD, motionControl],
|
|
10038
10175
|
[O3_REFERENCE, o3Reference],
|
|
10039
10176
|
[KLING_O3_OMNI, o3Reference],
|
|
10040
10177
|
[O3_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
10041
10178
|
[KLING_V4, klingV4],
|
|
10042
|
-
[
|
|
10179
|
+
[
|
|
10180
|
+
KLING_V4_EDIT,
|
|
10181
|
+
(req) => needsSource(req) ?? klingV4FourK(req.durationSeconds ?? req.sourceVideo?.durationSeconds, req) ?? needsPrompt(req)
|
|
10182
|
+
],
|
|
10043
10183
|
[KLING_V4_FLASH, klingV4Flash],
|
|
10044
10184
|
[KLING_V4_FLASH_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
10045
10185
|
[H3_TURBO, h3Turbo],
|
|
@@ -10049,7 +10189,10 @@ var RULES = /* @__PURE__ */ new Map([
|
|
|
10049
10189
|
[HAPPY_HORSE, happyHorse],
|
|
10050
10190
|
[HAPPY_HORSE_EDIT, happyHorseEdit],
|
|
10051
10191
|
[VIDU_Q4, viduQ4],
|
|
10052
|
-
[OMNIHUMAN_V2,
|
|
10192
|
+
[OMNIHUMAN_V2, (req) => imageAndAudio(req, OMNIHUMAN_AUDIO_SECONDS)],
|
|
10193
|
+
...AVATAR_AUDIO.map(
|
|
10194
|
+
([id, limits]) => [id, (req) => imageAndAudio(req, limits)]
|
|
10195
|
+
)
|
|
10053
10196
|
]);
|
|
10054
10197
|
function falVideoProblem(providerModelId, req) {
|
|
10055
10198
|
return RULES.get(providerModelId.toLowerCase())?.(req);
|