@shop-os/modelkit 0.27.0 → 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 +16 -0
- package/dist/catalog.cjs +21 -6
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.js +21 -6
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +21 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5672,7 +5672,9 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5672
5672
|
// start frame included (fal: "counts toward the image reference limit"), 300 px min.
|
|
5673
5673
|
// Reference videos: 5, 3-30.05 s each and 30 s combined, 700 px min, 23.9-60.05 fps.
|
|
5674
5674
|
// The prompt names references as @Image1, @Video1 (no space; @Element1 for elements,
|
|
5675
|
-
// which the kit does not send). No sound switch on any endpoint.
|
|
5675
|
+
// which the kit does not send). No sound switch on any endpoint. 4K since 2026-11-19;
|
|
5676
|
+
// the endpoints also take `hdr` (10-bit, 1080p and 4K, billed per output second on top),
|
|
5677
|
+
// which the kit does not send: no price row can carry that fee yet (ENG-4272).
|
|
5676
5678
|
id: "kling-4.0",
|
|
5677
5679
|
aliases: ["kling-4", "kling-v4"],
|
|
5678
5680
|
label: "Kling 4.0",
|
|
@@ -5684,7 +5686,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5684
5686
|
constraints: {
|
|
5685
5687
|
inputBilling: "kling-v4",
|
|
5686
5688
|
aspectRatios: ["adaptive", "16:9", "9:16", "1:1", "21:9"],
|
|
5687
|
-
resolutions: ["720p", "1080p"],
|
|
5689
|
+
resolutions: ["720p", "1080p", "4k"],
|
|
5688
5690
|
durations: { min: 3, max: 30 },
|
|
5689
5691
|
durationPresets: [5, 10, 15, 30],
|
|
5690
5692
|
references: {
|
|
@@ -5705,7 +5707,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5705
5707
|
display: {
|
|
5706
5708
|
provider: "kuaishou",
|
|
5707
5709
|
logo: KLING_LOGO2,
|
|
5708
|
-
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."
|
|
5710
|
+
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."
|
|
5709
5711
|
},
|
|
5710
5712
|
capabilities: { lastFrameRequiresFirstFrame: true }
|
|
5711
5713
|
},
|
|
@@ -5723,7 +5725,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5723
5725
|
exposure: ["cowork", "space_builder"],
|
|
5724
5726
|
constraints: {
|
|
5725
5727
|
inputBilling: "kling-v4",
|
|
5726
|
-
resolutions: ["720p", "1080p"],
|
|
5728
|
+
resolutions: ["720p", "1080p", "4k"],
|
|
5727
5729
|
durations: { min: 3, max: 30 },
|
|
5728
5730
|
references: { ...NO_REFERENCES, images: 10 },
|
|
5729
5731
|
requires: ["sourceVideo"],
|
|
@@ -5739,7 +5741,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5739
5741
|
display: {
|
|
5740
5742
|
provider: "kuaishou",
|
|
5741
5743
|
logo: KLING_LOGO2,
|
|
5742
|
-
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
|
|
5744
|
+
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."
|
|
5743
5745
|
},
|
|
5744
5746
|
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5745
5747
|
},
|
|
@@ -10269,7 +10271,17 @@ function o3Reference(req) {
|
|
|
10269
10271
|
function hasReferences(req) {
|
|
10270
10272
|
return count(req.referenceImages) + count(req.referenceVideos) > 0;
|
|
10271
10273
|
}
|
|
10274
|
+
var KLING_V4_4K_MAX_SECONDS = 15;
|
|
10275
|
+
function klingV4FourK(seconds3, req) {
|
|
10276
|
+
if (req.resolution !== "4k") return void 0;
|
|
10277
|
+
if (seconds3 === void 0) {
|
|
10278
|
+
return missing(`needs a measured source video of up to ${KLING_V4_4K_MAX_SECONDS} s at 4K`);
|
|
10279
|
+
}
|
|
10280
|
+
return seconds3 > KLING_V4_4K_MAX_SECONDS ? unsupported3(`renders at most ${KLING_V4_4K_MAX_SECONDS} s at 4K`) : void 0;
|
|
10281
|
+
}
|
|
10272
10282
|
function klingV4(req) {
|
|
10283
|
+
const fourK = klingV4FourK(req.durationSeconds ?? 5, req);
|
|
10284
|
+
if (fourK !== void 0) return fourK;
|
|
10273
10285
|
if (hasReferences(req)) {
|
|
10274
10286
|
if (req.lastFrame !== void 0) {
|
|
10275
10287
|
return unsupported3("takes an end frame only without reference images or videos");
|
|
@@ -10373,7 +10385,10 @@ var RULES = new Map([
|
|
|
10373
10385
|
[KLING_O3_OMNI, o3Reference],
|
|
10374
10386
|
[O3_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
10375
10387
|
[KLING_V4, klingV4],
|
|
10376
|
-
[
|
|
10388
|
+
[
|
|
10389
|
+
KLING_V4_EDIT,
|
|
10390
|
+
(req) => needsSource(req) ?? klingV4FourK(req.durationSeconds ?? req.sourceVideo?.durationSeconds, req) ?? needsPrompt(req)
|
|
10391
|
+
],
|
|
10377
10392
|
[KLING_V4_FLASH, klingV4Flash],
|
|
10378
10393
|
[KLING_V4_FLASH_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
10379
10394
|
[H3_TURBO, h3Turbo],
|