@shop-os/modelkit 0.27.0 → 0.29.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 +26 -0
- package/dist/catalog.cjs +112 -7
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.js +112 -7
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +165 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +165 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,32 @@ header in the release PR.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.29.0] - Unreleased
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- `ltx-2.3` and `ltx-2.3-fast` (ENG-4281): Lightricks LTX 2.3 on fal, one row per tier;
|
|
16
|
+
a start frame routes to `fal-ai/ltx-2.3/{text,image}-to-video` (or the `/fast` twins),
|
|
17
|
+
else text-to-video. The rows default to `adaptive`: fal's `auto` on image-to-video, its 16:9
|
|
18
|
+
default on text-to-video. The kit's `2k`/`4k` tiers are fal's `1440p`/`2160p`. Pro renders
|
|
19
|
+
6/8/10 s; Fast renders even 6-20 s, over 10 s at 1080p only. No new vocabulary:
|
|
20
|
+
`fps` is not a kit request field and the adapter leaves fal's 25 fps default in place.
|
|
21
|
+
|
|
22
|
+
## [0.28.0] - Unreleased
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- `kling-4.0` and `kling-4.0-edit` list `4k` in `constraints.resolutions` (fal `kling/v4`,
|
|
26
|
+
`resolution: "4k"` on text-, image- and reference-to-video and on the edit, 2026-11-19). The
|
|
27
|
+
default stays 1080p. 4K renders at most 15 s for now (the resolver refuses longer, and an
|
|
28
|
+
edit at 4K needs a measured source): a 3 s 4K clip took 138 s, so a 30 s one may outrun the
|
|
29
|
+
15-minute result wait while fal still bills it. fal bills 4K at $0.549 per output second, or $0.329 per billable second
|
|
30
|
+
with a video input, so a consumer needs a `4k` price row for both rows before it takes this
|
|
31
|
+
version. The endpoints' new `hdr` flag is not sent: no request field or price shape carries
|
|
32
|
+
its per-output-second fee yet.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
- The saved fal schemas for the four `kling/v4` endpoints are refreshed, so the row tests check
|
|
36
|
+
every body against the schema that lists `4k`.
|
|
37
|
+
|
|
12
38
|
## [0.27.0] - Unreleased
|
|
13
39
|
|
|
14
40
|
### Added
|
package/dist/catalog.cjs
CHANGED
|
@@ -5623,6 +5623,7 @@ var KLING_LOGO2 = "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0
|
|
|
5623
5623
|
var MINIMAX_LOGO4 = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/f4c2e906-28b7-4a4a-b491-df8fef7808ed.png";
|
|
5624
5624
|
var BYTEDANCE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png";
|
|
5625
5625
|
var XAI_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/858b7fcc-9bd5-411d-aea1-a7b35ecfffab_compressed.png";
|
|
5626
|
+
var LIGHTRICKS_LOGO = "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/lightricks.png";
|
|
5626
5627
|
var H3_RATIOS = ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"];
|
|
5627
5628
|
var HAPPY_HORSE_RATIOS = [
|
|
5628
5629
|
"16:9",
|
|
@@ -5753,7 +5754,9 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5753
5754
|
// start frame included (fal: "counts toward the image reference limit"), 300 px min.
|
|
5754
5755
|
// Reference videos: 5, 3-30.05 s each and 30 s combined, 700 px min, 23.9-60.05 fps.
|
|
5755
5756
|
// The prompt names references as @Image1, @Video1 (no space; @Element1 for elements,
|
|
5756
|
-
// which the kit does not send). No sound switch on any endpoint.
|
|
5757
|
+
// which the kit does not send). No sound switch on any endpoint. 4K since 2026-11-19;
|
|
5758
|
+
// the endpoints also take `hdr` (10-bit, 1080p and 4K, billed per output second on top),
|
|
5759
|
+
// which the kit does not send: no price row can carry that fee yet (ENG-4272).
|
|
5757
5760
|
id: "kling-4.0",
|
|
5758
5761
|
aliases: ["kling-4", "kling-v4"],
|
|
5759
5762
|
label: "Kling 4.0",
|
|
@@ -5765,7 +5768,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5765
5768
|
constraints: {
|
|
5766
5769
|
inputBilling: "kling-v4",
|
|
5767
5770
|
aspectRatios: ["adaptive", "16:9", "9:16", "1:1", "21:9"],
|
|
5768
|
-
resolutions: ["720p", "1080p"],
|
|
5771
|
+
resolutions: ["720p", "1080p", "4k"],
|
|
5769
5772
|
durations: { min: 3, max: 30 },
|
|
5770
5773
|
durationPresets: [5, 10, 15, 30],
|
|
5771
5774
|
references: {
|
|
@@ -5786,7 +5789,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5786
5789
|
display: {
|
|
5787
5790
|
provider: "kuaishou",
|
|
5788
5791
|
logo: KLING_LOGO2,
|
|
5789
|
-
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."
|
|
5792
|
+
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."
|
|
5790
5793
|
},
|
|
5791
5794
|
capabilities: { lastFrameRequiresFirstFrame: true }
|
|
5792
5795
|
},
|
|
@@ -5804,7 +5807,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5804
5807
|
exposure: ["cowork", "space_builder"],
|
|
5805
5808
|
constraints: {
|
|
5806
5809
|
inputBilling: "kling-v4",
|
|
5807
|
-
resolutions: ["720p", "1080p"],
|
|
5810
|
+
resolutions: ["720p", "1080p", "4k"],
|
|
5808
5811
|
durations: { min: 3, max: 30 },
|
|
5809
5812
|
references: { ...NO_REFERENCES, images: 10 },
|
|
5810
5813
|
requires: ["sourceVideo"],
|
|
@@ -5820,7 +5823,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5820
5823
|
display: {
|
|
5821
5824
|
provider: "kuaishou",
|
|
5822
5825
|
logo: KLING_LOGO2,
|
|
5823
|
-
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
|
|
5826
|
+
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."
|
|
5824
5827
|
},
|
|
5825
5828
|
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5826
5829
|
},
|
|
@@ -6219,6 +6222,77 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
6219
6222
|
description: "xAI Grok Imagine 1.5: text- and image-to-video at native 1080p with lip-synced audio, or up to 14 reference images and pinned first and last frames at 720p, up to 15 seconds."
|
|
6220
6223
|
},
|
|
6221
6224
|
capabilities: {}
|
|
6225
|
+
},
|
|
6226
|
+
{
|
|
6227
|
+
// https://fal.ai/models/fal-ai/ltx-2.3/text-to-video/api (+ /image-to-video): one row;
|
|
6228
|
+
// a start frame routes to image-to-video, else text-to-video. The kit's 2k/4k tiers
|
|
6229
|
+
// are fal's 1440p/2160p (adapters/fal-ltx.ts). "adaptive" is fal's "auto" on
|
|
6230
|
+
// image-to-video; text-to-video leaves an adaptive ratio at fal's 16:9 default.
|
|
6231
|
+
id: "ltx-2.3",
|
|
6232
|
+
aliases: ["ltx-2-3", "ltx23"],
|
|
6233
|
+
label: "LTX 2.3",
|
|
6234
|
+
type: "video",
|
|
6235
|
+
adapter: "fal",
|
|
6236
|
+
providerModelId: "fal-ai/ltx-2.3/text-to-video",
|
|
6237
|
+
lifecycle: "active",
|
|
6238
|
+
exposure: ["cowork", "space_builder"],
|
|
6239
|
+
constraints: {
|
|
6240
|
+
aspectRatios: ["adaptive", "16:9", "9:16"],
|
|
6241
|
+
resolutions: ["1080p", "2k", "4k"],
|
|
6242
|
+
durations: [6, 8, 10],
|
|
6243
|
+
supports: ["generateAudio", "lastFrame", "safetyChecker"],
|
|
6244
|
+
prompt: { referenceSyntax: "numbered", maxChars: 5e3 },
|
|
6245
|
+
audio: "optional"
|
|
6246
|
+
},
|
|
6247
|
+
defaults: {
|
|
6248
|
+
durationSeconds: 6,
|
|
6249
|
+
resolution: "1080p",
|
|
6250
|
+
aspectRatio: "adaptive",
|
|
6251
|
+
generateAudio: true
|
|
6252
|
+
},
|
|
6253
|
+
usage: { ...VIDEO_USAGE },
|
|
6254
|
+
pricingKind: "video_per_second",
|
|
6255
|
+
display: {
|
|
6256
|
+
provider: "lightricks",
|
|
6257
|
+
logo: LIGHTRICKS_LOGO,
|
|
6258
|
+
description: "Lightricks LTX 2.3 open-source text-to-video and start/end-frame image-to-video with native audio; 6, 8 or 10 seconds at up to 4K in landscape or portrait."
|
|
6259
|
+
},
|
|
6260
|
+
capabilities: { lastFrameRequiresFirstFrame: true }
|
|
6261
|
+
},
|
|
6262
|
+
{
|
|
6263
|
+
// https://fal.ai/models/fal-ai/ltx-2.3/text-to-video/fast/api (+ /image-to-video/fast):
|
|
6264
|
+
// the fast tier at the same resolutions; even durations 6-20 s, but over 10 s is
|
|
6265
|
+
// 1080p at 25 fps only (the kit never sends fps, so the rule checks the tier).
|
|
6266
|
+
id: "ltx-2.3-fast",
|
|
6267
|
+
aliases: ["ltx-2-3-fast", "ltx23-fast"],
|
|
6268
|
+
label: "LTX 2.3 Fast",
|
|
6269
|
+
type: "video",
|
|
6270
|
+
adapter: "fal",
|
|
6271
|
+
providerModelId: "fal-ai/ltx-2.3/text-to-video/fast",
|
|
6272
|
+
lifecycle: "active",
|
|
6273
|
+
exposure: ["cowork", "space_builder"],
|
|
6274
|
+
constraints: {
|
|
6275
|
+
aspectRatios: ["adaptive", "16:9", "9:16"],
|
|
6276
|
+
resolutions: ["1080p", "2k", "4k"],
|
|
6277
|
+
durations: [6, 8, 10, 12, 14, 16, 18, 20],
|
|
6278
|
+
supports: ["generateAudio", "lastFrame", "safetyChecker"],
|
|
6279
|
+
prompt: { referenceSyntax: "numbered", maxChars: 5e3 },
|
|
6280
|
+
audio: "optional"
|
|
6281
|
+
},
|
|
6282
|
+
defaults: {
|
|
6283
|
+
durationSeconds: 6,
|
|
6284
|
+
resolution: "1080p",
|
|
6285
|
+
aspectRatio: "adaptive",
|
|
6286
|
+
generateAudio: true
|
|
6287
|
+
},
|
|
6288
|
+
usage: { ...VIDEO_USAGE },
|
|
6289
|
+
pricingKind: "video_per_second",
|
|
6290
|
+
display: {
|
|
6291
|
+
provider: "lightricks",
|
|
6292
|
+
logo: LIGHTRICKS_LOGO,
|
|
6293
|
+
description: "Speed-optimized Lightricks LTX 2.3 Fast text-to-video and start/end-frame image-to-video with native audio; 6-20 seconds at up to 4K, over 10 seconds at 1080p."
|
|
6294
|
+
},
|
|
6295
|
+
capabilities: { lastFrameRequiresFirstFrame: true }
|
|
6222
6296
|
}
|
|
6223
6297
|
];
|
|
6224
6298
|
|
|
@@ -10083,6 +10157,8 @@ var HAPPY_HORSE = "happyhorse-1.1";
|
|
|
10083
10157
|
var HAPPY_HORSE_EDIT = "alibaba/happy-horse/video-edit";
|
|
10084
10158
|
var VIDU_Q4 = "fal-ai/vidu/q4";
|
|
10085
10159
|
var OMNIHUMAN_V2 = "bytedance/omnihuman/v2";
|
|
10160
|
+
var LTX_T2V = "fal-ai/ltx-2.3/text-to-video";
|
|
10161
|
+
var LTX_FAST_T2V = "fal-ai/ltx-2.3/text-to-video/fast";
|
|
10086
10162
|
var KLING_O3_IMAGE_CAP = 7;
|
|
10087
10163
|
var KLING_V4_IMAGE_CAP = 10;
|
|
10088
10164
|
var TURBO_AUDIO_MIN_SECONDS = 2;
|
|
@@ -10152,7 +10228,17 @@ function o3Reference(req) {
|
|
|
10152
10228
|
function hasReferences(req) {
|
|
10153
10229
|
return count(req.referenceImages) + count(req.referenceVideos) > 0;
|
|
10154
10230
|
}
|
|
10231
|
+
var KLING_V4_4K_MAX_SECONDS = 15;
|
|
10232
|
+
function klingV4FourK(seconds3, req) {
|
|
10233
|
+
if (req.resolution !== "4k") return void 0;
|
|
10234
|
+
if (seconds3 === void 0) {
|
|
10235
|
+
return missing(`needs a measured source video of up to ${KLING_V4_4K_MAX_SECONDS} s at 4K`);
|
|
10236
|
+
}
|
|
10237
|
+
return seconds3 > KLING_V4_4K_MAX_SECONDS ? unsupported2(`renders at most ${KLING_V4_4K_MAX_SECONDS} s at 4K`) : void 0;
|
|
10238
|
+
}
|
|
10155
10239
|
function klingV4(req) {
|
|
10240
|
+
const fourK = klingV4FourK(req.durationSeconds ?? 5, req);
|
|
10241
|
+
if (fourK !== void 0) return fourK;
|
|
10156
10242
|
if (hasReferences(req)) {
|
|
10157
10243
|
if (req.lastFrame !== void 0) {
|
|
10158
10244
|
return unsupported2("takes an end frame only without reference images or videos");
|
|
@@ -10249,6 +10335,20 @@ function imageAndAudio(req, audioSeconds) {
|
|
|
10249
10335
|
}
|
|
10250
10336
|
return inputSeconds("audio", audio, audioSeconds);
|
|
10251
10337
|
}
|
|
10338
|
+
function ltx(fast) {
|
|
10339
|
+
return (req) => {
|
|
10340
|
+
if (req.lastFrame !== void 0 && req.firstFrame === void 0) {
|
|
10341
|
+
return missing("takes an end frame only together with a start frame");
|
|
10342
|
+
}
|
|
10343
|
+
if (count(req.referenceImages) + count(req.referenceVideos) + count(req.referenceAudios) > 0) {
|
|
10344
|
+
return unsupported2("takes no reference images, videos or audio");
|
|
10345
|
+
}
|
|
10346
|
+
if (fast && (req.durationSeconds ?? 6) > 10 && req.resolution !== void 0 && req.resolution !== "1080p") {
|
|
10347
|
+
return unsupported2("renders over 10 s at 1080p only");
|
|
10348
|
+
}
|
|
10349
|
+
return needsPrompt(req);
|
|
10350
|
+
};
|
|
10351
|
+
}
|
|
10252
10352
|
var RULES = new Map([
|
|
10253
10353
|
[MOTION_PRO, motionControl],
|
|
10254
10354
|
[MOTION_STANDARD, motionControl],
|
|
@@ -10256,7 +10356,10 @@ var RULES = new Map([
|
|
|
10256
10356
|
[KLING_O3_OMNI, o3Reference],
|
|
10257
10357
|
[O3_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
10258
10358
|
[KLING_V4, klingV4],
|
|
10259
|
-
[
|
|
10359
|
+
[
|
|
10360
|
+
KLING_V4_EDIT,
|
|
10361
|
+
(req) => needsSource(req) ?? klingV4FourK(req.durationSeconds ?? req.sourceVideo?.durationSeconds, req) ?? needsPrompt(req)
|
|
10362
|
+
],
|
|
10260
10363
|
[KLING_V4_FLASH, klingV4Flash],
|
|
10261
10364
|
[KLING_V4_FLASH_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
10262
10365
|
[H3_TURBO, h3Turbo],
|
|
@@ -10269,7 +10372,9 @@ var RULES = new Map([
|
|
|
10269
10372
|
[OMNIHUMAN_V2, (req) => imageAndAudio(req, OMNIHUMAN_AUDIO_SECONDS)],
|
|
10270
10373
|
...AVATAR_AUDIO.map(
|
|
10271
10374
|
([id, limits]) => [id, (req) => imageAndAudio(req, limits)]
|
|
10272
|
-
)
|
|
10375
|
+
),
|
|
10376
|
+
[LTX_T2V, ltx(false)],
|
|
10377
|
+
[LTX_FAST_T2V, ltx(true)]
|
|
10273
10378
|
]);
|
|
10274
10379
|
function falVideoProblem(providerModelId, req) {
|
|
10275
10380
|
return RULES.get(providerModelId.toLowerCase())?.(req);
|