@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.cjs
CHANGED
|
@@ -5829,7 +5829,9 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5829
5829
|
// start frame included (fal: "counts toward the image reference limit"), 300 px min.
|
|
5830
5830
|
// Reference videos: 5, 3-30.05 s each and 30 s combined, 700 px min, 23.9-60.05 fps.
|
|
5831
5831
|
// The prompt names references as @Image1, @Video1 (no space; @Element1 for elements,
|
|
5832
|
-
// which the kit does not send). No sound switch on any endpoint.
|
|
5832
|
+
// which the kit does not send). No sound switch on any endpoint. 4K since 2026-11-19;
|
|
5833
|
+
// the endpoints also take `hdr` (10-bit, 1080p and 4K, billed per output second on top),
|
|
5834
|
+
// which the kit does not send: no price row can carry that fee yet (ENG-4272).
|
|
5833
5835
|
id: "kling-4.0",
|
|
5834
5836
|
aliases: ["kling-4", "kling-v4"],
|
|
5835
5837
|
label: "Kling 4.0",
|
|
@@ -5841,7 +5843,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5841
5843
|
constraints: {
|
|
5842
5844
|
inputBilling: "kling-v4",
|
|
5843
5845
|
aspectRatios: ["adaptive", "16:9", "9:16", "1:1", "21:9"],
|
|
5844
|
-
resolutions: ["720p", "1080p"],
|
|
5846
|
+
resolutions: ["720p", "1080p", "4k"],
|
|
5845
5847
|
durations: { min: 3, max: 30 },
|
|
5846
5848
|
durationPresets: [5, 10, 15, 30],
|
|
5847
5849
|
references: {
|
|
@@ -5862,7 +5864,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5862
5864
|
display: {
|
|
5863
5865
|
provider: "kuaishou",
|
|
5864
5866
|
logo: KLING_LOGO2,
|
|
5865
|
-
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."
|
|
5867
|
+
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."
|
|
5866
5868
|
},
|
|
5867
5869
|
capabilities: { lastFrameRequiresFirstFrame: true }
|
|
5868
5870
|
},
|
|
@@ -5880,7 +5882,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5880
5882
|
exposure: ["cowork", "space_builder"],
|
|
5881
5883
|
constraints: {
|
|
5882
5884
|
inputBilling: "kling-v4",
|
|
5883
|
-
resolutions: ["720p", "1080p"],
|
|
5885
|
+
resolutions: ["720p", "1080p", "4k"],
|
|
5884
5886
|
durations: { min: 3, max: 30 },
|
|
5885
5887
|
references: { ...NO_REFERENCES, images: 10 },
|
|
5886
5888
|
requires: ["sourceVideo"],
|
|
@@ -5896,7 +5898,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5896
5898
|
display: {
|
|
5897
5899
|
provider: "kuaishou",
|
|
5898
5900
|
logo: KLING_LOGO2,
|
|
5899
|
-
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
|
|
5901
|
+
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."
|
|
5900
5902
|
},
|
|
5901
5903
|
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5902
5904
|
},
|
|
@@ -10426,7 +10428,17 @@ function o3Reference(req) {
|
|
|
10426
10428
|
function hasReferences(req) {
|
|
10427
10429
|
return count(req.referenceImages) + count(req.referenceVideos) > 0;
|
|
10428
10430
|
}
|
|
10431
|
+
var KLING_V4_4K_MAX_SECONDS = 15;
|
|
10432
|
+
function klingV4FourK(seconds3, req) {
|
|
10433
|
+
if (req.resolution !== "4k") return void 0;
|
|
10434
|
+
if (seconds3 === void 0) {
|
|
10435
|
+
return missing(`needs a measured source video of up to ${KLING_V4_4K_MAX_SECONDS} s at 4K`);
|
|
10436
|
+
}
|
|
10437
|
+
return seconds3 > KLING_V4_4K_MAX_SECONDS ? unsupported3(`renders at most ${KLING_V4_4K_MAX_SECONDS} s at 4K`) : void 0;
|
|
10438
|
+
}
|
|
10429
10439
|
function klingV4(req) {
|
|
10440
|
+
const fourK = klingV4FourK(req.durationSeconds ?? 5, req);
|
|
10441
|
+
if (fourK !== void 0) return fourK;
|
|
10430
10442
|
if (hasReferences(req)) {
|
|
10431
10443
|
if (req.lastFrame !== void 0) {
|
|
10432
10444
|
return unsupported3("takes an end frame only without reference images or videos");
|
|
@@ -10530,7 +10542,10 @@ var RULES = new Map([
|
|
|
10530
10542
|
[KLING_O3_OMNI, o3Reference],
|
|
10531
10543
|
[O3_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
10532
10544
|
[KLING_V4, klingV4],
|
|
10533
|
-
[
|
|
10545
|
+
[
|
|
10546
|
+
KLING_V4_EDIT,
|
|
10547
|
+
(req) => needsSource(req) ?? klingV4FourK(req.durationSeconds ?? req.sourceVideo?.durationSeconds, req) ?? needsPrompt(req)
|
|
10548
|
+
],
|
|
10534
10549
|
[KLING_V4_FLASH, klingV4Flash],
|
|
10535
10550
|
[KLING_V4_FLASH_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
10536
10551
|
[H3_TURBO, h3Turbo],
|