@picsart/ai-sdk 6.53.0 → 6.53.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/index.js +21 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1669,7 +1669,7 @@ var { MODELS } = defineModels("kling", [
|
|
|
1669
1669
|
// ── Video: Kling 4.0 Omni (dedicated /omni-video/kling-4.0 tasks API) ──
|
|
1670
1670
|
{
|
|
1671
1671
|
id: "kling-v4-omni",
|
|
1672
|
-
name: "Kling 4.0
|
|
1672
|
+
name: "Kling 4.0 Omni",
|
|
1673
1673
|
modelId: "kling-v4-omni",
|
|
1674
1674
|
addedAt: "2026-10-16",
|
|
1675
1675
|
workflow: "kling-omni-video",
|
|
@@ -4565,6 +4565,8 @@ var seedance25ColorDepthConstraints = [
|
|
|
4565
4565
|
}
|
|
4566
4566
|
];
|
|
4567
4567
|
var SEEDANCE_25_FRAME_ADAPTIVE_REASON = "First/Last Frame mode requires an adaptive aspect ratio \u2014 the vendor rejects any fixed ratio.";
|
|
4568
|
+
var SEEDANCE_25_EDIT_REASON = "An edit follows its source video \u2014 the vendor requires an adaptive aspect ratio and Auto duration.";
|
|
4569
|
+
var SEEDANCE_25_EXTEND_REASON = "An extension follows its source video \u2014 the vendor requires an adaptive aspect ratio.";
|
|
4568
4570
|
var seedance25Constraints = [
|
|
4569
4571
|
...seedance20Constraints.slice(1),
|
|
4570
4572
|
{
|
|
@@ -4586,6 +4588,20 @@ var seedance25Constraints = [
|
|
|
4586
4588
|
when: { endFrame: { exists: true } },
|
|
4587
4589
|
then: { aspectRatio: { allowed: ["adaptive"], reason: SEEDANCE_25_FRAME_ADAPTIVE_REASON } }
|
|
4588
4590
|
},
|
|
4591
|
+
// An explicit edit / extend task type carries the same vendor rules as the
|
|
4592
|
+
// -video-edit / -video-extend entries, which hardcode them. Mirrors the
|
|
4593
|
+
// lock in buildSeedance25PayloadFor.
|
|
4594
|
+
{
|
|
4595
|
+
when: { omniReferenceTaskType: { is: "edit" } },
|
|
4596
|
+
then: {
|
|
4597
|
+
aspectRatio: { allowed: ["adaptive"], reason: SEEDANCE_25_EDIT_REASON },
|
|
4598
|
+
duration: { allowed: [-1], reason: SEEDANCE_25_EDIT_REASON }
|
|
4599
|
+
}
|
|
4600
|
+
},
|
|
4601
|
+
{
|
|
4602
|
+
when: { omniReferenceTaskType: { is: "extend" } },
|
|
4603
|
+
then: { aspectRatio: { allowed: ["adaptive"], reason: SEEDANCE_25_EXTEND_REASON } }
|
|
4604
|
+
},
|
|
4589
4605
|
...seedance25ColorDepthConstraints
|
|
4590
4606
|
];
|
|
4591
4607
|
var seedance25OutputFormat = (ctx) => {
|
|
@@ -4666,6 +4682,8 @@ var buildSeedance25PayloadFor = (modelAlias) => withSeedance25DraftMode(modelAli
|
|
|
4666
4682
|
const refAudios = ctx.audioUrls ?? [];
|
|
4667
4683
|
const usesFrame = Boolean(ctx.startFrame || ctx.endFrame);
|
|
4668
4684
|
const { omniReferenceTaskType } = ctx;
|
|
4685
|
+
const isEdit = omniReferenceTaskType === "edit";
|
|
4686
|
+
const followsSource = isEdit || omniReferenceTaskType === "extend";
|
|
4669
4687
|
return {
|
|
4670
4688
|
model: modelAlias,
|
|
4671
4689
|
content: [
|
|
@@ -4690,8 +4708,8 @@ var buildSeedance25PayloadFor = (modelAlias) => withSeedance25DraftMode(modelAli
|
|
|
4690
4708
|
// text item is not sent.
|
|
4691
4709
|
...ctx.prompt?.trim() ? [{ type: "text", text: ctx.prompt }] : []
|
|
4692
4710
|
],
|
|
4693
|
-
ratio: usesFrame ? "adaptive" : ctx.aspectRatio ?? "16:9",
|
|
4694
|
-
duration: ctx.duration ?? 5,
|
|
4711
|
+
ratio: usesFrame || followsSource ? "adaptive" : ctx.aspectRatio ?? "16:9",
|
|
4712
|
+
duration: isEdit ? -1 : ctx.duration ?? 5,
|
|
4695
4713
|
resolution: ctx.resolution ?? "1080p",
|
|
4696
4714
|
generate_audio: ctx.generateAudio ?? true,
|
|
4697
4715
|
output_format: seedance25OutputFormat(ctx),
|