@shop-os/modelkit 0.2.9 → 0.2.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 CHANGED
@@ -9,6 +9,15 @@ header in the release PR.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.2.10] - 2026-09-16
13
+
14
+ ### Added
15
+ - `VideoRequest.taskType` (`reference` | `edit` | `extend`) for Seedance omni-reference subtasks. `edit` sends `duration: -1` and `ratio: adaptive`; `extend` sends `ratio: adaptive`; both need a source or reference video and fail before submit otherwise. `seedance-2.5` also sends `omni_reference_task_type` so BytePlus validates at submit time instead of failing the task later with `InvalidParameter.TaskTypeConstraint`. The 2.0 rows do not list `taskType`.
16
+ - `ReferenceLimits.imagesWithVideo`: a lower image cap when a reference video is sent. `kling-v3-omni-video` declares 7 / 4 per the Replicate schema.
17
+
18
+ ### Fixed
19
+ - Omni usage bills 10 s when the caller sends no duration; the model renders 10 s by default, not 8 (live probe 2026-09-16). The `duration` response_format field is undocumented but honored, so it stays.
20
+
12
21
  ## [0.2.9] - 2026-09-15
13
22
 
14
23
  ### Changed
package/dist/catalog.cjs CHANGED
@@ -1520,6 +1520,7 @@ var VIDEO_MODELS = [
1520
1520
  },
1521
1521
  {
1522
1522
  // generateAudio defaults to false here (trigger-workflows); Space Builder defaults it to true.
1523
+ // omni_reference_task_type edit/extend: adaptive ratio, edit sends duration -1.
1523
1524
  id: "seedance-2.5",
1524
1525
  aliases: ["seedance-2-5", "dreamina-seedance-2-5-260628"],
1525
1526
  label: "Seedance 2.5",
@@ -1534,7 +1535,7 @@ var VIDEO_MODELS = [
1534
1535
  durations: { min: 4, max: 30 },
1535
1536
  references: { images: 30, videos: 10, audios: 10 },
1536
1537
  ratioIgnoredWith: ["firstFrame", "sourceVideo"],
1537
- supports: ["generateAudio", "seed", "lastFrame", "watermark"]
1538
+ supports: ["generateAudio", "seed", "lastFrame", "watermark", "taskType"]
1538
1539
  },
1539
1540
  defaults: {
1540
1541
  durationSeconds: 5,
@@ -1643,6 +1644,9 @@ var VIDEO_MODELS = [
1643
1644
  },
1644
1645
  {
1645
1646
  // mode standard/pro selects 720p/1080p; the endpoint takes no separate resolution.
1647
+ // Replicate: "Max 7 [images] without video, 4 with video"; 4K does not support
1648
+ // reference_video. No `videos` limit yet: the adapter sends no reference video,
1649
+ // so `imagesWithVideo` stays dormant until one is wired through.
1646
1650
  id: "kling-v3-omni-video",
1647
1651
  aliases: ["kwaivgi/kling-v3-omni-video", "kling-v3-omni"],
1648
1652
  label: "Kling V3 Omni",
@@ -1655,7 +1659,7 @@ var VIDEO_MODELS = [
1655
1659
  aspectRatios: [...KLING_RATIOS],
1656
1660
  resolutions: ["720p", "1080p"],
1657
1661
  durations: { min: 3, max: 15 },
1658
- references: { images: 7 },
1662
+ references: { images: 7, imagesWithVideo: 4 },
1659
1663
  supports: ["generateAudio", "lastFrame"]
1660
1664
  },
1661
1665
  defaults: { durationSeconds: 5, aspectRatio: "16:9", generateAudio: false, mode: "pro" },
@@ -1931,6 +1935,7 @@ var SupportedOptionSchema = import_zod.z.enum([
1931
1935
  "upscale",
1932
1936
  "watermark",
1933
1937
  "safetyChecker",
1938
+ "taskType",
1934
1939
  "instrumental"
1935
1940
  ]);
1936
1941
  var UsageUnitSchema = import_zod.z.enum([
@@ -1953,6 +1958,7 @@ var ProviderOptionValueSchema = import_zod.z.lazy(
1953
1958
  var ProviderOptionsSchema = import_zod.z.record(import_zod.z.string(), import_zod.z.record(import_zod.z.string(), ProviderOptionValueSchema));
1954
1959
  var ReferenceLimitsSchema = import_zod.z.looseObject({
1955
1960
  images: import_zod.z.number().optional(),
1961
+ imagesWithVideo: import_zod.z.number().optional(),
1956
1962
  videos: import_zod.z.number().optional(),
1957
1963
  audios: import_zod.z.number().optional(),
1958
1964
  total: import_zod.z.number().optional(),
@@ -2014,6 +2020,7 @@ var DefaultsSchema = import_zod.z.looseObject({
2014
2020
  promptExpansion: import_zod.z.enum(["fast", "balanced", "quality"]).optional(),
2015
2021
  watermark: import_zod.z.boolean().optional(),
2016
2022
  safetyChecker: import_zod.z.boolean().optional(),
2023
+ taskType: import_zod.z.enum(["reference", "edit", "extend"]).optional(),
2017
2024
  mode: import_zod.z.enum(["standard", "pro"]).optional(),
2018
2025
  instrumental: import_zod.z.boolean().optional()
2019
2026
  });
@@ -2550,6 +2557,9 @@ function resolveVideoOptions(model, request, onUnsupported = "error") {
2550
2557
  model,
2551
2558
  warnings
2552
2559
  );
2560
+ if (limits.imagesWithVideo !== void 0 && (limits.videos ?? 0) > 0 && videos.length > 0 && images.length > limits.imagesWithVideo) {
2561
+ images = trim("referenceImages", images, limits.imagesWithVideo, model, warnings);
2562
+ }
2553
2563
  if (limits.total !== void 0) {
2554
2564
  let over = images.length + videos.length + audios.length - limits.total;
2555
2565
  if (over > 0) {
@@ -2583,7 +2593,8 @@ function resolveVideoOptions(model, request, onUnsupported = "error") {
2583
2593
  "promptExpansion",
2584
2594
  "lastFrame",
2585
2595
  "watermark",
2586
- "safetyChecker"
2596
+ "safetyChecker",
2597
+ "taskType"
2587
2598
  ]);
2588
2599
  return { request: merged, warnings };
2589
2600
  }