@shop-os/modelkit 0.7.8 → 0.7.10
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 +11 -0
- package/dist/catalog.cjs +20 -17
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.js +20 -17
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +88 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +88 -45
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/catalog.js
CHANGED
|
@@ -5653,38 +5653,38 @@ var VIDEO_MODELS = [
|
|
|
5653
5653
|
capabilities: { ...FRAMES_EXCLUDE_REFERENCES }
|
|
5654
5654
|
},
|
|
5655
5655
|
{
|
|
5656
|
-
// mode standard/pro/4k selects 720p/1080p/4K
|
|
5657
|
-
//
|
|
5658
|
-
//
|
|
5659
|
-
//
|
|
5656
|
+
// fal Kling O3 (adapters/fal-kling-omni.ts): mode standard/pro/4k selects 720p/1080p/4K
|
|
5657
|
+
// in the endpoint path. Moved off Replicate kwaivgi/kling-v3-omni-video, which fal sells
|
|
5658
|
+
// at half the price; the id and inputs stay. The Replicate mapper stays for deployed
|
|
5659
|
+
// model_catalog rows not yet switched. Frames and reference images share fal's cap of 7.
|
|
5660
|
+
// Reference video, multi-shot and keep-sound were never wired, so stay off.
|
|
5660
5661
|
id: "kling-v3-omni-video",
|
|
5661
5662
|
aliases: ["kwaivgi/kling-v3-omni-video", "kling-v3-omni"],
|
|
5662
5663
|
label: "Kling V3 Omni",
|
|
5663
5664
|
type: "video",
|
|
5664
|
-
adapter: "
|
|
5665
|
-
providerModelId: "
|
|
5665
|
+
adapter: "fal",
|
|
5666
|
+
providerModelId: "fal-ai/kling-video/o3",
|
|
5666
5667
|
lifecycle: "active",
|
|
5667
5668
|
exposure: ["cowork", "space_builder"],
|
|
5668
5669
|
constraints: {
|
|
5669
5670
|
aspectRatios: [...KLING_OMNI_RATIOS],
|
|
5670
5671
|
resolutions: ["720p", "1080p", "4k"],
|
|
5671
5672
|
durations: { min: 3, max: 15 },
|
|
5672
|
-
references: { images: 7,
|
|
5673
|
+
references: { images: 7, videos: 0, audios: 0 },
|
|
5673
5674
|
supports: ["generateAudio", "lastFrame"],
|
|
5674
5675
|
prompt: KLING_PROMPT2,
|
|
5675
5676
|
audio: "optional"
|
|
5676
5677
|
},
|
|
5677
5678
|
defaults: { durationSeconds: 5, aspectRatio: "16:9", generateAudio: true, mode: "pro" },
|
|
5678
|
-
usage: {
|
|
5679
|
+
usage: { ...VIDEO_USAGE3 },
|
|
5679
5680
|
pricingKind: "video_per_second",
|
|
5680
5681
|
display: {
|
|
5681
5682
|
provider: "kuaishou",
|
|
5682
5683
|
logo: "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/kling-color.png",
|
|
5683
|
-
description: "Kuaishou Kling Video 3.0 Omni
|
|
5684
|
+
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 4K."
|
|
5684
5685
|
}
|
|
5685
|
-
//
|
|
5686
|
-
//
|
|
5687
|
-
// the adapter sends as start_image.
|
|
5686
|
+
// No lastFrameRequiresFirstFrame: fal image-to-video needs a start frame, so the adapter
|
|
5687
|
+
// sends a lone end frame as the start frame, as the Replicate model took it.
|
|
5688
5688
|
},
|
|
5689
5689
|
{
|
|
5690
5690
|
id: "minimax-h3",
|
|
@@ -8439,6 +8439,7 @@ var KLING_TIERS = [
|
|
|
8439
8439
|
{ mode: "pro", resolution: "1080p" },
|
|
8440
8440
|
{ mode: "4k", resolution: "4k" }
|
|
8441
8441
|
];
|
|
8442
|
+
var KLING_O3_OMNI = "fal-ai/kling-video/o3";
|
|
8442
8443
|
function klingTier(req) {
|
|
8443
8444
|
return KLING_TIERS.find((tier) => tier.resolution === req.resolution) ?? KLING_TIERS.find((tier) => tier.mode === req.mode) ?? KLING_TIERS[0];
|
|
8444
8445
|
}
|
|
@@ -8587,6 +8588,7 @@ var RULES = /* @__PURE__ */ new Map([
|
|
|
8587
8588
|
[MOTION_PRO, motionControl],
|
|
8588
8589
|
[MOTION_STANDARD, motionControl],
|
|
8589
8590
|
[O3_REFERENCE, o3Reference],
|
|
8591
|
+
[KLING_O3_OMNI, o3Reference],
|
|
8590
8592
|
[O3_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
8591
8593
|
[H3_TURBO, h3Turbo],
|
|
8592
8594
|
[MINIMAX_H3_INSERT, h3Insert],
|
|
@@ -8616,13 +8618,14 @@ function h3EndFrameRatioWarning(model, ratio) {
|
|
|
8616
8618
|
message: `${model.id} follows the end frame's aspect ratio`
|
|
8617
8619
|
};
|
|
8618
8620
|
}
|
|
8619
|
-
function
|
|
8621
|
+
function takesKlingMode(model) {
|
|
8622
|
+
if (model.adapter === "fal") return model.providerModelId.toLowerCase() === KLING_O3_OMNI;
|
|
8620
8623
|
if (model.adapter !== "replicate") return false;
|
|
8621
8624
|
const kind = videoKind(model.providerModelId);
|
|
8622
8625
|
return kind === "kling" || kind === "kling-omni";
|
|
8623
8626
|
}
|
|
8624
|
-
function
|
|
8625
|
-
if (
|
|
8627
|
+
function fillKlingModeResolution(model, req) {
|
|
8628
|
+
if (takesKlingMode(model) && req.resolution === void 0) {
|
|
8626
8629
|
req.resolution = klingTier(req).resolution;
|
|
8627
8630
|
}
|
|
8628
8631
|
}
|
|
@@ -9015,10 +9018,10 @@ function resolveVideoOptions(model, request, onUnsupported = "error") {
|
|
|
9015
9018
|
warnings
|
|
9016
9019
|
);
|
|
9017
9020
|
if (aspectRatio !== void 0) merged.aspectRatio = aspectRatio;
|
|
9018
|
-
|
|
9021
|
+
fillKlingModeResolution(model, merged);
|
|
9019
9022
|
const resolution = resolveVideoResolution(merged.resolution, model, onUnsupported, warnings);
|
|
9020
9023
|
if (resolution !== void 0) merged.resolution = resolution;
|
|
9021
|
-
if (
|
|
9024
|
+
if (takesKlingMode(model)) delete merged.mode;
|
|
9022
9025
|
const duration = resolveDuration(
|
|
9023
9026
|
merged.durationSeconds,
|
|
9024
9027
|
c.durations,
|