@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/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; the endpoint takes no separate resolution.
5657
- // Replicate: "Max 7 [images] without video, 4 with video"; 4K does not support
5658
- // reference_video. No `videos` limit yet: the adapter sends no reference video,
5659
- // so `imagesWithVideo` stays dormant until one is wired through.
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: "replicate",
5665
- providerModelId: "kwaivgi/kling-v3-omni-video",
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, imagesWithVideo: 4 },
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: { unit: "compute_seconds" },
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 unified generation and editing from text, start/end images, up to 7 reference images, and reference video; up to 15 seconds at up to 4K."
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
- // end_image "Requires start_image", but no lastFrameRequiresFirstFrame: SpaceLab resolves
5686
- // replicate rows in error mode, so the flag would refuse its end-frame-only nodes, which
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 isReplicateKling(model) {
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 fillReplicateKlingResolution(model, req) {
8625
- if (isReplicateKling(model) && req.resolution === void 0) {
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
- fillReplicateKlingResolution(model, merged);
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 (isReplicateKling(model)) delete merged.mode;
9024
+ if (takesKlingMode(model)) delete merged.mode;
9022
9025
  const duration = resolveDuration(
9023
9026
  merged.durationSeconds,
9024
9027
  c.durations,