@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/dist/catalog.js
CHANGED
|
@@ -582,6 +582,76 @@ var IMAGE_MODELS = [
|
|
|
582
582
|
logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/1204b494-8962-4f7f-af5e-699a8bdc98e3_compressed.png"
|
|
583
583
|
}
|
|
584
584
|
},
|
|
585
|
+
{
|
|
586
|
+
// 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).
|
|
587
|
+
id: "gpt-image-2.6-sunburst",
|
|
588
|
+
aliases: [],
|
|
589
|
+
label: "GPT Image 2.6 Sunburst",
|
|
590
|
+
type: "image",
|
|
591
|
+
adapter: "openai-image",
|
|
592
|
+
providerModelId: "gpt-image-2.6-sunburst",
|
|
593
|
+
lifecycle: "active",
|
|
594
|
+
exposure: ["cowork", "space_builder"],
|
|
595
|
+
constraints: {
|
|
596
|
+
exactSizes: {
|
|
597
|
+
"1:1": "1024x1024",
|
|
598
|
+
"3:2": "1536x1024",
|
|
599
|
+
"2:3": "1024x1536",
|
|
600
|
+
"16:9": "2048x1152",
|
|
601
|
+
"9:16": "1152x2048",
|
|
602
|
+
"4:5": "1024x1280",
|
|
603
|
+
"5:4": "1280x1024"
|
|
604
|
+
},
|
|
605
|
+
aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
|
|
606
|
+
sizes: ["1K", "2K", "4K"],
|
|
607
|
+
qualityOptions: ["auto", "low", "medium", "high", "xhigh", "max"],
|
|
608
|
+
references: { images: 16 },
|
|
609
|
+
supports: ["quality", "count", "outputFormat"],
|
|
610
|
+
prompt: GPT_IMAGE_PROMPT
|
|
611
|
+
},
|
|
612
|
+
defaults: { size: "1K", aspectRatio: "adaptive", quality: "auto" },
|
|
613
|
+
usage: { ...IMAGE_USAGE3 },
|
|
614
|
+
pricingKind: "image_size",
|
|
615
|
+
display: {
|
|
616
|
+
provider: "openai",
|
|
617
|
+
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."
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
// 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).
|
|
622
|
+
id: "gpt-image-2.6-flare",
|
|
623
|
+
aliases: [],
|
|
624
|
+
label: "GPT Image 2.6 Flare",
|
|
625
|
+
type: "image",
|
|
626
|
+
adapter: "openai-image",
|
|
627
|
+
providerModelId: "gpt-image-2.6-flare",
|
|
628
|
+
lifecycle: "active",
|
|
629
|
+
exposure: ["cowork", "space_builder"],
|
|
630
|
+
constraints: {
|
|
631
|
+
exactSizes: {
|
|
632
|
+
"1:1": "1024x1024",
|
|
633
|
+
"3:2": "1536x1024",
|
|
634
|
+
"2:3": "1024x1536",
|
|
635
|
+
"16:9": "2048x1152",
|
|
636
|
+
"9:16": "1152x2048",
|
|
637
|
+
"4:5": "1024x1280",
|
|
638
|
+
"5:4": "1280x1024"
|
|
639
|
+
},
|
|
640
|
+
aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
|
|
641
|
+
sizes: ["1K", "2K", "4K"],
|
|
642
|
+
qualityOptions: ["auto", "low", "medium", "high", "xhigh", "max"],
|
|
643
|
+
references: { images: 16 },
|
|
644
|
+
supports: ["quality", "count", "outputFormat"],
|
|
645
|
+
prompt: GPT_IMAGE_PROMPT
|
|
646
|
+
},
|
|
647
|
+
defaults: { size: "1K", aspectRatio: "adaptive", quality: "auto" },
|
|
648
|
+
usage: { ...IMAGE_USAGE3 },
|
|
649
|
+
pricingKind: "image_size",
|
|
650
|
+
display: {
|
|
651
|
+
provider: "openai",
|
|
652
|
+
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."
|
|
653
|
+
}
|
|
654
|
+
},
|
|
585
655
|
{
|
|
586
656
|
// Same Images API surface as gpt-image-2 plus the "xhigh" and "max" quality tiers.
|
|
587
657
|
id: "gpt-image-2.5-sunburst",
|
|
@@ -5063,6 +5133,7 @@ var KLING_PROMPT = { referenceSyntax: "numbered", maxChars: 2500 };
|
|
|
5063
5133
|
var H3_PROMPT = { referenceSyntax: "numbered", maxChars: 5e4 };
|
|
5064
5134
|
var KLING_V4_PROMPT = { referenceSyntax: "numbered", maxChars: 2500 };
|
|
5065
5135
|
var KLING_V4_AUDIO = "always";
|
|
5136
|
+
var KLING_V4_FLASH_PROMPT = { referenceSyntax: "numbered", maxChars: 26e3 };
|
|
5066
5137
|
var NO_REFERENCES = { images: 0, videos: 0, audios: 0 };
|
|
5067
5138
|
function klingMotionControl(tier) {
|
|
5068
5139
|
const label = tier === "pro" ? "Pro" : "Standard";
|
|
@@ -5240,6 +5311,85 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5240
5311
|
},
|
|
5241
5312
|
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5242
5313
|
},
|
|
5314
|
+
{
|
|
5315
|
+
// https://fal.ai/models/kling/v4/flash/reference-to-video/api (+ /text-to-video,
|
|
5316
|
+
// /image-to-video): routed like kling-4.0, at 720p only and 3-20 s. image-to-video takes
|
|
5317
|
+
// a start frame (300 px min, ratio 0.40-2.50) and no end frame; its prompt is optional.
|
|
5318
|
+
// Reference images: 10, the start frame included. Reference videos: 5, 3-20.05 s each
|
|
5319
|
+
// and 20 s combined, 700 px min. Prompts up to 26,000 characters. No sound switch.
|
|
5320
|
+
id: "kling-4.0-flash",
|
|
5321
|
+
aliases: ["kling-4-flash", "kling-v4-flash"],
|
|
5322
|
+
label: "Kling 4.0 Flash",
|
|
5323
|
+
type: "video",
|
|
5324
|
+
adapter: "fal",
|
|
5325
|
+
providerModelId: "kling/v4/flash",
|
|
5326
|
+
lifecycle: "active",
|
|
5327
|
+
exposure: ["cowork", "space_builder"],
|
|
5328
|
+
constraints: {
|
|
5329
|
+
aspectRatios: ["adaptive", "16:9", "9:16", "1:1", "21:9"],
|
|
5330
|
+
resolutions: ["720p"],
|
|
5331
|
+
durations: { min: 3, max: 20 },
|
|
5332
|
+
durationPresets: [5, 10, 15, 20],
|
|
5333
|
+
references: {
|
|
5334
|
+
...NO_REFERENCES,
|
|
5335
|
+
images: 10,
|
|
5336
|
+
videos: 5,
|
|
5337
|
+
videoSeconds: { min: 3, max: 20.05, total: 20 },
|
|
5338
|
+
videoPixels: { minWidth: 700, minHeight: 700 }
|
|
5339
|
+
},
|
|
5340
|
+
supports: [],
|
|
5341
|
+
prompt: KLING_V4_FLASH_PROMPT,
|
|
5342
|
+
audio: KLING_V4_AUDIO
|
|
5343
|
+
},
|
|
5344
|
+
defaults: { durationSeconds: 5, resolution: "720p", aspectRatio: "16:9" },
|
|
5345
|
+
usage: { ...VIDEO_USAGE },
|
|
5346
|
+
pricingKind: "video_per_second",
|
|
5347
|
+
display: {
|
|
5348
|
+
provider: "kuaishou",
|
|
5349
|
+
logo: KLING_LOGO,
|
|
5350
|
+
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."
|
|
5351
|
+
}
|
|
5352
|
+
},
|
|
5353
|
+
{
|
|
5354
|
+
// https://fal.ai/models/kling/v4/flash/video-to-video/api: source 3-20.05 s (700 px
|
|
5355
|
+
// min, 23.9-60.05 fps), up to 10 reference images and 4 reference videos; the source
|
|
5356
|
+
// and reference videos total 20 s at most. duration 3-20, or left out for the source's
|
|
5357
|
+
// length. The prompt names the source @Video1, reference videos @Video2 on, images @Image1.
|
|
5358
|
+
id: "kling-4.0-flash-edit",
|
|
5359
|
+
aliases: ["kling-4-flash-edit", "kling-v4-flash-edit"],
|
|
5360
|
+
label: "Kling 4.0 Flash Edit",
|
|
5361
|
+
type: "video",
|
|
5362
|
+
adapter: "fal",
|
|
5363
|
+
providerModelId: "kling/v4/flash/video-to-video",
|
|
5364
|
+
lifecycle: "active",
|
|
5365
|
+
exposure: ["cowork", "space_builder"],
|
|
5366
|
+
constraints: {
|
|
5367
|
+
resolutions: ["720p"],
|
|
5368
|
+
durations: { min: 3, max: 20 },
|
|
5369
|
+
references: {
|
|
5370
|
+
...NO_REFERENCES,
|
|
5371
|
+
images: 10,
|
|
5372
|
+
videos: 4,
|
|
5373
|
+
videoSeconds: { min: 3, max: 20.05, total: 20 },
|
|
5374
|
+
videoPixels: { minWidth: 700, minHeight: 700 }
|
|
5375
|
+
},
|
|
5376
|
+
requires: ["sourceVideo"],
|
|
5377
|
+
sourceVideoSeconds: { min: 3, max: 20.05, inReferenceTotal: true },
|
|
5378
|
+
sourceVideoPixels: { minWidth: 700, minHeight: 700 },
|
|
5379
|
+
supports: [],
|
|
5380
|
+
prompt: KLING_V4_FLASH_PROMPT,
|
|
5381
|
+
audio: KLING_V4_AUDIO
|
|
5382
|
+
},
|
|
5383
|
+
defaults: { resolution: "720p" },
|
|
5384
|
+
usage: { ...VIDEO_USAGE },
|
|
5385
|
+
pricingKind: "video_per_second",
|
|
5386
|
+
display: {
|
|
5387
|
+
provider: "kuaishou",
|
|
5388
|
+
logo: KLING_LOGO,
|
|
5389
|
+
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."
|
|
5390
|
+
},
|
|
5391
|
+
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5392
|
+
},
|
|
5243
5393
|
{
|
|
5244
5394
|
// https://fal.ai/models/minimax/h3-max-turbo/text-to-video/api (+ /image-to-video).
|
|
5245
5395
|
// image-to-video takes a start frame, an end frame, or both, and no aspect_ratio.
|
|
@@ -8999,6 +9149,8 @@ var O3_REFERENCE = "fal-ai/kling-video/o3/pro/reference-to-video";
|
|
|
8999
9149
|
var O3_EDIT = "fal-ai/kling-video/o3/pro/video-to-video/edit";
|
|
9000
9150
|
var KLING_V4 = "kling/v4";
|
|
9001
9151
|
var KLING_V4_EDIT = "kling/v4/video-to-video/edit";
|
|
9152
|
+
var KLING_V4_FLASH = "kling/v4/flash";
|
|
9153
|
+
var KLING_V4_FLASH_EDIT = "kling/v4/flash/video-to-video";
|
|
9002
9154
|
var H3_TURBO = "minimax/h3-max-turbo";
|
|
9003
9155
|
var H3_RECAST = "minimax/h3-max/recast";
|
|
9004
9156
|
var H3_RELIGHT = "minimax/h3-max/relight";
|
|
@@ -9080,6 +9232,11 @@ function klingV4(req) {
|
|
|
9080
9232
|
}
|
|
9081
9233
|
return needsPrompt(req);
|
|
9082
9234
|
}
|
|
9235
|
+
function klingV4Flash(req) {
|
|
9236
|
+
if (req.lastFrame !== void 0) return unsupported2("takes no end frame");
|
|
9237
|
+
if (!hasReferences(req) && req.firstFrame !== void 0) return void 0;
|
|
9238
|
+
return klingV4(req);
|
|
9239
|
+
}
|
|
9083
9240
|
function h3Turbo(req) {
|
|
9084
9241
|
if (count(req.referenceImages) + count(req.referenceVideos) > 0) {
|
|
9085
9242
|
return unsupported2("takes no reference images or videos");
|
|
@@ -9160,6 +9317,8 @@ var RULES = /* @__PURE__ */ new Map([
|
|
|
9160
9317
|
[O3_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
9161
9318
|
[KLING_V4, klingV4],
|
|
9162
9319
|
[KLING_V4_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
9320
|
+
[KLING_V4_FLASH, klingV4Flash],
|
|
9321
|
+
[KLING_V4_FLASH_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
9163
9322
|
[H3_TURBO, h3Turbo],
|
|
9164
9323
|
[MINIMAX_H3_INSERT, h3Insert],
|
|
9165
9324
|
[H3_RECAST, h3Recast],
|
|
@@ -9209,7 +9368,7 @@ function applyFalVideoRules(model, req, callerRatio, warnings) {
|
|
|
9209
9368
|
warnings.push(viduSilentWarning(model));
|
|
9210
9369
|
req.generateAudio = false;
|
|
9211
9370
|
}
|
|
9212
|
-
if (id === KLING_V4 && req.firstFrame !== void 0 && !hasReferences(req)) {
|
|
9371
|
+
if ((id === KLING_V4 || id === KLING_V4_FLASH) && req.firstFrame !== void 0 && !hasReferences(req)) {
|
|
9213
9372
|
if (req.aspectRatio !== void 0) {
|
|
9214
9373
|
if (callerRatio !== void 0) {
|
|
9215
9374
|
warnings.push({
|