@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.
@@ -103,6 +103,8 @@ interface VideoRequest {
103
103
  watermark?: boolean;
104
104
  /** Provider-side safety checker toggle (fal MiniMax). Provider default when unset. */
105
105
  safetyChecker?: boolean;
106
+ /** Seedance omni-reference subtask hint. `edit` forces duration -1 and adaptive ratio. */
107
+ taskType?: "reference" | "edit" | "extend";
106
108
  mode?: "standard" | "pro";
107
109
  }
108
110
  /**
@@ -154,9 +156,11 @@ interface MediaPart {
154
156
  cleanup?: () => Promise<void>;
155
157
  }
156
158
  type RequiredInput = "firstFrame" | "sourceVideo" | "references";
157
- type SupportedOption = "seed" | "quality" | "negativePrompt" | "cfgScale" | "generateAudio" | "promptExpansion" | "lastFrame" | "count" | "outputFormat" | "scaleFactor" | "safetySettings" | "temperature" | "upscale" | "watermark" | "safetyChecker" | "instrumental";
159
+ type SupportedOption = "seed" | "quality" | "negativePrompt" | "cfgScale" | "generateAudio" | "promptExpansion" | "lastFrame" | "count" | "outputFormat" | "scaleFactor" | "safetySettings" | "temperature" | "upscale" | "watermark" | "safetyChecker" | "taskType" | "instrumental";
158
160
  interface ReferenceLimits {
159
161
  images?: number;
162
+ /** Lower image cap when a reference video is also sent (Kling V3 Omni: 7 → 4). */
163
+ imagesWithVideo?: number;
160
164
  videos?: number;
161
165
  audios?: number;
162
166
  total?: number;
package/dist/catalog.d.ts CHANGED
@@ -103,6 +103,8 @@ interface VideoRequest {
103
103
  watermark?: boolean;
104
104
  /** Provider-side safety checker toggle (fal MiniMax). Provider default when unset. */
105
105
  safetyChecker?: boolean;
106
+ /** Seedance omni-reference subtask hint. `edit` forces duration -1 and adaptive ratio. */
107
+ taskType?: "reference" | "edit" | "extend";
106
108
  mode?: "standard" | "pro";
107
109
  }
108
110
  /**
@@ -154,9 +156,11 @@ interface MediaPart {
154
156
  cleanup?: () => Promise<void>;
155
157
  }
156
158
  type RequiredInput = "firstFrame" | "sourceVideo" | "references";
157
- type SupportedOption = "seed" | "quality" | "negativePrompt" | "cfgScale" | "generateAudio" | "promptExpansion" | "lastFrame" | "count" | "outputFormat" | "scaleFactor" | "safetySettings" | "temperature" | "upscale" | "watermark" | "safetyChecker" | "instrumental";
159
+ type SupportedOption = "seed" | "quality" | "negativePrompt" | "cfgScale" | "generateAudio" | "promptExpansion" | "lastFrame" | "count" | "outputFormat" | "scaleFactor" | "safetySettings" | "temperature" | "upscale" | "watermark" | "safetyChecker" | "taskType" | "instrumental";
158
160
  interface ReferenceLimits {
159
161
  images?: number;
162
+ /** Lower image cap when a reference video is also sent (Kling V3 Omni: 7 → 4). */
163
+ imagesWithVideo?: number;
160
164
  videos?: number;
161
165
  audios?: number;
162
166
  total?: number;
package/dist/catalog.js CHANGED
@@ -1467,6 +1467,7 @@ var VIDEO_MODELS = [
1467
1467
  },
