@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/CHANGELOG.md +10 -0
- package/dist/catalog.cjs +38 -0
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.js +38 -0
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +46 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6047,6 +6047,44 @@ var VIDEO_MODELS = [
|
|
|
6047
6047
|
lastFrameRequiresFirstFrame: true
|
|
6048
6048
|
}
|
|
6049
6049
|
},
|
|
6050
|
+
{
|
|
6051
|
+
// https://aistudio.google.com/docs/omni (2026-11-05): the 1.1 Interactions API with
|
|
6052
|
+
// 3-15 s output; first-to-last-frame and each extension stay at 3-10 s (the adapter
|
|
6053
|
+
// refuses more), extended clips stop at 30 s, and 11-15 s clips take one reference video.
|
|
6054
|
+
id: "gemini-omni-1.2-flash",
|
|
6055
|
+
aliases: ["gemini-omni-1.2-video", "gemini-omni-1.2-reference", "gemini-omni-1.2-edit"],
|
|
6056
|
+
label: "Gemini Omni 1.2 Flash",
|
|
6057
|
+
type: "video",
|
|
6058
|
+
adapter: "google-genai",
|
|
6059
|
+
providerModelId: "gemini-omni-1.2-flash",
|
|
6060
|
+
lifecycle: "active",
|
|
6061
|
+
exposure: ["cowork", "space_builder"],
|
|
6062
|
+
constraints: {
|
|
6063
|
+
aspectRatios: [...OMNI_RATIOS],
|
|
6064
|
+
resolutions: ["360p", "720p", "1080p", "4k"],
|
|
6065
|
+
durations: { min: 3, max: 15 },
|
|
6066
|
+
durationPresets: [3, 5, 8, 10, 15],
|
|
6067
|
+
references: { images: 6, videos: 1, videoSeconds: { max: 10 } },
|
|
6068
|
+
sourceVideoSeconds: { max: 15 },
|
|
6069
|
+
supports: ["videoExtension", "lastFrame"],
|
|
6070
|
+
extension: { segmentSeconds: 10, maxTotalSeconds: 30, returns: "joined" },
|
|
6071
|
+
prompt: OMNI_PROMPT,
|
|
6072
|
+
audio: "always"
|
|
6073
|
+
},
|
|
6074
|
+
defaults: {},
|
|
6075
|
+
usage: { ...VIDEO_USAGE3 },
|
|
6076
|
+
pricingKind: "video_per_second",
|
|
6077
|
+
display: {
|
|
6078
|
+
provider: "google",
|
|
6079
|
+
logo: GOOGLE_LOGO3,
|
|
6080
|
+
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."
|
|
6081
|
+
},
|
|
6082
|
+
capabilities: {
|
|
6083
|
+
acceptsSourceVideo: true,
|
|
6084
|
+
videoEdit: true,
|
|
6085
|
+
lastFrameRequiresFirstFrame: true
|
|
6086
|
+
}
|
|
6087
|
+
},
|
|
6050
6088
|
{
|
|
6051
6089
|
// vibe-triggers and Space Builder drop the ratio when a frame is wired; Cowork always sends it.
|
|
6052
6090
|
id: "seedance-2.0",
|
|
@@ -13861,6 +13899,7 @@ var VEO_POLL_INTERVAL_MS = 5e3;
|
|
|
13861
13899
|
var OMNI_POLL_INTERVAL_MS = 1e4;
|
|
13862
13900
|
var RESULT_TIMEOUT_MS3 = 15 * 60 * 1e3;
|
|
13863
13901
|
var OMNI_INLINE_LIMIT_BYTES = 4 * 1024 * 1024;
|
|
13902
|
+
var OMNI_FRAMES_MAX_SECONDS = 10;
|
|
13864
13903
|
var MEDIA_PART_INLINE_LIMIT_BYTES = 10 * 1024 * 1024;
|
|
13865
13904
|
var errorTextSchema = z24.string();
|
|
13866
13905
|
function isGoogleGenaiVideoKnown(providerModelId) {
|
|
@@ -14175,6 +14214,13 @@ async function generateOmniVideo(req, ctx, createGenAIClient) {
|
|
|
14175
14214
|
model: modelId
|
|
14176
14215
|
});
|
|
14177
14216
|
}
|
|
14217
|
+
if ((extend || lastFrame !== void 0) && duration > OMNI_FRAMES_MAX_SECONDS) {
|
|
14218
|
+
throw new ModelKitError({
|
|
14219
|
+
code: "unsupported_option",
|
|
14220
|
+
message: `${modelId} ${extend ? "extension" : "start-and-end-frame video"} is at most ${OMNI_FRAMES_MAX_SECONDS} s; got ${duration} s`,
|
|
14221
|
+
model: modelId
|
|
14222
|
+
});
|
|
14223
|
+
}
|
|
14178
14224
|
const task = extend ? "extend" : req.sourceVideo ? "edit" : firstFrame ? "image_to_video" : images.length > 0 || videos.length > 0 ? "reference_to_video" : "text_to_video";
|
|
14179
14225
|
const isOmniV1 = providerModelId === "gemini-omni-flash-preview";
|
|
14180
14226
|
const responseFormat = { type: "video", delivery: "uri" };
|