@shop-os/modelkit 0.16.0 → 0.17.1
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 +15 -0
- package/dist/catalog.cjs +160 -1
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.js +160 -1
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +188 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +188 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,21 @@ header in the release PR.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.17.1] - Unreleased
|
|
13
|
+
|
|
14
|
+
GPT Image 2.6 rows in the snapshot (ENG-3735).
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- `gpt-image-2.6-sunburst` and `gpt-image-2.6-flare` (`openai-image`): the same Images API surface as the 2.5 rows (sizes 1K/2K/4K, qualities auto to max, 16 reference images), live-checked 2026-11-05. The rows went live as data-only catalog rows first; the snapshot lets pro-backend seed their pricing and catalog rows on a new environment. No `sortOrder` or `recommended`: those stay in the database.
|
|
18
|
+
|
|
19
|
+
## [0.17.0] - Unreleased
|
|
20
|
+
|
|
21
|
+
Kling 4.0 Flash on fal (ENG-3743).
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- `kling-4.0-flash` (`kling/v4/flash`, aliases `kling-4-flash`, `kling-v4-flash`): routed like `kling-4.0` to `kling/v4/flash/{text,image,reference}-to-video` by its inputs. 720p only, 3-20 s (presets 5, 10, 15, 20). image-to-video takes a start frame and no end frame: the row does not support `lastFrame`, so the resolver drops one with an `option_ignored` warning and the planner refuses it; its prompt is optional there. Reference-to-video takes up to 10 images (the start frame included) and 5 videos of 3-20.05 s each, 20 s combined. Prompts up to 26,000 characters. No sound field.
|
|
25
|
+
- `kling-4.0-flash-edit` (`kling/v4/flash/video-to-video`, aliases `kling-4-flash-edit`, `kling-v4-flash-edit`): a 3-20.05 s source at 720p with up to 10 reference images and 4 reference videos (`video_urls`, which the Kling 4.0 edit does not take); the source and reference videos total 20 s at most (`sourceVideoSeconds.inReferenceTotal`). No duration renders and bills the source's length; a set 3-20 s bills that.
|
|
26
|
+
|
|
12
27
|
## [0.16.0] - Unreleased
|
|
13
28
|
|
|
14
29
|
Customer provider keys per call (BYOK, ENG-3403).
|
package/dist/catalog.cjs
CHANGED
|
@@ -668,6 +668,76 @@ var IMAGE_MODELS = [
|
|
|
668
668
|
logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/1204b494-8962-4f7f-af5e-699a8bdc98e3_compressed.png"
|
|
669
669
|
}
|
|
670
670
|
},
|
|
671
|
+
{
|
|
672
|
+
// Same Images API surface as gpt-image-2.5 (live-checked 2026-11-05; 2.6 also takes a `complexity` field the kit does not send).
|
|
673
|
+
id: "gpt-image-2.6-sunburst",
|
|
674
|
+
aliases: [],
|
|
675
|
+
label: "GPT Image 2.6 Sunburst",
|
|
676
|
+
type: "image",
|
|
677
|
+
adapter: "openai-image",
|
|
678
|
+
providerModelId: "gpt-image-2.6-sunburst",
|
|
679
|
+
lifecycle: "active",
|
|
680
|
+
exposure: ["cowork", "space_builder"],
|
|
681
|
+
constraints: {
|
|
682
|
+
exactSizes: {
|
|
683
|
+
"1:1": "1024x1024",
|
|
684
|
+
"3:2": "1536x1024",
|
|
685
|
+
"2:3": "1024x1536",
|
|
686
|
+
"16:9": "2048x1152",
|
|
687
|
+
"9:16": "1152x2048",
|
|
688
|
+
"4:5": "1024x1280",
|
|
689
|
+
"5:4": "1280x1024"
|
|
690
|
+
},
|
|
691
|
+
aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
|
|
692
|
+
sizes: ["1K", "2K", "4K"],
|
|
693
|
+
qualityOptions: ["auto", "low", "medium", "high", "xhigh", "max"],
|
|
694
|
+
references: { images: 16 },
|
|
695
|
+
supports: ["quality", "count", "outputFormat"],
|
|
696
|
+
prompt: GPT_IMAGE_PROMPT
|
|
697
|
+
},
|
|
698
|
+
defaults: { size: "1K", aspectRatio: "adaptive", quality: "auto" },
|
|
699
|
+
usage: { ...IMAGE_USAGE3 },
|
|
700
|
+
pricingKind: "image_size",
|
|
701
|
+
display: {
|
|
702
|
+
provider: "openai",
|
|
703
|
+
description: "OpenAI's most detailed GPT Image 2.6 tier, built for intricate detail and editing precision; takes text and image input and outputs images in low, medium, high, xhigh, or max quality."
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
// Same Images API surface as gpt-image-2.5 (live-checked 2026-11-05; 2.6 also takes a `complexity` field the kit does not send).
|
|
708
|
+
id: "gpt-image-2.6-flare",
|
|
709
|
+
aliases: [],
|
|
710
|
+
label: "GPT Image 2.6 Flare",
|
|
711
|
+
type: "image",
|
|
712
|
+
adapter: "openai-image",
|
|
713
|
+
providerModelId: "gpt-image-2.6-flare",
|
|
714
|
+
lifecycle: "active",
|
|
715
|
+
exposure: ["cowork", "space_builder"],
|
|
716
|
+
constraints: {
|
|
717
|
+
exactSizes: {
|
|
718
|
+
"1:1": "1024x1024",
|
|
719
|
+
"3:2": "1536x1024",
|
|
720
|
+
"2:3": "1024x1536",
|
|
721
|
+
"16:9": "2048x1152",
|
|
722
|
+
"9:16": "1152x2048",
|
|
723
|
+
"4:5": "1024x1280",
|
|
724
|
+
"5:4": "1280x1024"
|
|
725
|
+
},
|
|
726
|
+
aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
|
|
727
|
+
sizes: ["1K", "2K", "4K"],
|
|
728
|
+
qualityOptions: ["auto", "low", "medium", "high", "xhigh", "max"],
|
|
729
|
+
references: { images: 16 },
|
|
730
|
+
supports: ["quality", "count", "outputFormat"],
|
|
731
|
+
prompt: GPT_IMAGE_PROMPT
|
|
732
|
+
},
|
|
733
|
+
defaults: { size: "1K", aspectRatio: "adaptive", quality: "auto" },
|
|
734
|
+
usage: { ...IMAGE_USAGE3 },
|
|
735
|
+
pricingKind: "image_size",
|
|
736
|
+
display: {
|
|
737
|
+
provider: "openai",
|
|
738
|
+
description: "OpenAI's fast GPT Image 2.6 tier for everyday image generation and editing, with natural lighting, rich textures and complex layouts; takes text and image input and outputs images in low, medium, high, xhigh, or max quality."
|
|
739
|
+
}
|
|
740
|
+
},
|
|
671
741
|
{
|
|
672
742
|
// Same Images API surface as gpt-image-2 plus the "xhigh" and "max" quality tiers.
|
|
673
743
|
id: "gpt-image-2.5-sunburst",
|
|
@@ -5149,6 +5219,7 @@ var KLING_PROMPT = { referenceSyntax: "numbered", maxChars: 2500 };
|
|
|
5149
5219
|
var H3_PROMPT = { referenceSyntax: "numbered", maxChars: 5e4 };
|
|
5150
5220
|
var KLING_V4_PROMPT = { referenceSyntax: "numbered", maxChars: 2500 };
|
|
5151
5221
|
var KLING_V4_AUDIO = "always";
|
|
5222
|
+
var KLING_V4_FLASH_PROMPT = { referenceSyntax: "numbered", maxChars: 26e3 };
|
|
5152
5223
|
var NO_REFERENCES = { images: 0, videos: 0, audios: 0 };
|
|
5153
5224
|
function klingMotionControl(tier) {
|
|
5154
5225
|
const label = tier === "pro" ? "Pro" : "Standard";
|
|
@@ -5326,6 +5397,85 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5326
5397
|
},
|
|
5327
5398
|
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5328
5399
|
},
|
|
5400
|
+
{
|
|
5401
|
+
// https://fal.ai/models/kling/v4/flash/reference-to-video/api (+ /text-to-video,
|
|
5402
|
+
// /image-to-video): routed like kling-4.0, at 720p only and 3-20 s. image-to-video takes
|
|
5403
|
+
// a start frame (300 px min, ratio 0.40-2.50) and no end frame; its prompt is optional.
|
|
5404
|
+
// Reference images: 10, the start frame included. Reference videos: 5, 3-20.05 s each
|
|
5405
|
+
// and 20 s combined, 700 px min. Prompts up to 26,000 characters. No sound switch.
|
|
5406
|
+
id: "kling-4.0-flash",
|
|
5407
|
+
aliases: ["kling-4-flash", "kling-v4-flash"],
|
|
5408
|
+
label: "Kling 4.0 Flash",
|
|
5409
|
+
type: "video",
|
|
5410
|
+
adapter: "fal",
|
|
5411
|
+
providerModelId: "kling/v4/flash",
|
|
5412
|
+
lifecycle: "active",
|
|
5413
|
+
exposure: ["cowork", "space_builder"],
|
|
5414
|
+
constraints: {
|
|
5415
|
+
aspectRatios: ["adaptive", "16:9", "9:16", "1:1", "21:9"],
|
|
5416
|
+
resolutions: ["720p"],
|
|
5417
|
+
durations: { min: 3, max: 20 },
|
|
5418
|
+
durationPresets: [5, 10, 15, 20],
|
|
5419
|
+
references: {
|
|
5420
|
+
...NO_REFERENCES,
|
|
5421
|
+
images: 10,
|
|
5422
|
+
videos: 5,
|
|
5423
|
+
videoSeconds: { min: 3, max: 20.05, total: 20 },
|
|
5424
|
+
videoPixels: { minWidth: 700, minHeight: 700 }
|
|
5425
|
+
},
|
|
5426
|
+
supports: [],
|
|
5427
|
+
prompt: KLING_V4_FLASH_PROMPT,
|
|
5428
|
+
audio: KLING_V4_AUDIO
|
|
5429
|
+
},
|
|
5430
|
+
defaults: { durationSeconds: 5, resolution: "720p", aspectRatio: "16:9" },
|
|
5431
|
+
usage: { ...VIDEO_USAGE },
|
|
5432
|
+
pricingKind: "video_per_second",
|
|
5433
|
+
display: {
|
|
5434
|
+
provider: "kuaishou",
|
|
5435
|
+
logo: KLING_LOGO,
|
|
5436
|
+
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."
|
|
5437
|
+
}
|
|
5438
|
+
},
|
|
5439
|
+
{
|
|
5440
|
+
// https://fal.ai/models/kling/v4/flash/video-to-video/api: source 3-20.05 s (700 px
|
|
5441
|
+
// min, 23.9-60.05 fps), up to 10 reference images and 4 reference videos; the source
|
|
5442
|
+
// and reference videos total 20 s at most. duration 3-20, or left out for the source's
|
|
5443
|
+
// length. The prompt names the source @Video1, reference videos @Video2 on, images @Image1.
|
|
5444
|
+
id: "kling-4.0-flash-edit",
|
|
5445
|
+
aliases: ["kling-4-flash-edit", "kling-v4-flash-edit"],
|
|
5446
|
+
label: "Kling 4.0 Flash Edit",
|
|
5447
|
+
type: "video",
|
|
5448
|
+
adapter: "fal",
|
|
5449
|
+
providerModelId: "kling/v4/flash/video-to-video",
|
|
5450
|
+
lifecycle: "active",
|
|
5451
|
+
exposure: ["cowork", "space_builder"],
|
|
5452
|
+
constraints: {
|
|
5453
|
+
resolutions: ["720p"],
|
|
5454
|
+
durations: { min: 3, max: 20 },
|
|
5455
|
+
references: {
|
|
5456
|
+
...NO_REFERENCES,
|
|
5457
|
+
images: 10,
|
|
5458
|
+
videos: 4,
|
|
5459
|
+
videoSeconds: { min: 3, max: 20.05, total: 20 },
|
|
5460
|
+
videoPixels: { minWidth: 700, minHeight: 700 }
|
|
5461
|
+
},
|
|
5462
|
+
requires: ["sourceVideo"],
|
|
5463
|
+
sourceVideoSeconds: { min: 3, max: 20.05, inReferenceTotal: true },
|
|
5464
|
+
sourceVideoPixels: { minWidth: 700, minHeight: 700 },
|
|
5465
|
+
supports: [],
|
|
5466
|
+
prompt: KLING_V4_FLASH_PROMPT,
|
|
5467
|
+
audio: KLING_V4_AUDIO
|
|
5468
|
+
},
|
|
5469
|
+
defaults: { resolution: "720p" },
|
|
5470
|
+
usage: { ...VIDEO_USAGE },
|
|
5471
|
+
pricingKind: "video_per_second",
|
|
5472
|
+
display: {
|
|
5473
|
+
provider: "kuaishou",
|
|
5474
|
+
logo: KLING_LOGO,
|
|
5475
|
+
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."
|
|
5476
|
+
},
|
|
5477
|
+
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5478
|
+
},
|
|
5329
5479
|
{
|
|
5330
5480
|
// https://fal.ai/models/minimax/h3-max-turbo/text-to-video/api (+ /image-to-video).
|
|
5331
5481
|
// image-to-video takes a start frame, an end frame, or both, and no aspect_ratio.
|
|
@@ -9085,6 +9235,8 @@ var O3_REFERENCE = "fal-ai/kling-video/o3/pro/reference-to-video";
|
|
|
9085
9235
|
var O3_EDIT = "fal-ai/kling-video/o3/pro/video-to-video/edit";
|
|
9086
9236
|
var KLING_V4 = "kling/v4";
|
|
9087
9237
|
var KLING_V4_EDIT = "kling/v4/video-to-video/edit";
|
|
9238
|
+
var KLING_V4_FLASH = "kling/v4/flash";
|
|
9239
|
+
var KLING_V4_FLASH_EDIT = "kling/v4/flash/video-to-video";
|
|
9088
9240
|
var H3_TURBO = "minimax/h3-max-turbo";
|
|
9089
9241
|
var H3_RECAST = "minimax/h3-max/recast";
|
|
9090
9242
|
var H3_RELIGHT = "minimax/h3-max/relight";
|
|
@@ -9166,6 +9318,11 @@ function klingV4(req) {
|
|
|
9166
9318
|
}
|
|
9167
9319
|
return needsPrompt(req);
|
|
9168
9320
|
}
|
|
9321
|
+
function klingV4Flash(req) {
|
|
9322
|
+
if (req.lastFrame !== void 0) return unsupported2("takes no end frame");
|
|
9323
|
+
if (!hasReferences(req) && req.firstFrame !== void 0) return void 0;
|
|
9324
|
+
return klingV4(req);
|
|
9325
|
+
}
|
|
9169
9326
|
function h3Turbo(req) {
|
|
9170
9327
|
if (count(req.referenceImages) + count(req.referenceVideos) > 0) {
|
|
9171
9328
|
return unsupported2("takes no reference images or videos");
|
|
@@ -9246,6 +9403,8 @@ var RULES = /* @__PURE__ */ new Map([
|
|
|
9246
9403
|
[O3_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
9247
9404
|
[KLING_V4, klingV4],
|
|
9248
9405
|
[KLING_V4_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
9406
|
+
[KLING_V4_FLASH, klingV4Flash],
|
|
9407
|
+
[KLING_V4_FLASH_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
9249
9408
|
[H3_TURBO, h3Turbo],
|
|
9250
9409
|
[MINIMAX_H3_INSERT, h3Insert],
|
|
9251
9410
|
[H3_RECAST, h3Recast],
|
|
@@ -9295,7 +9454,7 @@ function applyFalVideoRules(model, req, callerRatio, warnings) {
|
|
|
9295
9454
|
warnings.push(viduSilentWarning(model));
|
|
9296
9455
|
req.generateAudio = false;
|
|
9297
9456
|
}
|
|
9298
|
-
if (id === KLING_V4 && req.firstFrame !== void 0 && !hasReferences(req)) {
|
|
9457
|
+
if ((id === KLING_V4 || id === KLING_V4_FLASH) && req.firstFrame !== void 0 && !hasReferences(req)) {
|
|
9299
9458
|
if (req.aspectRatio !== void 0) {
|
|
9300
9459
|
if (callerRatio !== void 0) {
|
|
9301
9460
|
warnings.push({
|