@shop-os/modelkit 0.4.2 → 0.4.3
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 +5 -0
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,11 @@ header in the release PR.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.4.3] - Unreleased
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- Gemini Omni edits with no requested duration report the source video's length (`sourceVideo.durationSeconds`) as usage instead of the 10 s text-to-video default. Omni renders an edit at its source's length, also below 3 s (live probe 2026-10-16), so a 2 s edit was billed as 10 s. The fix applies only to callers that send a measured length: without one, or with a length that is not a positive finite number, the 10 s default stays. Extensions are unchanged.
|
|
16
|
+
|
|
12
17
|
## [0.4.2] - Unreleased
|
|
13
18
|
|
|
14
19
|
### Added
|
package/dist/index.cjs
CHANGED
|
@@ -5757,8 +5757,10 @@ async function generateOmniVideo(req, ctx, createGenAIClient) {
|
|
|
5757
5757
|
const apiKey = googleKey(ctx);
|
|
5758
5758
|
const modelId = ctx.model.id;
|
|
5759
5759
|
const providerModelId = ctx.model.providerModelId;
|
|
5760
|
-
const duration = req.durationSeconds ?? 10;
|
|
5761
5760
|
const extend = req.taskType === "extend";
|
|
5761
|
+
const sourceSeconds = extend ? void 0 : req.sourceVideo?.durationSeconds;
|
|
5762
|
+
const editSeconds = sourceSeconds !== void 0 && Number.isFinite(sourceSeconds) && sourceSeconds > 0 ? sourceSeconds : void 0;
|
|
5763
|
+
const duration = req.durationSeconds ?? editSeconds ?? 10;
|
|
5762
5764
|
const previousId = extend ? req.previousInteractionId : void 0;
|
|
5763
5765
|
const chained = previousId !== void 0;
|
|
5764
5766
|
for (const field of [
|