@shop-os/modelkit 0.14.0 → 0.15.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 +22 -0
- package/dist/catalog.cjs +58 -25
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +31 -1
- package/dist/catalog.d.ts +31 -1
- package/dist/catalog.js +58 -25
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +59 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.js +58 -25
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,28 @@ header in the release PR.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.15.1] - Unreleased
|
|
13
|
+
|
|
14
|
+
Model names and descriptions now match what each row offers (ENG-3364). The stored `model_catalog` rows are seeded once and never updated, so each environment needs the same edits in pro-admin; the PR lists them.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Labels use one style, short names with consistent casing: `gpt-image-2` "GPT-image-2" is now "GPT Image 2", `flux-2-pro` "Flux 2 Pro" is now "FLUX 2 Pro" (like the FLUX 3 rows), `wan-2.7-image-pro` "WAN 2.7 Image Pro" is now "Wan 2.7 Image Pro" (like Wan 3).
|
|
18
|
+
- `kling-v3-omni-video` no longer offers `4k` (`resolutions` is `720p`, `1080p`), matching the stored rows; its description says up to 1080p. The fal adapter still maps the 4k tier.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- Descriptions that contradicted their row's limits: `flux-2-pro` said up to 4096x4096 (it offers 1K), `grok-imagine` said 5 reference images (it takes 7, the cap xAI documents for `grok-imagine-video`), `minimax-h3` said up to 2K (it offers 4K), `seedream-5-0-pro` listed a 1.5K size it does not offer.
|
|
22
|
+
- Descriptions of rows with duration presets give the longest clip instead of a range, since Creative Studio offers the presets and the canvas offers the range: `wan-3.0`, `wan-3.0-prime`, `kling-4.0`, `grok-imagine-1.5`, `seedance-2.0`.
|
|
23
|
+
- Descriptions no longer name the serving provider or carry internal notes, matching the public text already in the stored rows: `bg-remove`, `elevenlabs-multilingual-v2`, `fish-s2.1-pro-free`, `minimax-h3-max-reference`, `mmaudio`, `sam-3-image`, `seedvr2-upscale`, `lipsync-2`, `topaz`, `veed-lipsync-v2`.
|
|
24
|
+
|
|
25
|
+
## [0.15.0] - Unreleased
|
|
26
|
+
|
|
27
|
+
Reference and source videos have a minimum frame size, checked before the provider call (ENG-3453).
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
- `references.videoPixels` and `sourceVideoPixels` constraints (`{ minWidth?, minHeight? }`, `VideoPixelLimits`): the smallest frame a row takes for a reference or source video. Kits before 0.15.0 ignore them (the constraint objects are loose).
|
|
31
|
+
- `videoSizeViolation(model, { referenceVideos?, sourceVideo? })` beside `videoLengthViolation`: the first undersized video as a user-facing message ("Kling 4.0 takes reference videos at least 700 px wide; video 1 is 576 px."), from measured sizes. An unmeasured video passes.
|
|
32
|
+
- Limits from fal's schemas: `kling-4.0` reference videos and `kling-4.0-edit` source 700 px, `kling-o3-edit` source 720 px, `kling-3.0-motion-control-*` motion clip 340 px (width and height each). The stored `model_catalog` rows need the same values (pro-admin) for runtime checks to see them.
|
|
33
|
+
|
|
12
34
|
## [0.14.0] - Unreleased
|
|
13
35
|
|
|
14
36
|
Video Depth Anything on fal, as a Creative Studio video tool.
|
package/dist/catalog.cjs
CHANGED
|
@@ -79,6 +79,7 @@ __export(catalog_entry_exports, {
|
|
|
79
79
|
sortCatalogRows: () => sortCatalogRows,
|
|
80
80
|
takesTargetAspectRatio: () => takesTargetAspectRatio,
|
|
81
81
|
videoLengthViolation: () => videoLengthViolation,
|
|
82
|
+
videoSizeViolation: () => videoSizeViolation,
|
|
82
83
|
videoToolConstraints: () => videoToolConstraints
|
|
83
84
|
});
|
|
84
85
|
module.exports = __toCommonJS(catalog_entry_exports);
|
|
@@ -635,7 +636,7 @@ var IMAGE_MODELS = [
|
|
|
635
636
|
// Cowork "auto" lets OpenAI pick the size; the canonical equivalent is adaptive.
|
|
636
637
|
id: "gpt-image-2",
|
|
637
638
|
aliases: [],
|
|
638
|
-
label: "GPT
|
|
639
|
+
label: "GPT Image 2",
|
|
639
640
|
type: "image",
|
|
640
641
|
adapter: "openai-image",
|
|
641
642
|
providerModelId: "gpt-image-2",
|
|
@@ -822,7 +823,7 @@ var IMAGE_MODELS = [
|
|
|
822
823
|
display: {
|
|
823
824
|
provider: "bytedance",
|
|
824
825
|
logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png",
|
|
825
|
-
description: "ByteDance Seedream 5.0 Pro text-to-image and multi-reference image-to-image (up to 10 inputs) with region editing; outputs 1K
|
|
826
|
+
description: "ByteDance Seedream 5.0 Pro text-to-image and multi-reference image-to-image (up to 10 inputs) with region editing; outputs 1K or 2K."
|
|
826
827
|
}
|
|
827
828
|
},
|
|
828
829
|
{
|
|
@@ -865,7 +866,7 @@ var IMAGE_MODELS = [
|
|
|
865
866
|
{
|
|
866
867
|
id: "flux-2-pro",
|
|
867
868
|
aliases: [],
|
|
868
|
-
label: "
|
|
869
|
+
label: "FLUX 2 Pro",
|
|
869
870
|
type: "image",
|
|
870
871
|
adapter: "prodia",
|
|
871
872
|
providerModelId: "flux-2-pro",
|
|
@@ -886,7 +887,7 @@ var IMAGE_MODELS = [
|
|
|
886
887
|
display: {
|
|
887
888
|
provider: "black-forest-labs",
|
|
888
889
|
logo: "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/flux.png",
|
|
889
|
-
description: "Black Forest Labs FLUX.2 [pro] text-to-image and multi-reference editing model
|
|
890
|
+
description: "Black Forest Labs FLUX.2 [pro] text-to-image and multi-reference editing model; takes a prompt and up to 8 input images and outputs 1K images."
|
|
890
891
|
}
|
|
891
892
|
},
|
|
892
893
|
{
|
|
@@ -946,7 +947,7 @@ var IMAGE_MODELS = [
|
|
|
946
947
|
// https://replicate.com/wan-video/wan-2.7-image-pro (input schema)
|
|
947
948
|
id: "wan-2.7-image-pro",
|
|
948
949
|
aliases: [],
|
|
949
|
-
label: "
|
|
950
|
+
label: "Wan 2.7 Image Pro",
|
|
950
951
|
type: "image",
|
|
951
952
|
adapter: "replicate",
|
|
952
953
|
providerModelId: "wan-video/wan-2.7-image-pro",
|
|
@@ -1270,7 +1271,7 @@ var SAM_3_IMAGE = {
|
|
|
1270
1271
|
display: {
|
|
1271
1272
|
provider: "meta",
|
|
1272
1273
|
logo: META_LOGO,
|
|
1273
|
-
description: "Meta SAM 3
|
|
1274
|
+
description: "Meta SAM 3; finds every object a prompt names in one image and returns a black-and-white mask for each."
|
|
1274
1275
|
}
|
|
1275
1276
|
};
|
|
1276
1277
|
var VEED_SUBTITLES = {
|
|
@@ -2112,7 +2113,7 @@ var FISH_MODELS = [
|
|
|
2112
2113
|
"fish-s2.1-pro-free",
|
|
2113
2114
|
"Fish Audio S2.1 Pro Free",
|
|
2114
2115
|
"s2.1-pro-free",
|
|
2115
|
-
"Fish Audio S2.1 Pro
|
|
2116
|
+
"Fish Audio S2.1 Pro text to speech, with the same voices as S2.1 Pro."
|
|
2116
2117
|
),
|
|
2117
2118
|
fishTts(
|
|
2118
2119
|
"fish-drama-3",
|
|
@@ -3850,7 +3851,7 @@ var MEDIA_NODE_MODELS = [
|
|
|
3850
3851
|
formats: false,
|
|
3851
3852
|
// fal's schema states no limit; ElevenLabs documents 10,000 characters per request.
|
|
3852
3853
|
maxChars: 1e4,
|
|
3853
|
-
description: "ElevenLabs Multilingual v2 text to speech in 29 languages
|
|
3854
|
+
description: "ElevenLabs Multilingual v2 text to speech in 29 languages."
|
|
3854
3855
|
}),
|
|
3855
3856
|
geminiTts(
|
|
3856
3857
|
"gemini-3.8-flash-tts",
|
|
@@ -3946,7 +3947,7 @@ var MEDIA_NODE_MODELS = [
|
|
|
3946
3947
|
"Sync Lipsync 2",
|
|
3947
3948
|
"fal-ai/sync-lipsync/v2",
|
|
3948
3949
|
"lipsync-2",
|
|
3949
|
-
"Sync Lipsync 2 re-times the mouth in a video to new speech
|
|
3950
|
+
"Sync Lipsync 2 re-times the mouth in a video to new speech."
|
|
3950
3951
|
),
|
|
3951
3952
|
syncLipsync(
|
|
3952
3953
|
"lipsync-2-pro",
|
|
@@ -3984,7 +3985,7 @@ var MEDIA_NODE_MODELS = [
|
|
|
3984
3985
|
display: {
|
|
3985
3986
|
provider: "veed",
|
|
3986
3987
|
logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/d540d2bb-0022-4371-8889-48aefaf46bbe.png",
|
|
3987
|
-
description: "VEED Lipsync v2 re-times the mouth in a video to a new audio track
|
|
3988
|
+
description: "VEED Lipsync v2 re-times the mouth in a video to a new audio track."
|
|
3988
3989
|
},
|
|
3989
3990
|
capabilities: { acceptsSourceVideo: true }
|
|
3990
3991
|
},
|
|
@@ -4329,7 +4330,7 @@ var OTHER_MODELS = [
|
|
|
4329
4330
|
pricingKind: "flat",
|
|
4330
4331
|
display: {
|
|
4331
4332
|
provider: "mmaudio",
|
|
4332
|
-
description: "MMAudio V2 video-to-audio model
|
|
4333
|
+
description: "MMAudio V2 video-to-audio model; takes a source video and a prompt and synthesizes synchronized environmental, action, and speech-like audio."
|
|
4333
4334
|
},
|
|
4334
4335
|
capabilities: {}
|
|
4335
4336
|
},
|
|
@@ -4539,7 +4540,7 @@ var OTHER_MODELS = [
|
|
|
4539
4540
|
display: {
|
|
4540
4541
|
provider: "topaz",
|
|
4541
4542
|
logo: "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/topazlabs.png",
|
|
4542
|
-
description: "Topaz Labs AI image upscaling
|
|
4543
|
+
description: "Topaz Labs AI image upscaling; takes one input image and upscales up to 6x with selectable enhancement models and optional face enhancement."
|
|
4543
4544
|
}
|
|
4544
4545
|
},
|
|
4545
4546
|
{
|
|
@@ -4565,7 +4566,7 @@ var OTHER_MODELS = [
|
|
|
4565
4566
|
display: {
|
|
4566
4567
|
provider: "bytedance",
|
|
4567
4568
|
logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png",
|
|
4568
|
-
description: "ByteDance SeedVR2 one-step image upscaling and restoration
|
|
4569
|
+
description: "ByteDance SeedVR2 one-step image upscaling and restoration; takes one input image and upscales it 2x or 4x with sharp, faithful detail."
|
|
4569
4570
|
}
|
|
4570
4571
|
},
|
|
4571
4572
|
{
|
|
@@ -4589,7 +4590,7 @@ var OTHER_MODELS = [
|
|
|
4589
4590
|
pricingKind: "flat",
|
|
4590
4591
|
display: {
|
|
4591
4592
|
provider: "prodia",
|
|
4592
|
-
description: "
|
|
4593
|
+
description: "Background removal; takes one input image and returns a PNG cut-out of the subject plus an optional black-and-white mask."
|
|
4593
4594
|
}
|
|
4594
4595
|
}
|
|
4595
4596
|
];
|
|
@@ -5167,6 +5168,7 @@ function klingMotionControl(tier) {
|
|
|
5167
5168
|
videos: 1,
|
|
5168
5169
|
audios: 0,
|
|
5169
5170
|
videoSeconds: { min: 3, max: 30.05 },
|
|
5171
|
+
videoPixels: { minWidth: 340, minHeight: 340 },
|
|
5170
5172
|
min: { images: 1, videos: 1 }
|
|
5171
5173
|
},
|
|
5172
5174
|
requires: ["references"],
|
|
@@ -5233,6 +5235,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5233
5235
|
references: { ...NO_REFERENCES, images: 4 },
|
|
5234
5236
|
requires: ["sourceVideo"],
|
|
5235
5237
|
sourceVideoSeconds: { min: 3, max: 15.05 },
|
|
5238
|
+
sourceVideoPixels: { minWidth: 720, minHeight: 720 },
|
|
5236
5239
|
// generateAudio keeps (true) or drops (false) the source soundtrack.
|
|
5237
5240
|
supports: ["generateAudio"],
|
|
5238
5241
|
prompt: KLING_PROMPT,
|
|
@@ -5273,7 +5276,8 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5273
5276
|
...NO_REFERENCES,
|
|
5274
5277
|
images: 10,
|
|
5275
5278
|
videos: 5,
|
|
5276
|
-
videoSeconds: { min: 3, max: 30.05, total: 30 }
|
|
5279
|
+
videoSeconds: { min: 3, max: 30.05, total: 30 },
|
|
5280
|
+
videoPixels: { minWidth: 700, minHeight: 700 }
|
|
5277
5281
|
},
|
|
5278
5282
|
supports: ["lastFrame"],
|
|
5279
5283
|
prompt: KLING_V4_PROMPT,
|
|
@@ -5285,7 +5289,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5285
5289
|
display: {
|
|
5286
5290
|
provider: "kuaishou",
|
|
5287
5291
|
logo: KLING_LOGO,
|
|
5288
|
-
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),
|
|
5292
|
+
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."
|
|
5289
5293
|
},
|
|
5290
5294
|
capabilities: { lastFrameRequiresFirstFrame: true }
|
|
5291
5295
|
},
|
|
@@ -5307,6 +5311,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5307
5311
|
references: { ...NO_REFERENCES, images: 10 },
|
|
5308
5312
|
requires: ["sourceVideo"],
|
|
5309
5313
|
sourceVideoSeconds: { min: 3, max: 30.05 },
|
|
5314
|
+
sourceVideoPixels: { minWidth: 700, minHeight: 700 },
|
|
5310
5315
|
supports: [],
|
|
5311
5316
|
prompt: KLING_V4_PROMPT,
|
|
5312
5317
|
audio: KLING_V4_AUDIO
|
|
@@ -5629,7 +5634,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5629
5634
|
display: {
|
|
5630
5635
|
provider: "xai",
|
|
5631
5636
|
logo: XAI_LOGO,
|
|
5632
|
-
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,
|
|
5637
|
+
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."
|
|
5633
5638
|
},
|
|
5634
5639
|
capabilities: {}
|
|
5635
5640
|
}
|
|
@@ -5986,7 +5991,7 @@ var VIDEO_MODELS = [
|
|
|
5986
5991
|
pricingKind: "video_per_second",
|
|
5987
5992
|
display: {
|
|
5988
5993
|
provider: "bytedance",
|
|
5989
|
-
description: "High-quality
|
|
5994
|
+
description: "High-quality ByteDance video generation guided by reference images, for clips up to 15 seconds.",
|
|
5990
5995
|
logo: BYTEDANCE_LOGO2
|
|
5991
5996
|
},
|
|
5992
5997
|
capabilities: { acceptsSourceVideo: true, videoEdit: false, ...FRAMES_EXCLUDE_REFERENCES }
|
|
@@ -6110,7 +6115,7 @@ var VIDEO_MODELS = [
|
|
|
6110
6115
|
pricingKind: "video_per_second",
|
|
6111
6116
|
display: {
|
|
6112
6117
|
provider: "xai",
|
|
6113
|
-
description: "xAI's reference-to-video model. Generates short clips conditioned on up to
|
|
6118
|
+
description: "xAI's reference-to-video model. Generates short clips conditioned on up to 7 reference images with flexible aspect ratios.",
|
|
6114
6119
|
logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/858b7fcc-9bd5-411d-aea1-a7b35ecfffab_compressed.png"
|
|
6115
6120
|
},
|
|
6116
6121
|
capabilities: { ...FRAMES_EXCLUDE_REFERENCES }
|
|
@@ -6194,7 +6199,7 @@ var VIDEO_MODELS = [
|
|
|
6194
6199
|
exposure: ["cowork", "space_builder"],
|
|
6195
6200
|
constraints: {
|
|
6196
6201
|
aspectRatios: [...KLING_OMNI_RATIOS],
|
|
6197
|
-
resolutions: ["720p", "1080p"
|
|
6202
|
+
resolutions: ["720p", "1080p"],
|
|
6198
6203
|
durations: { min: 3, max: 15 },
|
|
6199
6204
|
references: { images: 7, videos: 0, audios: 0 },
|
|
6200
6205
|
supports: ["generateAudio", "lastFrame"],
|
|
@@ -6207,7 +6212,7 @@ var VIDEO_MODELS = [
|
|
|
6207
6212
|
display: {
|
|
6208
6213
|
provider: "kuaishou",
|
|
6209
6214
|
logo: "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/kling-color.png",
|
|
6210
|
-
description: "Kuaishou Kling Video 3.0 Omni generation from text, start/end images and up to 7 reference images, with optional native audio; up to 15 seconds at up to
|
|
6215
|
+
description: "Kuaishou Kling Video 3.0 Omni generation from text, start/end images and up to 7 reference images, with optional native audio; up to 15 seconds at up to 1080p."
|
|
6211
6216
|
}
|
|
6212
6217
|
// No lastFrameRequiresFirstFrame: fal image-to-video needs a start frame, so the adapter
|
|
6213
6218
|
// sends a lone end frame as the start frame, as the Replicate model took it.
|
|
@@ -6242,7 +6247,7 @@ var VIDEO_MODELS = [
|
|
|
6242
6247
|
display: {
|
|
6243
6248
|
provider: "minimax",
|
|
6244
6249
|
logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/f4c2e906-28b7-4a4a-b491-df8fef7808ed.png",
|
|
6245
|
-
description: "MiniMax H3 multimodal video model for text-to-video, image-to-video (first/last frame), and reference-to-video with native audio, up to
|
|
6250
|
+
description: "MiniMax H3 multimodal video model for text-to-video, image-to-video (first/last frame), and reference-to-video with native audio, up to 4K."
|
|
6246
6251
|
},
|
|
6247
6252
|
capabilities: { ...FRAMES_EXCLUDE_REFERENCES }
|
|
6248
6253
|
},
|
|
@@ -6362,7 +6367,7 @@ var VIDEO_MODELS = [
|
|
|
6362
6367
|
display: {
|
|
6363
6368
|
provider: "minimax",
|
|
6364
6369
|
logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/f4c2e906-28b7-4a4a-b491-df8fef7808ed.png",
|
|
6365
|
-
description: "MiniMax H3 Max reference-to-video
|
|
6370
|
+
description: "MiniMax H3 Max reference-to-video; conditions on reference images, videos, and audio."
|
|
6366
6371
|
},
|
|
6367
6372
|
// fal's reference-to-video endpoint never reads a frame; the resolver must drop the
|
|
6368
6373
|
// references instead of the adapter silently dropping the frame.
|
|
@@ -6406,7 +6411,7 @@ var VIDEO_MODELS = [
|
|
|
6406
6411
|
pricingKind: "video_per_second",
|
|
6407
6412
|
display: {
|
|
6408
6413
|
provider: "alibaba",
|
|
6409
|
-
description: "Alibaba Wan 3 video model for text-to-video, image-to-video (start/end frame), and reference-to-video from up to 10 images, 5 videos and 5 audio clips, with native audio;
|
|
6414
|
+
description: "Alibaba Wan 3 video model for text-to-video, image-to-video (start/end frame), and reference-to-video from up to 10 images, 5 videos and 5 audio clips, with native audio; up to 30 seconds at up to 1080p."
|
|
6410
6415
|
},
|
|
6411
6416
|
capabilities: { ...FRAMES_EXCLUDE_REFERENCES, lastFrameRequiresFirstFrame: true }
|
|
6412
6417
|
},
|
|
@@ -6448,7 +6453,7 @@ var VIDEO_MODELS = [
|
|
|
6448
6453
|
pricingKind: "video_per_second",
|
|
6449
6454
|
display: {
|
|
6450
6455
|
provider: "alibaba",
|
|
6451
|
-
description: "Alibaba Wan 3 Prime, the faster-generating tier of Wan 3, for text-to-video, image-to-video (start/end frame), and reference-to-video from up to 10 images, 5 videos and 5 audio clips, with native audio;
|
|
6456
|
+
description: "Alibaba Wan 3 Prime, the faster-generating tier of Wan 3, for text-to-video, image-to-video (start/end frame), and reference-to-video from up to 10 images, 5 videos and 5 audio clips, with native audio; up to 30 seconds at up to 1080p."
|
|
6452
6457
|
},
|
|
6453
6458
|
capabilities: { ...FRAMES_EXCLUDE_REFERENCES, lastFrameRequiresFirstFrame: true }
|
|
6454
6459
|
},
|
|
@@ -7857,6 +7862,10 @@ var VideoSecondsLimitsSchema = import_zod3.z.looseObject({
|
|
|
7857
7862
|
total: import_zod3.z.number().optional(),
|
|
7858
7863
|
editMin: import_zod3.z.number().optional()
|
|
7859
7864
|
});
|
|
7865
|
+
var VideoPixelLimitsSchema = import_zod3.z.looseObject({
|
|
7866
|
+
minWidth: import_zod3.z.number().int().positive().optional(),
|
|
7867
|
+
minHeight: import_zod3.z.number().int().positive().optional()
|
|
7868
|
+
});
|
|
7860
7869
|
var ReferenceLimitsSchema = import_zod3.z.looseObject({
|
|
7861
7870
|
images: import_zod3.z.number().optional(),
|
|
7862
7871
|
imagesWithVideo: import_zod3.z.number().optional(),
|
|
@@ -7865,6 +7874,7 @@ var ReferenceLimitsSchema = import_zod3.z.looseObject({
|
|
|
7865
7874
|
total: import_zod3.z.number().optional(),
|
|
7866
7875
|
audioOnly: import_zod3.z.boolean().optional(),
|
|
7867
7876
|
videoSeconds: VideoSecondsLimitsSchema.optional(),
|
|
7877
|
+
videoPixels: VideoPixelLimitsSchema.optional(),
|
|
7868
7878
|
audioSeconds: import_zod3.z.looseObject({
|
|
7869
7879
|
min: import_zod3.z.number().optional(),
|
|
7870
7880
|
max: import_zod3.z.number().optional(),
|
|
@@ -7954,6 +7964,7 @@ var ModelConstraintsSchema = import_zod3.z.looseObject({
|
|
|
7954
7964
|
}).optional(),
|
|
7955
7965
|
languages: import_zod3.z.array(LanguageOptionSchema).optional(),
|
|
7956
7966
|
outputFormats: import_zod3.z.array(import_zod3.z.string().min(1)).min(1).optional(),
|
|
7967
|
+
sourceVideoPixels: VideoPixelLimitsSchema.optional(),
|
|
7957
7968
|
sourceVideoSeconds: VideoSecondsLimitsSchema.omit({ total: true }).extend({ inReferenceTotal: import_zod3.z.boolean().optional() }).optional(),
|
|
7958
7969
|
// segmentSeconds/maxTotalSeconds stay required: a kit before 0.3.0 drops a row whose
|
|
7959
7970
|
// extension lacks them, so every extension block keeps them.
|
|
@@ -9478,6 +9489,28 @@ function videoLengthViolation(model, input) {
|
|
|
9478
9489
|
return `${model.label} takes a source video of at least ${String(sourceMin)} s; this one is ${seconds2(source, sourceMin)} s.`;
|
|
9479
9490
|
return void 0;
|
|
9480
9491
|
}
|
|
9492
|
+
function undersizedSide(frame, limits) {
|
|
9493
|
+
if (!frame || !limits) return void 0;
|
|
9494
|
+
const { width, height } = frame;
|
|
9495
|
+
if (limits.minWidth !== void 0 && width !== void 0 && width > 0 && width < limits.minWidth)
|
|
9496
|
+
return { side: "wide", min: limits.minWidth, actual: width };
|
|
9497
|
+
if (limits.minHeight !== void 0 && height !== void 0 && height > 0 && height < limits.minHeight)
|
|
9498
|
+
return { side: "tall", min: limits.minHeight, actual: height };
|
|
9499
|
+
return void 0;
|
|
9500
|
+
}
|
|
9501
|
+
function videoSizeViolation(model, input) {
|
|
9502
|
+
const refLimits = model.constraints.references?.videoPixels;
|
|
9503
|
+
const refs = input.referenceVideos ?? [];
|
|
9504
|
+
for (let i = 0; i < refs.length; i++) {
|
|
9505
|
+
const under2 = undersizedSide(refs[i], refLimits);
|
|
9506
|
+
if (under2)
|
|
9507
|
+
return `${model.label} takes reference videos at least ${String(under2.min)} px ${under2.side}; video ${i + 1} is ${String(under2.actual)} px.`;
|
|
9508
|
+
}
|
|
9509
|
+
const under = undersizedSide(input.sourceVideo, model.constraints.sourceVideoPixels);
|
|
9510
|
+
if (under)
|
|
9511
|
+
return `${model.label} takes a source video at least ${String(under.min)} px ${under.side}; this one is ${String(under.actual)} px.`;
|
|
9512
|
+
return void 0;
|
|
9513
|
+
}
|
|
9481
9514
|
function resolveImageOptions(model, request, onUnsupported = "error") {
|
|
9482
9515
|
const warnings = [];
|
|
9483
9516
|
const c = model.constraints;
|