@shop-os/modelkit 0.18.0 → 0.18.2

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
@@ -5013,6 +5013,7 @@ var TEXT_MODELS = [
5013
5013
  description: "Anthropic Claude Fable 5 (legacy) model for demanding reasoning and long-horizon agentic work; text and image input, 1M-token context."
5014
5014
  },
5015
5015
  capabilities: {
5016
+ reasoning: true,
5016
5017
  vision: true,
5017
5018
  contextWindow: 1e6
5018
5019
  }
@@ -6197,6 +6198,44 @@ var VIDEO_MODELS = [
6197
6198
  lastFrameRequiresFirstFrame: true
6198
6199
  }
6199
6200
  },
6201
+ {
6202
+ // https://aistudio.google.com/docs/omni (2026-11-05): the 1.1 Interactions API with
6203
+ // 3-15 s output; first-to-last-frame and each extension stay at 3-10 s (the adapter
6204
+ // refuses more), extended clips stop at 30 s, and 11-15 s clips take one reference video.
6205
+ id: "gemini-omni-1.2-flash",
6206
+ aliases: ["gemini-omni-1.2-video", "gemini-omni-1.2-reference", "gemini-omni-1.2-edit"],
6207
+ label: "Gemini Omni 1.2 Flash",
6208
+ type: "video",
6209
+ adapter: "google-genai",
6210
+ providerModelId: "gemini-omni-1.2-flash",
6211
+ lifecycle: "active",
6212
+ exposure: ["cowork", "space_builder"],
6213
+ constraints: {
6214
+ aspectRatios: [...OMNI_RATIOS],
6215
+ resolutions: ["360p", "720p", "1080p", "4k"],
6216
+ durations: { min: 3, max: 15 },
6217
+ durationPresets: [3, 5, 8, 10, 15],
6218
+ references: { images: 6, videos: 1, videoSeconds: { max: 10 } },
6219
+ sourceVideoSeconds: { max: 15 },
6220
+ supports: ["videoExtension", "lastFrame"],
6221
+ extension: { segmentSeconds: 10, maxTotalSeconds: 30, returns: "joined" },
6222
+ prompt: OMNI_PROMPT,
6223
+ audio: "always"
6224
+ },
6225
+ defaults: {},
6226
+ usage: { ...VIDEO_USAGE3 },
6227
+ pricingKind: "video_per_second",
6228
+ display: {
6229
+ provider: "google",
6230
+ logo: GOOGLE_LOGO3,
6231
+ 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."
6232
+ },
6233
+ capabilities: {
6234
+ acceptsSourceVideo: true,
6235
+ videoEdit: true,
6236
+ lastFrameRequiresFirstFrame: true
6237
+ }
6238
+ },
6200
6239
  {
6201
6240
  // vibe-triggers and Space Builder drop the ratio when a frame is wired; Cowork always sends it.
6202
6241
  id: "seedance-2.0",
@@ -6452,7 +6491,12 @@ var VIDEO_MODELS = [
6452
6491
  prompt: KLING_PROMPT2,
6453
6492
  audio: "optional"
6454
6493
  },
6455
- defaults: { durationSeconds: 5, aspectRatio: "16:9", generateAudio: true, mode: "pro" },
6494
+ defaults: {
6495
+ durationSeconds: 5,
6496
+ aspectRatio: "16:9",
6497
+ generateAudio: true,
6498
+ mode: "standard"
6499
+ },
6456
6500
  usage: { ...VIDEO_USAGE3 },
6457
6501
  pricingKind: "video_per_second",
6458
6502
  display: {
@@ -14009,6 +14053,7 @@ var VEO_POLL_INTERVAL_MS = 5e3;
14009
14053
  var OMNI_POLL_INTERVAL_MS = 1e4;
14010
14054
  var RESULT_TIMEOUT_MS3 = 15 * 60 * 1e3;
14011
14055
  var OMNI_INLINE_LIMIT_BYTES = 4 * 1024 * 1024;
14056
+ var OMNI_FRAMES_MAX_SECONDS = 10;
14012
14057
  var MEDIA_PART_INLINE_LIMIT_BYTES = 10 * 1024 * 1024;
14013
14058
  var errorTextSchema = import_zod24.z.string();
14014
14059
  function isGoogleGenaiVideoKnown(providerModelId) {
@@ -14323,6 +14368,13 @@ async function generateOmniVideo(req, ctx, createGenAIClient) {
14323
14368
  model: modelId
14324
14369
  });
14325
14370
  }
14371
+ if ((extend || lastFrame !== void 0) && duration > OMNI_FRAMES_MAX_SECONDS) {
14372
+ throw new ModelKitError({
14373
+ code: "unsupported_option",
14374
+ message: `${modelId} ${extend ? "extension" : "start-and-end-frame video"} is at most ${OMNI_FRAMES_MAX_SECONDS} s; got ${duration} s`,
14375
+ model: modelId
14376
+ });
14377
+ }
14326
14378
  const task = extend ? "extend" : req.sourceVideo ? "edit" : firstFrame ? "image_to_video" : images.length > 0 || videos.length > 0 ? "reference_to_video" : "text_to_video";
14327
14379
  const isOmniV1 = providerModelId === "gemini-omni-flash-preview";
14328
14380
  const responseFormat = { type: "video", delivery: "uri" };