@shop-os/modelkit 0.2.15 → 0.2.16

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,14 @@ header in the release PR.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.2.16] - Unreleased
13
+
14
+ ### Added
15
+ - Gemini Omni 1.1 Flash video extension. The row declares `supports: ["videoExtension"]` and `constraints.extension: { segmentSeconds: 10, maxTotalSeconds: 40 }`. A `taskType: "extend"` request continues the clip by `durationSeconds` and the result is the **full cumulative clip** (probe 2026-09-24). The first extension may upload a source video (≤ 10 s, `sourceVideo`); follow-ups chain with `VideoRequest.previousInteractionId`, taken from the previous result's new `VideoResult.providerRef.interactionId`. The Interactions API rejects `previous_interaction_id` together with a video task, so chained calls carry only the prompt (no `generation_config`) and no aspect ratio.
16
+ - `SupportedOption` / catalog `supports` gain `"videoExtension"`; `ModelConstraints.extension` is typed and validated.
17
+ - A chained extension (`previousInteractionId` set) sends the prompt alone: `referenceImages`, `referenceVideos` and `firstFrame` are dropped with an `option_ignored` warning each, since the API rejects the id next to a video task.
18
+ - `resolveVideoOptions` keeps `taskType: "extend"` on a `videoExtension` row (it is otherwise dropped as unsupported) and drops `previousInteractionId` with an `option_ignored` warning on rows without the capability.
19
+
12
20
  ## [0.2.15] - Unreleased
13
21
 
14
22
  ### Added
package/dist/catalog.cjs CHANGED
@@ -1446,7 +1446,14 @@ var VIDEO_MODELS = [
1446
1446
  durations: [3, 4, 5, 6, 7, 8, 9, 10],
1447
1447
  references: { images: 6, videos: 1, videoSeconds: { max: 10 } },
1448
1448
  sourceVideoSeconds: { max: 10 },
1449
- supports: []
1449
+ // Extension (probe 2026-09-24, 360p): each `taskType: "extend"` call
1450
+ // renders `durationSeconds` more and returns the FULL cumulative clip
1451
+ // (3 s -> 6 s -> 9 s); the provider caps the clip at 40 s. A first
1452
+ // extension can upload a <= 10 s source with task "extend"; later ones
1453
+ // chain by `previousInteractionId` (the API rejects the id together
1454
+ // with a video task, so those calls carry the prompt alone).
1455
+ supports: ["videoExtension"],
1456
+ extension: { segmentSeconds: 10, maxTotalSeconds: 40 }
1450
1457
  },
1451
1458
  defaults: {},
1452
1459
  usage: { ...VIDEO_USAGE },
@@ -1454,7 +1461,7 @@ var VIDEO_MODELS = [
1454
1461
  display: {
1455
1462
  provider: "google",
1456
1463
  logo: GOOGLE_LOGO2,
1457
- description: "Google Gemini Omni Flash 1.1 conversational video generation and editing; text, image, and up to 10-second video input, 3-10 second output at up to 4K and 24 FPS."
1464
+ description: "Google Gemini Omni Flash 1.1 conversational video generation, editing and extension; text, image, and up to 10-second video input, 3-10 second output at up to 4K and 24 FPS, extendable to 40 seconds."
1458
1465
  },
1459
1466
  capabilities: { acceptsSourceVideo: true }
1460
1467
  },
@@ -2185,6 +2192,7 @@ var SupportedOptionSchema = import_zod2.z.enum([
2185
2192
  "watermark",
2186
2193
  "safetyChecker",
2187
2194
  "taskType",
2195
+ "videoExtension",
2188
2196
  "instrumental"
2189
2197
  ]);
2190
2198
  var UsageUnitSchema = import_zod2.z.enum([
@@ -2232,7 +2240,8 @@ var ModelConstraintsSchema = import_zod2.z.looseObject({
2232
2240
  requires: import_zod2.z.array(RequiredInputSchema).optional(),
2233
2241
  supports: import_zod2.z.array(SupportedOptionSchema).optional(),
2234
2242
  ratioIgnoredWith: import_zod2.z.array(import_zod2.z.enum(["firstFrame", "sourceVideo"])).optional(),
2235
- sourceVideoSeconds: VideoSecondsLimitsSchema.omit({ total: true }).extend({ inReferenceTotal: import_zod2.z.boolean().optional() }).optional()
2243
+ sourceVideoSeconds: VideoSecondsLimitsSchema.omit({ total: true }).extend({ inReferenceTotal: import_zod2.z.boolean().optional() }).optional(),
2244
+ extension: import_zod2.z.looseObject({ segmentSeconds: import_zod2.z.number(), maxTotalSeconds: import_zod2.z.number() }).optional()
2236
2245
  });
2237
2246
  var MediaRefSchema = import_zod2.z.union([
2238
2247
  import_zod2.z.looseObject({
@@ -2979,6 +2988,7 @@ function resolveVideoOptions(model, request, onUnsupported = "error") {
2979
2988
  setOrDelete(merged, "referenceImages", images);
2980
2989
  setOrDelete(merged, "referenceVideos", videos);
2981
2990
  setOrDelete(merged, "referenceAudios", audios);
2991
+ const keepExtend = merged.taskType === "extend" && (model.constraints.supports ?? []).includes("videoExtension");
2982
2992
  dropUnsupported(merged, model, warnings, [
2983
2993
  "seed",
2984
2994
  "negativePrompt",
@@ -2988,8 +2998,17 @@ function resolveVideoOptions(model, request, onUnsupported = "error") {
2988
2998
  "lastFrame",
2989
2999
  "watermark",
2990
3000
  "safetyChecker",
2991
- "taskType"
3001
+ ...keepExtend ? [] : ["taskType"]
2992
3002
  ]);
3003
+ if (merged.previousInteractionId !== void 0 && !keepExtend) {
3004
+ warnings.push({
3005
+ code: "option_ignored",
3006
+ field: "previousInteractionId",
3007
+ from: merged.previousInteractionId,
3008
+ message: `${model.id} does not support previousInteractionId; ignored`
3009
+ });
3010
+ delete merged.previousInteractionId;
3011
+ }
2993
3012
  return { request: merged, warnings };
2994
3013
  }
2995
3014
  function resolveAudioOptions(model, request, onUnsupported = "error") {