@nodaro/shared 3.62.0 → 3.63.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-6CSXMWL4.cjs → chunk-2PU3AGGS.cjs} +27 -4
- package/dist/chunk-2PU3AGGS.cjs.map +1 -0
- package/dist/{chunk-CC4V2B7S.js → chunk-34QLPTSA.js} +3 -3
- package/dist/{chunk-CC4V2B7S.js.map → chunk-34QLPTSA.js.map} +1 -1
- package/dist/{chunk-G4U3HW6W.js → chunk-3K24DWOH.js} +3 -3
- package/dist/{chunk-G4U3HW6W.js.map → chunk-3K24DWOH.js.map} +1 -1
- package/dist/{chunk-GSFB537T.js → chunk-4DVWXEB6.js} +23 -4
- package/dist/chunk-4DVWXEB6.js.map +1 -0
- package/dist/{chunk-ZES6EZC4.js → chunk-4MMZD63H.js} +3 -3
- package/dist/{chunk-ZES6EZC4.js.map → chunk-4MMZD63H.js.map} +1 -1
- package/dist/{chunk-N7OUQK7E.cjs → chunk-63H4C56Q.cjs} +8 -8
- package/dist/{chunk-N7OUQK7E.cjs.map → chunk-63H4C56Q.cjs.map} +1 -1
- package/dist/{chunk-2D5LQFV4.cjs → chunk-6BZC2ZHC.cjs} +9 -9
- package/dist/{chunk-2D5LQFV4.cjs.map → chunk-6BZC2ZHC.cjs.map} +1 -1
- package/dist/{chunk-3OYO3XCC.js → chunk-6M563QE6.js} +71 -9
- package/dist/chunk-6M563QE6.js.map +1 -0
- package/dist/{chunk-IDTKF5EX.cjs → chunk-6TGB7ECA.cjs} +7 -7
- package/dist/{chunk-IDTKF5EX.cjs.map → chunk-6TGB7ECA.cjs.map} +1 -1
- package/dist/{chunk-2HZGDZZN.cjs → chunk-6XUG4L7X.cjs} +6 -6
- package/dist/{chunk-2HZGDZZN.cjs.map → chunk-6XUG4L7X.cjs.map} +1 -1
- package/dist/{chunk-CIPPPT7E.cjs → chunk-77WU3V3J.cjs} +6 -6
- package/dist/{chunk-CIPPPT7E.cjs.map → chunk-77WU3V3J.cjs.map} +1 -1
- package/dist/{chunk-C7POAYFE.js → chunk-AE3AAJ4O.js} +3 -3
- package/dist/{chunk-C7POAYFE.js.map → chunk-AE3AAJ4O.js.map} +1 -1
- package/dist/{chunk-NGKKNSK6.js → chunk-BMJVKYVB.js} +36 -15
- package/dist/chunk-BMJVKYVB.js.map +1 -0
- package/dist/{chunk-YCXRSWCQ.js → chunk-CZ5IQB3L.js} +3 -3
- package/dist/{chunk-YCXRSWCQ.js.map → chunk-CZ5IQB3L.js.map} +1 -1
- package/dist/{chunk-E2HZTGYX.js → chunk-EPXGG27L.js} +7 -7
- package/dist/chunk-EPXGG27L.js.map +1 -0
- package/dist/{chunk-3M4BNKFJ.cjs → chunk-F6WGGYQW.cjs} +167 -3
- package/dist/chunk-F6WGGYQW.cjs.map +1 -0
- package/dist/{chunk-7FCTCWHD.js → chunk-FXGNRYQQ.js} +3 -3
- package/dist/{chunk-7FCTCWHD.js.map → chunk-FXGNRYQQ.js.map} +1 -1
- package/dist/{chunk-QWYFHQYK.cjs → chunk-GMBDLNLD.cjs} +86 -62
- package/dist/chunk-GMBDLNLD.cjs.map +1 -0
- package/dist/{chunk-KJSRPHJ2.cjs → chunk-GSKLPI3J.cjs} +100 -46
- package/dist/chunk-GSKLPI3J.cjs.map +1 -0
- package/dist/{chunk-S5TMRJMX.js → chunk-HBXF6RUU.js} +4 -4
- package/dist/{chunk-S5TMRJMX.js.map → chunk-HBXF6RUU.js.map} +1 -1
- package/dist/{chunk-S24ZBUB4.js → chunk-HWQ2SYNA.js} +6 -32
- package/dist/chunk-HWQ2SYNA.js.map +1 -0
- package/dist/{chunk-JJNNM23P.js → chunk-IY3Y462W.js} +3 -3
- package/dist/{chunk-JJNNM23P.js.map → chunk-IY3Y462W.js.map} +1 -1
- package/dist/{chunk-JZGZ26YB.js → chunk-KCZHQH2O.js} +4 -4
- package/dist/{chunk-JZGZ26YB.js.map → chunk-KCZHQH2O.js.map} +1 -1
- package/dist/{chunk-FVII3KHN.js → chunk-KMGCHV6O.js} +163 -4
- package/dist/chunk-KMGCHV6O.js.map +1 -0
- package/dist/{chunk-4ZEFP2FQ.cjs → chunk-L2TVY6XN.cjs} +4 -4
- package/dist/{chunk-4ZEFP2FQ.cjs.map → chunk-L2TVY6XN.cjs.map} +1 -1
- package/dist/{chunk-TRVWMKNE.cjs → chunk-LH72PQO2.cjs} +204 -52
- package/dist/chunk-LH72PQO2.cjs.map +1 -0
- package/dist/{chunk-HRY7KGAE.cjs → chunk-LMAQUR55.cjs} +6 -6
- package/dist/{chunk-HRY7KGAE.cjs.map → chunk-LMAQUR55.cjs.map} +1 -1
- package/dist/{chunk-MYJQELFN.cjs → chunk-M5OCFGHF.cjs} +254 -7
- package/dist/chunk-M5OCFGHF.cjs.map +1 -0
- package/dist/{chunk-I2RQB7VG.js → chunk-MD4XHED4.js} +3 -3
- package/dist/{chunk-I2RQB7VG.js.map → chunk-MD4XHED4.js.map} +1 -1
- package/dist/{chunk-6G7NN4S4.js → chunk-NIAFR5EE.js} +2 -2
- package/dist/chunk-NIAFR5EE.js.map +1 -0
- package/dist/{chunk-CF4S4N5X.js → chunk-O2QOBA6Q.js} +2 -2
- package/dist/{chunk-CF4S4N5X.js.map → chunk-O2QOBA6Q.js.map} +1 -1
- package/dist/{chunk-4GGLKRYI.cjs → chunk-O6TBB4IF.cjs} +2 -2
- package/dist/{chunk-4GGLKRYI.cjs.map → chunk-O6TBB4IF.cjs.map} +1 -1
- package/dist/{chunk-UDDVDQMF.js → chunk-OV3JTKBY.js} +166 -25
- package/dist/chunk-OV3JTKBY.js.map +1 -0
- package/dist/{chunk-5YYN5X57.js → chunk-PSKZKLDG.js} +252 -8
- package/dist/chunk-PSKZKLDG.js.map +1 -0
- package/dist/{chunk-IWWVPR3W.cjs → chunk-TM5JYSJF.cjs} +95 -19
- package/dist/chunk-TM5JYSJF.cjs.map +1 -0
- package/dist/{chunk-G3KVK7OU.cjs → chunk-V5EEQR2U.cjs} +21 -21
- package/dist/{chunk-G3KVK7OU.cjs.map → chunk-V5EEQR2U.cjs.map} +1 -1
- package/dist/{chunk-AOJ6B7K4.cjs → chunk-WZVIBAKN.cjs} +12 -12
- package/dist/chunk-WZVIBAKN.cjs.map +1 -0
- package/dist/{chunk-5M43XMRB.cjs → chunk-X5BAFW3Q.cjs} +8 -8
- package/dist/{chunk-5M43XMRB.cjs.map → chunk-X5BAFW3Q.cjs.map} +1 -1
- package/dist/{chunk-SYWR5G3T.js → chunk-XBTYGQ6Z.js} +51 -7
- package/dist/chunk-XBTYGQ6Z.js.map +1 -0
- package/dist/{chunk-AFYTX4AI.cjs → chunk-XGGZWA4A.cjs} +107 -50
- package/dist/chunk-XGGZWA4A.cjs.map +1 -0
- package/dist/{chunk-VACPZPUA.cjs → chunk-XGVJGNZW.cjs} +5 -5
- package/dist/{chunk-VACPZPUA.cjs.map → chunk-XGVJGNZW.cjs.map} +1 -1
- package/dist/{chunk-2W745U4A.cjs → chunk-Y35JQPT6.cjs} +42 -70
- package/dist/chunk-Y35JQPT6.cjs.map +1 -0
- package/dist/{chunk-KYMHFVAZ.cjs → chunk-Y4GCJJPF.cjs} +2 -2
- package/dist/chunk-Y4GCJJPF.cjs.map +1 -0
- package/dist/{chunk-PTD6EDUU.js → chunk-YUER7TJG.js} +3 -3
- package/dist/{chunk-PTD6EDUU.js.map → chunk-YUER7TJG.js.map} +1 -1
- package/dist/{chunk-Y6X7UJSD.js → chunk-YX6TFX7H.js} +66 -14
- package/dist/chunk-YX6TFX7H.js.map +1 -0
- package/dist/{chunk-TWF2OSH4.cjs → chunk-ZPE2ZTJ4.cjs} +4 -4
- package/dist/{chunk-TWF2OSH4.cjs.map → chunk-ZPE2ZTJ4.cjs.map} +1 -1
- package/dist/entries/apps.cjs +42 -42
- package/dist/entries/apps.js +7 -7
- package/dist/entries/credits.cjs +237 -169
- package/dist/entries/credits.d.cts +163 -16
- package/dist/entries/credits.d.ts +163 -16
- package/dist/entries/credits.js +10 -10
- package/dist/entries/llm-models.cjs +77 -57
- package/dist/entries/llm-models.d.cts +85 -6
- package/dist/entries/llm-models.d.ts +85 -6
- package/dist/entries/llm-models.js +2 -2
- package/dist/entries/media.cjs +63 -63
- package/dist/entries/media.d.cts +8 -0
- package/dist/entries/media.d.ts +8 -0
- package/dist/entries/media.js +1 -1
- package/dist/entries/model-catalog.cjs +121 -105
- package/dist/entries/model-catalog.d.cts +48 -18
- package/dist/entries/model-catalog.d.ts +48 -18
- package/dist/entries/model-catalog.js +4 -4
- package/dist/entries/models.cjs +418 -322
- package/dist/entries/models.d.cts +71 -5
- package/dist/entries/models.d.ts +71 -5
- package/dist/entries/models.js +5 -5
- package/dist/entries/nodes.cjs +216 -208
- package/dist/entries/nodes.d.cts +22 -6
- package/dist/entries/nodes.d.ts +22 -6
- package/dist/entries/nodes.js +8 -8
- package/dist/entries/pipeline.cjs +152 -152
- package/dist/entries/pipeline.d.cts +3 -3
- package/dist/entries/pipeline.d.ts +3 -3
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/runtime-config.cjs +29 -29
- package/dist/entries/runtime-config.d.cts +10 -7
- package/dist/entries/runtime-config.d.ts +10 -7
- package/dist/entries/runtime-config.js +1 -1
- package/dist/entries/social.cjs +177 -177
- package/dist/entries/social.js +2 -2
- package/dist/entries/types.d.cts +8 -0
- package/dist/entries/types.d.ts +8 -0
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +154 -150
- package/dist/entries/video.d.cts +11 -2
- package/dist/entries/video.d.ts +11 -2
- 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 +1727 -1515
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +23 -23
- package/dist/{model-catalog-CCEcv08q.d.cts → model-catalog-C_Eo35tL.d.cts} +30 -0
- package/dist/{model-catalog-CCEcv08q.d.ts → model-catalog-C_Eo35tL.d.ts} +30 -0
- package/dist/{model-constants-Cf3zaITt.d.cts → model-constants-Bg4ccSQb.d.ts} +138 -25
- package/dist/{model-constants-B88p6XR0.d.ts → model-constants-DWcxOmaY.d.cts} +138 -25
- package/package.json +1 -1
- package/src/__tests__/credit-identifiers.test.ts +29 -0
- package/src/__tests__/extend-providers.test.ts +106 -26
- package/src/__tests__/gvp-supported-providers.test.ts +27 -2
- package/src/__tests__/lip-sync-audio-rate.test.ts +74 -0
- package/src/__tests__/lip-sync-levers.test.ts +31 -0
- package/src/__tests__/llm-models.test.ts +132 -3
- package/src/__tests__/llm-price-key.test.ts +152 -1
- package/src/__tests__/nemotron-transcribe-pricing.test.ts +61 -0
- package/src/__tests__/normalize-node-params.test.ts +25 -0
- package/src/__tests__/pixverse-v6-max-catalog.test.ts +271 -0
- package/src/__tests__/prompt-length-limits.test.ts +4 -0
- package/src/__tests__/seedance-task-type.test.ts +13 -3
- package/src/__tests__/transcribe-capabilities.test.ts +39 -2
- package/src/__tests__/transcribe-preflight.test.ts +50 -1
- package/src/__tests__/video-audio-capability.test.ts +35 -6
- package/src/__tests__/video-resolution-billed-as-named.test.ts +30 -0
- package/src/__tests__/video-upscale-params.test.ts +62 -0
- package/src/catalog-projection.ts +8 -0
- package/src/credit-estimators/index.ts +10 -0
- package/src/credit-estimators/nemotron-transcribe.ts +87 -0
- package/src/credit-identifiers.ts +109 -35
- package/src/entries/credits.ts +12 -1
- package/src/entries/llm-models.ts +6 -0
- package/src/entries/model-catalog.ts +9 -0
- package/src/entries/models.ts +35 -0
- package/src/entries/nodes.ts +2 -0
- package/src/entries/video.ts +1 -1
- package/src/freecut-protocol.ts +8 -0
- package/src/lip-sync-levers.ts +56 -0
- package/src/lip-sync-pricing.ts +91 -1
- package/src/llm-models.ts +249 -4
- package/src/model-catalog.ts +250 -4
- package/src/model-constants.ts +277 -30
- package/src/model-tree.ts +2 -1
- package/src/nodaro-video-upscale.ts +48 -0
- package/src/node-default-mappings.ts +3 -0
- package/src/normalize-node-params.ts +49 -1
- package/src/runtime-config/contract.ts +10 -7
- package/src/seedance-draft.ts +2 -1
- package/src/transcribe-preflight.ts +58 -7
- package/src/video-duration.ts +9 -0
- package/src/video-ui-defaults.ts +5 -3
- package/src/video-upscale-params.ts +67 -0
- package/dist/chunk-2W745U4A.cjs.map +0 -1
- package/dist/chunk-3M4BNKFJ.cjs.map +0 -1
- package/dist/chunk-3OYO3XCC.js.map +0 -1
- package/dist/chunk-5YYN5X57.js.map +0 -1
- package/dist/chunk-6CSXMWL4.cjs.map +0 -1
- package/dist/chunk-6G7NN4S4.js.map +0 -1
- package/dist/chunk-AFYTX4AI.cjs.map +0 -1
- package/dist/chunk-AOJ6B7K4.cjs.map +0 -1
- package/dist/chunk-E2HZTGYX.js.map +0 -1
- package/dist/chunk-FVII3KHN.js.map +0 -1
- package/dist/chunk-GSFB537T.js.map +0 -1
- package/dist/chunk-IWWVPR3W.cjs.map +0 -1
- package/dist/chunk-KJSRPHJ2.cjs.map +0 -1
- package/dist/chunk-KYMHFVAZ.cjs.map +0 -1
- package/dist/chunk-MYJQELFN.cjs.map +0 -1
- package/dist/chunk-NGKKNSK6.js.map +0 -1
- package/dist/chunk-QWYFHQYK.cjs.map +0 -1
- package/dist/chunk-S24ZBUB4.js.map +0 -1
- package/dist/chunk-SYWR5G3T.js.map +0 -1
- package/dist/chunk-TRVWMKNE.cjs.map +0 -1
- package/dist/chunk-UDDVDQMF.js.map +0 -1
- package/dist/chunk-Y6X7UJSD.js.map +0 -1
package/src/model-constants.ts
CHANGED
|
@@ -304,6 +304,19 @@ export const LLM_TEXT_INPUT_MAX = 100_000
|
|
|
304
304
|
*/
|
|
305
305
|
export const LLM_STRUCTURED_SYSTEM_MAX = 200_000
|
|
306
306
|
|
|
307
|
+
/** Kling 4.0's prompt limit, 8000 chars on both endpoints
|
|
308
|
+
* (docs.kie.ai/market/kling/v4-reference-to-video and /v4-keyframe-to-video). */
|
|
309
|
+
const KLING_4_PROMPT_MAX = 8000
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* The characters a Kling 4 Extend run puts around the user's prompt on its
|
|
313
|
+
* way to Kling 4.0: the continuation wrapper before it, and the opening-frame
|
|
314
|
+
* sentence (after a blank line) that the reference endpoint adds for the
|
|
315
|
+
* source's last frame. Held to the text the run really sends by
|
|
316
|
+
* `backend/src/lib/__tests__/extend-recipe.test.ts`.
|
|
317
|
+
*/
|
|
318
|
+
const KLING_4_EXTEND_PROMPT_OVERHEAD = 131
|
|
319
|
+
|
|
307
320
|
/**
|
|
308
321
|
* Per-provider maximum VIDEO prompt length (chars), VERIFIED against each model's
|
|
309
322
|
* official docs.kie.ai schema (2026-06). Absent → {@link VIDEO_PROMPT_MAX} (8000)
|
|
@@ -345,11 +358,18 @@ export const MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER: Record<string, number> = {
|
|
|
345
358
|
"vidu-q4": 20000,
|
|
346
359
|
// Kling 4.0 — 8000 chars on both endpoints
|
|
347
360
|
// (docs.kie.ai/market/kling/v4-reference-to-video and /v4-keyframe-to-video).
|
|
348
|
-
"kling-4":
|
|
349
|
-
"kling-4-keyframes":
|
|
361
|
+
"kling-4": KLING_4_PROMPT_MAX,
|
|
362
|
+
"kling-4-keyframes": KLING_4_PROMPT_MAX,
|
|
363
|
+
// Kling 4 Extend generates on Kling 4.0's reference endpoint, its user's
|
|
364
|
+
// prompt wrapped: the room the wrapping takes is left out, so a prompt at
|
|
365
|
+
// the cap (its "Avoid: …" clause last) reaches Kling 4.0 whole.
|
|
366
|
+
"kling-4-extend": KLING_4_PROMPT_MAX - KLING_4_EXTEND_PROMPT_OVERHEAD,
|
|
350
367
|
// Kling 4.0 Flash — 8000 chars on both endpoints
|
|
351
368
|
// (docs.kie.ai/market/kling/v4-flash-reference-to-video and /v4-flash-keyframe-to-video).
|
|
352
369
|
"kling-4-flash": 8000,
|
|
370
|
+
// PixVerse V6 Max — 1-5000 chars on both endpoints
|
|
371
|
+
// (docs.kie.ai/market/pixverse/v6-max-text-to-video and /v6-max-image-to-video).
|
|
372
|
+
"pixverse-v6-max": 5000,
|
|
353
373
|
"bytedance-lite": 10000,
|
|
354
374
|
"bytedance-pro": 10000,
|
|
355
375
|
"bytedance-pro-fast": 10000,
|
|
@@ -375,6 +395,9 @@ export const MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER: Record<string, number> = {
|
|
|
375
395
|
"happyhorse-ref2v": 5000,
|
|
376
396
|
"happyhorse-edit": 5000,
|
|
377
397
|
"runway-kie": 1800,
|
|
398
|
+
// OmniHuman 2.0 (lip-sync) — "Up to 300 characters" (maxLength 300 in KIE's
|
|
399
|
+
// omnihuman-2-0 schema, read 2026-11-11). Cut to it before the request.
|
|
400
|
+
"omnihuman-2-0": 300,
|
|
378
401
|
// NB: `wan-2.7` / `wan-2.7-pro` are IMAGE models (see the image registry), not
|
|
379
402
|
// video. The motion-transfer route's prompt is capped at the motion-control
|
|
380
403
|
// limit (2500) inside the route itself — its provider values are the shared
|
|
@@ -1105,6 +1128,10 @@ export const IMAGE_TO_VIDEO_PROVIDERS = [
|
|
|
1105
1128
|
// Kling 4.0 Flash — one id over KIE's two Flash endpoints (picked by what is
|
|
1106
1129
|
// wired); both run with no image, so it is listed in both arrays too.
|
|
1107
1130
|
"kling-4-flash",
|
|
1131
|
+
// PixVerse V6 Max — one id over KIE's image-to-video and text-to-video
|
|
1132
|
+
// endpoints (picked by whether a start frame is wired), so it is listed in
|
|
1133
|
+
// this array AND in TEXT_TO_VIDEO_PROVIDERS's main section.
|
|
1134
|
+
"pixverse-v6-max",
|
|
1108
1135
|
"ltx-2.3-pro",
|
|
1109
1136
|
"ltx-2.3-fast",
|
|
1110
1137
|
// xAI Grok Imagine Video 1.5 — KIE i2v (a start image required). Also listed in
|
|
@@ -1154,6 +1181,8 @@ export const TEXT_TO_VIDEO_PROVIDERS = [
|
|
|
1154
1181
|
"kling-4",
|
|
1155
1182
|
"kling-4-keyframes",
|
|
1156
1183
|
"kling-4-flash",
|
|
1184
|
+
// PixVerse V6 Max — a real text-to-video endpoint runs an image-less request.
|
|
1185
|
+
"pixverse-v6-max",
|
|
1157
1186
|
"ltx-2.3-pro",
|
|
1158
1187
|
"ltx-2.3-fast",
|
|
1159
1188
|
// ── i2v-only providers (image required) ──────────────────────────────────
|
|
@@ -1479,6 +1508,10 @@ export const VIDEO_UPSCALE_PROVIDERS = [
|
|
|
1479
1508
|
// Seedance 2.5 Draft finalize: re-renders a Seedance 2.5 DRAFT (by its task
|
|
1480
1509
|
// id) as the same take at 1080p. See seedance-draft.ts.
|
|
1481
1510
|
"seedance-2-5-hd",
|
|
1511
|
+
// Nodaro Video Upscale: any clip up to 60 s / 50 MB into a 1080p, 2K or 4K
|
|
1512
|
+
// box, priced per second. Offered only where the deployment serves it (see
|
|
1513
|
+
// nodaro-video-upscale.ts).
|
|
1514
|
+
"nodaro-video-upscale",
|
|
1482
1515
|
] as const
|
|
1483
1516
|
export type VideoUpscaleProvider = typeof VIDEO_UPSCALE_PROVIDERS[number]
|
|
1484
1517
|
|
|
@@ -1489,10 +1522,13 @@ export const EXTEND_VIDEO_PROVIDERS = [
|
|
|
1489
1522
|
"ltx-2.3-pro",
|
|
1490
1523
|
// Seedance extends ANY video, one provider per model: Seedance 2.5 (4–30 s
|
|
1491
1524
|
// added) and Seedance 2.0 (4–15 s), each priced on its own rows
|
|
1492
|
-
// (`
|
|
1525
|
+
// (`tailExtendCreditId`). The earlier single id `seedance-2-extend` is
|
|
1493
1526
|
// retired (RETIRED_VIDEO_PROVIDERS) and runs as Seedance 2.5.
|
|
1494
1527
|
"seedance-2-5-extend",
|
|
1495
1528
|
"seedance-2-0-extend",
|
|
1529
|
+
// Kling 4 extends ANY video the same way (3–30 s added, 720p / 1080p, its
|
|
1530
|
+
// sound always on), generated on Kling 4.0 and priced on its own rows.
|
|
1531
|
+
"kling-4-extend",
|
|
1496
1532
|
] as const
|
|
1497
1533
|
export type ExtendVideoProvider = typeof EXTEND_VIDEO_PROVIDERS[number]
|
|
1498
1534
|
|
|
@@ -1502,12 +1538,33 @@ const SEEDANCE_EXTEND_PROVIDERS: readonly SeedanceExtendProvider[] = ["seedance-
|
|
|
1502
1538
|
|
|
1503
1539
|
/**
|
|
1504
1540
|
* Whether a value is one of the Seedance Extend Video providers. A retired id
|
|
1505
|
-
* answers false: pass it through {@link canonicalVideoProvider} first.
|
|
1541
|
+
* answers false: pass it through {@link canonicalVideoProvider} first. It
|
|
1542
|
+
* decides the levers only Seedance has (reference images, the sound switch);
|
|
1543
|
+
* the length, the resolution and the price follow {@link isTailExtendProvider}.
|
|
1506
1544
|
*/
|
|
1507
1545
|
export function isSeedanceExtendProvider(p: unknown): p is SeedanceExtendProvider {
|
|
1508
1546
|
return typeof p === "string" && (SEEDANCE_EXTEND_PROVIDERS as readonly string[]).includes(p)
|
|
1509
1547
|
}
|
|
1510
1548
|
|
|
1549
|
+
/**
|
|
1550
|
+
* The Extend Video providers that continue a video from its tail: the
|
|
1551
|
+
* source's last frame opens the new footage and its last seconds ride as the
|
|
1552
|
+
* `@video_1` reference, then the two are stitched into one clip. Each has its
|
|
1553
|
+
* own catalog entry (its seconds added and resolutions) and price rows, one
|
|
1554
|
+
* per second and resolution (`tailExtendCreditId`).
|
|
1555
|
+
*/
|
|
1556
|
+
export type TailExtendProvider = SeedanceExtendProvider | Extract<ExtendVideoProvider, "kling-4-extend">
|
|
1557
|
+
const TAIL_EXTEND_PROVIDERS: readonly TailExtendProvider[] = [...SEEDANCE_EXTEND_PROVIDERS, "kling-4-extend"]
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* Whether a value is one of the tail-recipe Extend Video providers
|
|
1561
|
+
* ({@link TailExtendProvider}). A retired id answers false: pass it through
|
|
1562
|
+
* {@link canonicalVideoProvider} first.
|
|
1563
|
+
*/
|
|
1564
|
+
export function isTailExtendProvider(p: unknown): p is TailExtendProvider {
|
|
1565
|
+
return typeof p === "string" && (TAIL_EXTEND_PROVIDERS as readonly string[]).includes(p)
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1511
1568
|
/** Lip sync providers */
|
|
1512
1569
|
export const LIP_SYNC_PROVIDERS = [
|
|
1513
1570
|
"kling-avatar",
|
|
@@ -1517,6 +1574,11 @@ export const LIP_SYNC_PROVIDERS = [
|
|
|
1517
1574
|
// performance, per-second billed, 60s audio cap. Routes the default KIE
|
|
1518
1575
|
// path (not in any replicate/fal/seedance/video-input set).
|
|
1519
1576
|
"omnihuman-1-5",
|
|
1577
|
+
// ByteDance OmniHuman 2.0 — a different model from 1.5 (no speaker mask, no
|
|
1578
|
+
// resolution choice, no fast mode, no seed; 720p output). KIE image+audio
|
|
1579
|
+
// avatar on the default KIE path, charged per second of its audio at a rate
|
|
1580
|
+
// (LIP_SYNC_AUDIO_RATES), never by bucket.
|
|
1581
|
+
"omnihuman-2-0",
|
|
1520
1582
|
"latentsync",
|
|
1521
1583
|
"wav2lip",
|
|
1522
1584
|
"video-retalking",
|
|
@@ -1739,12 +1801,14 @@ export function resolveMusicProvider(value: unknown): MusicProvider {
|
|
|
1739
1801
|
* (the canvas picker re-offered the two Replicate lanes in #768 while this enum
|
|
1740
1802
|
* still hid them, so a single-node Run on Whisper 400'd where the same node in a
|
|
1741
1803
|
* workflow Run worked). `elevenlabs-stt` stays FIRST: several call sites take
|
|
1742
|
-
* "the first enabled word-capable provider" from this order.
|
|
1804
|
+
* "the first enabled word-capable provider" from this order. A new engine goes
|
|
1805
|
+
* at the END (Nemotron 3.5 Transcribe, 2026-11-12), so that answer never moves.
|
|
1743
1806
|
*/
|
|
1744
1807
|
export const TRANSCRIBE_PROVIDERS = [
|
|
1745
1808
|
"elevenlabs-stt",
|
|
1746
1809
|
"whisper",
|
|
1747
1810
|
"incredibly-fast-whisper",
|
|
1811
|
+
"nemotron-3-5-transcribe",
|
|
1748
1812
|
] as const
|
|
1749
1813
|
export type TranscribeProvider = typeof TRANSCRIBE_PROVIDERS[number]
|
|
1750
1814
|
|
|
@@ -1760,6 +1824,7 @@ export const TRANSCRIBE_LANES = [
|
|
|
1760
1824
|
"whisper",
|
|
1761
1825
|
"incredibly-fast-whisper",
|
|
1762
1826
|
"elevenlabs-stt",
|
|
1827
|
+
"nemotron-3-5-transcribe",
|
|
1763
1828
|
] as const
|
|
1764
1829
|
export type TranscribeLane = typeof TRANSCRIBE_LANES[number]
|
|
1765
1830
|
|
|
@@ -1768,6 +1833,22 @@ export type TranscribeLane = typeof TRANSCRIBE_LANES[number]
|
|
|
1768
1833
|
const _TRANSCRIBE_PROVIDERS_ARE_LANES: readonly TranscribeLane[] = TRANSCRIBE_PROVIDERS
|
|
1769
1834
|
void _TRANSCRIBE_PROVIDERS_ARE_LANES
|
|
1770
1835
|
|
|
1836
|
+
/**
|
|
1837
|
+
* The lanes Add Captions may transcribe on (its `transcribe_provider`, on the
|
|
1838
|
+
* route, MCP `add_captions` and the SDK's `media.addCaptions`). Add Captions
|
|
1839
|
+
* charges its own flat render price (`add-captions`, `add-captions:kinetic`)
|
|
1840
|
+
* and reserves nothing for the transcription it runs inside, so a lane priced
|
|
1841
|
+
* by the file's length (Nemotron 3.5 Transcribe, per minute) is not one of
|
|
1842
|
+
* them: it would run unpriced inside the render. Kept to the lanes it offered
|
|
1843
|
+
* before Nemotron (2026-11-12); widening it is a pricing decision, not a sync.
|
|
1844
|
+
*/
|
|
1845
|
+
export const CAPTION_TRANSCRIBE_LANES = [
|
|
1846
|
+
"whisper",
|
|
1847
|
+
"incredibly-fast-whisper",
|
|
1848
|
+
"elevenlabs-stt",
|
|
1849
|
+
] as const satisfies readonly TranscribeLane[]
|
|
1850
|
+
export type CaptionTranscribeLane = typeof CAPTION_TRANSCRIBE_LANES[number]
|
|
1851
|
+
|
|
1771
1852
|
/**
|
|
1772
1853
|
* What each transcription lane can actually DO. Single source of truth — never
|
|
1773
1854
|
* re-derive a capability from a provider-name check.
|
|
@@ -1779,11 +1860,44 @@ void _TRANSCRIBE_PROVIDERS_ARE_LANES
|
|
|
1779
1860
|
* for word timings yields an empty array, never an error.
|
|
1780
1861
|
* - `incredibly-fast-whisper` — yes, via `timestamp: "word"`.
|
|
1781
1862
|
* - `elevenlabs-stt` (direct Scribe) — always word-level, flag or not.
|
|
1863
|
+
* - `nemotron-3-5-transcribe` (KIE) — yes, with a speaker per word, via
|
|
1864
|
+
* `timestamps: true` (transcription only: never with a translation).
|
|
1865
|
+
*
|
|
1866
|
+
* `translation`: can the lane translate the speech instead of transcribing it
|
|
1867
|
+
* (`targetLanguage`)? Only Nemotron 3.5 Transcribe, to or from English, and
|
|
1868
|
+
* never together with word timings (KIE refuses the pair).
|
|
1869
|
+
*/
|
|
1870
|
+
export const TRANSCRIBE_PROVIDER_CAPABILITIES: Record<TranscribeLane, { wordTimestamps: boolean; translation: boolean }> = {
|
|
1871
|
+
"whisper": { wordTimestamps: false, translation: false },
|
|
1872
|
+
"incredibly-fast-whisper": { wordTimestamps: true, translation: false },
|
|
1873
|
+
"elevenlabs-stt": { wordTimestamps: true, translation: false },
|
|
1874
|
+
"nemotron-3-5-transcribe": { wordTimestamps: true, translation: true },
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
/**
|
|
1878
|
+
* The languages Nemotron 3.5 Transcribe translates INTO (KIE's
|
|
1879
|
+
* `target_language` enum, ISO 639-1). Translation is supported to or from
|
|
1880
|
+
* English: other speech into `en`, or English speech into any other listed
|
|
1881
|
+
* language. Fewer than the 40 it transcribes.
|
|
1882
|
+
*/
|
|
1883
|
+
export const TRANSCRIBE_TARGET_LANGUAGES = [
|
|
1884
|
+
"en", "zh", "ja", "ko", "fr", "de", "es", "pt", "it", "ru", "nl", "pl", "cs", "sk", "hi", "bg",
|
|
1885
|
+
"hr", "da", "et", "fi", "hu", "lv", "lt", "ro", "sl", "sv", "th", "uk", "ar", "el", "he", "mt",
|
|
1886
|
+
] as const
|
|
1887
|
+
export type TranscribeTargetLanguage = typeof TRANSCRIBE_TARGET_LANGUAGES[number]
|
|
1888
|
+
|
|
1889
|
+
/** The lanes that can translate, in declaration order. */
|
|
1890
|
+
export function transcribeProvidersWithTranslation(): TranscribeLane[] {
|
|
1891
|
+
return TRANSCRIBE_LANES.filter((p) => TRANSCRIBE_PROVIDER_CAPABILITIES[p].translation)
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
/**
|
|
1895
|
+
* Capability question for a lane id from UNTRUSTED data (node data, an
|
|
1896
|
+
* imported workflow, a wire body): an unknown lane answers `false`.
|
|
1782
1897
|
*/
|
|
1783
|
-
export
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
"elevenlabs-stt": { wordTimestamps: true },
|
|
1898
|
+
export function transcribeLaneSupportsTranslation(lane: string | null | undefined): boolean {
|
|
1899
|
+
if (!lane) return false
|
|
1900
|
+
return TRANSCRIBE_PROVIDER_CAPABILITIES[lane as TranscribeLane]?.translation === true
|
|
1787
1901
|
}
|
|
1788
1902
|
|
|
1789
1903
|
/** The lanes that can honour a word-timestamps request, in declaration order. */
|
|
@@ -2064,6 +2178,9 @@ export const DURATION_PRICED_PROVIDERS = new Set([
|
|
|
2064
2178
|
// only Omni SKU here: the per-clip SKUs price in their own branch of
|
|
2065
2179
|
// buildVideoCreditModelIdentifier.
|
|
2066
2180
|
"gemini-omni-flash-1-2",
|
|
2181
|
+
// PixVerse V6 Max — per-second billing at four quality rates, each with and
|
|
2182
|
+
// without native audio (the `:audio` rows, AUDIO_ADDON_PROVIDERS).
|
|
2183
|
+
"pixverse-v6-max",
|
|
2067
2184
|
])
|
|
2068
2185
|
|
|
2069
2186
|
/**
|
|
@@ -2319,6 +2436,36 @@ export function normalizeGrokVideo15Resolution(resolution: string | undefined):
|
|
|
2319
2436
|
/** Most in-between frames Grok Imagine Video 1.5 takes (KIE `keyframes`). */
|
|
2320
2437
|
export const GROK_VIDEO_15_MAX_MIDDLE_FRAMES = 4
|
|
2321
2438
|
|
|
2439
|
+
/**
|
|
2440
|
+
* PixVerse V6 Max — ONE Nodaro id over KIE's two V6 Max endpoints
|
|
2441
|
+
* (`pixverse-v6-max/image-to-video` with a start frame,
|
|
2442
|
+
* `pixverse-v6-max/text-to-video` without one), built by the backend's bespoke
|
|
2443
|
+
* runner (`kie/pixverse-v6-max.ts`).
|
|
2444
|
+
*/
|
|
2445
|
+
export const PIXVERSE_V6_MAX_PROVIDER = "pixverse-v6-max"
|
|
2446
|
+
|
|
2447
|
+
export function isPixverseV6MaxProvider(provider: string | undefined): provider is "pixverse-v6-max" {
|
|
2448
|
+
return provider === PIXVERSE_V6_MAX_PROVIDER
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
/** PixVerse V6 Max quality rendered when the param is omitted or unknown — the
|
|
2452
|
+
* tier the bare credit identifier prices. Never `resolutions[0]`, the 360p
|
|
2453
|
+
* preview tier. (KIE requires a quality; it has no default of its own.) */
|
|
2454
|
+
export const PIXVERSE_V6_MAX_DEFAULT_QUALITY = "720p"
|
|
2455
|
+
|
|
2456
|
+
/**
|
|
2457
|
+
* SINGLE normalization for the PixVerse V6 Max quality lever (KIE `quality`,
|
|
2458
|
+
* the platform's `resolution`). The wire enum is lowercase (`360p` | `540p` |
|
|
2459
|
+
* `720p` | `1080p`), the same spelling as the catalog and the credit
|
|
2460
|
+
* identifiers; this folds case and collapses anything else to
|
|
2461
|
+
* {@link PIXVERSE_V6_MAX_DEFAULT_QUALITY}. The runner sends what this returns
|
|
2462
|
+
* and the credit identifier bills what this returns.
|
|
2463
|
+
*/
|
|
2464
|
+
export function normalizePixverseV6MaxQuality(resolution: string | undefined): "360p" | "540p" | "720p" | "1080p" {
|
|
2465
|
+
const r = resolution?.trim().toLowerCase()
|
|
2466
|
+
return r === "360p" || r === "540p" || r === "1080p" ? r : PIXVERSE_V6_MAX_DEFAULT_QUALITY
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2322
2469
|
/**
|
|
2323
2470
|
* How many in-between frames a Grok Imagine Video 1.5 clip of `durationSec`
|
|
2324
2471
|
* seconds carries. The node has no per-frame time, so the frames sit at whole
|
|
@@ -2463,6 +2610,12 @@ export const GVP_DEFAULT_PROVIDER = "seedance-2"
|
|
|
2463
2610
|
* `seedance-2-mini` re-enters selection here (it was withdrawn by hand on
|
|
2464
2611
|
* 2026-07-21). It qualifies on capability and is the cheapest Seedance-2 SKU,
|
|
2465
2612
|
* which makes it the natural pick for cheap iteration on long runs.
|
|
2613
|
+
*
|
|
2614
|
+
* The ONE exception to the reference-image bar is explicit, per model: a
|
|
2615
|
+
* catalog `gvpWithoutReferences` (PixVerse V6 Max, decided 2026-11-12) admits
|
|
2616
|
+
* a model that takes a start frame but no reference images, on keyframes from
|
|
2617
|
+
* its start anchor or text alone. The capability bar itself is unchanged, so
|
|
2618
|
+
* no other start-frame-only model (wan-i2v, hailuo, bytedance) rides in.
|
|
2466
2619
|
*/
|
|
2467
2620
|
function deriveGvpSupportedProviders(): VideoGenProvider[] {
|
|
2468
2621
|
const dispatchable = new Set<string>(VIDEO_GEN_PROVIDERS as readonly string[])
|
|
@@ -2471,7 +2624,7 @@ function deriveGvpSupportedProviders(): VideoGenProvider[] {
|
|
|
2471
2624
|
(m) =>
|
|
2472
2625
|
m.kind === "video" &&
|
|
2473
2626
|
(m.modes as readonly string[]).includes("i2v") &&
|
|
2474
|
-
m.features?.includes("reference-image") === true &&
|
|
2627
|
+
(m.features?.includes("reference-image") === true || m.gvpWithoutReferences === true) &&
|
|
2475
2628
|
(m.durations?.length ?? 0) > 0 &&
|
|
2476
2629
|
// Must also be dispatchable by the unified video node — the pro route
|
|
2477
2630
|
// hands the provider id straight to the app's imageToVideo.
|
|
@@ -2589,19 +2742,27 @@ export type GvpAnchorWireMode = "upfront" | "progressive" | "none"
|
|
|
2589
2742
|
* here would mean duplicating the plugin's `MAX_SEGMENTS` cap in this repo
|
|
2590
2743
|
* where nothing could keep the two in step.
|
|
2591
2744
|
*/
|
|
2592
|
-
export function resolveGvpAnchorWire(choice: string | undefined): GvpAnchorWireMode | undefined {
|
|
2745
|
+
export function resolveGvpAnchorWire(choice: string | undefined, provider?: string): GvpAnchorWireMode | undefined {
|
|
2593
2746
|
switch (choice) {
|
|
2594
2747
|
case "start-end":
|
|
2595
2748
|
return "upfront"
|
|
2596
2749
|
case "start-only":
|
|
2597
2750
|
return "progressive"
|
|
2598
2751
|
case "reference":
|
|
2599
|
-
|
|
2752
|
+
// A model with no reference images has nothing to carry a reference-
|
|
2753
|
+
// driven shot (`gvpWithoutReferences`): it runs as Auto instead.
|
|
2754
|
+
return gvpTakesReferenceImages(provider) ? "none" : undefined
|
|
2600
2755
|
default:
|
|
2601
2756
|
return undefined
|
|
2602
2757
|
}
|
|
2603
2758
|
}
|
|
2604
2759
|
|
|
2760
|
+
/** Whether a Generate Video Pro segment can send reference images to this model. */
|
|
2761
|
+
function gvpTakesReferenceImages(provider: string | undefined): boolean {
|
|
2762
|
+
if (!provider) return true // no model named: the choice is the caller's, as before
|
|
2763
|
+
return MODEL_CATALOG[provider]?.gvpWithoutReferences !== true
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2605
2766
|
// ---------------------------------------------------------------------------
|
|
2606
2767
|
// SEGMENT BOUNDS — pure catalog readers. The generate-video-pro splitter (in
|
|
2607
2768
|
// three places: the plugin engine, the money closed-form, the UI estimate)
|
|
@@ -3133,6 +3294,12 @@ export const RESOLUTION_DURATION_PRICING: Record<string, readonly string[]> = {
|
|
|
3133
3294
|
// Gemini Omni Flash 1.2 — per-second billing at four resolution rates.
|
|
3134
3295
|
// Ascending; the billed default (720p) is declared in PRICING_DEFAULT_RESOLUTION.
|
|
3135
3296
|
"gemini-omni-flash-1-2": ["360p", "720p", "1080p", "4k"],
|
|
3297
|
+
// PixVerse V6 Max — per-second billing at four quality rates on both
|
|
3298
|
+
// endpoints. Ascending; the billed default (720p) is declared in
|
|
3299
|
+
// PRICING_DEFAULT_RESOLUTION, and normalizePixverseV6MaxQuality pins the same
|
|
3300
|
+
// 720p at the wire. The audio state is its own `:audio` suffix
|
|
3301
|
+
// (AUDIO_ADDON_PROVIDERS), after the resolution.
|
|
3302
|
+
"pixverse-v6-max": ["360p", "540p", "720p", "1080p"],
|
|
3136
3303
|
}
|
|
3137
3304
|
|
|
3138
3305
|
/**
|
|
@@ -3410,6 +3577,9 @@ export function videoStartFrameOnlyProblem(
|
|
|
3410
3577
|
export const AUDIO_ADDON_PROVIDERS = new Set([
|
|
3411
3578
|
"kling-3.0",
|
|
3412
3579
|
"kling",
|
|
3580
|
+
// PixVerse V6 Max — every (seconds × quality) row has an `:audio` twin at
|
|
3581
|
+
// the with-audio rate (`pixverse-v6-max:5s:720p:audio`).
|
|
3582
|
+
"pixverse-v6-max",
|
|
3413
3583
|
])
|
|
3414
3584
|
|
|
3415
3585
|
/**
|
|
@@ -3449,8 +3619,9 @@ export type VideoAudioMode = "none" | "ambient" | "native_speech" | "audio_drive
|
|
|
3449
3619
|
export interface VideoAudioCapability {
|
|
3450
3620
|
mode: VideoAudioMode
|
|
3451
3621
|
/** Provider-option field carrying the on/off toggle, when user-controllable.
|
|
3452
|
-
* `audio` is Wan 3.0's own boolean lever (KIE `input.audio`, default true)
|
|
3453
|
-
|
|
3622
|
+
* `audio` is Wan 3.0's own boolean lever (KIE `input.audio`, default true);
|
|
3623
|
+
* `generateAudioSwitch` is PixVerse V6 Max's (KIE `input.generate_audio_switch`). */
|
|
3624
|
+
field?: "generateAudio" | "sound" | "audio" | "generateAudioSwitch"
|
|
3454
3625
|
/** Audio is always produced and can't be turned off by the user (VEO 3.x). */
|
|
3455
3626
|
alwaysOn?: boolean
|
|
3456
3627
|
/** Enabling audio raises the credit cost (Kling — see AUDIO_ADDON_PROVIDERS). */
|
|
@@ -3463,6 +3634,21 @@ export interface VideoAudioCapability {
|
|
|
3463
3634
|
* (see buildVideoCreditModelIdentifier). Absent ⇒ default off.
|
|
3464
3635
|
*/
|
|
3465
3636
|
defaultOn?: boolean
|
|
3637
|
+
/**
|
|
3638
|
+
* A cost-affecting model whose audio intent the `generateAudio` request field
|
|
3639
|
+
* also carries, after `sound` (PixVerse V6 Max, decided 2026-11-12: the
|
|
3640
|
+
* Generate Video Pro engine sends only `generateAudio`). Read through
|
|
3641
|
+
* {@link videoAudioIntent}, so the switch the model gets and the `:audio`
|
|
3642
|
+
* row the run is priced at follow the same fields. Absent on Kling, which
|
|
3643
|
+
* keeps reading `sound` alone.
|
|
3644
|
+
*/
|
|
3645
|
+
readsGenerateAudio?: true
|
|
3646
|
+
}
|
|
3647
|
+
|
|
3648
|
+
/** The audio fields a video request carries: `sound` (canonical) and the older `generateAudio`. */
|
|
3649
|
+
export interface VideoAudioRequest {
|
|
3650
|
+
readonly sound?: boolean
|
|
3651
|
+
readonly generateAudio?: boolean
|
|
3466
3652
|
}
|
|
3467
3653
|
|
|
3468
3654
|
/**
|
|
@@ -3533,6 +3719,18 @@ export const VIDEO_AUDIO_CAPABILITY: Record<string, VideoAudioCapability> = {
|
|
|
3533
3719
|
"kling-4-keyframes": { mode: "ambient", alwaysOn: true, defaultOn: true },
|
|
3534
3720
|
// Kling 4.0 Flash — the same: native audio on both endpoints, no lever.
|
|
3535
3721
|
"kling-4-flash": { mode: "ambient", alwaysOn: true, defaultOn: true },
|
|
3722
|
+
// PixVerse V6 Max — a boolean `generate_audio_switch` lever on both
|
|
3723
|
+
// endpoints. Cost-affecting: the with-audio rows bill at a higher per-second
|
|
3724
|
+
// rate (`:audio` suffix, AUDIO_ADDON_PROVIDERS), so — like Kling — only the
|
|
3725
|
+
// canonical `sound` intent turns it. `defaultOn`: a request that names no
|
|
3726
|
+
// audio setting renders AND bills audio (decided 2026-11-11; KIE's own default
|
|
3727
|
+
// is off, so the runner sends the switch explicitly). Classified "ambient" on
|
|
3728
|
+
// the Wan 3.0 rule: the schema mentions dialogue and lip-sync, but no live
|
|
3729
|
+
// probe has verified scripted speech, and `native_speech` would reroute the
|
|
3730
|
+
// Story→Video dialogue pipeline past its lip-sync pass. `readsGenerateAudio`:
|
|
3731
|
+
// the `generateAudio` field turns it too (after `sound`), and the price
|
|
3732
|
+
// follows the same resolved intent (videoAudioIntent).
|
|
3733
|
+
"pixverse-v6-max": { mode: "ambient", field: "generateAudioSwitch", affectsCost: true, defaultOn: true, readsGenerateAudio: true },
|
|
3536
3734
|
// Gemini Omni Flash 1.2 — native audio with no on/off input in its schema.
|
|
3537
3735
|
"gemini-omni-flash-1-2": { mode: "ambient", alwaysOn: true },
|
|
3538
3736
|
// Gemini Omni (both SKUs — the pro `gemini-omni-video` and the faster
|
|
@@ -3601,6 +3799,33 @@ export function videoModelCanSpeakDialogue(model: string | undefined): boolean {
|
|
|
3601
3799
|
return mode === "native_speech" || mode === "audio_driven"
|
|
3602
3800
|
}
|
|
3603
3801
|
|
|
3802
|
+
/**
|
|
3803
|
+
* THE audio intent of a video request for one model — `undefined` when the
|
|
3804
|
+
* request expresses none (the model's own default then applies). The ONE
|
|
3805
|
+
* reading of the request's audio fields: {@link applyVideoAudioToggle} (what
|
|
3806
|
+
* the model is SENT) and `buildVideoCreditModelIdentifier` (the `:audio` row
|
|
3807
|
+
* it is PRICED at) both resolve through it, so the two cannot disagree.
|
|
3808
|
+
*
|
|
3809
|
+
* - A cost-affecting model reads `sound` alone (Kling: the field its `:audio`
|
|
3810
|
+
* surcharge has always keyed off), unless it declares `readsGenerateAudio`
|
|
3811
|
+
* (PixVerse V6 Max): then `sound`, else `generateAudio`.
|
|
3812
|
+
* - Every other model reads `sound`, else the `generateAudio` alias.
|
|
3813
|
+
*/
|
|
3814
|
+
export function videoAudioIntent(provider: string | undefined, req: VideoAudioRequest | undefined): boolean | undefined {
|
|
3815
|
+
const cap = getVideoAudioCapability(provider)
|
|
3816
|
+
if (cap.affectsCost && cap.readsGenerateAudio !== true) return req?.sound
|
|
3817
|
+
return req?.sound ?? req?.generateAudio
|
|
3818
|
+
}
|
|
3819
|
+
|
|
3820
|
+
/**
|
|
3821
|
+
* Whether a request PRICES with audio on a cost-affecting model: its intent
|
|
3822
|
+
* ({@link videoAudioIntent}), else the model's own default (`defaultOn`). The
|
|
3823
|
+
* provider runner of such a model renders the same state.
|
|
3824
|
+
*/
|
|
3825
|
+
export function videoAudioPricedOn(provider: string | undefined, req: VideoAudioRequest | undefined): boolean {
|
|
3826
|
+
return videoAudioIntent(provider, req) ?? (getVideoAudioCapability(provider).defaultOn === true)
|
|
3827
|
+
}
|
|
3828
|
+
|
|
3604
3829
|
/**
|
|
3605
3830
|
* Write the caller's neutral "enable native audio" intent onto a KIE provider
|
|
3606
3831
|
* `input` under whichever field the chosen model actually reads, per
|
|
@@ -3612,12 +3837,12 @@ export function videoModelCanSpeakDialogue(model: string | undefined): boolean {
|
|
|
3612
3837
|
* - `sound` is the canonical neutral name; `generateAudio` is accepted as a
|
|
3613
3838
|
* legacy alias (the workflow node + some clients send that key). `sound` wins
|
|
3614
3839
|
* if both are present.
|
|
3615
|
-
* - **
|
|
3616
|
-
*
|
|
3617
|
-
*
|
|
3618
|
-
*
|
|
3619
|
-
*
|
|
3620
|
-
*
|
|
3840
|
+
* - **The intent is {@link videoAudioIntent}'s** — the same reading the `:audio`
|
|
3841
|
+
* credit surcharge (`AUDIO_ADDON_PROVIDERS` in `credit-identifiers.ts`) is
|
|
3842
|
+
* built from. That makes a billed-but-not-generated (or generated-but-not-
|
|
3843
|
+
* billed) divergence structurally impossible: the model and the surcharge
|
|
3844
|
+
* read the same fields. Kling honours ONLY `sound`; PixVerse V6 Max
|
|
3845
|
+
* (`readsGenerateAudio`) and every free model also the `generateAudio` alias.
|
|
3621
3846
|
* - No-op for `alwaysOn` models (VEO — audio can't be toggled) and silent /
|
|
3622
3847
|
* unlisted models (no `field`), and when the caller expressed no intent
|
|
3623
3848
|
* (leaves the model's own default in place).
|
|
@@ -3633,13 +3858,13 @@ export function applyVideoAudioToggle(
|
|
|
3633
3858
|
): void {
|
|
3634
3859
|
const cap = getVideoAudioCapability(provider)
|
|
3635
3860
|
if (!cap.field) return // alwaysOn (VEO) or silent/unlisted model — nothing to toggle
|
|
3636
|
-
//
|
|
3637
|
-
//
|
|
3638
|
-
|
|
3639
|
-
const enabled = cap.affectsCost ? opts?.sound : (opts?.sound ?? opts?.generateAudio)
|
|
3861
|
+
// The one reading of the request's audio fields, shared with the credit
|
|
3862
|
+
// surcharge (see videoAudioIntent). `sound` is canonical and wins when both are set.
|
|
3863
|
+
const enabled = videoAudioIntent(provider, opts)
|
|
3640
3864
|
if (enabled === undefined) return // no intent — keep the model's own default
|
|
3641
3865
|
if (cap.field === "generateAudio") input.generate_audio = enabled
|
|
3642
3866
|
else if (cap.field === "audio") input.audio = enabled
|
|
3867
|
+
else if (cap.field === "generateAudioSwitch") input.generate_audio_switch = enabled
|
|
3643
3868
|
else input.sound = enabled
|
|
3644
3869
|
}
|
|
3645
3870
|
|
|
@@ -3671,8 +3896,9 @@ export const VEO_RESOLUTION_TIERED_PROVIDERS = new Set<string>([
|
|
|
3671
3896
|
* Video variable pricing config — which params affect credit cost per model.
|
|
3672
3897
|
* "duration" = cost varies by video length
|
|
3673
3898
|
* "duration+audio" = cost varies by length AND audio on/off
|
|
3899
|
+
* "duration+resolution+audio" = cost varies by length, resolution AND audio on/off
|
|
3674
3900
|
*/
|
|
3675
|
-
export const VIDEO_VARIABLE_PRICING: Record<string, "duration" | "duration+audio" | "duration+mode" | "duration+resolution+ref" | "duration+resolution"> = {
|
|
3901
|
+
export const VIDEO_VARIABLE_PRICING: Record<string, "duration" | "duration+audio" | "duration+mode" | "duration+resolution+ref" | "duration+resolution" | "duration+resolution+audio"> = {
|
|
3676
3902
|
"kling-3.0": "duration+audio",
|
|
3677
3903
|
"kling-3-omni": "duration",
|
|
3678
3904
|
"kling": "duration+audio",
|
|
@@ -3712,6 +3938,9 @@ export const VIDEO_VARIABLE_PRICING: Record<string, "duration" | "duration+audio
|
|
|
3712
3938
|
// Gemini Omni Flash 1.2 — per-second at four resolution rates; a video edit
|
|
3713
3939
|
// bills the same rates over the source clip.
|
|
3714
3940
|
"gemini-omni-flash-1-2": "duration+resolution",
|
|
3941
|
+
// PixVerse V6 Max — per-second at four quality rates, each with and without
|
|
3942
|
+
// native audio.
|
|
3943
|
+
"pixverse-v6-max": "duration+resolution+audio",
|
|
3715
3944
|
}
|
|
3716
3945
|
|
|
3717
3946
|
/**
|
|
@@ -3802,7 +4031,11 @@ export interface SeedanceTaskTypeFacts {
|
|
|
3802
4031
|
provider: string | undefined
|
|
3803
4032
|
/** The value the request carries, unvalidated: anything but a declared value is Auto. */
|
|
3804
4033
|
requested: unknown
|
|
3805
|
-
|
|
4034
|
+
/**
|
|
4035
|
+
* @deprecated Not read: a draft declares exactly as any other run does. Kept
|
|
4036
|
+
* so a caller that still passes it compiles; leave it out.
|
|
4037
|
+
*/
|
|
4038
|
+
draft?: boolean
|
|
3806
4039
|
/** Reference images only: a start or end frame is not counted. */
|
|
3807
4040
|
referenceImageCount: number
|
|
3808
4041
|
referenceAudioCount: number
|
|
@@ -3867,7 +4100,6 @@ function editReferenceVideosFit(referenceVideoSec: ReadonlyArray<number | undefi
|
|
|
3867
4100
|
* LISTS, matched exactly. The list is what is honoured: a model that lists
|
|
3868
4101
|
* nothing, a value it does not list (`auto`, a wrong case, a number) and a
|
|
3869
4102
|
* model that lists only some values are all Auto;
|
|
3870
|
-
* - the run is not a draft;
|
|
3871
4103
|
* - it has the reference media the type needs
|
|
3872
4104
|
* ({@link seedanceTaskTypeFitsMedia}): `edit` and `extend` need a
|
|
3873
4105
|
* reference video;
|
|
@@ -3885,13 +4117,17 @@ function editReferenceVideosFit(referenceVideoSec: ReadonlyArray<number | undefi
|
|
|
3885
4117
|
* Each value it changes is reported as one adjustment; a value it fills where
|
|
3886
4118
|
* the request had none is not a correction and reports nothing, and neither is
|
|
3887
4119
|
* a ratio that already runs at the forced one (`"Auto"` with a reference video
|
|
3888
|
-
* runs at `"adaptive"`).
|
|
4120
|
+
* runs at `"adaptive"`).
|
|
4121
|
+
*
|
|
4122
|
+
* A draft (`draft: true`) is no exception: it declares, and is forced, exactly
|
|
4123
|
+
* as the same request without Draft (a draft and its 1080p finalize keep an
|
|
4124
|
+
* edit's own length and framing, measured). Pure.
|
|
3889
4125
|
*/
|
|
3890
4126
|
export function resolveSeedanceTaskType(facts: SeedanceTaskTypeFacts): SeedanceTaskTypeResolution {
|
|
3891
4127
|
const { provider, aspectRatio, duration, referenceVideoSec } = facts
|
|
3892
4128
|
const unchanged: SeedanceTaskTypeResolution = { taskType: undefined, aspectRatio, duration, adjustments: [] }
|
|
3893
4129
|
const taskType = listedSeedanceTaskType(provider, facts.requested)
|
|
3894
|
-
if (!taskType || !provider
|
|
4130
|
+
if (!taskType || !provider) return unchanged
|
|
3895
4131
|
const media = {
|
|
3896
4132
|
imageCount: facts.referenceImageCount,
|
|
3897
4133
|
videoCount: referenceVideoSec.length,
|
|
@@ -3992,6 +4228,10 @@ export const PRICING_DEFAULT_RESOLUTION: Record<string, string> = {
|
|
|
3992
4228
|
// that names no resolution is judged at 480p by the free-tier check (decided
|
|
3993
4229
|
// 2026-11-11) and is sent 480p by pricedVideoSelection.
|
|
3994
4230
|
"grok-imagine-video-1.5": "480p",
|
|
4231
|
+
// PixVerse V6 Max — KIE requires a quality and has no default; the runner
|
|
4232
|
+
// sends 720p for an omitted or unknown one (normalizePixverseV6MaxQuality),
|
|
4233
|
+
// never the 360p preview tier.
|
|
4234
|
+
"pixverse-v6-max": "720p",
|
|
3995
4235
|
}
|
|
3996
4236
|
|
|
3997
4237
|
/** Gemini Omni Flash 1.2 per-second tiers — one per allowed duration (3–15s). */
|
|
@@ -4059,6 +4299,12 @@ const KLING_4_FLASH_DURATION_TIERS: Array<{ maxSeconds: number; suffix: string }
|
|
|
4059
4299
|
(_, i) => ({ maxSeconds: i + 3, suffix: `${i + 3}s` }),
|
|
4060
4300
|
)
|
|
4061
4301
|
|
|
4302
|
+
/** PixVerse V6 Max per-second tiers — one per allowed duration (1-15s). */
|
|
4303
|
+
const PIXVERSE_V6_MAX_DURATION_TIERS: Array<{ maxSeconds: number; suffix: string }> = Array.from(
|
|
4304
|
+
{ length: 15 },
|
|
4305
|
+
(_, i) => ({ maxSeconds: i + 1, suffix: `${i + 1}s` }),
|
|
4306
|
+
)
|
|
4307
|
+
|
|
4062
4308
|
/**
|
|
4063
4309
|
* Duration tier breakpoints for variable-priced video models.
|
|
4064
4310
|
* Maps provider → array of { maxSeconds, suffix } in ascending order.
|
|
@@ -4123,7 +4369,7 @@ export const VIDEO_DURATION_TIERS: Record<string, Array<{ maxSeconds: number; su
|
|
|
4123
4369
|
],
|
|
4124
4370
|
// The length tiers of the earlier Seedance Extend rows
|
|
4125
4371
|
// (`seedance-2-extend:<tier>:<res>`). No extend is priced on them any more —
|
|
4126
|
-
// each Seedance extend provider has a row per second (`
|
|
4372
|
+
// each Seedance extend provider has a row per second (`tailExtendCreditId`)
|
|
4127
4373
|
// — but the rows stay, and so do their tiers.
|
|
4128
4374
|
"seedance-2-extend": [
|
|
4129
4375
|
{ maxSeconds: 4, suffix: "4s" },
|
|
@@ -4144,6 +4390,7 @@ export const VIDEO_DURATION_TIERS: Record<string, Array<{ maxSeconds: number; su
|
|
|
4144
4390
|
"kling-4": KLING_4_DURATION_TIERS,
|
|
4145
4391
|
"kling-4-keyframes": KLING_4_DURATION_TIERS,
|
|
4146
4392
|
"kling-4-flash": KLING_4_FLASH_DURATION_TIERS,
|
|
4393
|
+
"pixverse-v6-max": PIXVERSE_V6_MAX_DURATION_TIERS,
|
|
4147
4394
|
"gemini-omni-flash-1-2": GEMINI_OMNI_12_DURATION_TIERS,
|
|
4148
4395
|
// MiniMax Hailuo 3 — true per-second billing (KIE 36.5 cr/s @2K, 22.5 cr/s
|
|
4149
4396
|
// @768P). One tier per allowed second (4-15s) so the composite identifier
|
package/src/model-tree.ts
CHANGED
|
@@ -74,7 +74,8 @@ const MODE_TO_NODE: Readonly<Partial<Record<ModelMode, string>>> = {
|
|
|
74
74
|
|
|
75
75
|
export function modelToNodeTarget(modelId: string): ModelNodeTarget | null {
|
|
76
76
|
const entry = MODEL_CATALOG[modelId]
|
|
77
|
-
|
|
77
|
+
// A model the platform runs on its own creates no node (`pickerHidden`).
|
|
78
|
+
if (!entry || entry.pickerHidden === true) return null
|
|
78
79
|
// Resolve the target node: a valid provider-enum value wins, else the catalog's modes.
|
|
79
80
|
const enumMatch = ENUM_TARGETS.find(([providers]) => providers.includes(modelId))
|
|
80
81
|
const nodeType = enumMatch?.[1] ?? entry.modes.map((m) => MODE_TO_NODE[m]).find(Boolean)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nodaro Video Upscale — the Video Upscale node's `nodaro-video-upscale`
|
|
3
|
+
* provider (decided 2026-11-11): what a caller may ask for and what the
|
|
4
|
+
* platform accepts. The pricing rule lives in `@nodaro/render-rules`
|
|
5
|
+
* (`nodaro-video-upscale-pricing.ts`). It is offered under the deployment's
|
|
6
|
+
* own label (`ownLabel` in the catalog), and only where the deployment serves
|
|
7
|
+
* it (the backend's house-model seam).
|
|
8
|
+
*
|
|
9
|
+
* A tier is an output BOX, not a short side: the clip is fitted into
|
|
10
|
+
* 1920×1080, 2560×1440 or 3840×2160 (the box turned for a portrait clip),
|
|
11
|
+
* never cropped, at its own frame rate, length and audio. It has no frame-rate
|
|
12
|
+
* setting and no 720p tier — Topaz has both.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export const NODARO_VIDEO_UPSCALE_PROVIDER = "nodaro-video-upscale" as const
|
|
16
|
+
|
|
17
|
+
/** The output tiers, cheapest first. */
|
|
18
|
+
export const NODARO_VIDEO_UPSCALE_TIERS = ["1080p", "2k", "4k"] as const
|
|
19
|
+
export type NodaroVideoUpscaleTier = (typeof NODARO_VIDEO_UPSCALE_TIERS)[number]
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The tier a request that names none runs at — the cheapest, as Topaz's
|
|
23
|
+
* default is its 1080p (decided 2026-11-11 by the build; the catalog entry's
|
|
24
|
+
* `defaultResolution` says the same, so the normalizer snaps to it).
|
|
25
|
+
*/
|
|
26
|
+
export const NODARO_VIDEO_UPSCALE_DEFAULT_TIER: NodaroVideoUpscaleTier = "1080p"
|
|
27
|
+
|
|
28
|
+
/** The landscape output box of each tier (a portrait clip gets it turned). */
|
|
29
|
+
export const NODARO_VIDEO_UPSCALE_BOX: Readonly<Record<NodaroVideoUpscaleTier, { readonly width: number; readonly height: number }>> = {
|
|
30
|
+
"1080p": { width: 1920, height: 1080 },
|
|
31
|
+
"2k": { width: 2560, height: 1440 },
|
|
32
|
+
"4k": { width: 3840, height: 2160 },
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** The longest clip accepted, in seconds. A longer one is refused before anything is held. */
|
|
36
|
+
export const NODARO_VIDEO_UPSCALE_MAX_SEC = 60
|
|
37
|
+
|
|
38
|
+
/** The largest clip accepted, in bytes (50 MB, decimal). A larger one is refused before anything is held. */
|
|
39
|
+
export const NODARO_VIDEO_UPSCALE_MAX_BYTES = 50_000_000
|
|
40
|
+
|
|
41
|
+
export function isNodaroVideoUpscaleTier(v: unknown): v is NodaroVideoUpscaleTier {
|
|
42
|
+
return typeof v === "string" && (NODARO_VIDEO_UPSCALE_TIERS as readonly string[]).includes(v)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Is this Video Upscale `provider` value the Nodaro Video Upscale provider? */
|
|
46
|
+
export function isNodaroVideoUpscaleProvider(provider: unknown): provider is typeof NODARO_VIDEO_UPSCALE_PROVIDER {
|
|
47
|
+
return provider === NODARO_VIDEO_UPSCALE_PROVIDER
|
|
48
|
+
}
|
|
@@ -236,6 +236,9 @@ const QUALITY_MAP: Record<string, QualityMapping> = {
|
|
|
236
236
|
"gemini-omni-flash-1-2": { field: "resolution", values: { low: "720p", mid: "1080p", high: "4k" } },
|
|
237
237
|
// Grok Imagine Video 1.5 — 480p / 720p / 1080p, each quality rung its own tier.
|
|
238
238
|
"grok-imagine-video-1.5": { field: "resolution", values: { low: "480p", mid: "720p", high: "1080p" } },
|
|
239
|
+
// PixVerse V6 Max — four tiers; "low" stops at 540p (360p is a preview tier,
|
|
240
|
+
// as on Gemini Omni Flash 1.2) and "mid" is its declared 720p default.
|
|
241
|
+
"pixverse-v6-max": { field: "resolution", values: { low: "540p", mid: "720p", high: "1080p" } },
|
|
239
242
|
// Replicate Flux 2 family — MP-based resolution (matching IMAGE_RESOLUTION_OPTIONS["flux-2-*"]).
|
|
240
243
|
// `field: "resolution"` is mandatory — see Provider Enum Sync pitfall 4.
|
|
241
244
|
// mid = provider default: 1 MP for Klein, 2 MP for Pro/Max.
|