@nodaro/shared 3.68.0 → 3.69.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-T4GIHHXY.cjs → chunk-25C2E2GI.cjs} +6 -6
- package/dist/{chunk-T4GIHHXY.cjs.map → chunk-25C2E2GI.cjs.map} +1 -1
- package/dist/{chunk-OXTF4Y3P.cjs → chunk-3AB3YIFM.cjs} +6 -6
- package/dist/{chunk-OXTF4Y3P.cjs.map → chunk-3AB3YIFM.cjs.map} +1 -1
- package/dist/{chunk-BCY3A62O.cjs → chunk-3OHRFSQL.cjs} +51 -49
- package/dist/{chunk-BCY3A62O.cjs.map → chunk-3OHRFSQL.cjs.map} +1 -1
- package/dist/{chunk-GNLA5NTT.cjs → chunk-4IMEJQVQ.cjs} +4 -4
- package/dist/{chunk-GNLA5NTT.cjs.map → chunk-4IMEJQVQ.cjs.map} +1 -1
- package/dist/{chunk-4XR66IWF.cjs → chunk-54E2JO4E.cjs} +51 -22
- package/dist/chunk-54E2JO4E.cjs.map +1 -0
- package/dist/{chunk-HTDKEYMY.cjs → chunk-5EQRIUGI.cjs} +139 -91
- package/dist/chunk-5EQRIUGI.cjs.map +1 -0
- package/dist/{chunk-AT53ZQUC.js → chunk-5WHU7CYE.js} +3 -3
- package/dist/{chunk-AT53ZQUC.js.map → chunk-5WHU7CYE.js.map} +1 -1
- package/dist/{chunk-BNR5FKL5.js → chunk-5ZCZL73I.js} +3 -3
- package/dist/{chunk-BNR5FKL5.js.map → chunk-5ZCZL73I.js.map} +1 -1
- package/dist/{chunk-WZG6GZIL.cjs → chunk-6QJHSN6J.cjs} +4 -4
- package/dist/{chunk-WZG6GZIL.cjs.map → chunk-6QJHSN6J.cjs.map} +1 -1
- package/dist/{chunk-OFQ6CU6S.js → chunk-7EQJIGVT.js} +3 -3
- package/dist/{chunk-OFQ6CU6S.js.map → chunk-7EQJIGVT.js.map} +1 -1
- package/dist/{chunk-XEPKONJC.js → chunk-7OSUEYZ4.js} +3 -3
- package/dist/{chunk-XEPKONJC.js.map → chunk-7OSUEYZ4.js.map} +1 -1
- package/dist/{chunk-3L7GMQ4M.cjs → chunk-7PC2YHBN.cjs} +54 -49
- package/dist/chunk-7PC2YHBN.cjs.map +1 -0
- package/dist/{chunk-BMDOPJBP.cjs → chunk-AGIG5HUU.cjs} +17 -17
- package/dist/{chunk-BMDOPJBP.cjs.map → chunk-AGIG5HUU.cjs.map} +1 -1
- package/dist/{chunk-5LWYX4GV.js → chunk-AH6OQXLW.js} +3 -3
- package/dist/{chunk-5LWYX4GV.js.map → chunk-AH6OQXLW.js.map} +1 -1
- package/dist/{chunk-BHL7TAQO.js → chunk-BDW25A7Y.js} +32 -9
- package/dist/chunk-BDW25A7Y.js.map +1 -0
- package/dist/{chunk-5J2LIQYU.js → chunk-DE55SA2X.js} +5 -5
- package/dist/{chunk-5J2LIQYU.js.map → chunk-DE55SA2X.js.map} +1 -1
- package/dist/{chunk-VBP4DH37.js → chunk-DNWFFVC6.js} +130 -15
- package/dist/chunk-DNWFFVC6.js.map +1 -0
- package/dist/{chunk-MVXZP6VB.js → chunk-FUYBUT65.js} +97 -2
- package/dist/chunk-FUYBUT65.js.map +1 -0
- package/dist/{chunk-SW5ZD7BO.js → chunk-G6AOKNAY.js} +3 -3
- package/dist/{chunk-SW5ZD7BO.js.map → chunk-G6AOKNAY.js.map} +1 -1
- package/dist/{chunk-EFYWV2V5.cjs → chunk-I6TBKTW3.cjs} +61 -61
- package/dist/{chunk-EFYWV2V5.cjs.map → chunk-I6TBKTW3.cjs.map} +1 -1
- package/dist/{chunk-3YWZ5SOZ.js → chunk-KLEKJUQI.js} +5 -5
- package/dist/{chunk-3YWZ5SOZ.js.map → chunk-KLEKJUQI.js.map} +1 -1
- package/dist/{chunk-OXBU5AGH.js → chunk-LSX2OFNB.js} +3 -3
- package/dist/{chunk-OXBU5AGH.js.map → chunk-LSX2OFNB.js.map} +1 -1
- package/dist/{chunk-66QSUUB4.cjs → chunk-LY6IR5LL.cjs} +12 -12
- package/dist/{chunk-66QSUUB4.cjs.map → chunk-LY6IR5LL.cjs.map} +1 -1
- package/dist/{chunk-5GG4CG4Y.js → chunk-LZPG4XHT.js} +3 -3
- package/dist/{chunk-5GG4CG4Y.js.map → chunk-LZPG4XHT.js.map} +1 -1
- package/dist/{chunk-PGDR7CO3.cjs → chunk-MGSGLRHZ.cjs} +8 -8
- package/dist/{chunk-PGDR7CO3.cjs.map → chunk-MGSGLRHZ.cjs.map} +1 -1
- package/dist/{chunk-Z77M7Q2R.js → chunk-ML55U7WM.js} +3 -3
- package/dist/{chunk-Z77M7Q2R.js.map → chunk-ML55U7WM.js.map} +1 -1
- package/dist/{chunk-IWUW3YPM.cjs → chunk-NTCSXKZ3.cjs} +5 -5
- package/dist/{chunk-IWUW3YPM.cjs.map → chunk-NTCSXKZ3.cjs.map} +1 -1
- package/dist/{chunk-SCDE676D.js → chunk-OEOOXL3F.js} +65 -23
- package/dist/chunk-OEOOXL3F.js.map +1 -0
- package/dist/{chunk-GF7ZA26H.js → chunk-OOUJZR4K.js} +4 -4
- package/dist/{chunk-GF7ZA26H.js.map → chunk-OOUJZR4K.js.map} +1 -1
- package/dist/{chunk-5IZHECUP.js → chunk-OZA4DE23.js} +3 -3
- package/dist/{chunk-5IZHECUP.js.map → chunk-OZA4DE23.js.map} +1 -1
- package/dist/{chunk-XNJDAW3M.js → chunk-PHQVAPSD.js} +7 -5
- package/dist/{chunk-XNJDAW3M.js.map → chunk-PHQVAPSD.js.map} +1 -1
- package/dist/{chunk-5NVGKXJV.cjs → chunk-PLANUXQL.cjs} +89 -3
- package/dist/chunk-PLANUXQL.cjs.map +1 -0
- package/dist/{chunk-PJAJCFLP.cjs → chunk-QNPYYSLT.cjs} +168 -44
- package/dist/chunk-QNPYYSLT.cjs.map +1 -0
- package/dist/{chunk-G2G7XGFU.cjs → chunk-RURPG6IS.cjs} +7 -7
- package/dist/{chunk-G2G7XGFU.cjs.map → chunk-RURPG6IS.cjs.map} +1 -1
- package/dist/{chunk-PAUWEWTY.js → chunk-TDU45K6Z.js} +12 -7
- package/dist/chunk-TDU45K6Z.js.map +1 -0
- package/dist/{chunk-X2YHKP4D.cjs → chunk-TWUFC32F.cjs} +8 -8
- package/dist/{chunk-X2YHKP4D.cjs.map → chunk-TWUFC32F.cjs.map} +1 -1
- package/dist/{chunk-F6XIH3TZ.cjs → chunk-UJREE6EQ.cjs} +9 -9
- package/dist/{chunk-F6XIH3TZ.cjs.map → chunk-UJREE6EQ.cjs.map} +1 -1
- package/dist/{chunk-37ZSFS6A.cjs → chunk-WML66SUV.cjs} +9 -9
- package/dist/{chunk-37ZSFS6A.cjs.map → chunk-WML66SUV.cjs.map} +1 -1
- package/dist/{chunk-M5QY464F.cjs → chunk-XZYZYWKG.cjs} +21 -21
- package/dist/{chunk-M5QY464F.cjs.map → chunk-XZYZYWKG.cjs.map} +1 -1
- package/dist/{chunk-3QJ3UR5Z.js → chunk-YT4ZTJVC.js} +9 -9
- package/dist/{chunk-3QJ3UR5Z.js.map → chunk-YT4ZTJVC.js.map} +1 -1
- package/dist/{chunk-V6OXSXIX.js → chunk-YVQFYW2U.js} +86 -4
- package/dist/chunk-YVQFYW2U.js.map +1 -0
- package/dist/{chunk-E62W5I6A.cjs → chunk-ZWEVRMFN.cjs} +97 -2
- package/dist/chunk-ZWEVRMFN.cjs.map +1 -0
- package/dist/entries/apps.cjs +42 -42
- package/dist/entries/apps.js +7 -7
- package/dist/entries/credits.cjs +273 -225
- package/dist/entries/credits.d.cts +152 -66
- package/dist/entries/credits.d.ts +152 -66
- package/dist/entries/credits.js +10 -10
- package/dist/entries/llm-models.cjs +84 -68
- package/dist/entries/llm-models.d.cts +36 -3
- package/dist/entries/llm-models.d.ts +36 -3
- package/dist/entries/llm-models.js +2 -2
- package/dist/entries/model-catalog.cjs +133 -133
- package/dist/entries/model-catalog.js +4 -4
- package/dist/entries/models.cjs +431 -395
- package/dist/entries/models.d.cts +2 -2
- package/dist/entries/models.d.ts +2 -2
- package/dist/entries/models.js +6 -6
- package/dist/entries/nodes.cjs +212 -212
- package/dist/entries/nodes.js +8 -8
- package/dist/entries/pipeline.cjs +153 -153
- package/dist/entries/pipeline.d.cts +1 -1
- package/dist/entries/pipeline.d.ts +1 -1
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/social.cjs +177 -177
- package/dist/entries/social.js +2 -2
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +152 -152
- package/dist/entries/video.d.cts +2 -1
- package/dist/entries/video.d.ts +2 -1
- package/dist/entries/video.js +6 -6
- package/dist/index.cjs +1697 -1597
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +21 -21
- package/dist/{model-constants-DZ3tPGFO.d.ts → model-constants-B5DNHIP8.d.ts} +156 -12
- package/dist/{model-constants-BstsUup6.d.cts → model-constants-CQr_d3Kw.d.cts} +156 -12
- package/package.json +1 -1
- package/src/__tests__/extend-providers.test.ts +43 -6
- package/src/__tests__/fixtures/measured-input-quote-parity.json +537 -1
- package/src/__tests__/fixtures/planned-length-quote-parity.json +46 -1
- package/src/__tests__/fixtures/probed-node-quote-parity.json +132 -0
- package/src/__tests__/fixtures/video-utility-quote-parity.json +112 -1
- package/src/__tests__/gemini-omni-extend.test.ts +110 -0
- package/src/__tests__/gvp-supported-providers.test.ts +3 -0
- package/src/__tests__/llm-models.test.ts +116 -2
- package/src/__tests__/llm-price-key.test.ts +2 -0
- package/src/__tests__/seedance-2-5-flash-catalog.test.ts +194 -0
- package/src/__tests__/video-character-refs.test.ts +48 -0
- package/src/credit-identifiers.ts +51 -32
- package/src/entries/credits.ts +17 -0
- package/src/entries/llm-models.ts +4 -0
- package/src/entries/models.ts +11 -0
- package/src/gemini-omni-extend-quote.ts +76 -0
- package/src/lip-sync-pricing.ts +1 -1
- package/src/llm-models.ts +117 -2
- package/src/model-catalog.ts +95 -0
- package/src/model-constants.ts +274 -11
- package/src/node-default-mappings.ts +2 -0
- package/src/seedance-extend-rate.ts +83 -20
- package/src/seedance-lip-sync.ts +68 -0
- package/src/video-character-refs.ts +26 -6
- package/dist/chunk-3L7GMQ4M.cjs.map +0 -1
- package/dist/chunk-4XR66IWF.cjs.map +0 -1
- package/dist/chunk-5NVGKXJV.cjs.map +0 -1
- package/dist/chunk-BHL7TAQO.js.map +0 -1
- package/dist/chunk-E62W5I6A.cjs.map +0 -1
- package/dist/chunk-HTDKEYMY.cjs.map +0 -1
- package/dist/chunk-MVXZP6VB.js.map +0 -1
- package/dist/chunk-PAUWEWTY.js.map +0 -1
- package/dist/chunk-PJAJCFLP.cjs.map +0 -1
- package/dist/chunk-SCDE676D.js.map +0 -1
- package/dist/chunk-V6OXSXIX.js.map +0 -1
- package/dist/chunk-VBP4DH37.js.map +0 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "The id a node that its run prices from a server-side measure (or not at all before the run) is QUOTED at, on BOTH estimates over the same node: the editor's (frontend getModelIdentifier — the node's pill, its Run button, the confirm and the workflow badge) and the server's run estimate (CreditsService.estimateWorkflowCreditsAt — also the credit check before a run and an app's listing), which used to name the bare node type (priced nowhere: 0). Cinematic Avatar: the exact (resolution, duration) id its run holds, Auto at the 15 s ceiling, a duration clamped to 4–15 s (resolveCinematicCreditId). SwitchX: the 240-frame worst-case tier at the node's frame size, the most a run holds and what a workflow run holds (switchXQuoteCreditId: maxResolution 720 only for the number 720) — never a frame count the node's data carries. AI Avatar with no audio wired: the script's bucket in text mode, else the 120 s default (aiAvatarQuoteCreditId). `expected` is the credit id; the server's line is that id's price, above 0. Held by frontend/src/lib/__tests__/probed-node-quote-parity.test.ts and backend/src/ee/billing/__tests__/probed-node-quote-parity.test.ts.",
|
|
3
|
+
"cases": [
|
|
4
|
+
{
|
|
5
|
+
"name": "1. Cinematic Avatar at 720p for 10 s",
|
|
6
|
+
"node": {
|
|
7
|
+
"type": "cinematic-avatar",
|
|
8
|
+
"data": {
|
|
9
|
+
"resolution": "720p",
|
|
10
|
+
"duration": 10
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"expected": "cinematic-avatar:720p:10s"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "1b. Cinematic Avatar at 1080p for 4 s",
|
|
17
|
+
"node": {
|
|
18
|
+
"type": "cinematic-avatar",
|
|
19
|
+
"data": {
|
|
20
|
+
"resolution": "1080p",
|
|
21
|
+
"duration": 4
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"expected": "cinematic-avatar:1080p:4s"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "1c. Cinematic Avatar on Auto: the 15 s ceiling (the length is the model's, known only after the run)",
|
|
28
|
+
"node": {
|
|
29
|
+
"type": "cinematic-avatar",
|
|
30
|
+
"data": {
|
|
31
|
+
"resolution": "1080p",
|
|
32
|
+
"autoDuration": true
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"expected": "cinematic-avatar:1080p:15s"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "1d. Cinematic Avatar with a duration past its range (an API write): clamped to 15 s, as the run holds it",
|
|
39
|
+
"node": {
|
|
40
|
+
"type": "cinematic-avatar",
|
|
41
|
+
"data": {
|
|
42
|
+
"resolution": "720p",
|
|
43
|
+
"duration": 30
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"expected": "cinematic-avatar:720p:15s"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "1e. Cinematic Avatar with no settings: its defaults",
|
|
50
|
+
"node": {
|
|
51
|
+
"type": "cinematic-avatar",
|
|
52
|
+
"data": {}
|
|
53
|
+
},
|
|
54
|
+
"expected": "cinematic-avatar:720p:10s"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "2. SwitchX at its default 1080p: the 240-frame worst-case tier",
|
|
58
|
+
"node": {
|
|
59
|
+
"type": "switchx",
|
|
60
|
+
"data": {}
|
|
61
|
+
},
|
|
62
|
+
"expected": "beeble-switchx:240f:1080p"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "2b. SwitchX at 720p",
|
|
66
|
+
"node": {
|
|
67
|
+
"type": "switchx",
|
|
68
|
+
"data": {
|
|
69
|
+
"maxResolution": 720
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"expected": "beeble-switchx:240f:720p"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "2c. SwitchX whose data carries a frame count (a client's word): still the worst-case tier",
|
|
76
|
+
"node": {
|
|
77
|
+
"type": "switchx",
|
|
78
|
+
"data": {
|
|
79
|
+
"maxResolution": 720,
|
|
80
|
+
"__probedFrameCount": 30
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"expected": "beeble-switchx:240f:720p"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "2d. SwitchX with maxResolution written as text (an API write): 1080p, as a workflow run holds it",
|
|
87
|
+
"node": {
|
|
88
|
+
"type": "switchx",
|
|
89
|
+
"data": {
|
|
90
|
+
"maxResolution": "720"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"expected": "beeble-switchx:240f:1080p"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "3. AI Avatar in audio mode with nothing wired: the 120 s default, a minimum",
|
|
97
|
+
"node": {
|
|
98
|
+
"type": "ai-avatar",
|
|
99
|
+
"data": {
|
|
100
|
+
"speechMode": "audio",
|
|
101
|
+
"avatarId": "a1"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"expected": "heygen-avatar-iv:720p:120s"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "3b. AI Avatar in text mode: its script's bucket (600 characters, about 50 s)",
|
|
108
|
+
"node": {
|
|
109
|
+
"type": "ai-avatar",
|
|
110
|
+
"data": {
|
|
111
|
+
"speechMode": "text",
|
|
112
|
+
"script": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
113
|
+
"voiceId": "v1",
|
|
114
|
+
"engine": "avatar-v",
|
|
115
|
+
"resolution": "1080p"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"expected": "heygen-avatar-v:1080p:60s"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "3c. AI Avatar whose data carries a probed length (a client's word): never read",
|
|
122
|
+
"node": {
|
|
123
|
+
"type": "ai-avatar",
|
|
124
|
+
"data": {
|
|
125
|
+
"speechMode": "audio",
|
|
126
|
+
"__probedDurationSec": 4
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"expected": "heygen-avatar-iv:720p:120s"
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$comment": "Trim Video, Loop Video and Combine Videos are charged by the measured length of each clip they are given (their run probes every input before it reserves). Their quote before a run reads the one measured walk Mask Composite and Video Overlay read (measuredWireLengthSec, @nodaro/render-rules), with VIDEO_UTILITY_PLANNED_CLIP_SLACK_SEC (0.15 s) on each clip a node makes in the run (a quarter second on a Dubbing, an Audio Isolation or a PixVerse V6 extension, whose files run further past their planned length: LONG_OVERSHOOT_PLANNED_CLIP_SLACK_SEC), and every clip less VIDEO_UTILITY_PRICE_GRACE_SEC (0.15 s) before the node's formula (videoUtilityUnitsOf — the rule the charge counts by, so a clip up to 0.15 s past a 5-second mark is priced as if it ended on it, on both): a generation at the length its model renders for its settings (Auto at its longest, a mapped length as the run resolves it), an Extend Video at its source plus what it adds, a node outside the run (or frozen) at the take it hands on, an upload or a Library clip at its measured length, and a clip nothing can size at the estimators' 8-second fallback (a minimum: the run is charged the length it measures). Each case names its step `t`; `whole` is a whole run (the editor's whole-run set, the server's estimate with no run set), `alone` is the step's own Run and its pill (the server's run of `t` alone), `partial` a run of exactly `runSet`. Units are the step's pricing units (each one unit of its own row). Held by frontend/src/lib/__tests__/video-utility-quote-parity.test.ts and backend/src/ee/billing/__tests__/video-utility-quote-parity.test.ts. The step settings: Trim keeps the whole clip (seconds mode, 0 + 0), Loop repeats twice, Combine joins by cuts with its default 1 + 2 frame trims, taken off only where two clips meet (decided 2026-11-14, \"charge what is cut\": the end of every clip but the last and the start of every clip but the first, n − 1 joins), cut at the rate the join conforms its clips to when the graph knows every clip's (an upload's declared `fps`: `runWireFps`), else none cut — the uncut clips, a bound (decided 2026-11-14: frame trims at the clip's real rate; the run cuts at the rate it probes). A Trim's frame trims are cut at its clip's rate the same way. A Combine's quote reads the fields a workflow run sends (combineVideosRunFields: its defaults, never per-join `transitions`, which only a request to the route carries). A case's `stepData` replaces its step's settings; a Trim is priced over the fields its run sends (trimVideoRunFields: its mode's own, an end of 0 left open, so the cut runs to the clip's end).",
|
|
2
|
+
"$comment": "Trim Video, Loop Video and Combine Videos are charged by the measured length of each clip they are given (their run probes every input before it reserves). Their quote before a run reads the one measured walk Mask Composite and Video Overlay read (measuredWireLengthSec, @nodaro/render-rules), with VIDEO_UTILITY_PLANNED_CLIP_SLACK_SEC (0.15 s) on each clip a node makes in the run (a quarter second on a Dubbing, an Audio Isolation or a PixVerse V6 extension, whose files run further past their planned length: LONG_OVERSHOOT_PLANNED_CLIP_SLACK_SEC — but a Dubbing's or an Audio Isolation's not on a Combine Videos, which measures each clip's video stream, which a dub keeps exactly: VIDEO_UTILITY_READING), and every clip less VIDEO_UTILITY_PRICE_GRACE_SEC (0.15 s) before the node's formula (videoUtilityUnitsOf — the rule the charge counts by, so a clip up to 0.15 s past a 5-second mark is priced as if it ended on it, on both): a generation at the length its model renders for its settings (Auto at its longest, a mapped length as the run resolves it), an Extend Video at its source plus what it adds, a node outside the run (or frozen) at the take it hands on, an upload or a Library clip at its measured length, and a clip nothing can size at the estimators' 8-second fallback (a minimum: the run is charged the length it measures). Each case names its step `t`; `whole` is a whole run (the editor's whole-run set, the server's estimate with no run set), `alone` is the step's own Run and its pill (the server's run of `t` alone), `partial` a run of exactly `runSet`. Units are the step's pricing units (each one unit of its own row). Held by frontend/src/lib/__tests__/video-utility-quote-parity.test.ts and backend/src/ee/billing/__tests__/video-utility-quote-parity.test.ts. The step settings: Trim keeps the whole clip (seconds mode, 0 + 0), Loop repeats twice, Combine joins by cuts with its default 1 + 2 frame trims, taken off only where two clips meet (decided 2026-11-14, \"charge what is cut\": the end of every clip but the last and the start of every clip but the first, n − 1 joins), cut at the rate the join conforms its clips to when the graph knows every clip's (an upload's declared `fps`: `runWireFps`), else none cut — the uncut clips, a bound (decided 2026-11-14: frame trims at the clip's real rate; the run cuts at the rate it probes). A Trim's frame trims are cut at its clip's rate the same way. A Combine's quote reads the fields a workflow run sends (combineVideosRunFields: its defaults, never per-join `transitions`, which only a request to the route carries). A case's `stepData` replaces its step's settings; a Trim is priced over the fields its run sends (trimVideoRunFields: its mode's own, an end of 0 left open, so the cut runs to the clip's end).",
|
|
3
3
|
"steps": {
|
|
4
4
|
"trim": {
|
|
5
5
|
"type": "trim-video",
|
|
@@ -3134,6 +3134,117 @@
|
|
|
3134
3134
|
"whole": 6,
|
|
3135
3135
|
"alone": 6
|
|
3136
3136
|
}
|
|
3137
|
+
},
|
|
3138
|
+
{
|
|
3139
|
+
"name": "32. Combine — a Dubbing of each of two 10 s uploads: Combine measures each clip's video stream, which a dub keeps exactly, so each clip takes the step's own slack, not the quarter second: 10.15 + 10.15 s less the grace, 20 s, 4 units (Trim and Loop measure the container: cases 30, 32b)",
|
|
3140
|
+
"step": "combine",
|
|
3141
|
+
"nodes": [
|
|
3142
|
+
{
|
|
3143
|
+
"id": "u",
|
|
3144
|
+
"type": "upload-video",
|
|
3145
|
+
"data": {
|
|
3146
|
+
"url": "https://cdn.example/u.mp4",
|
|
3147
|
+
"generatedResults": [
|
|
3148
|
+
{
|
|
3149
|
+
"url": "https://cdn.example/u.mp4",
|
|
3150
|
+
"duration": 10
|
|
3151
|
+
}
|
|
3152
|
+
],
|
|
3153
|
+
"activeResultIndex": 0
|
|
3154
|
+
}
|
|
3155
|
+
},
|
|
3156
|
+
{
|
|
3157
|
+
"id": "d",
|
|
3158
|
+
"type": "dubbing",
|
|
3159
|
+
"data": {}
|
|
3160
|
+
},
|
|
3161
|
+
{
|
|
3162
|
+
"id": "v",
|
|
3163
|
+
"type": "upload-video",
|
|
3164
|
+
"data": {
|
|
3165
|
+
"url": "https://cdn.example/v.mp4",
|
|
3166
|
+
"generatedResults": [
|
|
3167
|
+
{
|
|
3168
|
+
"url": "https://cdn.example/v.mp4",
|
|
3169
|
+
"duration": 10
|
|
3170
|
+
}
|
|
3171
|
+
],
|
|
3172
|
+
"activeResultIndex": 0
|
|
3173
|
+
}
|
|
3174
|
+
},
|
|
3175
|
+
{
|
|
3176
|
+
"id": "e",
|
|
3177
|
+
"type": "dubbing",
|
|
3178
|
+
"data": {}
|
|
3179
|
+
}
|
|
3180
|
+
],
|
|
3181
|
+
"edges": [
|
|
3182
|
+
{
|
|
3183
|
+
"source": "u",
|
|
3184
|
+
"target": "d",
|
|
3185
|
+
"targetHandle": "video"
|
|
3186
|
+
},
|
|
3187
|
+
{
|
|
3188
|
+
"source": "v",
|
|
3189
|
+
"target": "e",
|
|
3190
|
+
"targetHandle": "video"
|
|
3191
|
+
},
|
|
3192
|
+
{
|
|
3193
|
+
"source": "d",
|
|
3194
|
+
"target": "t",
|
|
3195
|
+
"targetHandle": "in"
|
|
3196
|
+
},
|
|
3197
|
+
{
|
|
3198
|
+
"source": "e",
|
|
3199
|
+
"target": "t",
|
|
3200
|
+
"targetHandle": "in"
|
|
3201
|
+
}
|
|
3202
|
+
],
|
|
3203
|
+
"expectedUnits": {
|
|
3204
|
+
"whole": 4,
|
|
3205
|
+
"alone": 4
|
|
3206
|
+
}
|
|
3207
|
+
},
|
|
3208
|
+
{
|
|
3209
|
+
"name": "32b. Loop ×2 — a Dubbing of a 10 s upload: Loop measures the container, which runs further past the input: twice 10 s plus a quarter second less the grace, 20.2 s, 5 units",
|
|
3210
|
+
"step": "loop",
|
|
3211
|
+
"nodes": [
|
|
3212
|
+
{
|
|
3213
|
+
"id": "u",
|
|
3214
|
+
"type": "upload-video",
|
|
3215
|
+
"data": {
|
|
3216
|
+
"url": "https://cdn.example/u.mp4",
|
|
3217
|
+
"generatedResults": [
|
|
3218
|
+
{
|
|
3219
|
+
"url": "https://cdn.example/u.mp4",
|
|
3220
|
+
"duration": 10
|
|
3221
|
+
}
|
|
3222
|
+
],
|
|
3223
|
+
"activeResultIndex": 0
|
|
3224
|
+
}
|
|
3225
|
+
},
|
|
3226
|
+
{
|
|
3227
|
+
"id": "d",
|
|
3228
|
+
"type": "dubbing",
|
|
3229
|
+
"data": {}
|
|
3230
|
+
}
|
|
3231
|
+
],
|
|
3232
|
+
"edges": [
|
|
3233
|
+
{
|
|
3234
|
+
"source": "u",
|
|
3235
|
+
"target": "d",
|
|
3236
|
+
"targetHandle": "video"
|
|
3237
|
+
},
|
|
3238
|
+
{
|
|
3239
|
+
"source": "d",
|
|
3240
|
+
"target": "t",
|
|
3241
|
+
"targetHandle": "in"
|
|
3242
|
+
}
|
|
3243
|
+
],
|
|
3244
|
+
"expectedUnits": {
|
|
3245
|
+
"whole": 5,
|
|
3246
|
+
"alone": 5
|
|
3247
|
+
}
|
|
3137
3248
|
}
|
|
3138
3249
|
]
|
|
3139
3250
|
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest"
|
|
2
|
+
import {
|
|
3
|
+
EXTEND_VIDEO_PROVIDERS,
|
|
4
|
+
extendHasSoundSwitch,
|
|
5
|
+
getMaxVideoPromptChars,
|
|
6
|
+
isCatalogExtendProvider,
|
|
7
|
+
isSeedanceExtendProvider,
|
|
8
|
+
isTailExtendProvider,
|
|
9
|
+
refVideoAspectProblem,
|
|
10
|
+
} from "../model-constants.js"
|
|
11
|
+
import { MODEL_CATALOG } from "../model-catalog.js"
|
|
12
|
+
import { buildVideoCreditModelIdentifier, tailExtendCreditId, tailExtendResolution } from "../credit-identifiers.js"
|
|
13
|
+
import { geminiOmniExtendQuoteCreditId, parseGeminiOmniExtendQuoteCreditId } from "../gemini-omni-extend-quote.js"
|
|
14
|
+
import { isSeedanceExtendPricedBySecondsSent } from "../seedance-extend-rate.js"
|
|
15
|
+
import * as credits from "../entries/credits.js"
|
|
16
|
+
|
|
17
|
+
const P = "gemini-omni-flash-1-2-extend"
|
|
18
|
+
|
|
19
|
+
describe("Gemini Omni Flash 1.2 Extend: the provider", () => {
|
|
20
|
+
it("is a tail-recipe, catalog extend provider, listed after Kling 4, with no Seedance levers", () => {
|
|
21
|
+
const at = EXTEND_VIDEO_PROVIDERS.indexOf(P)
|
|
22
|
+
expect(EXTEND_VIDEO_PROVIDERS[at - 1]).toBe("kling-4-extend")
|
|
23
|
+
expect(isTailExtendProvider(P)).toBe(true)
|
|
24
|
+
expect(isCatalogExtendProvider(P)).toBe(true)
|
|
25
|
+
expect(isSeedanceExtendProvider(P)).toBe(false)
|
|
26
|
+
expect(extendHasSoundSwitch(P)).toBe(false)
|
|
27
|
+
expect(isSeedanceExtendPricedBySecondsSent(P)).toBe(false)
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it("offers 3–10 s added at 360p / 720p / 1080p / 4K (default 8 s), made by Google, its default run first", () => {
|
|
31
|
+
const entry = MODEL_CATALOG[P]!
|
|
32
|
+
expect(entry.modes).toEqual(["extend"])
|
|
33
|
+
expect(entry.maker).toBe("google")
|
|
34
|
+
expect(entry.durations).toEqual([3, 4, 5, 6, 7, 8, 9, 10])
|
|
35
|
+
expect(entry.defaultDuration).toBe(8)
|
|
36
|
+
expect(entry.resolutions).toEqual(["360p", "720p", "1080p", "4k"])
|
|
37
|
+
expect(entry.pricing[0]!.identifier).toBe(tailExtendCreditId(P))
|
|
38
|
+
expect(entry.pricing[0]!.identifier).toBe("gemini-omni-flash-1-2-extend:720p:sent-10s:added-8s")
|
|
39
|
+
for (const row of entry.pricing) expect(parseGeminiOmniExtendQuoteCreditId(row.identifier), row.identifier).toBeDefined()
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
it("takes fal's 20000-character prompt; the plain Gemini Omni Flash 1.2 model's reference videos are untouched", () => {
|
|
43
|
+
expect(getMaxVideoPromptChars(P)).toBe(20000)
|
|
44
|
+
expect(refVideoAspectProblem("gemini-omni-flash-1-2", 640, 640)).toBeUndefined()
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
it("prices a resolution it renders as asked, any other at 720p", () => {
|
|
48
|
+
for (const res of ["360p", "720p", "1080p", "4k"]) expect(tailExtendResolution(P, res)).toBe(res)
|
|
49
|
+
for (const other of [undefined, "480p", "540p", "4K", "2160p"]) expect(tailExtendResolution(P, other)).toBe("720p")
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
// The one id of a whole run (decided 2026-11-17): both lengths and the resolution.
|
|
54
|
+
describe("geminiOmniExtendQuoteCreditId", () => {
|
|
55
|
+
it("names the resolution, the seconds sent (the overhang rule, at most 10) and the seconds added", () => {
|
|
56
|
+
expect(geminiOmniExtendQuoteCreditId({ sourcePictureSec: 4.37, duration: 3, resolution: "720p" })).toBe("gemini-omni-flash-1-2-extend:720p:sent-4.37s:added-3s")
|
|
57
|
+
expect(geminiOmniExtendQuoteCreditId({ sourcePictureSec: 4.06, duration: 3, resolution: "720p" })).toBe("gemini-omni-flash-1-2-extend:720p:sent-4s:added-3s")
|
|
58
|
+
expect(geminiOmniExtendQuoteCreditId({ sourcePictureSec: 42, duration: 5, resolution: "4k" })).toBe("gemini-omni-flash-1-2-extend:4k:sent-10s:added-5s")
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
it("an unknown source is the whole 10 s window; no length is 8 s; another resolution is 720p; a length outside 3–10 is held in it", () => {
|
|
62
|
+
expect(geminiOmniExtendQuoteCreditId({})).toBe("gemini-omni-flash-1-2-extend:720p:sent-10s:added-8s")
|
|
63
|
+
expect(geminiOmniExtendQuoteCreditId({ sourcePictureSec: null, duration: "12", resolution: "480p" })).toBe("gemini-omni-flash-1-2-extend:720p:sent-10s:added-10s")
|
|
64
|
+
expect(geminiOmniExtendQuoteCreditId({ sourcePictureSec: -1, duration: 2, resolution: "360p" })).toBe("gemini-omni-flash-1-2-extend:360p:sent-10s:added-3s")
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
it("is what tailExtendCreditId and buildVideoCreditModelIdentifier name for a run on an unknown source", () => {
|
|
68
|
+
expect(tailExtendCreditId(P, 5, "4k")).toBe(geminiOmniExtendQuoteCreditId({ duration: 5, resolution: "4k" }))
|
|
69
|
+
expect(buildVideoCreditModelIdentifier(P, 8, undefined, undefined, undefined, "1080p")).toBe("gemini-omni-flash-1-2-extend:1080p:sent-10s:added-8s")
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
it("uses no character a URL query or an id splitter reads specially", () => {
|
|
73
|
+
const id = geminiOmniExtendQuoteCreditId({ sourcePictureSec: 4.37, duration: 3, resolution: "4k" })
|
|
74
|
+
expect(id).toMatch(/^[a-z0-9.:-]+$/)
|
|
75
|
+
expect(encodeURIComponent(id)).toBe(id.replace(/:/g, "%3A"))
|
|
76
|
+
// Not a `<rate>:<N>u` quote id.
|
|
77
|
+
expect(id.endsWith("u")).toBe(false)
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
describe("parseGeminiOmniExtendQuoteCreditId", () => {
|
|
82
|
+
it("reads back what the builder wrote", () => {
|
|
83
|
+
for (const [src, dur, res] of [[4.37, 3, "720p"], [undefined, 8, "4k"], [6, 10, "360p"]] as const) {
|
|
84
|
+
const id = geminiOmniExtendQuoteCreditId({ sourcePictureSec: src, duration: dur, resolution: res })
|
|
85
|
+
expect(parseGeminiOmniExtendQuoteCreditId(id)).toEqual({ resolution: res, sentSec: src ?? 10, addedSec: dur })
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
it("answers nothing for any other shape", () => {
|
|
90
|
+
for (const id of [
|
|
91
|
+
"gemini-omni-flash-1-2-extend:720p:per-second",
|
|
92
|
+
"gemini-omni-flash-1-2-extend:8s:720p",
|
|
93
|
+
"gemini-omni-flash-1-2-extend:720p:sent-10s:added-8.5s",
|
|
94
|
+
"gemini-omni-flash-1-2-extend:720p:sent-0s:added-8s",
|
|
95
|
+
"gemini-omni-flash-1-2-extend:720p:sent-10s+added-8s",
|
|
96
|
+
"seedance-2-5-extend:720p:per-2s:9u",
|
|
97
|
+
"",
|
|
98
|
+
]) expect(parseGeminiOmniExtendQuoteCreditId(id), id).toBeUndefined()
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
// The irrevocable grant is kept minimal (decided 2026-11-17): the id builder,
|
|
103
|
+
// its reader and its parts' type; the rule, the rows and the shape check are
|
|
104
|
+
// the server's and the editor's (@nodaro/render-rules, backend).
|
|
105
|
+
describe("what @nodaro/shared exports for it", () => {
|
|
106
|
+
it("is the builder and the reader, nothing else of the engine", () => {
|
|
107
|
+
const names = Object.keys(credits).filter((k) => /gemini/i.test(k))
|
|
108
|
+
expect(names.sort()).toEqual(["geminiOmniExtendQuoteCreditId", "parseGeminiOmniExtendQuoteCreditId"])
|
|
109
|
+
})
|
|
110
|
+
})
|
|
@@ -55,6 +55,7 @@ describe("GVP_SUPPORTED_PROVIDERS", () => {
|
|
|
55
55
|
"seedance-2-fast",
|
|
56
56
|
"seedance-2-mini",
|
|
57
57
|
"seedance-2-5",
|
|
58
|
+
"seedance-2-5-flash",
|
|
58
59
|
"minimax-h3",
|
|
59
60
|
"veo3.1",
|
|
60
61
|
"veo3_lite",
|
|
@@ -186,6 +187,7 @@ describe("GVP_EXTEND_PROVIDERS", () => {
|
|
|
186
187
|
"seedance-2-fast",
|
|
187
188
|
"seedance-2-mini",
|
|
188
189
|
"seedance-2-5",
|
|
190
|
+
"seedance-2-5-flash",
|
|
189
191
|
"minimax-h3",
|
|
190
192
|
])
|
|
191
193
|
// Behaviour-neutral swap: the derived set is exactly what the old
|
|
@@ -236,6 +238,7 @@ describe("GVP_END_FRAME_PROVIDERS", () => {
|
|
|
236
238
|
"seedance-2-fast",
|
|
237
239
|
"seedance-2-mini",
|
|
238
240
|
"seedance-2-5",
|
|
241
|
+
"seedance-2-5-flash",
|
|
239
242
|
"minimax-h3",
|
|
240
243
|
// `veo3` is absent because GVP_END_FRAME_PROVIDERS is a subset of
|
|
241
244
|
// GVP_SUPPORTED_PROVIDERS, which VEO 3.1 Quality left — see above. The
|
|
@@ -15,7 +15,12 @@ import {
|
|
|
15
15
|
getLlmModalityCaps,
|
|
16
16
|
VIDEO_ANALYSIS_LLM_MODELS,
|
|
17
17
|
VIDEO_ANALYSIS_TIERS,
|
|
18
|
+
VIDEO_ANALYSIS_LEGACY_MODELS,
|
|
18
19
|
resolveVideoAnalysisModel,
|
|
20
|
+
LLM_NODE_ONLY_MEDIA_MODELS,
|
|
21
|
+
readsMediaOnLlmNodesOnly,
|
|
22
|
+
readsVideoOutsideLlmNodes,
|
|
23
|
+
readsAudioOutsideLlmNodes,
|
|
19
24
|
buildLlmCreditIdentifier,
|
|
20
25
|
resolveLlmCreditId,
|
|
21
26
|
motionGraphicsFeature,
|
|
@@ -66,6 +71,7 @@ const EXPECTED_MODEL_IDS = [
|
|
|
66
71
|
"gemini-3.1-pro",
|
|
67
72
|
"gemini-4-argon",
|
|
68
73
|
"gemini-4-carbon",
|
|
74
|
+
"gemini-4-hydrogen",
|
|
69
75
|
"claude-opus-4.7",
|
|
70
76
|
"gpt-5.4",
|
|
71
77
|
"gpt-5.5",
|
|
@@ -132,14 +138,14 @@ describe("LLM_MODELS data integrity", () => {
|
|
|
132
138
|
expect(new Set(ids).size).toBe(ids.length)
|
|
133
139
|
})
|
|
134
140
|
|
|
135
|
-
it("has 9 economy, 8 standard,
|
|
141
|
+
it("has 9 economy, 8 standard, 17 premium models", () => {
|
|
136
142
|
const tierCounts: Record<LlmTier, number> = { economy: 0, standard: 0, premium: 0 }
|
|
137
143
|
for (const model of LLM_MODELS) {
|
|
138
144
|
tierCounts[model.tier]++
|
|
139
145
|
}
|
|
140
146
|
expect(tierCounts.economy).toBe(9)
|
|
141
147
|
expect(tierCounts.standard).toBe(8)
|
|
142
|
-
expect(tierCounts.premium).toBe(
|
|
148
|
+
expect(tierCounts.premium).toBe(17)
|
|
143
149
|
})
|
|
144
150
|
|
|
145
151
|
it("all three kieFormats are represented", () => {
|
|
@@ -1136,6 +1142,114 @@ describe("gemini-4-carbon exposure", () => {
|
|
|
1136
1142
|
})
|
|
1137
1143
|
})
|
|
1138
1144
|
|
|
1145
|
+
// ---------------------------------------------------------------------------
|
|
1146
|
+
// 2026-11-16 addition: Gemini 4 Hydrogen (KIE lane and Google lane probed that
|
|
1147
|
+
// day). Carbon's lane shape, with an xhigh level on both lanes.
|
|
1148
|
+
// ---------------------------------------------------------------------------
|
|
1149
|
+
describe("gemini-4-hydrogen exposure", () => {
|
|
1150
|
+
it("premium Gemini, KIE first with Google's own API as the fallback — never direct-only or direct-first", () => {
|
|
1151
|
+
const m = getLlmModel("gemini-4-hydrogen")!
|
|
1152
|
+
expect(m.displayName).toBe("Gemini 4 Hydrogen")
|
|
1153
|
+
expect(m.series).toBe("Gemini")
|
|
1154
|
+
expect(m.tier).toBe("premium")
|
|
1155
|
+
expect(m.vendor).toBe("google")
|
|
1156
|
+
expect(m.kieFormat).toBe("chat-completions")
|
|
1157
|
+
expect(m.kieSlugOrModel).toBe("gemini-4-hydrogen-openai")
|
|
1158
|
+
expect(m.directGeminiModel).toBe("gemini-4-hydrogen")
|
|
1159
|
+
expect(m.directOnly).toBeUndefined()
|
|
1160
|
+
expect(m.preferDirect).toBeUndefined()
|
|
1161
|
+
expect(supportsAdvancedMode("gemini-4-hydrogen")).toBe(true)
|
|
1162
|
+
// Only Advanced mode moves it to Google's API — no effort does.
|
|
1163
|
+
expect(llmServesDirect("gemini-4-hydrogen")).toBe(false)
|
|
1164
|
+
expect(llmServesDirect("gemini-4-hydrogen", "xhigh")).toBe(false)
|
|
1165
|
+
expect(llmServesDirect("gemini-4-hydrogen", undefined, true)).toBe(true)
|
|
1166
|
+
})
|
|
1167
|
+
|
|
1168
|
+
it("declares NO trusted structured mode, only the response_format hint — callers parse and re-ask", () => {
|
|
1169
|
+
const m = getLlmModel("gemini-4-hydrogen")!
|
|
1170
|
+
expect(m.structuredOutputMode).toBeUndefined()
|
|
1171
|
+
expect(m.structuredOutputHint).toBe("kie-response-format")
|
|
1172
|
+
expect(STRUCTURED_VISION_MODELS.map((x) => x.id)).not.toContain("gemini-4-hydrogen")
|
|
1173
|
+
expect(DESCRIBE_TO_PICKER_MODELS.map((x) => x.id)).not.toContain("gemini-4-hydrogen")
|
|
1174
|
+
})
|
|
1175
|
+
|
|
1176
|
+
it("offers low / medium / high / xhigh on both lanes — `none` runs at Auto, `max` clamps to xhigh", () => {
|
|
1177
|
+
expect(availableReasoningEfforts("gemini-4-hydrogen")).toEqual(["low", "medium", "high", "xhigh"])
|
|
1178
|
+
expect(availableReasoningEfforts("gemini-4-hydrogen", true)).toEqual(["low", "medium", "high", "xhigh"])
|
|
1179
|
+
for (const advanced of [false, true]) {
|
|
1180
|
+
expect(effectiveReasoningEffort("gemini-4-hydrogen", "none", advanced)).toBeUndefined()
|
|
1181
|
+
expect(effectiveReasoningEffort("gemini-4-hydrogen", "max", advanced)).toBe("xhigh")
|
|
1182
|
+
expect(effectiveReasoningEffort("gemini-4-hydrogen", "xhigh", advanced)).toBe("xhigh")
|
|
1183
|
+
expect(effectiveReasoningEffort("gemini-4-hydrogen", "medium", advanced)).toBe("medium")
|
|
1184
|
+
}
|
|
1185
|
+
expect(getLlmModel("gemini-4-hydrogen")?.effortBelowLowestSendsLowest).toBeUndefined()
|
|
1186
|
+
})
|
|
1187
|
+
|
|
1188
|
+
it("takes XHIGH on Google's API (`directXhighThinking`)", () => {
|
|
1189
|
+
expect(getLlmModel("gemini-4-hydrogen")?.directXhighThinking).toBe(true)
|
|
1190
|
+
})
|
|
1191
|
+
|
|
1192
|
+
it("reasons by default, floored at the default 32768 on the registry's usual 16384 cap", () => {
|
|
1193
|
+
const m = getLlmModel("gemini-4-hydrogen")!
|
|
1194
|
+
expect(m.thinkingDefaultOn).toBe(true)
|
|
1195
|
+
expect(m.reasoningOutputFloor).toBeUndefined()
|
|
1196
|
+
expect(reasoningOutputFloor(m)).toBe(REASONING_OUTPUT_FLOOR)
|
|
1197
|
+
expect(m.maxOutputTokens).toBe(16384)
|
|
1198
|
+
})
|
|
1199
|
+
|
|
1200
|
+
it("resolves by its id and its KIE slug, and backs no feature default", () => {
|
|
1201
|
+
expect(getLlmModel("gemini-4-hydrogen-openai")?.id).toBe("gemini-4-hydrogen")
|
|
1202
|
+
expect(Object.values(LLM_FEATURE_DEFAULTS)).not.toContain("gemini-4-hydrogen")
|
|
1203
|
+
expect(getLlmTier("gemini-4-hydrogen")).toBe("premium")
|
|
1204
|
+
})
|
|
1205
|
+
|
|
1206
|
+
it("reads images, video and audio on the LLM nodes (decided 2026-11-16; probed 2026-11-17) — no files", () => {
|
|
1207
|
+
expect(getLlmModalityCaps("gemini-4-hydrogen")).toEqual({ image: true, video: true, audio: true })
|
|
1208
|
+
expect(llmAcceptsFiles("gemini-4-hydrogen")).toBe(false)
|
|
1209
|
+
})
|
|
1210
|
+
|
|
1211
|
+
it("its media caps are for the LLM nodes only: no Video Analysis list, tier, legacy row or passthrough", () => {
|
|
1212
|
+
expect(LLM_NODE_ONLY_MEDIA_MODELS).toEqual(["gemini-4-hydrogen"])
|
|
1213
|
+
expect(readsMediaOnLlmNodesOnly("gemini-4-hydrogen")).toBe(true)
|
|
1214
|
+
expect(readsMediaOnLlmNodesOnly("gemini-4-carbon")).toBe(false)
|
|
1215
|
+
expect(readsMediaOnLlmNodesOnly(undefined)).toBe(false)
|
|
1216
|
+
expect(VIDEO_ANALYSIS_LLM_MODELS).not.toContain("gemini-4-hydrogen")
|
|
1217
|
+
expect(Object.values(VIDEO_ANALYSIS_TIERS)).not.toContain("gemini-4-hydrogen")
|
|
1218
|
+
expect(Object.keys(VIDEO_ANALYSIS_LEGACY_MODELS)).not.toContain("gemini-4-hydrogen")
|
|
1219
|
+
// A stored raw `llmModel: "gemini-4-hydrogen"` on a Video Analysis node is
|
|
1220
|
+
// not passed through: it resolves like any unknown value.
|
|
1221
|
+
expect(resolveVideoAnalysisModel("gemini-4-hydrogen")).toBe(resolveVideoAnalysisModel("not-a-model"))
|
|
1222
|
+
})
|
|
1223
|
+
|
|
1224
|
+
it("reads no video or audio outside the LLM nodes (readsVideoOutsideLlmNodes / readsAudioOutsideLlmNodes); Carbon does", () => {
|
|
1225
|
+
expect(readsVideoOutsideLlmNodes("gemini-4-hydrogen")).toBe(false)
|
|
1226
|
+
expect(readsAudioOutsideLlmNodes("gemini-4-hydrogen")).toBe(false)
|
|
1227
|
+
expect(readsVideoOutsideLlmNodes("gemini-4-carbon")).toBe(true)
|
|
1228
|
+
expect(readsAudioOutsideLlmNodes("gemini-4-carbon")).toBe(true)
|
|
1229
|
+
expect(readsVideoOutsideLlmNodes("gemini-4-argon")).toBe(false)
|
|
1230
|
+
expect(readsVideoOutsideLlmNodes(undefined)).toBe(false)
|
|
1231
|
+
// The Video Analysis list is exactly the models that read both outside the LLM nodes.
|
|
1232
|
+
expect(VIDEO_ANALYSIS_LLM_MODELS).toEqual(LLM_MODELS.filter((m) => readsVideoOutsideLlmNodes(m.id) && readsAudioOutsideLlmNodes(m.id)).map((m) => m.id))
|
|
1233
|
+
})
|
|
1234
|
+
|
|
1235
|
+
it("every LLM-node-only media model really reads video and audio (else the list is stale)", () => {
|
|
1236
|
+
for (const id of LLM_NODE_ONLY_MEDIA_MODELS) {
|
|
1237
|
+
expect(getLlmModalityCaps(id), id).toMatchObject({ video: true, audio: true })
|
|
1238
|
+
}
|
|
1239
|
+
})
|
|
1240
|
+
})
|
|
1241
|
+
|
|
1242
|
+
describe("directXhighThinking is declared only where the direct lane can send it", () => {
|
|
1243
|
+
it("sits only on a model with a Google lane and an xhigh level on that lane's ladder", () => {
|
|
1244
|
+
const declared = LLM_MODELS.filter((m) => m.directXhighThinking)
|
|
1245
|
+
expect(declared.map((m) => m.id)).toEqual(["gemini-4-hydrogen"])
|
|
1246
|
+
for (const m of declared) {
|
|
1247
|
+
expect(m.directGeminiModel, m.id).toBeTruthy()
|
|
1248
|
+
expect(availableReasoningEfforts(m.id, true), m.id).toContain("xhigh")
|
|
1249
|
+
}
|
|
1250
|
+
})
|
|
1251
|
+
})
|
|
1252
|
+
|
|
1139
1253
|
describe("gpt-6.1-terra exposure", () => {
|
|
1140
1254
|
it("standard GPT-6.1 on the codex responses wire with an enforced schema, KIE only", () => {
|
|
1141
1255
|
const m = getLlmModel("gpt-6.1-terra")!
|
|
@@ -176,6 +176,7 @@ describe("effortBelowLowestSendsLowest (Kimi K3 and K3.1 Pro)", () => {
|
|
|
176
176
|
expect(effectiveReasoningEffort("gpt-6.1-sol", "none")).toBeUndefined()
|
|
177
177
|
expect(effectiveReasoningEffort("gpt-6.1-terra", "none")).toBeUndefined()
|
|
178
178
|
expect(effectiveReasoningEffort("gemini-4-carbon", "none")).toBeUndefined()
|
|
179
|
+
expect(effectiveReasoningEffort("gemini-4-hydrogen", "none")).toBeUndefined()
|
|
179
180
|
})
|
|
180
181
|
})
|
|
181
182
|
|
|
@@ -209,6 +210,7 @@ describe("structured output: a trusted mode vs a schema hint", () => {
|
|
|
209
210
|
|
|
210
211
|
it("llmSendsSchema: a model that sends its schema (trusted or hinted) counts it; one that sends none does not", () => {
|
|
211
212
|
expect(llmSendsSchema("gemini-4-carbon")).toBe(true)
|
|
213
|
+
expect(llmSendsSchema("gemini-4-hydrogen")).toBe(true)
|
|
212
214
|
expect(llmSendsSchema("gpt-6.1-terra")).toBe(true)
|
|
213
215
|
expect(llmSendsSchema("gpt-5.2")).toBe(false)
|
|
214
216
|
// Unset model = the feature's default; an unknown model counts it.
|