@nodaro/shared 3.61.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-4KYLNTR7.cjs → chunk-2PU3AGGS.cjs} +27 -4
- package/dist/chunk-2PU3AGGS.cjs.map +1 -0
- package/dist/{chunk-43TGSZRJ.js → chunk-2QKF7M2Z.js} +3 -3
- package/dist/{chunk-43TGSZRJ.js.map → chunk-2QKF7M2Z.js.map} +1 -1
- package/dist/{chunk-B6BG3LV2.js → chunk-34QLPTSA.js} +3 -3
- package/dist/{chunk-B6BG3LV2.js.map → chunk-34QLPTSA.js.map} +1 -1
- package/dist/chunk-3K24DWOH.js +453 -0
- package/dist/chunk-3K24DWOH.js.map +1 -0
- package/dist/{chunk-IRQ3SPX7.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-MQZRQ5LM.cjs → chunk-63H4C56Q.cjs} +8 -8
- package/dist/{chunk-MQZRQ5LM.cjs.map → chunk-63H4C56Q.cjs.map} +1 -1
- package/dist/{chunk-IVXSNW2B.cjs → chunk-6BZC2ZHC.cjs} +18 -332
- package/dist/chunk-6BZC2ZHC.cjs.map +1 -0
- package/dist/{chunk-M3SXUUWC.cjs → chunk-6FQBKI2A.cjs} +4 -11
- package/dist/chunk-6FQBKI2A.cjs.map +1 -0
- package/dist/{chunk-673E4KYC.js → chunk-6M563QE6.js} +134 -8
- package/dist/chunk-6M563QE6.js.map +1 -0
- package/dist/chunk-6TGB7ECA.cjs +48 -0
- package/dist/chunk-6TGB7ECA.cjs.map +1 -0
- package/dist/{chunk-XUJC6GHE.cjs → chunk-6XUG4L7X.cjs} +6 -6
- package/dist/{chunk-XUJC6GHE.cjs.map → chunk-6XUG4L7X.cjs.map} +1 -1
- package/dist/{chunk-XZKFZMRT.cjs → chunk-77WU3V3J.cjs} +6 -6
- package/dist/{chunk-XZKFZMRT.cjs.map → chunk-77WU3V3J.cjs.map} +1 -1
- package/dist/{chunk-ZFJN23V4.cjs → chunk-A2PX5IRC.cjs} +4 -4
- package/dist/{chunk-ZFJN23V4.cjs.map → chunk-A2PX5IRC.cjs.map} +1 -1
- package/dist/{chunk-ZDBPQBAA.js → chunk-AE3AAJ4O.js} +3 -3
- package/dist/{chunk-ZDBPQBAA.js.map → chunk-AE3AAJ4O.js.map} +1 -1
- package/dist/chunk-ALRXY4QH.cjs +13 -0
- package/dist/chunk-ALRXY4QH.cjs.map +1 -0
- package/dist/{chunk-UARGJ5IZ.js → chunk-BMJVKYVB.js} +56 -12
- package/dist/chunk-BMJVKYVB.js.map +1 -0
- package/dist/{chunk-6XVHYD5R.js → chunk-CLAKSLXF.js} +4 -9
- package/dist/chunk-CLAKSLXF.js.map +1 -0
- package/dist/chunk-CTANEPMY.js +61 -0
- package/dist/chunk-CTANEPMY.js.map +1 -0
- package/dist/chunk-CZ5IQB3L.js +42 -0
- package/dist/chunk-CZ5IQB3L.js.map +1 -0
- package/dist/{chunk-WGKAOUEQ.cjs → chunk-D34K455O.cjs} +3 -2
- package/dist/chunk-D34K455O.cjs.map +1 -0
- package/dist/chunk-EPXGG27L.js +331 -0
- 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-ZNM2LW3D.cjs → chunk-GMBDLNLD.cjs} +105 -56
- package/dist/chunk-GMBDLNLD.cjs.map +1 -0
- package/dist/{chunk-NJVOJXBS.cjs → chunk-GSKLPI3J.cjs} +104 -49
- package/dist/chunk-GSKLPI3J.cjs.map +1 -0
- package/dist/{chunk-EWS2VFO4.js → chunk-HBXF6RUU.js} +4 -4
- package/dist/{chunk-EWS2VFO4.js.map → chunk-HBXF6RUU.js.map} +1 -1
- package/dist/{chunk-MOMFX32D.js → chunk-HWQ2SYNA.js} +194 -325
- package/dist/chunk-HWQ2SYNA.js.map +1 -0
- package/dist/{chunk-SCMTN57Y.js → chunk-IY3Y462W.js} +3 -3
- package/dist/{chunk-SCMTN57Y.js.map → chunk-IY3Y462W.js.map} +1 -1
- package/dist/{chunk-ZZGQRRN7.js → chunk-KCZHQH2O.js} +6 -306
- package/dist/chunk-KCZHQH2O.js.map +1 -0
- package/dist/{chunk-XROE3CAS.cjs → chunk-KHH54GRP.cjs} +120 -79
- package/dist/chunk-KHH54GRP.cjs.map +1 -0
- package/dist/{chunk-FVVD6XY2.js → chunk-KL6GAYTT.js} +13 -4
- package/dist/chunk-KL6GAYTT.js.map +1 -0
- package/dist/{chunk-FVII3KHN.js → chunk-KMGCHV6O.js} +163 -4
- package/dist/chunk-KMGCHV6O.js.map +1 -0
- package/dist/{chunk-FMXFHJWX.cjs → chunk-L2TVY6XN.cjs} +4 -4
- package/dist/{chunk-FMXFHJWX.cjs.map → chunk-L2TVY6XN.cjs.map} +1 -1
- package/dist/{chunk-FQXRYPCX.cjs → chunk-LH72PQO2.cjs} +505 -68
- package/dist/chunk-LH72PQO2.cjs.map +1 -0
- package/dist/chunk-LMAQUR55.cjs +506 -0
- package/dist/chunk-LMAQUR55.cjs.map +1 -0
- package/dist/{chunk-F5YEMSNK.cjs → chunk-M5OCFGHF.cjs} +571 -30
- package/dist/chunk-M5OCFGHF.cjs.map +1 -0
- package/dist/{chunk-VOWJCUMR.js → chunk-MD4XHED4.js} +3 -3
- package/dist/{chunk-VOWJCUMR.js.map → chunk-MD4XHED4.js.map} +1 -1
- package/dist/chunk-N5HH46JF.cjs +68 -0
- package/dist/chunk-N5HH46JF.cjs.map +1 -0
- package/dist/{chunk-G4XWVWRI.js → chunk-NIAFR5EE.js} +5 -4
- 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-SWVGHAYO.js → chunk-O7RZRUMZ.js} +110 -74
- package/dist/chunk-O7RZRUMZ.js.map +1 -0
- package/dist/{chunk-LLOIAGFB.js → chunk-OV3JTKBY.js} +449 -51
- package/dist/chunk-OV3JTKBY.js.map +1 -0
- package/dist/{chunk-A3FHTSLB.js → chunk-PSKZKLDG.js} +550 -31
- package/dist/chunk-PSKZKLDG.js.map +1 -0
- package/dist/{chunk-VB2ARGQ6.js → chunk-RGNHHIMN.js} +3 -3
- package/dist/chunk-RGNHHIMN.js.map +1 -0
- package/dist/chunk-SMOO5FAH.js +10 -0
- package/dist/chunk-SMOO5FAH.js.map +1 -0
- package/dist/{chunk-5XRRENHD.cjs → chunk-TM5JYSJF.cjs} +170 -17
- package/dist/chunk-TM5JYSJF.cjs.map +1 -0
- package/dist/{chunk-PONP5J5E.cjs → chunk-V24EPI5N.cjs} +13 -3
- package/dist/chunk-V24EPI5N.cjs.map +1 -0
- package/dist/{chunk-RQ4F3AJH.cjs → chunk-V5EEQR2U.cjs} +21 -21
- package/dist/{chunk-RQ4F3AJH.cjs.map → chunk-V5EEQR2U.cjs.map} +1 -1
- package/dist/chunk-WZVIBAKN.cjs +351 -0
- 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-RUHKBEFF.js → chunk-XBTYGQ6Z.js} +63 -10
- package/dist/chunk-XBTYGQ6Z.js.map +1 -0
- package/dist/{chunk-JHTT2V4A.cjs → chunk-XGGZWA4A.cjs} +118 -52
- package/dist/chunk-XGGZWA4A.cjs.map +1 -0
- package/dist/{chunk-5I4T4QR5.cjs → chunk-XGVJGNZW.cjs} +5 -5
- package/dist/{chunk-5I4T4QR5.cjs.map → chunk-XGVJGNZW.cjs.map} +1 -1
- package/dist/{chunk-7ARKVJTN.cjs → chunk-Y35JQPT6.cjs} +228 -383
- package/dist/chunk-Y35JQPT6.cjs.map +1 -0
- package/dist/{chunk-AFQFGZN7.cjs → chunk-Y4GCJJPF.cjs} +8 -6
- package/dist/chunk-Y4GCJJPF.cjs.map +1 -0
- package/dist/{chunk-C77F4ZTL.js → chunk-YUER7TJG.js} +3 -3
- package/dist/{chunk-C77F4ZTL.js.map → chunk-YUER7TJG.js.map} +1 -1
- package/dist/{chunk-HGI2VKIV.js → chunk-YX6TFX7H.js} +67 -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 +44 -44
- package/dist/entries/apps.js +9 -9
- package/dist/entries/credits.cjs +286 -153
- package/dist/entries/credits.d.cts +254 -5
- package/dist/entries/credits.d.ts +254 -5
- package/dist/entries/credits.js +14 -9
- package/dist/entries/entities.cjs +188 -143
- package/dist/entries/entities.d.cts +122 -1
- package/dist/entries/entities.d.ts +122 -1
- package/dist/entries/entities.js +2 -1
- package/dist/entries/llm-models.cjs +77 -57
- package/dist/entries/llm-models.d.cts +85 -5
- package/dist/entries/llm-models.d.ts +85 -5
- package/dist/entries/llm-models.js +2 -2
- package/dist/entries/media.cjs +92 -87
- package/dist/entries/media.d.cts +19 -1
- package/dist/entries/media.d.ts +19 -1
- package/dist/entries/media.js +3 -2
- package/dist/entries/model-catalog.cjs +211 -103
- package/dist/entries/model-catalog.d.cts +135 -19
- package/dist/entries/model-catalog.d.ts +135 -19
- package/dist/entries/model-catalog.js +5 -5
- package/dist/entries/models.cjs +504 -295
- package/dist/entries/models.d.cts +71 -4
- package/dist/entries/models.d.ts +71 -4
- package/dist/entries/models.js +7 -6
- package/dist/entries/nodes.cjs +249 -233
- package/dist/entries/nodes.d.cts +35 -6
- package/dist/entries/nodes.d.ts +35 -6
- package/dist/entries/nodes.js +10 -10
- package/dist/entries/pipeline.cjs +152 -152
- package/dist/entries/pipeline.d.cts +3 -2
- package/dist/entries/pipeline.d.ts +3 -2
- 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 +316 -208
- package/dist/entries/video.d.cts +490 -99
- package/dist/entries/video.d.ts +490 -99
- package/dist/entries/video.js +8 -4
- package/dist/entries/workflow.cjs +102 -102
- package/dist/entries/workflow.d.cts +5 -4
- package/dist/entries/workflow.d.ts +5 -4
- package/dist/entries/workflow.js +2 -2
- package/dist/{gpt-image-2-6-BeZdT-pW.d.cts → gpt-image-2-6-jIRQBRag.d.cts} +6 -0
- package/dist/{gpt-image-2-6-BeZdT-pW.d.ts → gpt-image-2-6-jIRQBRag.d.ts} +6 -0
- package/dist/index.cjs +2727 -2092
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +30 -27
- package/dist/{model-catalog-BgSvskgY.d.ts → model-catalog-C_Eo35tL.d.cts} +158 -14
- package/dist/{model-catalog-BgSvskgY.d.cts → model-catalog-C_Eo35tL.d.ts} +158 -14
- package/dist/{model-constants-DHd9jwQ7.d.cts → model-constants-Bg4ccSQb.d.ts} +427 -34
- package/dist/{model-constants-DHd9jwQ7.d.ts → model-constants-DWcxOmaY.d.cts} +427 -34
- package/package.json +1 -1
- package/src/__tests__/credit-identifiers.test.ts +29 -0
- package/src/__tests__/extend-providers.test.ts +194 -0
- package/src/__tests__/fixtures/mask-composite-quote-parity.json +118 -0
- package/src/__tests__/fixtures/root-exports.baseline.json +68 -0
- package/src/__tests__/gpt-image-2-6-formats.test.ts +4 -1
- package/src/__tests__/grok-video-15-catalog.test.ts +189 -0
- package/src/__tests__/gvp-supported-providers.test.ts +32 -4
- 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__/minimax-h3-image.test.ts +140 -0
- package/src/__tests__/model-makers.test.ts +49 -11
- package/src/__tests__/model-tree.test.ts +13 -0
- 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__/retired-video-provider.test.ts +15 -5
- package/src/__tests__/seedance-25-catalog-modes.test.ts +1 -1
- package/src/__tests__/seedance-task-type.test.ts +188 -0
- package/src/__tests__/seedream-5-5.test.ts +117 -0
- package/src/__tests__/transcribe-capabilities.test.ts +39 -2
- package/src/__tests__/transcribe-preflight.test.ts +50 -1
- package/src/__tests__/unit-contract-compose.test.ts +27 -1
- package/src/__tests__/unit-contracts.test.ts +20 -6
- package/src/__tests__/upscale-factors.test.ts +107 -0
- package/src/__tests__/video-audio-capability.test.ts +35 -6
- package/src/__tests__/video-character-refs.test.ts +20 -2
- package/src/__tests__/video-collapse-parity.test.ts +19 -0
- package/src/__tests__/video-overlay-geometry.test.ts +68 -0
- package/src/__tests__/video-overlay-layer-plan.test.ts +3 -4
- package/src/__tests__/video-overlay-layouts.test.ts +529 -0
- package/src/__tests__/video-overlay-pricing.test.ts +61 -0
- package/src/__tests__/video-overlay-validate.test.ts +128 -0
- package/src/__tests__/video-overlay-wired-kind.test.ts +207 -0
- package/src/__tests__/video-overlay.test.ts +280 -194
- package/src/__tests__/video-ref-limits.test.ts +2 -1
- package/src/__tests__/video-reference-only.test.ts +6 -2
- package/src/__tests__/video-resolution-billed-as-named.test.ts +30 -0
- package/src/__tests__/video-start-frame-only.test.ts +98 -0
- package/src/__tests__/video-upscale-params.test.ts +62 -0
- package/src/__tests__/wired-character-names.test.ts +220 -0
- package/src/catalog-projection.ts +8 -0
- package/src/credit-estimators/index.ts +18 -0
- package/src/credit-estimators/nemotron-transcribe.ts +87 -0
- package/src/credit-estimators/video-overlay.ts +70 -0
- package/src/credit-identifiers.ts +183 -16
- package/src/entity-image-url.ts +21 -0
- package/src/entries/credits.ts +26 -1
- package/src/entries/entities.ts +14 -0
- package/src/entries/llm-models.ts +6 -0
- package/src/entries/model-catalog.ts +44 -1
- package/src/entries/models.ts +69 -0
- package/src/entries/nodes.ts +4 -0
- package/src/entries/video.ts +7 -1
- package/src/freecut-protocol.ts +8 -0
- package/src/generated/unit-contracts.ts +8 -1
- package/src/gpt-image-2-6.ts +6 -0
- package/src/input-image-pricing.ts +76 -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/mask-composite.ts +11 -0
- package/src/minimax-h3-image.ts +61 -0
- package/src/model-catalog.ts +604 -40
- package/src/model-constants.ts +860 -55
- package/src/model-tree.ts +2 -1
- package/src/nodaro-video-upscale.ts +48 -0
- package/src/node-default-mappings.ts +15 -2
- package/src/node-execution-state.ts +4 -3
- package/src/normalize-node-params.ts +49 -1
- package/src/producer-types.ts +23 -1
- package/src/runtime-config/contract.ts +10 -7
- package/src/seedance-draft.ts +2 -1
- package/src/seedance-task-type.ts +37 -0
- package/src/seedream-5-5.ts +45 -0
- package/src/transcribe-preflight.ts +58 -7
- package/src/unit-contract-compose.ts +4 -1
- package/src/upscale-factors.ts +111 -0
- package/src/video-character-refs.ts +7 -4
- package/src/video-duration.ts +9 -0
- package/src/video-overlay-geometry.ts +99 -0
- package/src/video-overlay-input.ts +25 -0
- package/src/video-overlay-layout-ids.ts +48 -0
- package/src/video-overlay-layouts.ts +315 -0
- package/src/video-overlay-validate.ts +223 -0
- package/src/video-overlay-video-layers.ts +304 -0
- package/src/video-overlay.ts +165 -297
- package/src/video-ui-defaults.ts +11 -7
- package/src/video-upscale-params.ts +67 -0
- package/src/wired-character-names.ts +202 -0
- package/dist/chunk-3M4BNKFJ.cjs.map +0 -1
- package/dist/chunk-4KYLNTR7.cjs.map +0 -1
- package/dist/chunk-5XRRENHD.cjs.map +0 -1
- package/dist/chunk-673E4KYC.js.map +0 -1
- package/dist/chunk-6XVHYD5R.js.map +0 -1
- package/dist/chunk-7ARKVJTN.cjs.map +0 -1
- package/dist/chunk-7WGKP3EU.js +0 -23
- package/dist/chunk-7WGKP3EU.js.map +0 -1
- package/dist/chunk-A3FHTSLB.js.map +0 -1
- package/dist/chunk-AFQFGZN7.cjs.map +0 -1
- package/dist/chunk-F5YEMSNK.cjs.map +0 -1
- package/dist/chunk-FQXRYPCX.cjs.map +0 -1
- package/dist/chunk-FVII3KHN.js.map +0 -1
- package/dist/chunk-FVVD6XY2.js.map +0 -1
- package/dist/chunk-G4XWVWRI.js.map +0 -1
- package/dist/chunk-HGI2VKIV.js.map +0 -1
- package/dist/chunk-IRQ3SPX7.js.map +0 -1
- package/dist/chunk-IVXSNW2B.cjs.map +0 -1
- package/dist/chunk-JHTT2V4A.cjs.map +0 -1
- package/dist/chunk-KHZAQGRP.js +0 -17
- package/dist/chunk-KHZAQGRP.js.map +0 -1
- package/dist/chunk-LLOIAGFB.js.map +0 -1
- package/dist/chunk-M3SXUUWC.cjs.map +0 -1
- package/dist/chunk-MOMFX32D.js.map +0 -1
- package/dist/chunk-NCOGGRRP.cjs +0 -27
- package/dist/chunk-NCOGGRRP.cjs.map +0 -1
- package/dist/chunk-NJVOJXBS.cjs.map +0 -1
- package/dist/chunk-PONP5J5E.cjs.map +0 -1
- package/dist/chunk-RUHKBEFF.js.map +0 -1
- package/dist/chunk-SWVGHAYO.js.map +0 -1
- package/dist/chunk-UARGJ5IZ.js.map +0 -1
- package/dist/chunk-VB2ARGQ6.js.map +0 -1
- package/dist/chunk-WGKAOUEQ.cjs.map +0 -1
- package/dist/chunk-XROE3CAS.cjs.map +0 -1
- package/dist/chunk-ZLDFPVVI.cjs +0 -19
- package/dist/chunk-ZLDFPVVI.cjs.map +0 -1
- package/dist/chunk-ZNM2LW3D.cjs.map +0 -1
- package/dist/chunk-ZZGQRRN7.js.map +0 -1
|
@@ -21,8 +21,11 @@ describe("which models write which files", () => {
|
|
|
21
21
|
|
|
22
22
|
it("a menu offers a format only on a model that writes more than one", () => {
|
|
23
23
|
const formats = outputFormatOptionsByKind("image")
|
|
24
|
-
expect(Object.keys(formats).sort()).toEqual(["gpt-image-2-6-economy", "gpt-image-2-6-flare", "gpt-image-2-6-flare-i2i", "gpt-image-2-6-sunburst", "gpt-image-2-6-sunburst-i2i"])
|
|
24
|
+
expect(Object.keys(formats).sort()).toEqual(["gpt-image-2-6-economy", "gpt-image-2-6-flare", "gpt-image-2-6-flare-i2i", "gpt-image-2-6-sunburst", "gpt-image-2-6-sunburst-i2i", "minimax-h3-image", "minimax-h3-image-i2i", "seedream-5-5", "seedream-5-5-i2i"])
|
|
25
25
|
expect(formats[FLARE]!.map((o) => o.value)).toEqual(["png", "jpeg", "webp", "gif", "svg"])
|
|
26
|
+
expect(formats["minimax-h3-image"]!.map((o) => o.value)).toEqual(["png", "jpeg"])
|
|
27
|
+
expect(formats["minimax-h3-image-i2i"]!.map((o) => o.value)).toEqual(["png", "jpeg"])
|
|
28
|
+
expect(formats["seedream-5-5"]!.map((o) => o.value)).toEqual(["png", "jpeg"])
|
|
26
29
|
expect(Object.keys(svgLevelOptionsByKind("image")).sort()).toEqual(["gpt-image-2-6-flare", "gpt-image-2-6-flare-i2i", "gpt-image-2-6-sunburst", "gpt-image-2-6-sunburst-i2i"])
|
|
27
30
|
expect(svgLevelOptionsByKind("image")[FLARE]!.map((o) => o.label)).toEqual(["SVG Standard", "SVG Detailed", "SVG Max"])
|
|
28
31
|
})
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
import { MODEL_CATALOG, hasFeature } from "../model-catalog.js"
|
|
3
|
+
import {
|
|
4
|
+
IMAGE_TO_VIDEO_PROVIDERS,
|
|
5
|
+
TEXT_TO_VIDEO_PROVIDERS,
|
|
6
|
+
GROK_VIDEO_15_PROVIDER,
|
|
7
|
+
GROK_VIDEO_15_MAX_MIDDLE_FRAMES,
|
|
8
|
+
isGrokVideo15Provider,
|
|
9
|
+
normalizeGrokVideo15Resolution,
|
|
10
|
+
grokVideo15MiddleFrameSlots,
|
|
11
|
+
videoKeyframesMiddleCap,
|
|
12
|
+
kling4KeyframeFrameCap,
|
|
13
|
+
KLING_4_MAX_MIDDLE_FRAMES,
|
|
14
|
+
VIDEO_REF_LIMITS_BY_PROVIDER,
|
|
15
|
+
VIDEO_PROVIDERS_WITH_SEPARATE_FRAME_CHANNEL,
|
|
16
|
+
RESOLUTION_DURATION_PRICING,
|
|
17
|
+
PRICING_DEFAULT_RESOLUTION,
|
|
18
|
+
videoProviderRequiresImage,
|
|
19
|
+
videoProviderAppendsFrames,
|
|
20
|
+
videoProviderRunsFromReferences,
|
|
21
|
+
videoProviderTakesLoneEndFrame,
|
|
22
|
+
videoProviderRefsReplaceStartFrame,
|
|
23
|
+
videoProviderFoldsLoneEndFrame,
|
|
24
|
+
isGeminiOmniPerSecondProvider,
|
|
25
|
+
resolveVideoModeForInputs,
|
|
26
|
+
isGvpSupportedProvider,
|
|
27
|
+
} from "../model-constants.js"
|
|
28
|
+
import { buildVideoCreditModelIdentifier, pricedVideoSelection } from "../credit-identifiers.js"
|
|
29
|
+
import { uiResolutionFill } from "../video-ui-defaults.js"
|
|
30
|
+
import { mapQuality } from "../node-default-mappings.js"
|
|
31
|
+
|
|
32
|
+
const ID = "grok-imagine-video-1.5"
|
|
33
|
+
const videoIds = Object.values(MODEL_CATALOG).filter((m) => m.kind === "video").map((m) => m.id)
|
|
34
|
+
|
|
35
|
+
describe("grok-imagine-video-1.5 catalog (frames, in-between frames, 1080p)", () => {
|
|
36
|
+
it("an image-to-video model with an end frame and in-between frames, 1-15s at 480p / 720p / 1080p", () => {
|
|
37
|
+
const m = MODEL_CATALOG[ID]!
|
|
38
|
+
expect(isGrokVideo15Provider(ID)).toBe(true)
|
|
39
|
+
expect(GROK_VIDEO_15_PROVIDER).toBe(ID)
|
|
40
|
+
expect([...m.modes]).toEqual(["i2v"])
|
|
41
|
+
expect([...(m.features ?? [])].sort()).toEqual(["end-frame", "keyframes", "reference-image"])
|
|
42
|
+
// In-between frames need the start frame: no references-only mode.
|
|
43
|
+
expect(videoProviderRunsFromReferences(ID)).toBe(false)
|
|
44
|
+
expect(m.durations).toEqual(Array.from({ length: 15 }, (_, i) => i + 1))
|
|
45
|
+
expect(m.defaultDuration).toBe(8)
|
|
46
|
+
expect(m.resolutions).toEqual(["480p", "720p", "1080p"])
|
|
47
|
+
expect(m.noSeed).toBe(true)
|
|
48
|
+
// Unchanged by this model's frames: the ratio list and the lanes it is in.
|
|
49
|
+
expect(m.aspectRatios).toEqual(["16:9", "9:16", "1:1", "4:3", "3:4"])
|
|
50
|
+
expect(IMAGE_TO_VIDEO_PROVIDERS as readonly string[]).toContain(ID)
|
|
51
|
+
expect(TEXT_TO_VIDEO_PROVIDERS as readonly string[]).toContain(ID)
|
|
52
|
+
expect(videoProviderRequiresImage(ID)).toBe(true)
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
it("the in-between frames ride their own channel, at most 4, and keep the model out of generate-video-pro", () => {
|
|
56
|
+
expect(VIDEO_REF_LIMITS_BY_PROVIDER[ID]).toEqual({ images: GROK_VIDEO_15_MAX_MIDDLE_FRAMES })
|
|
57
|
+
expect(GROK_VIDEO_15_MAX_MIDDLE_FRAMES).toBe(4)
|
|
58
|
+
expect(VIDEO_PROVIDERS_WITH_SEPARATE_FRAME_CHANNEL.has(ID)).toBe(true)
|
|
59
|
+
expect(videoProviderAppendsFrames(ID)).toBe(false)
|
|
60
|
+
expect(isGvpSupportedProvider(ID)).toBe(false)
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
it("480p stays the default: the first priced tier, the collapse target and the bare id's tier", () => {
|
|
64
|
+
expect(RESOLUTION_DURATION_PRICING[ID]).toEqual(["480p", "720p", "1080p"])
|
|
65
|
+
expect(MODEL_CATALOG[ID]!.unlistedResolutionRendersAs).toBe("480p")
|
|
66
|
+
expect(normalizeGrokVideo15Resolution(undefined)).toBe("480p")
|
|
67
|
+
expect(buildVideoCreditModelIdentifier(ID)).toBe(`${ID}:8s:480p`)
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
it("an unset resolution is 480p for every reader of the declared default", () => {
|
|
71
|
+
expect(PRICING_DEFAULT_RESOLUTION[ID]).toBe("480p")
|
|
72
|
+
// The routes and the workflow run fill it (and send it), at the same price.
|
|
73
|
+
expect(pricedVideoSelection({ provider: ID }).resolution).toBe("480p")
|
|
74
|
+
expect(pricedVideoSelection({ provider: ID, resolution: "720p" }).resolution).toBe("720p")
|
|
75
|
+
expect(buildVideoCreditModelIdentifier(ID, 8, undefined, "image-to-video", undefined, undefined)).toBe(`${ID}:8s:480p`)
|
|
76
|
+
// The editor's persisted fill is family-scoped and stays out of it: the
|
|
77
|
+
// panel's own snap keeps 480p first.
|
|
78
|
+
expect(uiResolutionFill(ID)).toBeUndefined()
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
it("the quality rungs land on the three tiers", () => {
|
|
82
|
+
expect(mapQuality(ID, "low")).toEqual({ field: "resolution", value: "480p" })
|
|
83
|
+
expect(mapQuality(ID, "mid")).toEqual({ field: "resolution", value: "720p" })
|
|
84
|
+
expect(mapQuality(ID, "high")).toEqual({ field: "resolution", value: "1080p" })
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
describe("one resolution normalizer for the wire and the bill", () => {
|
|
89
|
+
it("folds case and collapses anything else to 480p", () => {
|
|
90
|
+
expect(normalizeGrokVideo15Resolution("1080P")).toBe("1080p")
|
|
91
|
+
expect(normalizeGrokVideo15Resolution(" 720p ")).toBe("720p")
|
|
92
|
+
expect(normalizeGrokVideo15Resolution("480p")).toBe("480p")
|
|
93
|
+
expect(normalizeGrokVideo15Resolution("4k")).toBe("480p")
|
|
94
|
+
expect(normalizeGrokVideo15Resolution("")).toBe("480p")
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
it("the credit identifier bills what the runner renders, for every spelling", () => {
|
|
98
|
+
const cases: Array<[string | undefined, string]> = [
|
|
99
|
+
["1080P", "1080p"],
|
|
100
|
+
["1080p", "1080p"],
|
|
101
|
+
["720P", "720p"],
|
|
102
|
+
["480p", "480p"],
|
|
103
|
+
[undefined, "480p"],
|
|
104
|
+
["4k", "480p"],
|
|
105
|
+
["nonsense", "480p"],
|
|
106
|
+
]
|
|
107
|
+
for (const [asked, billed] of cases) {
|
|
108
|
+
expect(normalizeGrokVideo15Resolution(asked)).toBe(billed)
|
|
109
|
+
expect(buildVideoCreditModelIdentifier(ID, 8, undefined, "image-to-video", undefined, asked)).toBe(`${ID}:8s:${billed}`)
|
|
110
|
+
}
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
it("prices every second 1-15 on its own row, the default 8s when unset", () => {
|
|
114
|
+
for (let s = 1; s <= 15; s++) {
|
|
115
|
+
expect(buildVideoCreditModelIdentifier(ID, s, undefined, "image-to-video", undefined, "720p")).toBe(`${ID}:${s}s:720p`)
|
|
116
|
+
}
|
|
117
|
+
expect(buildVideoCreditModelIdentifier(ID, undefined, undefined, "image-to-video", undefined, "1080p")).toBe(`${ID}:8s:1080p`)
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
describe("in-between frame slots", () => {
|
|
122
|
+
it("one per whole second inside the clip, at most 4", () => {
|
|
123
|
+
const expected: Record<number, number> = { 1: 0, 2: 1, 3: 2, 4: 3, 5: 4, 8: 4, 15: 4 }
|
|
124
|
+
for (const [seconds, slots] of Object.entries(expected)) {
|
|
125
|
+
expect(grokVideo15MiddleFrameSlots(Number(seconds)), `${seconds}s`).toBe(slots)
|
|
126
|
+
}
|
|
127
|
+
// Unset renders the 8s default.
|
|
128
|
+
expect(grokVideo15MiddleFrameSlots(undefined)).toBe(4)
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
it("the start and end frames take no slot on Grok, and share the cap on Kling 4.0 Keyframes", () => {
|
|
132
|
+
for (const hasStartFrame of [false, true]) {
|
|
133
|
+
for (const hasEndFrame of [false, true]) {
|
|
134
|
+
expect(videoKeyframesMiddleCap(ID, 3, { hasStartFrame, hasEndFrame })).toBe(2)
|
|
135
|
+
for (const seconds of [3, 5, 9, 30]) {
|
|
136
|
+
const ends = (hasStartFrame ? 1 : 0) + (hasEndFrame ? 1 : 0)
|
|
137
|
+
expect(videoKeyframesMiddleCap("kling-4-keyframes", seconds, { hasStartFrame, hasEndFrame }))
|
|
138
|
+
.toBe(Math.max(0, Math.min(KLING_4_MAX_MIDDLE_FRAMES, kling4KeyframeFrameCap(seconds) - ends)))
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
expect(videoKeyframesMiddleCap("seedance-2", 8, { hasStartFrame: true, hasEndFrame: false })).toBeUndefined()
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
describe("a lone end frame and references alone: Grok keeps the general rule", () => {
|
|
147
|
+
it("Grok needs its start image: a lone end frame is not kept as the end, in-between frames do not replace it", () => {
|
|
148
|
+
expect(videoProviderTakesLoneEndFrame(ID)).toBe(false)
|
|
149
|
+
expect(videoProviderFoldsLoneEndFrame(ID)).toBe(false)
|
|
150
|
+
expect(videoProviderRefsReplaceStartFrame(ID)).toBe(false)
|
|
151
|
+
// The workflow run's mode resolver agrees: in-between frames alone go to the
|
|
152
|
+
// text-to-video lane, whose image gate refuses the run.
|
|
153
|
+
expect(resolveVideoModeForInputs(ID, { hasStartFrame: false, hasImageRefs: true })).toBe("text-to-video")
|
|
154
|
+
expect(resolveVideoModeForInputs(ID, { hasStartFrame: true, hasImageRefs: true })).toBe("image-to-video")
|
|
155
|
+
})
|
|
156
|
+
|
|
157
|
+
it("every other model answers exactly as the rules these helpers replace did", () => {
|
|
158
|
+
for (const id of videoIds) {
|
|
159
|
+
if (id === ID) continue
|
|
160
|
+
const oldTakesLoneEnd = hasFeature(id, "keyframes") || isGeminiOmniPerSecondProvider(id)
|
|
161
|
+
expect(videoProviderTakesLoneEndFrame(id), id).toBe(oldTakesLoneEnd)
|
|
162
|
+
const oldRefsCarried = (VIDEO_REF_LIMITS_BY_PROVIDER[id]?.images ?? 0) > 0
|
|
163
|
+
expect(videoProviderRefsReplaceStartFrame(id), id).toBe(oldRefsCarried)
|
|
164
|
+
}
|
|
165
|
+
expect(videoProviderTakesLoneEndFrame("kling-4-keyframes")).toBe(true)
|
|
166
|
+
expect(videoProviderTakesLoneEndFrame("gemini-omni-flash-1-2")).toBe(true)
|
|
167
|
+
})
|
|
168
|
+
})
|
|
169
|
+
|
|
170
|
+
describe("the price ladder", () => {
|
|
171
|
+
it("each catalog row is ceil(rate × seconds × 2.5 / 10) × 10 at the per-second rate of its resolution", () => {
|
|
172
|
+
// Rates in tenths of a provider credit a second (integers, so no float lands
|
|
173
|
+
// a boundary row one step up); the bare id is the 8s 480p row.
|
|
174
|
+
const tenths: Record<string, number> = { "480p": 24, "720p": 45, "1080p": 80 }
|
|
175
|
+
const ladder = (res: string, s: number) => Math.ceil((tenths[res]! * s * 25) / 1000) * 10
|
|
176
|
+
for (const row of MODEL_CATALOG[ID]!.pricing) {
|
|
177
|
+
const m = /^grok-imagine-video-1\.5(?::(\d+)s:(\d+p))?$/.exec(row.identifier)
|
|
178
|
+
expect(m, row.identifier).not.toBeNull()
|
|
179
|
+
const [s, res] = m![1] ? [Number(m![1]), m![2]!] : [8, "480p"]
|
|
180
|
+
expect(row.credits, row.identifier).toBe(ladder(res, s))
|
|
181
|
+
}
|
|
182
|
+
expect(ladder("480p", 8)).toBe(50)
|
|
183
|
+
expect(ladder("720p", 8)).toBe(90)
|
|
184
|
+
expect(ladder("1080p", 8)).toBe(160)
|
|
185
|
+
expect(ladder("480p", 15)).toBe(90)
|
|
186
|
+
expect(ladder("720p", 15)).toBe(170)
|
|
187
|
+
expect(ladder("1080p", 15)).toBe(300)
|
|
188
|
+
})
|
|
189
|
+
})
|
|
@@ -62,14 +62,36 @@ describe("GVP_SUPPORTED_PROVIDERS", () => {
|
|
|
62
62
|
"gemini-omni-flash",
|
|
63
63
|
"gemini-omni-flash-1-2",
|
|
64
64
|
"kling-4",
|
|
65
|
+
"kling-4-flash",
|
|
65
66
|
"grok-i2v",
|
|
66
67
|
"wan-3",
|
|
67
68
|
"wan-3-prime",
|
|
68
69
|
"happyhorse-ref2v",
|
|
69
70
|
"vidu-q4",
|
|
71
|
+
// Admitted by its explicit catalog opt-in, `gvpWithoutReferences` (decided
|
|
72
|
+
// 2026-11-12): a start frame and no reference images.
|
|
73
|
+
"pixverse-v6-max",
|
|
70
74
|
])
|
|
71
75
|
})
|
|
72
76
|
|
|
77
|
+
it("the reference-image bar admits nothing new: the explicit opt-in adds exactly pixverse-v6-max", () => {
|
|
78
|
+
const optedIn = Object.values(MODEL_CATALOG).filter((m) => m.gvpWithoutReferences === true).map((m) => m.id)
|
|
79
|
+
expect(optedIn).toEqual(["pixverse-v6-max"])
|
|
80
|
+
const byCapability = GVP_SUPPORTED_PROVIDERS.filter((p) => MODEL_CATALOG[p]?.features?.includes("reference-image") === true)
|
|
81
|
+
expect(GVP_SUPPORTED_PROVIDERS.filter((p) => !byCapability.includes(p))).toEqual(["pixverse-v6-max"])
|
|
82
|
+
// The opt-in is never redundant: a model that takes reference images needs none.
|
|
83
|
+
for (const id of optedIn) {
|
|
84
|
+
expect(MODEL_CATALOG[id]!.features ?? [], id).not.toContain("reference-image")
|
|
85
|
+
// Keyframes only and no end anchor: it takes neither a reference video nor an end frame.
|
|
86
|
+
expect(supportsExtendRender(id), id).toBe(false)
|
|
87
|
+
expect(supportsEndAnchor(id), id).toBe(false)
|
|
88
|
+
}
|
|
89
|
+
// The start-frame-only models the bar keeps out stay out.
|
|
90
|
+
for (const id of ["wan-i2v", "hailuo-2.3-pro", "hailuo-2.3", "bytedance-pro", "bytedance-pro-fast", "kling-turbo", "minimax"]) {
|
|
91
|
+
expect(isGvpSupportedProvider(id), id).toBe(false)
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
|
|
73
95
|
it("lists the default SKU first (dropdowns render this order)", () => {
|
|
74
96
|
expect(GVP_SUPPORTED_PROVIDERS[0]).toBe(GVP_DEFAULT_PROVIDER)
|
|
75
97
|
})
|
|
@@ -80,7 +102,8 @@ describe("GVP_SUPPORTED_PROVIDERS", () => {
|
|
|
80
102
|
expect(m, `${p} must be in the catalog`).toBeDefined()
|
|
81
103
|
expect(m!.kind).toBe("video")
|
|
82
104
|
expect(m!.modes as readonly string[]).toContain("i2v")
|
|
83
|
-
|
|
105
|
+
// Reference images, or the explicit opt-in for a model that has none.
|
|
106
|
+
if (m!.gvpWithoutReferences !== true) expect(m!.features ?? [], `${p} must accept reference images`).toContain("reference-image")
|
|
84
107
|
// Segmentable: a model with no declared durations cannot be split, and a
|
|
85
108
|
// silent 4-15s fallback would send lengths the provider rejects.
|
|
86
109
|
expect(segmentDurationsFor(p).length, `${p} must declare durations`).toBeGreaterThan(0)
|
|
@@ -91,8 +114,8 @@ describe("GVP_SUPPORTED_PROVIDERS", () => {
|
|
|
91
114
|
* The cross-check that makes the catalog flag trustworthy.
|
|
92
115
|
* VIDEO_REF_LIMITS_BY_PROVIDER was built by the 2026-06-28 audit of actual
|
|
93
116
|
* backend reference-FORWARDING paths (it deliberately omits wan-i2v /
|
|
94
|
-
* hailuo-2.3[-pro] / bytedance-pro[-fast]
|
|
95
|
-
*
|
|
117
|
+
* hailuo-2.3[-pro] / bytedance-pro[-fast], which take a single image_url
|
|
118
|
+
* start frame and drop refs on the floor). If the
|
|
96
119
|
* two signals ever disagree, one of them is lying about what the backend
|
|
97
120
|
* does — fail the build rather than advertise a dropped capability.
|
|
98
121
|
*/
|
|
@@ -106,7 +129,10 @@ describe("GVP_SUPPORTED_PROVIDERS", () => {
|
|
|
106
129
|
!VIDEO_PROVIDERS_WITHOUT_DISPATCH.has(id) &&
|
|
107
130
|
!MODEL_CATALOG[id]?.features?.includes("keyframes"),
|
|
108
131
|
)
|
|
109
|
-
|
|
132
|
+
// A model opted in without reference images has no forwarding path by design.
|
|
133
|
+
const optedIn = GVP_SUPPORTED_PROVIDERS.filter((p) => MODEL_CATALOG[p]?.gvpWithoutReferences === true)
|
|
134
|
+
expect(optedIn.every((p) => VIDEO_REF_LIMITS_BY_PROVIDER[p] === undefined)).toBe(true)
|
|
135
|
+
expect(GVP_SUPPORTED_PROVIDERS.filter((p) => !optedIn.includes(p)).sort()).toEqual(withRefLimits.sort())
|
|
110
136
|
})
|
|
111
137
|
|
|
112
138
|
/**
|
|
@@ -137,6 +163,8 @@ describe("GVP_SUPPORTED_PROVIDERS", () => {
|
|
|
137
163
|
expect(isGvpSupportedProvider("wan-i2v")).toBe(false)
|
|
138
164
|
expect(isGvpSupportedProvider("hailuo-2.3-pro")).toBe(false)
|
|
139
165
|
expect(isGvpSupportedProvider("bytedance-pro")).toBe(false)
|
|
166
|
+
// Its Image References are in-between FRAMES (`keyframes`), like Kling 4.0
|
|
167
|
+
// Keyframes: a pro segment's cast references would land as frames.
|
|
140
168
|
expect(isGvpSupportedProvider("grok-imagine-video-1.5")).toBe(false)
|
|
141
169
|
// VEO 3.1 Quality joins them: i2v and segmentable, but no reference
|
|
142
170
|
// transport at KIE (Fast/Lite only), so the anchor wave has nowhere to
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
import {
|
|
3
|
+
LIP_SYNC_AUDIO_RATES,
|
|
4
|
+
LIP_SYNC_UNMEASURED_ESTIMATE_SECONDS,
|
|
5
|
+
OMNIHUMAN_2_0_PER_SECOND_CREDIT_ID,
|
|
6
|
+
buildLipSyncCreditId,
|
|
7
|
+
getLipSyncMaxAudioSeconds,
|
|
8
|
+
isPerSecondLipSyncProvider,
|
|
9
|
+
lipSyncAudioRateOf,
|
|
10
|
+
lipSyncBilledSeconds,
|
|
11
|
+
lipSyncEstimateSeconds,
|
|
12
|
+
lipSyncFifteenSecondCreditId,
|
|
13
|
+
} from "../lip-sync-pricing.js"
|
|
14
|
+
import { LIP_SYNC_PROVIDERS } from "../model-constants.js"
|
|
15
|
+
import { MODEL_CATALOG } from "../model-catalog.js"
|
|
16
|
+
|
|
17
|
+
const rate = LIP_SYNC_AUDIO_RATES["omnihuman-2-0"]!
|
|
18
|
+
|
|
19
|
+
describe("OmniHuman 2.0 — charged per second of its audio at one rate (decided 2026-11-11)", () => {
|
|
20
|
+
it("is a lip-sync model beside 1.5, with its one-second row", () => {
|
|
21
|
+
expect(LIP_SYNC_PROVIDERS).toContain("omnihuman-2-0")
|
|
22
|
+
expect(LIP_SYNC_PROVIDERS).toContain("omnihuman-1-5")
|
|
23
|
+
expect(lipSyncAudioRateOf("omnihuman-2-0")).toEqual({ rateId: OMNIHUMAN_2_0_PER_SECOND_CREDIT_ID, minSeconds: 4, maxSeconds: 300 })
|
|
24
|
+
expect(OMNIHUMAN_2_0_PER_SECOND_CREDIT_ID).toBe("omnihuman-2-0:per-second")
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
it("is never bucketed: no caller that branches on the bucket set can give it :15s/:30s ids", () => {
|
|
28
|
+
expect(isPerSecondLipSyncProvider("omnihuman-2-0")).toBe(false)
|
|
29
|
+
expect(buildLipSyncCreditId("omnihuman-2-0", 10)).toBe("omnihuman-2-0")
|
|
30
|
+
for (const provider of Object.keys(LIP_SYNC_AUDIO_RATES)) expect(isPerSecondLipSyncProvider(provider), provider).toBe(false)
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
it("takes up to 300 s of audio (refused past it, never trimmed to the 15 s default cap)", () => {
|
|
34
|
+
expect(getLipSyncMaxAudioSeconds("omnihuman-2-0")).toBe(300)
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
it.each([
|
|
38
|
+
[3.2, 4],
|
|
39
|
+
[0.4, 4],
|
|
40
|
+
[4, 4],
|
|
41
|
+
[10, 10],
|
|
42
|
+
[10.04, 11],
|
|
43
|
+
[15, 15],
|
|
44
|
+
[59.999, 60],
|
|
45
|
+
[60, 60],
|
|
46
|
+
[300, 300],
|
|
47
|
+
])("audio of %s s is billed %s s (rounded up, at least 4)", (sec, billed) => {
|
|
48
|
+
expect(lipSyncBilledSeconds(rate, sec)).toBe(billed)
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
it("an estimate quotes the billed seconds when the length is known, else the maximum (or the caller's default)", () => {
|
|
52
|
+
expect(lipSyncEstimateSeconds(rate, 10.04)).toBe(11)
|
|
53
|
+
expect(lipSyncEstimateSeconds(rate, 2)).toBe(4)
|
|
54
|
+
expect(lipSyncEstimateSeconds(rate, 900)).toBe(300)
|
|
55
|
+
expect(lipSyncEstimateSeconds(rate, undefined)).toBe(300)
|
|
56
|
+
expect(lipSyncEstimateSeconds(rate, undefined, LIP_SYNC_UNMEASURED_ESTIMATE_SECONDS)).toBe(15)
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
it("a menu prices it from its 15-second quote; bucketed models keep their :15s row; flat models have none", () => {
|
|
60
|
+
expect(lipSyncFifteenSecondCreditId("omnihuman-2-0")).toBe("omnihuman-2-0:per-second:15u")
|
|
61
|
+
expect(lipSyncFifteenSecondCreditId("omnihuman-1-5")).toBe("omnihuman-1-5:15s")
|
|
62
|
+
expect(lipSyncFifteenSecondCreditId("kling-avatar")).toBe("kling-avatar:15s")
|
|
63
|
+
expect(lipSyncFifteenSecondCreditId("infinitalk")).toBeUndefined()
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
it("the catalog lists its one row and none of 1.5's levers", () => {
|
|
67
|
+
const entry = MODEL_CATALOG["omnihuman-2-0"]!
|
|
68
|
+
expect(entry.modes).toEqual(["lip-sync"])
|
|
69
|
+
expect(entry.pricing.map((p) => p.identifier)).toEqual([OMNIHUMAN_2_0_PER_SECOND_CREDIT_ID])
|
|
70
|
+
expect(entry.resolutions).toBeUndefined()
|
|
71
|
+
// 1.5 is unchanged.
|
|
72
|
+
expect(MODEL_CATALOG["omnihuman-1-5"]!.resolutions).toEqual(["720p", "1080p"])
|
|
73
|
+
})
|
|
74
|
+
})
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
import { LIP_SYNC_PROVIDERS } from "../model-constants.js"
|
|
3
|
+
import { lipSyncLeverClearPatch, lipSyncLeversNotTaken, lipSyncTakesLever, withoutLipSyncLeversNotTaken } from "../lip-sync-levers.js"
|
|
4
|
+
|
|
5
|
+
describe("Lip Sync levers a model does not take", () => {
|
|
6
|
+
it("OmniHuman 2.0 takes no resolution, fast mode or seed", () => {
|
|
7
|
+
expect(lipSyncLeversNotTaken("omnihuman-2-0")).toEqual(["resolution", "fastMode", "seed"])
|
|
8
|
+
expect(lipSyncTakesLever("omnihuman-2-0", "resolution")).toBe(false)
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
it("a node switched from 1.5 to 2.0 loses 1.5's 1080p, fast mode and seed", () => {
|
|
12
|
+
const from15 = { provider: "omnihuman-1-5", resolution: "1080p", fastMode: true, seed: 42, prompt: "smile" }
|
|
13
|
+
expect(lipSyncLeverClearPatch("omnihuman-2-0", from15)).toEqual({ resolution: undefined, fastMode: undefined, seed: undefined })
|
|
14
|
+
expect(withoutLipSyncLeversNotTaken("omnihuman-2-0", from15)).toEqual({ provider: "omnihuman-1-5", resolution: undefined, fastMode: undefined, seed: undefined, prompt: "smile" })
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
it("nothing to clear: an empty patch, and the same object back", () => {
|
|
18
|
+
const clean = { provider: "omnihuman-2-0", prompt: "x" }
|
|
19
|
+
expect(lipSyncLeverClearPatch("omnihuman-2-0", clean)).toEqual({})
|
|
20
|
+
expect(withoutLipSyncLeversNotTaken("omnihuman-2-0", clean)).toBe(clean)
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
it("every other model keeps every lever exactly as it was (kling, infinitalk, 1.5, the rest)", () => {
|
|
24
|
+
const data = { resolution: "1080p", fastMode: true, seed: 7 }
|
|
25
|
+
for (const provider of LIP_SYNC_PROVIDERS.filter((p) => p !== "omnihuman-2-0")) {
|
|
26
|
+
expect(lipSyncLeversNotTaken(provider), provider).toEqual([])
|
|
27
|
+
expect(withoutLipSyncLeversNotTaken(provider, data), provider).toBe(data)
|
|
28
|
+
}
|
|
29
|
+
expect(lipSyncLeversNotTaken(undefined)).toEqual([])
|
|
30
|
+
})
|
|
31
|
+
})
|
|
@@ -56,6 +56,7 @@ const EXPECTED_MODEL_IDS = [
|
|
|
56
56
|
"gpt-5.2",
|
|
57
57
|
"gemini-3.1-pro",
|
|
58
58
|
"gemini-4-argon",
|
|
59
|
+
"gemini-4-carbon",
|
|
59
60
|
"claude-opus-4.7",
|
|
60
61
|
"gpt-5.4",
|
|
61
62
|
"gpt-5.5",
|
|
@@ -66,6 +67,7 @@ const EXPECTED_MODEL_IDS = [
|
|
|
66
67
|
"gpt-6-luna",
|
|
67
68
|
"gpt-6-sol",
|
|
68
69
|
"gpt-6.1-sol",
|
|
70
|
+
"gpt-6.1-terra",
|
|
69
71
|
"grok-4.6",
|
|
70
72
|
"grok-4.7",
|
|
71
73
|
"claude-sonnet-5",
|
|
@@ -75,6 +77,7 @@ const EXPECTED_MODEL_IDS = [
|
|
|
75
77
|
"claude-opus-5.5",
|
|
76
78
|
"claude-fable-5",
|
|
77
79
|
"kimi-k3",
|
|
80
|
+
"kimi-k3.1-pro",
|
|
78
81
|
"deepseek-v4.1-flash",
|
|
79
82
|
]
|
|
80
83
|
|
|
@@ -120,14 +123,14 @@ describe("LLM_MODELS data integrity", () => {
|
|
|
120
123
|
expect(new Set(ids).size).toBe(ids.length)
|
|
121
124
|
})
|
|
122
125
|
|
|
123
|
-
it("has 9 economy,
|
|
126
|
+
it("has 9 economy, 8 standard, 16 premium models", () => {
|
|
124
127
|
const tierCounts: Record<LlmTier, number> = { economy: 0, standard: 0, premium: 0 }
|
|
125
128
|
for (const model of LLM_MODELS) {
|
|
126
129
|
tierCounts[model.tier]++
|
|
127
130
|
}
|
|
128
131
|
expect(tierCounts.economy).toBe(9)
|
|
129
|
-
expect(tierCounts.standard).toBe(
|
|
130
|
-
expect(tierCounts.premium).toBe(
|
|
132
|
+
expect(tierCounts.standard).toBe(8)
|
|
133
|
+
expect(tierCounts.premium).toBe(16)
|
|
131
134
|
})
|
|
132
135
|
|
|
133
136
|
it("all three kieFormats are represented", () => {
|
|
@@ -685,6 +688,11 @@ describe("STRUCTURED_VISION_MODELS", () => {
|
|
|
685
688
|
"deepseek-v4.1-flash",
|
|
686
689
|
// directOnly; the direct lane enforced responseJsonSchema (2026-10-17).
|
|
687
690
|
"gemini-4-argon",
|
|
691
|
+
// 2026-11-12 — text.format json_schema enforced on KIE, vision read.
|
|
692
|
+
// gemini-4-carbon is NOT here: KIE did not enforce its schema, so it
|
|
693
|
+
// declares no structured mode (parse, validate and re-ask instead).
|
|
694
|
+
"gpt-6.1-terra",
|
|
695
|
+
"kimi-k3.1-pro",
|
|
688
696
|
].sort(),
|
|
689
697
|
)
|
|
690
698
|
})
|
|
@@ -1065,6 +1073,127 @@ describe("gemini-4-argon exposure", () => {
|
|
|
1065
1073
|
})
|
|
1066
1074
|
})
|
|
1067
1075
|
|
|
1076
|
+
// ---------------------------------------------------------------------------
|
|
1077
|
+
// 2026-11-12 additions: Kimi K3.1 Pro, GPT-6.1 Terra, Gemini 4 Carbon (KIE
|
|
1078
|
+
// lanes probed that day; Carbon's Google lane checked too)
|
|
1079
|
+
// ---------------------------------------------------------------------------
|
|
1080
|
+
describe("gemini-4-carbon exposure", () => {
|
|
1081
|
+
it("premium Gemini, KIE first with Google's own API as the fallback — never direct-only or direct-first", () => {
|
|
1082
|
+
const m = getLlmModel("gemini-4-carbon")!
|
|
1083
|
+
expect(m.tier).toBe("premium")
|
|
1084
|
+
expect(m.vendor).toBe("google")
|
|
1085
|
+
expect(m.kieFormat).toBe("chat-completions")
|
|
1086
|
+
expect(m.kieSlugOrModel).toBe("gemini-4-carbon-openai")
|
|
1087
|
+
expect(m.directGeminiModel).toBe("gemini-4-carbon")
|
|
1088
|
+
expect(m.directOnly).toBeUndefined()
|
|
1089
|
+
expect(m.preferDirect).toBeUndefined()
|
|
1090
|
+
expect(supportsAdvancedMode("gemini-4-carbon")).toBe(true)
|
|
1091
|
+
// Only Advanced mode moves it to Google's API — no effort does.
|
|
1092
|
+
expect(llmServesDirect("gemini-4-carbon")).toBe(false)
|
|
1093
|
+
expect(llmServesDirect("gemini-4-carbon", "high")).toBe(false)
|
|
1094
|
+
expect(llmServesDirect("gemini-4-carbon", undefined, true)).toBe(true)
|
|
1095
|
+
})
|
|
1096
|
+
|
|
1097
|
+
it("declares NO structured mode — KIE left an off-enum value in a schema field, so callers parse and re-ask", () => {
|
|
1098
|
+
expect(getLlmModel("gemini-4-carbon")?.structuredOutputMode).toBeUndefined()
|
|
1099
|
+
expect(STRUCTURED_VISION_MODELS.map((m) => m.id)).not.toContain("gemini-4-carbon")
|
|
1100
|
+
expect(DESCRIBE_TO_PICKER_MODELS.map((m) => m.id)).not.toContain("gemini-4-carbon")
|
|
1101
|
+
})
|
|
1102
|
+
|
|
1103
|
+
it("offers low / medium / high on both lanes — never `none`, which Google 400s as MINIMAL", () => {
|
|
1104
|
+
expect(availableReasoningEfforts("gemini-4-carbon")).toEqual(["low", "medium", "high"])
|
|
1105
|
+
expect(availableReasoningEfforts("gemini-4-carbon", true)).toEqual(["low", "medium", "high"])
|
|
1106
|
+
expect(effectiveReasoningEffort("gemini-4-carbon", "none")).toBeUndefined()
|
|
1107
|
+
expect(effectiveReasoningEffort("gemini-4-carbon", "max")).toBe("high")
|
|
1108
|
+
})
|
|
1109
|
+
|
|
1110
|
+
it("reasons by default, floored at the default 32768 on the registry's usual 16384 cap", () => {
|
|
1111
|
+
const m = getLlmModel("gemini-4-carbon")!
|
|
1112
|
+
expect(m.thinkingDefaultOn).toBe(true)
|
|
1113
|
+
expect(m.reasoningOutputFloor).toBeUndefined()
|
|
1114
|
+
expect(reasoningOutputFloor(m)).toBe(REASONING_OUTPUT_FLOOR)
|
|
1115
|
+
expect(m.maxOutputTokens).toBe(16384)
|
|
1116
|
+
})
|
|
1117
|
+
|
|
1118
|
+
it("resolves by its id and its KIE slug, and backs no feature default", () => {
|
|
1119
|
+
expect(getLlmModel("gemini-4-carbon-openai")?.id).toBe("gemini-4-carbon")
|
|
1120
|
+
expect(Object.values(LLM_FEATURE_DEFAULTS)).not.toContain("gemini-4-carbon")
|
|
1121
|
+
})
|
|
1122
|
+
|
|
1123
|
+
it("stays OUT of video-analysis — image-only caps until its video + audio change", () => {
|
|
1124
|
+
expect(getLlmModalityCaps("gemini-4-carbon")).toEqual({ image: true, video: false, audio: false })
|
|
1125
|
+
expect(VIDEO_ANALYSIS_LLM_MODELS).not.toContain("gemini-4-carbon")
|
|
1126
|
+
})
|
|
1127
|
+
})
|
|
1128
|
+
|
|
1129
|
+
describe("gpt-6.1-terra exposure", () => {
|
|
1130
|
+
it("standard GPT-6.1 on the codex responses wire with an enforced schema, KIE only", () => {
|
|
1131
|
+
const m = getLlmModel("gpt-6.1-terra")!
|
|
1132
|
+
expect(m.tier).toBe("standard")
|
|
1133
|
+
expect(m.vendor).toBe("openai")
|
|
1134
|
+
expect(m.kieFormat).toBe("responses")
|
|
1135
|
+
expect(m.kieSlugOrModel).toBe("gpt-6-1-terra")
|
|
1136
|
+
expect(m.structuredOutputMode).toBe("responses-json-schema")
|
|
1137
|
+
expect(m.supportsImages).toBe(true)
|
|
1138
|
+
expect(m.supportsTemperature).toBe(false)
|
|
1139
|
+
expect(m.kieCollapseStream).toBeUndefined()
|
|
1140
|
+
expect(supportsAdvancedMode("gpt-6.1-terra")).toBe(false)
|
|
1141
|
+
expect(getLlmModalityCaps("gpt-6.1-terra")).toEqual({ image: true, video: false, audio: false })
|
|
1142
|
+
})
|
|
1143
|
+
|
|
1144
|
+
it("offers low…max but never `none`: a `none` request clamps to Auto (nothing sent)", () => {
|
|
1145
|
+
expect(availableReasoningEfforts("gpt-6.1-terra")).toEqual(["low", "medium", "high", "xhigh", "max"])
|
|
1146
|
+
expect(effectiveReasoningEffort("gpt-6.1-terra", "none")).toBeUndefined()
|
|
1147
|
+
expect(effectiveReasoningEffort("gpt-6.1-terra", "medium")).toBe("medium")
|
|
1148
|
+
})
|
|
1149
|
+
|
|
1150
|
+
it("does not reason by default (0 reasoning tokens with no effort) — no floor on an Auto call", () => {
|
|
1151
|
+
expect(getLlmModel("gpt-6.1-terra")?.thinkingDefaultOn).toBeUndefined()
|
|
1152
|
+
})
|
|
1153
|
+
|
|
1154
|
+
it("is the default of no feature, and the GPT-5.6 Terra entry is untouched", () => {
|
|
1155
|
+
expect(Object.values(LLM_FEATURE_DEFAULTS)).not.toContain("gpt-6.1-terra")
|
|
1156
|
+
expect(getLlmModel("gpt-5.6-terra")?.reasoningEfforts).toEqual(["none", "low", "medium", "high", "xhigh", "max"])
|
|
1157
|
+
})
|
|
1158
|
+
})
|
|
1159
|
+
|
|
1160
|
+
describe("kimi-k3.1-pro exposure", () => {
|
|
1161
|
+
it("premium Kimi on the openai responses wire with an enforced schema, KIE only", () => {
|
|
1162
|
+
const m = getLlmModel("kimi-k3.1-pro")!
|
|
1163
|
+
expect(m.tier).toBe("premium")
|
|
1164
|
+
expect(m.vendor).toBe("moonshot")
|
|
1165
|
+
expect(m.series).toBe("Kimi")
|
|
1166
|
+
expect(m.kieFormat).toBe("responses")
|
|
1167
|
+
expect(m.kieSlugOrModel).toBe("kimi-k3-1-pro")
|
|
1168
|
+
expect(m.structuredOutputMode).toBe("responses-json-schema")
|
|
1169
|
+
expect(m.supportsTemperature).toBe(false)
|
|
1170
|
+
expect(supportsAdvancedMode("kimi-k3.1-pro")).toBe(false)
|
|
1171
|
+
expect(getLlmModalityCaps("kimi-k3.1-pro")).toEqual({ image: true, video: false, audio: false })
|
|
1172
|
+
})
|
|
1173
|
+
|
|
1174
|
+
it("offers KIE's low / high / max — `none` and `medium` send low, `xhigh` high", () => {
|
|
1175
|
+
expect(availableReasoningEfforts("kimi-k3.1-pro")).toEqual(["low", "high", "max"])
|
|
1176
|
+
expect(effectiveReasoningEffort("kimi-k3.1-pro", "medium")).toBe("low")
|
|
1177
|
+
expect(effectiveReasoningEffort("kimi-k3.1-pro", "xhigh")).toBe("high")
|
|
1178
|
+
// Below `low` it sends `low`, never nothing (with none sent KIE runs it at `max`).
|
|
1179
|
+
expect(effectiveReasoningEffort("kimi-k3.1-pro", "none")).toBe("low")
|
|
1180
|
+
expect(effectiveReasoningEffort("kimi-k3.1-pro", undefined)).toBeUndefined()
|
|
1181
|
+
})
|
|
1182
|
+
|
|
1183
|
+
it("reasons by default, so every call is floored at 32768", () => {
|
|
1184
|
+
const m = getLlmModel("kimi-k3.1-pro")!
|
|
1185
|
+
expect(m.thinkingDefaultOn).toBe(true)
|
|
1186
|
+
expect(reasoningOutputFloor(m)).toBe(REASONING_OUTPUT_FLOOR)
|
|
1187
|
+
})
|
|
1188
|
+
|
|
1189
|
+
it("never resolves to kimi-k3, and kimi-k3 keeps its own ladder", () => {
|
|
1190
|
+
expect(getLlmModel("kimi-k3-1-pro")?.id).toBe("kimi-k3.1-pro")
|
|
1191
|
+
expect(getLlmModel("kimi-k3")?.id).toBe("kimi-k3")
|
|
1192
|
+
expect(getLlmModel("kimi-k3")?.reasoningEfforts).toEqual(["low", "medium", "high"])
|
|
1193
|
+
expect(Object.values(LLM_FEATURE_DEFAULTS)).not.toContain("kimi-k3.1-pro")
|
|
1194
|
+
})
|
|
1195
|
+
})
|
|
1196
|
+
|
|
1068
1197
|
// ---------------------------------------------------------------------------
|
|
1069
1198
|
// gpt-6-astra exposure (KIE responses lane live-verified 2026-09-06 on the
|
|
1070
1199
|
// streaming path: enforced text.format json_schema with strict:true, the
|