@shop-os/modelkit 0.18.0 → 0.18.1

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/index.cjs CHANGED
@@ -6197,6 +6197,44 @@ var VIDEO_MODELS = [
6197
6197
  lastFrameRequiresFirstFrame: true
6198
6198
  }
6199
6199
  },
6200
+ {
6201
+ // https://aistudio.google.com/docs/omni (2026-11-05): the 1.1 Interactions API with
6202
+ // 3-15 s output; first-to-last-frame and each extension stay at 3-10 s (the adapter
6203
+ // refuses more), extended clips stop at 30 s, and 11-15 s clips take one reference video.
6204
+ id: "gemini-omni-1.2-flash",
6205
+ aliases: ["gemini-omni-1.2-video", "gemini-omni-1.2-reference", "gemini-omni-1.2-edit"],
6206
+ label: "Gemini Omni 1.2 Flash",
6207
+ type: "video",
6208
+ adapter: "google-genai",
6209
+ providerModelId: "gemini-omni-1.2-flash",
6210
+ lifecycle: "active",
6211
+ exposure: ["cowork", "space_builder"],
6212
+ constraints: {
6213
+ aspectRatios: [...OMNI_RATIOS],
6214
+ resolutions: ["360p", "720p", "1080p", "4k"],
6215
+ durations: { min: 3, max: 15 },
6216
+ durationPresets: [3, 5, 8, 10, 15],
6217
+ references: { images: 6, videos: 1, videoSeconds: { max: 10 } },
6218
+ sourceVideoSeconds: { max: 15 },
6219
+ supports: ["videoExtension", "lastFrame"],
6220
+ extension: { segmentSeconds: 10, maxTotalSeconds: 30, returns: "joined" },
6221
+ prompt: OMNI_PROMPT,
6222
+ audio: "always"
6223
+ },
6224
+ defaults: {},
6225
+ usage: { ...VIDEO_USAGE3 },
6226
+ pricingKind: "video_per_second",
6227
+ display: {
6228
+ provider: "google",
6229
+ logo: GOOGLE_LOGO3,
6230
+ description: "Google Gemini Omni Flash 1.2 conversational video generation, editing and extension; text, image, and up to 15-second video input, 3-15 second output at up to 4K and 24 FPS (start and end frames up to 10 seconds), extendable to 30 seconds."
6231
+ },
6232
+ capabilities: {
6233
+ acceptsSourceVideo: true,
6234
+ videoEdit: true,
6235
+ lastFrameRequiresFirstFrame: true
6236
+ }
6237
+ },
6200
6238
  {
6201
6239
  // vibe-triggers and Space Builder drop the ratio when a frame is wired; Cowork always sends it.
6202
6240
  id: "seedance-2.0",
@@ -14009,6 +14047,7 @@ var VEO_POLL_INTERVAL_MS = 5e3;
14009
14047
  var OMNI_POLL_INTERVAL_MS = 1e4;
14010
14048
  var RESULT_TIMEOUT_MS3 = 15 * 60 * 1e3;
14011
14049
  var OMNI_INLINE_LIMIT_BYTES = 4 * 1024 * 1024;
14050
+ var OMNI_FRAMES_MAX_SECONDS = 10;
14012
14051
  var MEDIA_PART_INLINE_LIMIT_BYTES = 10 * 1024 * 1024;
14013
14052
  var errorTextSchema = import_zod24.z.string();
14014
14053
  function isGoogleGenaiVideoKnown(providerModelId) {
@@ -14323,6 +14362,13 @@ async function generateOmniVideo(req, ctx, createGenAIClient) {
14323
14362
  model: modelId
14324
14363
  });
14325
14364
  }
14365
+ if ((extend || lastFrame !== void 0) && duration > OMNI_FRAMES_MAX_SECONDS) {
14366
+ throw new ModelKitError({
14367
+ code: "unsupported_option",
14368
+ message: `${modelId} ${extend ? "extension" : "start-and-end-frame video"} is at most ${OMNI_FRAMES_MAX_SECONDS} s; got ${duration} s`,
14369
+ model: modelId
14370
+ });
14371
+ }
14326
14372
  const task = extend ? "extend" : req.sourceVideo ? "edit" : firstFrame ? "image_to_video" : images.length > 0 || videos.length > 0 ? "reference_to_video" : "text_to_video";
14327
14373
  const isOmniV1 = providerModelId === "gemini-omni-flash-preview";
14328
14374
  const responseFormat = { type: "video", delivery: "uri" };