1468
1468
  {
1469
1469
  // generateAudio defaults to false here (trigger-workflows); Space Builder defaults it to true.
1470
+ // omni_reference_task_type edit/extend: adaptive ratio, edit sends duration -1.
1470
1471
  id: "seedance-2.5",
1471
1472
  aliases: ["seedance-2-5", "dreamina-seedance-2-5-260628"],
1472
1473
  label: "Seedance 2.5",
@@ -1481,7 +1482,7 @@ var VIDEO_MODELS = [
1481
1482
  durations: { min: 4, max: 30 },
1482
1483
  references: { images: 30, videos: 10, audios: 10 },
1483
1484
  ratioIgnoredWith: ["firstFrame", "sourceVideo"],
1484
- supports: ["generateAudio", "seed", "lastFrame", "watermark"]
1485
+ supports: ["generateAudio", "seed", "lastFrame", "watermark", "taskType"]
1485
1486
  },
1486
1487
  defaults: {
1487
1488
  durationSeconds: 5,
@@ -1590,6 +1591,9 @@ var VIDEO_MODELS = [
1590
1591
  },
1591
1592
  {
1592
1593
  // mode standard/pro selects 720p/1080p; the endpoint takes no separate resolution.
1594
+ // Replicate: "Max 7 [images] without video, 4 with video"; 4K does not support
1595
+ // reference_video. No `videos` limit yet: the adapter sends no reference video,
1596
+ // so `imagesWithVideo` stays dormant until one is wired through.
1593
1597
  id: "kling-v3-omni-video",
1594
1598
  aliases: ["kwaivgi/kling-v3-omni-video", "kling-v3-omni"],
1595
1599
  label: "Kling V3 Omni",
@@ -1602,7 +1606,7 @@ var VIDEO_MODELS = [
1602
1606
  aspectRatios: [...KLING_RATIOS],
1603
1607
  resolutions: ["720p", "1080p"],
1604
1608
  durations: { min: 3, max: 15 },
1605
- references: { images: 7 },
1609
+ references: { images: 7, imagesWithVideo: 4 },
1606
1610
  supports: ["generateAudio", "lastFrame"]
1607
1611
  },
1608
1612
  defaults: { durationSeconds: 5, aspectRatio: "16:9", generateAudio: false, mode: "pro" },
@@ -1878,6 +1882,7 @@ var SupportedOptionSchema = z.enum([
1878
1882
  "upscale",
1879
1883
  "watermark",
1880
1884
  "safetyChecker",
1885
+ "taskType",
1881
1886
  "instrumental"
1882
1887
  ]);
1883
1888
  var UsageUnitSchema = z.enum([
@@ -1900,6 +1905,7 @@ var ProviderOptionValueSchema = z.lazy(
1900
1905
  var ProviderOptionsSchema = z.record(z.string(), z.record(z.string(), ProviderOptionValueSchema));
1901
1906
  var ReferenceLimitsSchema = z.looseObject({
1902
1907
  images: z.number().optional(),
1908
+ imagesWithVideo: z.number().optional(),
1903
1909
  videos: z.number().optional(),
1904
1910
  audios: z.number().optional(),
1905
1911
  total: z.number().optional(),
@@ -1961,6 +1967,7 @@ var DefaultsSchema = z.looseObject({
1961
1967
  promptExpansion: z.enum(["fast", "balanced", "quality"]).optional(),
1962
1968
  watermark: z.boolean().optional(),
1963
1969
  safetyChecker: z.boolean().optional(),
1970
+ taskType: z.enum(["reference", "edit", "extend"]).optional(),
1964
1971
  mode: z.enum(["standard", "pro"]).optional(),
1965
1972
  instrumental: z.boolean().optional()
1966
1973
  });
@@ -2497,6 +2504,9 @@ function resolveVideoOptions(model, request, onUnsupported = "error") {
2497
2504
  model,
2498
2505
  warnings
2499
2506
  );
2507
+ if (limits.imagesWithVideo !== void 0 && (limits.videos ?? 0) > 0 && videos.length > 0 && images.length > limits.imagesWithVideo) {
2508
+ images = trim("referenceImages", images, limits.imagesWithVideo, model, warnings);
2509
+ }
2500
2510
  if (limits.total !== void 0) {
2501
2511
  let over = images.length + videos.length + audios.length - limits.total;
2502
2512
  if (over > 0) {
@@ -2530,7 +2540,8 @@ function resolveVideoOptions(model, request, onUnsupported = "error") {
2530
2540
  "promptExpansion",
2531
2541
  "lastFrame",
2532
2542
  "watermark",
2533
- "safetyChecker"
2543
+ "safetyChecker",
2544
+ "taskType"
2534
2545
  ]);
2535
2546
  return { request: merged, warnings };
2536
2547
  }