@nodaro/shared 3.65.0 → 3.66.0
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/{chunk-GJ3D5X4X.cjs → chunk-23IKLMRL.cjs} +41 -41
- package/dist/{chunk-GJ3D5X4X.cjs.map → chunk-23IKLMRL.cjs.map} +1 -1
- package/dist/{chunk-E66HSC2E.cjs → chunk-37ZSFS6A.cjs} +9 -9
- package/dist/{chunk-E66HSC2E.cjs.map → chunk-37ZSFS6A.cjs.map} +1 -1
- package/dist/{chunk-K6RIN3LW.cjs → chunk-3L7GMQ4M.cjs} +47 -47
- package/dist/chunk-3L7GMQ4M.cjs.map +1 -0
- package/dist/{chunk-YMZUE2IX.js → chunk-3QJ3UR5Z.js} +9 -9
- package/dist/{chunk-YMZUE2IX.js.map → chunk-3QJ3UR5Z.js.map} +1 -1
- package/dist/{chunk-Q4YOLT4M.js → chunk-3YWZ5SOZ.js} +5 -5
- package/dist/{chunk-Q4YOLT4M.js.map → chunk-3YWZ5SOZ.js.map} +1 -1
- package/dist/{chunk-2NKF476Z.js → chunk-5GG4CG4Y.js} +3 -3
- package/dist/{chunk-2NKF476Z.js.map → chunk-5GG4CG4Y.js.map} +1 -1
- package/dist/{chunk-ZSRXY5YT.js → chunk-5IZHECUP.js} +3 -3
- package/dist/{chunk-ZSRXY5YT.js.map → chunk-5IZHECUP.js.map} +1 -1
- package/dist/{chunk-D5Y3EYRM.js → chunk-5J2LIQYU.js} +5 -5
- package/dist/{chunk-D5Y3EYRM.js.map → chunk-5J2LIQYU.js.map} +1 -1
- package/dist/{chunk-BSTAAGLY.js → chunk-5LWYX4GV.js} +3 -3
- package/dist/{chunk-BSTAAGLY.js.map → chunk-5LWYX4GV.js.map} +1 -1
- package/dist/{chunk-JYU5EIRM.cjs → chunk-66QSUUB4.cjs} +12 -12
- package/dist/{chunk-JYU5EIRM.cjs.map → chunk-66QSUUB4.cjs.map} +1 -1
- package/dist/{chunk-7BN4EDIC.cjs → chunk-BMDOPJBP.cjs} +17 -17
- package/dist/{chunk-7BN4EDIC.cjs.map → chunk-BMDOPJBP.cjs.map} +1 -1
- package/dist/{chunk-222QM7CO.js → chunk-BNR5FKL5.js} +3 -3
- package/dist/{chunk-222QM7CO.js.map → chunk-BNR5FKL5.js.map} +1 -1
- package/dist/{chunk-FI3HJZWM.cjs → chunk-E62W5I6A.cjs} +6 -2
- package/dist/chunk-E62W5I6A.cjs.map +1 -0
- package/dist/{chunk-MIT2USTS.cjs → chunk-EFYWV2V5.cjs} +61 -61
- package/dist/{chunk-MIT2USTS.cjs.map → chunk-EFYWV2V5.cjs.map} +1 -1
- package/dist/{chunk-RP4KQUNU.cjs → chunk-F6XIH3TZ.cjs} +9 -9
- package/dist/{chunk-RP4KQUNU.cjs.map → chunk-F6XIH3TZ.cjs.map} +1 -1
- package/dist/{chunk-KTCEKGBJ.cjs → chunk-G2G7XGFU.cjs} +7 -7
- package/dist/{chunk-KTCEKGBJ.cjs.map → chunk-G2G7XGFU.cjs.map} +1 -1
- package/dist/{chunk-HAH2F7LT.js → chunk-GF7ZA26H.js} +4 -4
- package/dist/{chunk-HAH2F7LT.js.map → chunk-GF7ZA26H.js.map} +1 -1
- package/dist/{chunk-FJZTQTF4.cjs → chunk-GNLA5NTT.cjs} +4 -4
- package/dist/{chunk-FJZTQTF4.cjs.map → chunk-GNLA5NTT.cjs.map} +1 -1
- package/dist/{chunk-ST7OBB5J.js → chunk-GTBW2KAY.js} +4 -4
- package/dist/{chunk-ST7OBB5J.js.map → chunk-GTBW2KAY.js.map} +1 -1
- package/dist/{chunk-R5ILCNCC.cjs → chunk-HTDKEYMY.cjs} +75 -75
- package/dist/{chunk-R5ILCNCC.cjs.map → chunk-HTDKEYMY.cjs.map} +1 -1
- package/dist/{chunk-DQ2PARNH.cjs → chunk-IWUW3YPM.cjs} +5 -5
- package/dist/{chunk-DQ2PARNH.cjs.map → chunk-IWUW3YPM.cjs.map} +1 -1
- package/dist/{chunk-6OSIOVF7.cjs → chunk-JTYCJ5OL.cjs} +16 -16
- package/dist/{chunk-6OSIOVF7.cjs.map → chunk-JTYCJ5OL.cjs.map} +1 -1
- package/dist/{chunk-JQMFJAYU.cjs → chunk-M5QY464F.cjs} +21 -21
- package/dist/{chunk-JQMFJAYU.cjs.map → chunk-M5QY464F.cjs.map} +1 -1
- package/dist/{chunk-CW6MMQNO.js → chunk-MVXZP6VB.js} +6 -2
- package/dist/chunk-MVXZP6VB.js.map +1 -0
- package/dist/{chunk-H745DQ6V.js → chunk-OFQ6CU6S.js} +3 -3
- package/dist/{chunk-H745DQ6V.js.map → chunk-OFQ6CU6S.js.map} +1 -1
- package/dist/{chunk-XJANKTIL.js → chunk-OXBU5AGH.js} +3 -3
- package/dist/{chunk-XJANKTIL.js.map → chunk-OXBU5AGH.js.map} +1 -1
- package/dist/{chunk-SPU7MUWE.cjs → chunk-OXTF4Y3P.cjs} +6 -6
- package/dist/{chunk-SPU7MUWE.cjs.map → chunk-OXTF4Y3P.cjs.map} +1 -1
- package/dist/{chunk-5SSMPYE5.js → chunk-PAUWEWTY.js} +5 -5
- package/dist/chunk-PAUWEWTY.js.map +1 -0
- package/dist/{chunk-KWYS4IIM.cjs → chunk-PJAJCFLP.cjs} +49 -38
- package/dist/chunk-PJAJCFLP.cjs.map +1 -0
- package/dist/{chunk-7OWXHW7Z.js → chunk-RVQW623D.js} +6 -6
- package/dist/{chunk-7OWXHW7Z.js.map → chunk-RVQW623D.js.map} +1 -1
- package/dist/{chunk-V5NLQ4L5.js → chunk-SCDE676D.js} +5 -5
- package/dist/{chunk-V5NLQ4L5.js.map → chunk-SCDE676D.js.map} +1 -1
- package/dist/{chunk-3AU52TSW.js → chunk-SW5ZD7BO.js} +3 -3
- package/dist/{chunk-3AU52TSW.js.map → chunk-SW5ZD7BO.js.map} +1 -1
- package/dist/{chunk-WQMPIURW.cjs → chunk-T4GIHHXY.cjs} +6 -6
- package/dist/{chunk-WQMPIURW.cjs.map → chunk-T4GIHHXY.cjs.map} +1 -1
- package/dist/{chunk-PL7AQQV7.js → chunk-VBP4DH37.js} +18 -10
- package/dist/chunk-VBP4DH37.js.map +1 -0
- package/dist/{chunk-YD4XY74W.cjs → chunk-X2YHKP4D.cjs} +8 -8
- package/dist/{chunk-YD4XY74W.cjs.map → chunk-X2YHKP4D.cjs.map} +1 -1
- package/dist/{chunk-6X5PBAC4.js → chunk-XEPKONJC.js} +3 -3
- package/dist/{chunk-6X5PBAC4.js.map → chunk-XEPKONJC.js.map} +1 -1
- package/dist/entries/apps.cjs +42 -42
- package/dist/entries/apps.js +7 -7
- package/dist/entries/credits.cjs +217 -217
- package/dist/entries/credits.d.cts +2 -2
- package/dist/entries/credits.d.ts +2 -2
- package/dist/entries/credits.js +9 -9
- package/dist/entries/llm-models.d.cts +2 -2
- package/dist/entries/llm-models.d.ts +2 -2
- package/dist/entries/model-catalog.cjs +133 -133
- package/dist/entries/model-catalog.d.cts +3 -3
- package/dist/entries/model-catalog.d.ts +3 -3
- package/dist/entries/model-catalog.js +4 -4
- package/dist/entries/models.cjs +403 -391
- package/dist/entries/models.d.cts +5 -5
- package/dist/entries/models.d.ts +5 -5
- package/dist/entries/models.js +5 -5
- package/dist/entries/nodes.cjs +212 -212
- package/dist/entries/nodes.d.cts +1 -1
- package/dist/entries/nodes.d.ts +1 -1
- package/dist/entries/nodes.js +8 -8
- package/dist/entries/pipeline.cjs +153 -153
- package/dist/entries/pipeline.d.cts +2 -2
- package/dist/entries/pipeline.d.ts +2 -2
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +152 -152
- package/dist/entries/video.d.cts +15 -10
- package/dist/entries/video.d.ts +15 -10
- package/dist/entries/video.js +6 -6
- package/dist/entries/workflow.d.cts +1 -1
- package/dist/entries/workflow.d.ts +1 -1
- package/dist/index.cjs +1355 -1343
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +18 -18
- package/dist/{model-catalog-BoUKGFNl.d.cts → model-catalog-B-aQnUS8.d.cts} +19 -1
- package/dist/{model-catalog-BoUKGFNl.d.ts → model-catalog-B-aQnUS8.d.ts} +19 -1
- package/dist/{model-constants-CpQz1bGa.d.cts → model-constants-BstsUup6.d.cts} +52 -2
- package/dist/{model-constants-BElS3AeE.d.ts → model-constants-DZ3tPGFO.d.ts} +52 -2
- package/dist/{tts-capabilities-BtnDWK9K.d.ts → tts-capabilities-BJ4N8MIB.d.ts} +1 -1
- package/dist/{tts-capabilities-C52UccTI.d.cts → tts-capabilities-Cf_4nu1Z.d.cts} +1 -1
- package/package.json +1 -1
- package/src/__tests__/flux-3-klein.test.ts +51 -3
- package/src/__tests__/image-run-limit.test.ts +96 -0
- package/src/__tests__/kling4-catalog.test.ts +1 -1
- package/src/__tests__/seedream-5-5.test.ts +17 -0
- package/src/__tests__/video-subjects.test.ts +33 -16
- package/src/entries/models.ts +4 -0
- package/src/model-catalog.ts +24 -2
- package/src/model-constants.ts +72 -6
- package/src/video-character-refs.ts +15 -10
- package/dist/chunk-5SSMPYE5.js.map +0 -1
- package/dist/chunk-CW6MMQNO.js.map +0 -1
- package/dist/chunk-FI3HJZWM.cjs.map +0 -1
- package/dist/chunk-K6RIN3LW.cjs.map +0 -1
- package/dist/chunk-KWYS4IIM.cjs.map +0 -1
- package/dist/chunk-PL7AQQV7.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkE62W5I6A_cjs = require('./chunk-E62W5I6A.cjs');
|
|
4
4
|
var zod = require('zod');
|
|
5
5
|
|
|
6
6
|
// src/seedance-task-type.ts
|
|
@@ -262,7 +262,7 @@ function getMaxNegativePromptChars(provider) {
|
|
|
262
262
|
}
|
|
263
263
|
var TTS_TEXT_MAX = 5e3;
|
|
264
264
|
var MAX_TTS_CHARS_BY_PROVIDER = Object.fromEntries(
|
|
265
|
-
Object.values(
|
|
265
|
+
Object.values(chunkE62W5I6A_cjs.MODEL_CATALOG).filter((m) => m.tts !== void 0).map((m) => [m.id, m.tts.maxChars])
|
|
266
266
|
);
|
|
267
267
|
function getMaxTtsChars(provider) {
|
|
268
268
|
const cap = provider && Object.hasOwn(MAX_TTS_CHARS_BY_PROVIDER, provider) ? MAX_TTS_CHARS_BY_PROVIDER[provider] : void 0;
|
|
@@ -491,6 +491,16 @@ function requestImageLimit(provider) {
|
|
|
491
491
|
const effective = provider ? T2I_TO_I2I_VARIANT[provider] ?? provider : void 0;
|
|
492
492
|
return (effective !== void 0 ? REQUEST_IMAGE_LIMITS[effective] : void 0) ?? DEFAULT_REQUEST_IMAGE_LIMIT;
|
|
493
493
|
}
|
|
494
|
+
function hasOwnRequestImageLimit(provider) {
|
|
495
|
+
if (provider === void 0) return false;
|
|
496
|
+
return Object.hasOwn(REQUEST_IMAGE_LIMITS, T2I_TO_I2I_VARIANT[provider] ?? provider);
|
|
497
|
+
}
|
|
498
|
+
function refusesImagesOverLimit(provider) {
|
|
499
|
+
return provider !== void 0 && chunkE62W5I6A_cjs.MODEL_CATALOG[provider]?.refusesImagesOverLimit === true;
|
|
500
|
+
}
|
|
501
|
+
function refusesImagesOverLimitOn(provider, run) {
|
|
502
|
+
return refusesImagesOverLimit(provider) || run === "request" && hasOwnRequestImageLimit(provider);
|
|
503
|
+
}
|
|
494
504
|
var VARIABLE_PRICING_MODELS = {
|
|
495
505
|
"gpt-image": "quality",
|
|
496
506
|
"gpt-image-i2i": "quality",
|
|
@@ -812,7 +822,7 @@ function resolveVideoModeForInputs(provider, inputs) {
|
|
|
812
822
|
const i2v = resolveVideoProviderForMode(provider, "image-to-video");
|
|
813
823
|
const t2v = resolveVideoProviderForMode(provider, "text-to-video");
|
|
814
824
|
if (i2v === t2v) {
|
|
815
|
-
const entry =
|
|
825
|
+
const entry = chunkE62W5I6A_cjs.MODEL_CATALOG[i2v];
|
|
816
826
|
const noTextMode = !!entry && !entry.modes.includes("t2v");
|
|
817
827
|
return noTextMode && videoProviderRunsFromReferences(i2v) ? "image-to-video" : "text-to-video";
|
|
818
828
|
}
|
|
@@ -820,7 +830,7 @@ function resolveVideoModeForInputs(provider, inputs) {
|
|
|
820
830
|
return carriesImageRefs(i2v) && !carriesImageRefs(t2v) ? "image-to-video" : "text-to-video";
|
|
821
831
|
}
|
|
822
832
|
function videoProviderReferenceSyntax(provider) {
|
|
823
|
-
return (provider ?
|
|
833
|
+
return (provider ? chunkE62W5I6A_cjs.MODEL_CATALOG[provider]?.referenceSyntax : void 0) ?? "@image_N";
|
|
824
834
|
}
|
|
825
835
|
var VIDEO_PROVIDERS_WITH_SEPARATE_FRAME_CHANNEL = /* @__PURE__ */ new Set([
|
|
826
836
|
"kling-3-omni",
|
|
@@ -829,18 +839,18 @@ var VIDEO_PROVIDERS_WITH_SEPARATE_FRAME_CHANNEL = /* @__PURE__ */ new Set([
|
|
|
829
839
|
]);
|
|
830
840
|
function videoProviderAppendsFrames(provider) {
|
|
831
841
|
if (!provider) return false;
|
|
832
|
-
const entry =
|
|
842
|
+
const entry = chunkE62W5I6A_cjs.MODEL_CATALOG[provider];
|
|
833
843
|
return !!entry && entry.kind === "video" && entry.features?.includes("reference-image") === true && !VIDEO_PROVIDERS_WITH_SEPARATE_FRAME_CHANNEL.has(provider);
|
|
834
844
|
}
|
|
835
845
|
function videoProviderRefModeFrameSeats(provider, frames) {
|
|
836
846
|
if (!provider) return 0;
|
|
837
847
|
if (!videoProviderAppendsFrames(provider)) return 0;
|
|
838
848
|
const start = frames.hasStartFrame ? 1 : 0;
|
|
839
|
-
const end = frames.hasEndFrame &&
|
|
849
|
+
const end = frames.hasEndFrame && chunkE62W5I6A_cjs.MODEL_CATALOG[provider]?.features?.includes("end-frame") === true ? 1 : 0;
|
|
840
850
|
return start + end;
|
|
841
851
|
}
|
|
842
852
|
function videoProviderRunsFromReferences(provider) {
|
|
843
|
-
return !!provider &&
|
|
853
|
+
return !!provider && chunkE62W5I6A_cjs.MODEL_CATALOG[provider]?.features?.includes("reference-to-video") === true;
|
|
844
854
|
}
|
|
845
855
|
var VIDEO_GEN_COLLAPSED_T2V_IDS = new Set(
|
|
846
856
|
VIDEO_MODE_ALIASES.filter((g) => g.t2v !== g.base).map((g) => g.t2v)
|
|
@@ -859,7 +869,7 @@ function isSeedanceVideoEditProvider(provider) {
|
|
|
859
869
|
}
|
|
860
870
|
var VIDEO_TO_VIDEO_NODE_PROVIDERS = [...VIDEO_TO_VIDEO_PROVIDERS, ...SEEDANCE_VIDEO_EDIT_PROVIDERS];
|
|
861
871
|
var DEFAULT_VIDEO_TO_VIDEO_PROVIDER = "wan";
|
|
862
|
-
var SEEDANCE_VIDEO_EDIT_SHAPE = { aspectRatio: "adaptive", duration:
|
|
872
|
+
var SEEDANCE_VIDEO_EDIT_SHAPE = { aspectRatio: "adaptive", duration: chunkE62W5I6A_cjs.VIDEO_DURATION_AUTO };
|
|
863
873
|
var SEEDANCE_VIDEO_EDIT_TASK_TYPE = "edit";
|
|
864
874
|
var FACE_SWAP_PROVIDERS = [
|
|
865
875
|
"roop"
|
|
@@ -1459,7 +1469,7 @@ var VIDEO_PROVIDERS_WITHOUT_DISPATCH = /* @__PURE__ */ new Set([
|
|
|
1459
1469
|
var GVP_DEFAULT_PROVIDER = "seedance-2";
|
|
1460
1470
|
function deriveGvpSupportedProviders() {
|
|
1461
1471
|
const dispatchable = new Set(VIDEO_GEN_PROVIDERS);
|
|
1462
|
-
const eligible = Object.values(
|
|
1472
|
+
const eligible = Object.values(chunkE62W5I6A_cjs.MODEL_CATALOG).filter(
|
|
1463
1473
|
(m) => m.kind === "video" && m.modes.includes("i2v") && (m.features?.includes("reference-image") === true || m.gvpWithoutReferences === true) && (m.durations?.length ?? 0) > 0 && // Must also be dispatchable by the unified video node — the pro route
|
|
1464
1474
|
// hands the provider id straight to the app's imageToVideo.
|
|
1465
1475
|
dispatchable.has(m.id) && // A keyframes model's Image References are in-between FRAMES, so the
|
|
@@ -1469,7 +1479,7 @@ function deriveGvpSupportedProviders() {
|
|
|
1469
1479
|
// router (see VIDEO_PROVIDERS_WITHOUT_DISPATCH).
|
|
1470
1480
|
!VIDEO_PROVIDERS_WITHOUT_DISPATCH.has(m.id)
|
|
1471
1481
|
).map((m) => m.id);
|
|
1472
|
-
const seriesOf = (id) =>
|
|
1482
|
+
const seriesOf = (id) => chunkE62W5I6A_cjs.MODEL_CATALOG[id]?.series ?? chunkE62W5I6A_cjs.MODEL_CATALOG[id]?.family ?? id;
|
|
1473
1483
|
const defaultSeries = seriesOf(GVP_DEFAULT_PROVIDER);
|
|
1474
1484
|
const order = [];
|
|
1475
1485
|
for (const id of eligible) {
|
|
@@ -1493,13 +1503,13 @@ function isGvpSupportedProvider(provider) {
|
|
|
1493
1503
|
return !!provider && GVP_SUPPORTED_PROVIDERS.includes(provider);
|
|
1494
1504
|
}
|
|
1495
1505
|
var GVP_EXTEND_PROVIDERS = GVP_SUPPORTED_PROVIDERS.filter(
|
|
1496
|
-
(id) =>
|
|
1506
|
+
(id) => chunkE62W5I6A_cjs.MODEL_CATALOG[id]?.features?.includes("video-reference") === true
|
|
1497
1507
|
);
|
|
1498
1508
|
function supportsExtendRender(provider) {
|
|
1499
1509
|
return !!provider && GVP_EXTEND_PROVIDERS.includes(provider);
|
|
1500
1510
|
}
|
|
1501
1511
|
var GVP_END_FRAME_PROVIDERS = GVP_SUPPORTED_PROVIDERS.filter(
|
|
1502
|
-
(id) =>
|
|
1512
|
+
(id) => chunkE62W5I6A_cjs.MODEL_CATALOG[id]?.features?.includes("end-frame") === true
|
|
1503
1513
|
);
|
|
1504
1514
|
function supportsEndAnchor(provider) {
|
|
1505
1515
|
return !!provider && GVP_END_FRAME_PROVIDERS.includes(provider);
|
|
@@ -1519,11 +1529,11 @@ function resolveGvpAnchorWire(choice, provider) {
|
|
|
1519
1529
|
}
|
|
1520
1530
|
function gvpTakesReferenceImages(provider) {
|
|
1521
1531
|
if (!provider) return true;
|
|
1522
|
-
return
|
|
1532
|
+
return chunkE62W5I6A_cjs.MODEL_CATALOG[provider]?.gvpWithoutReferences !== true;
|
|
1523
1533
|
}
|
|
1524
1534
|
function segmentDurationsFor(provider) {
|
|
1525
1535
|
if (!provider) return [];
|
|
1526
|
-
return [...
|
|
1536
|
+
return [...chunkE62W5I6A_cjs.MODEL_CATALOG[provider]?.durations ?? []].sort((a, b) => a - b);
|
|
1527
1537
|
}
|
|
1528
1538
|
function minSegmentSecFor(provider) {
|
|
1529
1539
|
return segmentDurationsFor(provider)[0] ?? 0;
|
|
@@ -1673,10 +1683,9 @@ var VIDEO_REF_LIMITS_BY_PROVIDER = {
|
|
|
1673
1683
|
// preset personas, which Kling does not take.
|
|
1674
1684
|
// Of the 7 subjects, at most 3 may be video subjects (a 3-8 s clip each), and
|
|
1675
1685
|
// reference videos plus video subjects are at most 5. A video subject is
|
|
1676
|
-
//
|
|
1677
|
-
//
|
|
1678
|
-
|
|
1679
|
-
"kling-4": { images: 10, videos: 5, audio: 3, characters: 7, materials: 15, videoCharacters: 3, videoCharactersBillAsReferenceVideo: true },
|
|
1686
|
+
// billed like an image subject (measured, decided 2026-11-14), as on Flash:
|
|
1687
|
+
// no `videoCharactersBillAsReferenceVideo`.
|
|
1688
|
+
"kling-4": { images: 10, videos: 5, audio: 3, characters: 7, materials: 15, videoCharacters: 3 },
|
|
1680
1689
|
// Kling 4.0 Keyframes — the Image References are the in-between frames
|
|
1681
1690
|
// (`keyframe_urls`, max 8; the clip's duration lowers the cap, see
|
|
1682
1691
|
// kling4KeyframeFrameCap). No reference videos or audio.
|
|
@@ -1687,8 +1696,7 @@ var VIDEO_REF_LIMITS_BY_PROVIDER = {
|
|
|
1687
1696
|
// (`voice_url`) when that character is a subject (2-4 images), so at most one
|
|
1688
1697
|
// per character (7) and none takes a material seat. A wired start frame takes one of the 10 image slots when it
|
|
1689
1698
|
// runs on this endpoint. A video subject is billed like an image subject
|
|
1690
|
-
// (measured
|
|
1691
|
-
// `videoCharactersBillAsReferenceVideo`.
|
|
1699
|
+
// (measured, decided 2026-11-14): no `videoCharactersBillAsReferenceVideo`.
|
|
1692
1700
|
"kling-4-flash": { images: 10, videos: 5, audio: 7, characters: 7, materials: 15, audioBindsToCharacters: true, videoCharacters: 3 },
|
|
1693
1701
|
"grok-i2v": { images: 7 },
|
|
1694
1702
|
// backend kie/models.ts maxRefImages: 7
|
|
@@ -1852,7 +1860,7 @@ var FRAME_MODE_ADAPTIVE_ONLY_ASPECT = /* @__PURE__ */ new Set([
|
|
|
1852
1860
|
"seedance-2-5"
|
|
1853
1861
|
]);
|
|
1854
1862
|
var VIDEO_PROVIDERS_REQUIRING_IMAGE = new Set(
|
|
1855
|
-
Object.values(
|
|
1863
|
+
Object.values(chunkE62W5I6A_cjs.MODEL_CATALOG).filter(
|
|
1856
1864
|
(m) => m.kind === "video" && m.modes.includes("i2v") && !m.modes.includes("t2v") && VIDEO_GEN_PROVIDERS.includes(m.id) && resolveVideoProviderForMode(m.id, "text-to-video") === m.id
|
|
1857
1865
|
).map((m) => m.id)
|
|
1858
1866
|
);
|
|
@@ -1865,29 +1873,29 @@ function videoProviderFoldsLoneEndFrame(provider) {
|
|
|
1865
1873
|
function videoProviderTakesLoneEndFrame(provider) {
|
|
1866
1874
|
if (!provider) return false;
|
|
1867
1875
|
if (isGeminiOmniPerSecondProvider(provider)) return true;
|
|
1868
|
-
return
|
|
1876
|
+
return chunkE62W5I6A_cjs.MODEL_CATALOG[provider]?.features?.includes("keyframes") === true && !videoProviderRequiresImage(provider);
|
|
1869
1877
|
}
|
|
1870
1878
|
function videoProviderRefsReplaceStartFrame(provider) {
|
|
1871
1879
|
if (!provider || (VIDEO_REF_LIMITS_BY_PROVIDER[provider]?.images ?? 0) <= 0) return false;
|
|
1872
|
-
const keyframes =
|
|
1880
|
+
const keyframes = chunkE62W5I6A_cjs.MODEL_CATALOG[provider]?.features?.includes("keyframes") === true;
|
|
1873
1881
|
return !keyframes || videoProviderRunsFromReferences(provider);
|
|
1874
1882
|
}
|
|
1875
1883
|
var VIDEO_START_FRAME_ONLY_CODE = "start_frame_only_resolution";
|
|
1876
1884
|
function videoStartFrameOnlyResolution(provider, resolution) {
|
|
1877
|
-
const tiers = provider ?
|
|
1885
|
+
const tiers = provider ? chunkE62W5I6A_cjs.MODEL_CATALOG[provider]?.startFrameOnlyResolutions : void 0;
|
|
1878
1886
|
const r = resolution?.trim().toLowerCase();
|
|
1879
1887
|
if (!tiers?.length || !r) return void 0;
|
|
1880
1888
|
return tiers.find((t) => t.toLowerCase() === r);
|
|
1881
1889
|
}
|
|
1882
1890
|
function videoFramesResolutionFallback(provider) {
|
|
1883
|
-
const entry =
|
|
1891
|
+
const entry = chunkE62W5I6A_cjs.MODEL_CATALOG[provider];
|
|
1884
1892
|
const restricted = new Set((entry?.startFrameOnlyResolutions ?? []).map((t) => t.toLowerCase()));
|
|
1885
1893
|
const open = (entry?.resolutions ?? []).filter((r) => !restricted.has(r.toLowerCase()));
|
|
1886
1894
|
const height = (r) => Number.parseInt(r, 10) || 0;
|
|
1887
1895
|
return [...open].sort((a, b) => height(b) - height(a))[0];
|
|
1888
1896
|
}
|
|
1889
1897
|
function videoStartFrameOnlyMessage(provider, resolution, opts = {}) {
|
|
1890
|
-
const label =
|
|
1898
|
+
const label = chunkE62W5I6A_cjs.MODEL_CATALOG[provider]?.label ?? provider;
|
|
1891
1899
|
const fallback = videoFramesResolutionFallback(provider);
|
|
1892
1900
|
const choose = fallback ? `Choose ${fallback}, or remove` : "Remove";
|
|
1893
1901
|
const sentence = `${label} takes a start frame only at ${resolution}: no end frame, loop or in-between frames. ${choose} the end frame and the in-between frames.`;
|
|
@@ -2100,7 +2108,7 @@ var VIDEO_VARIABLE_PRICING = {
|
|
|
2100
2108
|
};
|
|
2101
2109
|
var PRICING_DEFAULT_DURATION_SEC = Object.freeze(
|
|
2102
2110
|
Object.fromEntries(
|
|
2103
|
-
Object.values(
|
|
2111
|
+
Object.values(chunkE62W5I6A_cjs.MODEL_CATALOG).filter((e) => e.kind === "video" && typeof e.defaultDuration === "number").map((e) => [e.id, e.defaultDuration])
|
|
2104
2112
|
)
|
|
2105
2113
|
);
|
|
2106
2114
|
function snapToNearestDuration(requested, allowed) {
|
|
@@ -2109,7 +2117,7 @@ function snapToNearestDuration(requested, allowed) {
|
|
|
2109
2117
|
return allowed.reduce((best, d) => Math.abs(d - requested) < Math.abs(best - requested) ? d : best);
|
|
2110
2118
|
}
|
|
2111
2119
|
function videoDefaultDurationSec(provider) {
|
|
2112
|
-
const entry =
|
|
2120
|
+
const entry = chunkE62W5I6A_cjs.MODEL_CATALOG[provider];
|
|
2113
2121
|
if (typeof entry?.defaultDuration === "number") return entry.defaultDuration;
|
|
2114
2122
|
const shortest = entry?.durations?.length ? Math.min(...entry.durations) : void 0;
|
|
2115
2123
|
return shortest ?? 5;
|
|
@@ -2119,19 +2127,19 @@ function pricedOutputDurationSec(provider, requested) {
|
|
|
2119
2127
|
const parsed = typeof requested === "string" ? parseInt(requested, 10) : requested;
|
|
2120
2128
|
if (parsed === void 0 || Number.isNaN(parsed)) return fallback;
|
|
2121
2129
|
if (parsed <= 0) {
|
|
2122
|
-
return
|
|
2130
|
+
return chunkE62W5I6A_cjs.isAutoVideoDuration(parsed) && supportsAutoVideoDuration(provider) ? maxVideoDurationSec(provider) ?? fallback : fallback;
|
|
2123
2131
|
}
|
|
2124
|
-
return snapToNearestDuration(parsed,
|
|
2132
|
+
return snapToNearestDuration(parsed, chunkE62W5I6A_cjs.MODEL_CATALOG[provider]?.durations);
|
|
2125
2133
|
}
|
|
2126
2134
|
function supportsAutoVideoDuration(provider) {
|
|
2127
|
-
return !!provider &&
|
|
2135
|
+
return !!provider && chunkE62W5I6A_cjs.MODEL_CATALOG[provider]?.autoDuration === true;
|
|
2128
2136
|
}
|
|
2129
2137
|
function supportsReferenceTaskType(provider) {
|
|
2130
|
-
return !!provider && (
|
|
2138
|
+
return !!provider && (chunkE62W5I6A_cjs.MODEL_CATALOG[provider]?.referenceTaskTypes?.length ?? 0) > 0;
|
|
2131
2139
|
}
|
|
2132
2140
|
var SEEDANCE_EXTEND_ASPECT = "adaptive";
|
|
2133
2141
|
function listedSeedanceTaskType(provider, requested) {
|
|
2134
|
-
return provider ?
|
|
2142
|
+
return provider ? chunkE62W5I6A_cjs.MODEL_CATALOG[provider]?.referenceTaskTypes?.find((t) => t === requested) : void 0;
|
|
2135
2143
|
}
|
|
2136
2144
|
function seedanceTaskTypeFitsMedia(type, media) {
|
|
2137
2145
|
return type === "reference" ? media.imageCount + media.videoCount + media.audioCount > 0 : media.videoCount > 0;
|
|
@@ -2157,7 +2165,7 @@ function resolveSeedanceTaskType(facts) {
|
|
|
2157
2165
|
const nextAspect = taskType === "edit" ? SEEDANCE_VIDEO_EDIT_SHAPE.aspectRatio : SEEDANCE_EXTEND_ASPECT;
|
|
2158
2166
|
const adjustments = [];
|
|
2159
2167
|
const askedAspect = typeof aspectRatio === "string" ? aspectRatio.trim() : "";
|
|
2160
|
-
const runsAtForced = askedAspect.toLowerCase() === nextAspect ||
|
|
2168
|
+
const runsAtForced = askedAspect.toLowerCase() === nextAspect || chunkE62W5I6A_cjs.isVideoAutoAspectToken(askedAspect) && chunkE62W5I6A_cjs.videoAutoAspectRunsAt(provider, media.videoCount > 0) === nextAspect;
|
|
2161
2169
|
if (askedAspect !== "" && !runsAtForced) {
|
|
2162
2170
|
adjustments.push({
|
|
2163
2171
|
field: "aspectRatio",
|
|
@@ -2169,7 +2177,7 @@ function resolveSeedanceTaskType(facts) {
|
|
|
2169
2177
|
let nextDuration;
|
|
2170
2178
|
if (taskType === "edit") {
|
|
2171
2179
|
nextDuration = SEEDANCE_VIDEO_EDIT_SHAPE.duration;
|
|
2172
|
-
if (duration !== void 0 && !
|
|
2180
|
+
if (duration !== void 0 && !chunkE62W5I6A_cjs.isAutoVideoDuration(duration)) {
|
|
2173
2181
|
adjustments.push({
|
|
2174
2182
|
field: "duration",
|
|
2175
2183
|
from: duration,
|
|
@@ -2177,7 +2185,7 @@ function resolveSeedanceTaskType(facts) {
|
|
|
2177
2185
|
reason: `Edit keeps the video's own length \u2014 using Auto instead of ${duration}s.`
|
|
2178
2186
|
});
|
|
2179
2187
|
}
|
|
2180
|
-
} else if (duration === void 0 ||
|
|
2188
|
+
} else if (duration === void 0 || chunkE62W5I6A_cjs.isAutoVideoDuration(duration)) {
|
|
2181
2189
|
nextDuration = videoDefaultDurationSec(provider);
|
|
2182
2190
|
if (duration !== void 0) {
|
|
2183
2191
|
adjustments.push({
|
|
@@ -2791,6 +2799,7 @@ exports.getMinImagePromptChars = getMinImagePromptChars;
|
|
|
2791
2799
|
exports.getVideoAudioCapability = getVideoAudioCapability;
|
|
2792
2800
|
exports.grokVideo15MiddleFrameSlots = grokVideo15MiddleFrameSlots;
|
|
2793
2801
|
exports.hasContiguousSegmentDurations = hasContiguousSegmentDurations;
|
|
2802
|
+
exports.hasOwnRequestImageLimit = hasOwnRequestImageLimit;
|
|
2794
2803
|
exports.imageReferenceLimit = imageReferenceLimit;
|
|
2795
2804
|
exports.isCatalogExtendProvider = isCatalogExtendProvider;
|
|
2796
2805
|
exports.isGeminiOmniPerSecondProvider = isGeminiOmniPerSecondProvider;
|
|
@@ -2828,6 +2837,8 @@ exports.normalizeViduQ4Resolution = normalizeViduQ4Resolution;
|
|
|
2828
2837
|
exports.normalizeWan3Resolution = normalizeWan3Resolution;
|
|
2829
2838
|
exports.preferredInputModeForModel = preferredInputModeForModel;
|
|
2830
2839
|
exports.pricedOutputDurationSec = pricedOutputDurationSec;
|
|
2840
|
+
exports.refusesImagesOverLimit = refusesImagesOverLimit;
|
|
2841
|
+
exports.refusesImagesOverLimitOn = refusesImagesOverLimitOn;
|
|
2831
2842
|
exports.requestImageLimit = requestImageLimit;
|
|
2832
2843
|
exports.resolveGvpAnchorWire = resolveGvpAnchorWire;
|
|
2833
2844
|
exports.resolveMusicProvider = resolveMusicProvider;
|
|
@@ -2868,5 +2879,5 @@ exports.videoSourceTrimMaxSec = videoSourceTrimMaxSec;
|
|
|
2868
2879
|
exports.videoStartFrameOnlyMessage = videoStartFrameOnlyMessage;
|
|
2869
2880
|
exports.videoStartFrameOnlyProblem = videoStartFrameOnlyProblem;
|
|
2870
2881
|
exports.videoStartFrameOnlyResolution = videoStartFrameOnlyResolution;
|
|
2871
|
-
//# sourceMappingURL=chunk-
|
|
2872
|
-
//# sourceMappingURL=chunk-
|
|
2882
|
+
//# sourceMappingURL=chunk-PJAJCFLP.cjs.map
|
|
2883
|
+
//# sourceMappingURL=chunk-PJAJCFLP.cjs.map
|