@nodaro/shared 3.62.0 → 3.64.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.
Files changed (264) hide show
  1. package/dist/{chunk-C7POAYFE.js → chunk-36VWLB4J.js} +3 -3
  2. package/dist/{chunk-C7POAYFE.js.map → chunk-36VWLB4J.js.map} +1 -1
  3. package/dist/{chunk-S24ZBUB4.js → chunk-3AYM47GW.js} +6 -32
  4. package/dist/chunk-3AYM47GW.js.map +1 -0
  5. package/dist/{chunk-YCXRSWCQ.js → chunk-3KTWYYCN.js} +8 -5
  6. package/dist/chunk-3KTWYYCN.js.map +1 -0
  7. package/dist/{chunk-ZES6EZC4.js → chunk-4IUE2JB7.js} +3 -3
  8. package/dist/{chunk-ZES6EZC4.js.map → chunk-4IUE2JB7.js.map} +1 -1
  9. package/dist/{chunk-MYJQELFN.cjs → chunk-5OBTGNUQ.cjs} +547 -29
  10. package/dist/chunk-5OBTGNUQ.cjs.map +1 -0
  11. package/dist/{chunk-TWF2OSH4.cjs → chunk-67CMMTLN.cjs} +4 -4
  12. package/dist/{chunk-TWF2OSH4.cjs.map → chunk-67CMMTLN.cjs.map} +1 -1
  13. package/dist/{chunk-WRSWH7US.cjs → chunk-6BRWPJPP.cjs} +17 -2
  14. package/dist/chunk-6BRWPJPP.cjs.map +1 -0
  15. package/dist/{chunk-S5TMRJMX.js → chunk-6YIV37V7.js} +4 -4
  16. package/dist/{chunk-S5TMRJMX.js.map → chunk-6YIV37V7.js.map} +1 -1
  17. package/dist/{chunk-3M4BNKFJ.cjs → chunk-7AJGUI7L.cjs} +202 -16
  18. package/dist/chunk-7AJGUI7L.cjs.map +1 -0
  19. package/dist/{chunk-JZGZ26YB.js → chunk-7KQ6W5DS.js} +4 -4
  20. package/dist/{chunk-JZGZ26YB.js.map → chunk-7KQ6W5DS.js.map} +1 -1
  21. package/dist/{chunk-IWWVPR3W.cjs → chunk-ACZZHHFZ.cjs} +149 -34
  22. package/dist/chunk-ACZZHHFZ.cjs.map +1 -0
  23. package/dist/{chunk-2W745U4A.cjs → chunk-AZNZ5WNZ.cjs} +42 -70
  24. package/dist/chunk-AZNZ5WNZ.cjs.map +1 -0
  25. package/dist/{chunk-HSHCCBIV.js → chunk-BQYCZLMF.js} +16 -3
  26. package/dist/chunk-BQYCZLMF.js.map +1 -0
  27. package/dist/chunk-CHS2SIP6.cjs +504 -0
  28. package/dist/chunk-CHS2SIP6.cjs.map +1 -0
  29. package/dist/{chunk-CIPPPT7E.cjs → chunk-CHTZZRAL.cjs} +6 -6
  30. package/dist/{chunk-CIPPPT7E.cjs.map → chunk-CHTZZRAL.cjs.map} +1 -1
  31. package/dist/{chunk-AOJ6B7K4.cjs → chunk-D4KWNDPH.cjs} +12 -12
  32. package/dist/chunk-D4KWNDPH.cjs.map +1 -0
  33. package/dist/{chunk-5YYN5X57.js → chunk-DZ4IOP3Q.js} +536 -30
  34. package/dist/chunk-DZ4IOP3Q.js.map +1 -0
  35. package/dist/{chunk-VACPZPUA.cjs → chunk-EXEVT6D2.cjs} +15 -5
  36. package/dist/chunk-EXEVT6D2.cjs.map +1 -0
  37. package/dist/{chunk-5M43XMRB.cjs → chunk-FHGRKQVZ.cjs} +8 -8
  38. package/dist/{chunk-5M43XMRB.cjs.map → chunk-FHGRKQVZ.cjs.map} +1 -1
  39. package/dist/{chunk-KJSRPHJ2.cjs → chunk-GTWUS6MQ.cjs} +165 -54
  40. package/dist/chunk-GTWUS6MQ.cjs.map +1 -0
  41. package/dist/{chunk-Q6IES3U2.js → chunk-H5KHWTAE.js} +5 -2
  42. package/dist/chunk-H5KHWTAE.js.map +1 -0
  43. package/dist/{chunk-G3KVK7OU.cjs → chunk-HDPJNNMF.cjs} +21 -21
  44. package/dist/{chunk-G3KVK7OU.cjs.map → chunk-HDPJNNMF.cjs.map} +1 -1
  45. package/dist/{chunk-3OYO3XCC.js → chunk-IYSOVS7O.js} +118 -24
  46. package/dist/chunk-IYSOVS7O.js.map +1 -0
  47. package/dist/{chunk-AFYTX4AI.cjs → chunk-J6B7J73J.cjs} +110 -50
  48. package/dist/chunk-J6B7J73J.cjs.map +1 -0
  49. package/dist/{chunk-I2RQB7VG.js → chunk-KB2SQAR3.js} +3 -3
  50. package/dist/{chunk-I2RQB7VG.js.map → chunk-KB2SQAR3.js.map} +1 -1
  51. package/dist/{chunk-BLJUCPMV.cjs → chunk-KSHAAPQF.cjs} +5 -2
  52. package/dist/chunk-KSHAAPQF.cjs.map +1 -0
  53. package/dist/{chunk-6G7NN4S4.js → chunk-NIAFR5EE.js} +2 -2
  54. package/dist/chunk-NIAFR5EE.js.map +1 -0
  55. package/dist/{chunk-CF4S4N5X.js → chunk-O2QOBA6Q.js} +2 -2
  56. package/dist/{chunk-CF4S4N5X.js.map → chunk-O2QOBA6Q.js.map} +1 -1
  57. package/dist/{chunk-IDTKF5EX.cjs → chunk-O4RPXBDZ.cjs} +12 -8
  58. package/dist/chunk-O4RPXBDZ.cjs.map +1 -0
  59. package/dist/{chunk-4GGLKRYI.cjs → chunk-O6TBB4IF.cjs} +2 -2
  60. package/dist/{chunk-4GGLKRYI.cjs.map → chunk-O6TBB4IF.cjs.map} +1 -1
  61. package/dist/{chunk-PTD6EDUU.js → chunk-OBOOHG3N.js} +13 -4
  62. package/dist/chunk-OBOOHG3N.js.map +1 -0
  63. package/dist/{chunk-2D5LQFV4.cjs → chunk-OOZW2MM6.cjs} +9 -9
  64. package/dist/{chunk-2D5LQFV4.cjs.map → chunk-OOZW2MM6.cjs.map} +1 -1
  65. package/dist/{chunk-A2PX5IRC.cjs → chunk-PERUFUVH.cjs} +13 -13
  66. package/dist/{chunk-A2PX5IRC.cjs.map → chunk-PERUFUVH.cjs.map} +1 -1
  67. package/dist/{chunk-G4U3HW6W.js → chunk-PJJAZQVZ.js} +3 -3
  68. package/dist/{chunk-G4U3HW6W.js.map → chunk-PJJAZQVZ.js.map} +1 -1
  69. package/dist/{chunk-E2HZTGYX.js → chunk-Q2Y4JHF7.js} +7 -7
  70. package/dist/chunk-Q2Y4JHF7.js.map +1 -0
  71. package/dist/{chunk-FVII3KHN.js → chunk-QYU7J5EQ.js} +198 -17
  72. package/dist/chunk-QYU7J5EQ.js.map +1 -0
  73. package/dist/{chunk-JJNNM23P.js → chunk-S3UGLZSF.js} +3 -3
  74. package/dist/{chunk-JJNNM23P.js.map → chunk-S3UGLZSF.js.map} +1 -1
  75. package/dist/{chunk-CC4V2B7S.js → chunk-SHH2T4CR.js} +3 -3
  76. package/dist/{chunk-CC4V2B7S.js.map → chunk-SHH2T4CR.js.map} +1 -1
  77. package/dist/{chunk-4ZEFP2FQ.cjs → chunk-SPAHI7DY.cjs} +4 -4
  78. package/dist/{chunk-4ZEFP2FQ.cjs.map → chunk-SPAHI7DY.cjs.map} +1 -1
  79. package/dist/{chunk-Y6X7UJSD.js → chunk-SXHHLZ22.js} +122 -15
  80. package/dist/chunk-SXHHLZ22.js.map +1 -0
  81. package/dist/{chunk-HRY7KGAE.cjs → chunk-T2OVDF2M.cjs} +6 -6
  82. package/dist/{chunk-HRY7KGAE.cjs.map → chunk-T2OVDF2M.cjs.map} +1 -1
  83. package/dist/{chunk-2QKF7M2Z.js → chunk-TAPBDT47.js} +3 -3
  84. package/dist/{chunk-2QKF7M2Z.js.map → chunk-TAPBDT47.js.map} +1 -1
  85. package/dist/{chunk-NGKKNSK6.js → chunk-TPQJKS7D.js} +139 -16
  86. package/dist/chunk-TPQJKS7D.js.map +1 -0
  87. package/dist/{chunk-N7OUQK7E.cjs → chunk-TQW3R44P.cjs} +8 -8
  88. package/dist/{chunk-N7OUQK7E.cjs.map → chunk-TQW3R44P.cjs.map} +1 -1
  89. package/dist/{chunk-GSFB537T.js → chunk-TTGZ2L3O.js} +23 -4
  90. package/dist/chunk-TTGZ2L3O.js.map +1 -0
  91. package/dist/{chunk-SYWR5G3T.js → chunk-VPTA4Z7G.js} +54 -7
  92. package/dist/chunk-VPTA4Z7G.js.map +1 -0
  93. package/dist/{chunk-2HZGDZZN.cjs → chunk-VZ6TE23U.cjs} +6 -6
  94. package/dist/{chunk-2HZGDZZN.cjs.map → chunk-VZ6TE23U.cjs.map} +1 -1
  95. package/dist/{chunk-TRVWMKNE.cjs → chunk-W6VJAUGM.cjs} +285 -64
  96. package/dist/chunk-W6VJAUGM.cjs.map +1 -0
  97. package/dist/{chunk-UDDVDQMF.js → chunk-W7KHHNZR.js} +235 -37
  98. package/dist/chunk-W7KHHNZR.js.map +1 -0
  99. package/dist/{chunk-KYMHFVAZ.cjs → chunk-Y4GCJJPF.cjs} +2 -2
  100. package/dist/chunk-Y4GCJJPF.cjs.map +1 -0
  101. package/dist/{chunk-6CSXMWL4.cjs → chunk-YQV53HRR.cjs} +27 -4
  102. package/dist/chunk-YQV53HRR.cjs.map +1 -0
  103. package/dist/{chunk-7FCTCWHD.js → chunk-ZI3QDUHO.js} +3 -3
  104. package/dist/{chunk-7FCTCWHD.js.map → chunk-ZI3QDUHO.js.map} +1 -1
  105. package/dist/entries/apps.cjs +43 -42
  106. package/dist/entries/apps.js +8 -7
  107. package/dist/entries/captions.cjs +38 -30
  108. package/dist/entries/captions.d.cts +47 -1
  109. package/dist/entries/captions.d.ts +47 -1
  110. package/dist/entries/captions.js +1 -1
  111. package/dist/entries/credits.cjs +354 -174
  112. package/dist/entries/credits.d.cts +378 -27
  113. package/dist/entries/credits.d.ts +378 -27
  114. package/dist/entries/credits.js +11 -11
  115. package/dist/entries/llm-models.cjs +77 -57
  116. package/dist/entries/llm-models.d.cts +108 -7
  117. package/dist/entries/llm-models.d.ts +108 -7
  118. package/dist/entries/llm-models.js +2 -2
  119. package/dist/entries/media.cjs +63 -63
  120. package/dist/entries/media.d.cts +8 -0
  121. package/dist/entries/media.d.ts +8 -0
  122. package/dist/entries/media.js +1 -1
  123. package/dist/entries/model-catalog.cjs +161 -105
  124. package/dist/entries/model-catalog.d.cts +109 -22
  125. package/dist/entries/model-catalog.d.ts +109 -22
  126. package/dist/entries/model-catalog.js +4 -4
  127. package/dist/entries/models.cjs +466 -322
  128. package/dist/entries/models.d.cts +71 -5
  129. package/dist/entries/models.d.ts +71 -5
  130. package/dist/entries/models.js +5 -5
  131. package/dist/entries/nodes.cjs +226 -209
  132. package/dist/entries/nodes.d.cts +66 -7
  133. package/dist/entries/nodes.d.ts +66 -7
  134. package/dist/entries/nodes.js +10 -9
  135. package/dist/entries/pipeline.cjs +156 -152
  136. package/dist/entries/pipeline.d.cts +14 -4
  137. package/dist/entries/pipeline.d.ts +14 -4
  138. package/dist/entries/pipeline.js +3 -3
  139. package/dist/entries/runtime-config.cjs +29 -29
  140. package/dist/entries/runtime-config.d.cts +10 -7
  141. package/dist/entries/runtime-config.d.ts +10 -7
  142. package/dist/entries/runtime-config.js +1 -1
  143. package/dist/entries/social.cjs +177 -177
  144. package/dist/entries/social.js +2 -2
  145. package/dist/entries/types.d.cts +8 -0
  146. package/dist/entries/types.d.ts +8 -0
  147. package/dist/entries/ugc.cjs +71 -71
  148. package/dist/entries/ugc.js +4 -4
  149. package/dist/entries/video.cjs +154 -150
  150. package/dist/entries/video.d.cts +11 -2
  151. package/dist/entries/video.d.ts +11 -2
  152. package/dist/entries/video.js +6 -6
  153. package/dist/entries/workflow.cjs +150 -150
  154. package/dist/entries/workflow.d.cts +1 -1
  155. package/dist/entries/workflow.d.ts +1 -1
  156. package/dist/entries/workflow.js +2 -2
  157. package/dist/index.cjs +2136 -1704
  158. package/dist/index.d.cts +10 -10
  159. package/dist/index.d.ts +10 -10
  160. package/dist/index.js +27 -27
  161. package/dist/{model-catalog-CCEcv08q.d.ts → model-catalog-Cf9fkEUp.d.cts} +45 -2
  162. package/dist/{model-catalog-CCEcv08q.d.cts → model-catalog-Cf9fkEUp.d.ts} +45 -2
  163. package/dist/{model-constants-B88p6XR0.d.ts → model-constants-BxjiWVQ9.d.ts} +215 -32
  164. package/dist/{model-constants-Cf3zaITt.d.cts → model-constants-C_Nyft_i.d.cts} +215 -32
  165. package/package.json +1 -1
  166. package/src/__tests__/add-captions-nemotron-pricing.test.ts +111 -0
  167. package/src/__tests__/credit-identifiers.test.ts +29 -0
  168. package/src/__tests__/extend-providers.test.ts +359 -39
  169. package/src/__tests__/fixtures/mask-composite-quote-parity.json +1 -1
  170. package/src/__tests__/fixtures/measured-input-quote-parity.json +1435 -0
  171. package/src/__tests__/fixtures/planned-length-quote-parity.json +1866 -0
  172. package/src/__tests__/fixtures/video-utility-quote-parity.json +2343 -0
  173. package/src/__tests__/flux-3-klein.test.ts +203 -0
  174. package/src/__tests__/gpt-image-2-6-formats.test.ts +3 -1
  175. package/src/__tests__/gvp-supported-providers.test.ts +27 -2
  176. package/src/__tests__/lip-sync-audio-rate.test.ts +74 -0
  177. package/src/__tests__/lip-sync-levers.test.ts +31 -0
  178. package/src/__tests__/llm-models.test.ts +139 -12
  179. package/src/__tests__/llm-price-key.test.ts +164 -1
  180. package/src/__tests__/model-makers.test.ts +3 -0
  181. package/src/__tests__/nemotron-transcribe-pricing.test.ts +61 -0
  182. package/src/__tests__/node-runtime-keys.test.ts +7 -0
  183. package/src/__tests__/normalize-node-params.test.ts +172 -1
  184. package/src/__tests__/pixverse-v6-max-catalog.test.ts +271 -0
  185. package/src/__tests__/prompt-length-limits.test.ts +4 -0
  186. package/src/__tests__/retired-lip-sync-providers.test.ts +43 -0
  187. package/src/__tests__/seedance-extend-source-credit-id.test.ts +89 -0
  188. package/src/__tests__/seedance-task-type.test.ts +13 -3
  189. package/src/__tests__/sequence-execution.test.ts +22 -1
  190. package/src/__tests__/suno-credit-type.test.ts +21 -2
  191. package/src/__tests__/transcribe-capabilities.test.ts +41 -2
  192. package/src/__tests__/transcribe-preflight.test.ts +50 -1
  193. package/src/__tests__/video-analysis-catalog-sync.test.ts +4 -2
  194. package/src/__tests__/video-analysis-pricing.test.ts +10 -9
  195. package/src/__tests__/video-audio-capability.test.ts +35 -6
  196. package/src/__tests__/video-resolution-billed-as-named.test.ts +30 -0
  197. package/src/__tests__/video-upscale-params.test.ts +62 -0
  198. package/src/caption-styles.ts +62 -0
  199. package/src/catalog-projection.ts +8 -0
  200. package/src/credit-estimators/add-captions-nemotron.ts +73 -0
  201. package/src/credit-estimators/index.ts +20 -0
  202. package/src/credit-estimators/nemotron-transcribe.ts +87 -0
  203. package/src/credit-identifiers.ts +351 -41
  204. package/src/entries/captions.ts +2 -0
  205. package/src/entries/credits.ts +37 -2
  206. package/src/entries/llm-models.ts +6 -0
  207. package/src/entries/model-catalog.ts +22 -0
  208. package/src/entries/models.ts +50 -0
  209. package/src/entries/nodes.ts +4 -0
  210. package/src/entries/pipeline.ts +1 -1
  211. package/src/entries/video.ts +1 -1
  212. package/src/flux-3-klein.ts +69 -0
  213. package/src/freecut-protocol.ts +8 -0
  214. package/src/input-image-pricing.ts +23 -6
  215. package/src/lip-sync-levers.ts +56 -0
  216. package/src/lip-sync-pricing.ts +91 -1
  217. package/src/llm-models.ts +305 -16
  218. package/src/model-catalog.ts +529 -28
  219. package/src/model-constants.ts +417 -41
  220. package/src/model-tree.ts +2 -1
  221. package/src/nodaro-video-upscale.ts +48 -0
  222. package/src/node-default-mappings.ts +6 -0
  223. package/src/node-runtime-keys.ts +3 -0
  224. package/src/normalize-node-params.ts +172 -3
  225. package/src/runtime-config/contract.ts +10 -7
  226. package/src/seedance-draft.ts +2 -1
  227. package/src/seedance-extend-rate.ts +116 -0
  228. package/src/sequence-execution.ts +24 -0
  229. package/src/transcribe-preflight.ts +81 -7
  230. package/src/video-analysis-pricing.ts +28 -15
  231. package/src/video-duration.ts +9 -0
  232. package/src/video-ui-defaults.ts +5 -3
  233. package/src/video-upscale-params.ts +67 -0
  234. package/dist/chunk-2W745U4A.cjs.map +0 -1
  235. package/dist/chunk-3M4BNKFJ.cjs.map +0 -1
  236. package/dist/chunk-3OYO3XCC.js.map +0 -1
  237. package/dist/chunk-5YYN5X57.js.map +0 -1
  238. package/dist/chunk-6CSXMWL4.cjs.map +0 -1
  239. package/dist/chunk-6G7NN4S4.js.map +0 -1
  240. package/dist/chunk-AFYTX4AI.cjs.map +0 -1
  241. package/dist/chunk-AOJ6B7K4.cjs.map +0 -1
  242. package/dist/chunk-BLJUCPMV.cjs.map +0 -1
  243. package/dist/chunk-E2HZTGYX.js.map +0 -1
  244. package/dist/chunk-FVII3KHN.js.map +0 -1
  245. package/dist/chunk-GSFB537T.js.map +0 -1
  246. package/dist/chunk-HSHCCBIV.js.map +0 -1
  247. package/dist/chunk-IDTKF5EX.cjs.map +0 -1
  248. package/dist/chunk-IWWVPR3W.cjs.map +0 -1
  249. package/dist/chunk-KJSRPHJ2.cjs.map +0 -1
  250. package/dist/chunk-KYMHFVAZ.cjs.map +0 -1
  251. package/dist/chunk-MYJQELFN.cjs.map +0 -1
  252. package/dist/chunk-NGKKNSK6.js.map +0 -1
  253. package/dist/chunk-PTD6EDUU.js.map +0 -1
  254. package/dist/chunk-Q6IES3U2.js.map +0 -1
  255. package/dist/chunk-QWYFHQYK.cjs +0 -357
  256. package/dist/chunk-QWYFHQYK.cjs.map +0 -1
  257. package/dist/chunk-S24ZBUB4.js.map +0 -1
  258. package/dist/chunk-SYWR5G3T.js.map +0 -1
  259. package/dist/chunk-TRVWMKNE.cjs.map +0 -1
  260. package/dist/chunk-UDDVDQMF.js.map +0 -1
  261. package/dist/chunk-VACPZPUA.cjs.map +0 -1
  262. package/dist/chunk-WRSWH7US.cjs.map +0 -1
  263. package/dist/chunk-Y6X7UJSD.js.map +0 -1
  264. package/dist/chunk-YCXRSWCQ.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk3M4BNKFJ_cjs = require('./chunk-3M4BNKFJ.cjs');
3
+ var chunk7AJGUI7L_cjs = require('./chunk-7AJGUI7L.cjs');
4
4
 
5
5
  // src/script-model.ts
6
6
  var SCRIPT_LEGACY_PROVIDER_MODELS = {
@@ -10,10 +10,10 @@ var SCRIPT_LEGACY_PROVIDER_MODELS = {
10
10
  };
11
11
  function resolveScriptModelId(provider, llmModel) {
12
12
  const legacy = provider && Object.hasOwn(SCRIPT_LEGACY_PROVIDER_MODELS, provider) ? SCRIPT_LEGACY_PROVIDER_MODELS[provider] : void 0;
13
- return llmModel || legacy || chunk3M4BNKFJ_cjs.LLM_FEATURE_DEFAULTS["generate-script"];
13
+ return llmModel || legacy || chunk7AJGUI7L_cjs.LLM_FEATURE_DEFAULTS["generate-script"];
14
14
  }
15
15
 
16
16
  exports.SCRIPT_LEGACY_PROVIDER_MODELS = SCRIPT_LEGACY_PROVIDER_MODELS;
17
17
  exports.resolveScriptModelId = resolveScriptModelId;
18
- //# sourceMappingURL=chunk-TWF2OSH4.cjs.map
19
- //# sourceMappingURL=chunk-TWF2OSH4.cjs.map
18
+ //# sourceMappingURL=chunk-67CMMTLN.cjs.map
19
+ //# sourceMappingURL=chunk-67CMMTLN.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/script-model.ts"],"names":["LLM_FEATURE_DEFAULTS"],"mappings":";;;;;AAWO,IAAM,6BAAA,GAA0E;AAAA,EACrF,MAAA,EAAQ,kBAAA;AAAA,EACR,MAAA,EAAQ,mBAAA;AAAA,EACR,GAAA,EAAK;AACP;AAEO,SAAS,oBAAA,CAAqB,UAAmB,QAAA,EAA2B;AACjF,EAAA,MAAM,MAAA,GAAS,YAAY,MAAA,CAAO,MAAA,CAAO,+BAA+B,QAAQ,CAAA,GAAI,6BAAA,CAA8B,QAA0B,CAAA,GAAI,MAAA;AAChJ,EAAA,OAAO,QAAA,IAAY,MAAA,IAAUA,sCAAA,CAAqB,iBAAiB,CAAA;AACrE","file":"chunk-TWF2OSH4.cjs","sourcesContent":["/**\n * The model a Generate Script call runs on, in one place: an explicit\n * `llmModel`, else a legacy script `provider` alias (nodes saved before the\n * per-model picker), else the feature's default. The route validates against\n * it, the worker runs it, and the server's estimate and the editor's price it —\n * one rule, so none of them can name a different model.\n */\nimport { LLM_FEATURE_DEFAULTS } from \"./llm-models.js\"\nimport type { ScriptProvider } from \"./model-constants.js\"\n\n/** Legacy provider names → the LLM model ids they ran. */\nexport const SCRIPT_LEGACY_PROVIDER_MODELS: Readonly<Record<ScriptProvider, string>> = {\n gemini: \"gemini-3.6-flash\",\n claude: \"claude-sonnet-4.6\",\n gpt: \"gpt-5.2\",\n}\n\nexport function resolveScriptModelId(provider?: string, llmModel?: string): string {\n const legacy = provider && Object.hasOwn(SCRIPT_LEGACY_PROVIDER_MODELS, provider) ? SCRIPT_LEGACY_PROVIDER_MODELS[provider as ScriptProvider] : undefined\n return llmModel || legacy || LLM_FEATURE_DEFAULTS[\"generate-script\"]\n}\n"]}
1
+ {"version":3,"sources":["../src/script-model.ts"],"names":["LLM_FEATURE_DEFAULTS"],"mappings":";;;;;AAWO,IAAM,6BAAA,GAA0E;AAAA,EACrF,MAAA,EAAQ,kBAAA;AAAA,EACR,MAAA,EAAQ,mBAAA;AAAA,EACR,GAAA,EAAK;AACP;AAEO,SAAS,oBAAA,CAAqB,UAAmB,QAAA,EAA2B;AACjF,EAAA,MAAM,MAAA,GAAS,YAAY,MAAA,CAAO,MAAA,CAAO,+BAA+B,QAAQ,CAAA,GAAI,6BAAA,CAA8B,QAA0B,CAAA,GAAI,MAAA;AAChJ,EAAA,OAAO,QAAA,IAAY,MAAA,IAAUA,sCAAA,CAAqB,iBAAiB,CAAA;AACrE","file":"chunk-67CMMTLN.cjs","sourcesContent":["/**\n * The model a Generate Script call runs on, in one place: an explicit\n * `llmModel`, else a legacy script `provider` alias (nodes saved before the\n * per-model picker), else the feature's default. The route validates against\n * it, the worker runs it, and the server's estimate and the editor's price it —\n * one rule, so none of them can name a different model.\n */\nimport { LLM_FEATURE_DEFAULTS } from \"./llm-models.js\"\nimport type { ScriptProvider } from \"./model-constants.js\"\n\n/** Legacy provider names → the LLM model ids they ran. */\nexport const SCRIPT_LEGACY_PROVIDER_MODELS: Readonly<Record<ScriptProvider, string>> = {\n gemini: \"gemini-3.6-flash\",\n claude: \"claude-sonnet-4.6\",\n gpt: \"gpt-5.2\",\n}\n\nexport function resolveScriptModelId(provider?: string, llmModel?: string): string {\n const legacy = provider && Object.hasOwn(SCRIPT_LEGACY_PROVIDER_MODELS, provider) ? SCRIPT_LEGACY_PROVIDER_MODELS[provider as ScriptProvider] : undefined\n return llmModel || legacy || LLM_FEATURE_DEFAULTS[\"generate-script\"]\n}\n"]}
@@ -34,6 +34,19 @@ function captionRoutesToRemotion(input) {
34
34
  if (!input.text) return true;
35
35
  return false;
36
36
  }
37
+ function isStaticTextCaptionSource(input) {
38
+ if (input.segments && input.segments.length > 0) return false;
39
+ if (isKineticCaptionStyle(input.style)) return false;
40
+ if (input.captions && input.captions.length > 0) return false;
41
+ if (input.transcript !== void 0 && input.transcript !== null) return false;
42
+ return typeof input.text === "string" && /\S/.test(input.text);
43
+ }
44
+ function captionsNeedTranscription(input) {
45
+ const hasSegments = !!(input.segments && input.segments.length > 0);
46
+ const hasTranscript = input.transcript !== void 0 && input.transcript !== null;
47
+ const someSegmentNeedsShared = hasSegments && input.segments.some((s) => !(s.text || s.captions && s.captions.length > 0));
48
+ return !isStaticTextCaptionSource(input) && !input.captions?.length && !hasTranscript && input.auto_transcribe !== false && (!hasSegments || someSegmentNeedsShared);
49
+ }
37
50
  var CAPTION_MAX_WORDS_PER_LINE_MIN = 1;
38
51
  var CAPTION_MAX_WORDS_PER_LINE_MAX = 20;
39
52
  var CAPTION_LEVER_BOUNDS = {
@@ -271,9 +284,11 @@ exports.captionInputSchema = captionInputSchema;
271
284
  exports.captionPlanBodyLevers = captionPlanBodyLevers;
272
285
  exports.captionRoutesToRemotion = captionRoutesToRemotion;
273
286
  exports.captionSegmentInputSchema = captionSegmentInputSchema;
287
+ exports.captionsNeedTranscription = captionsNeedTranscription;
274
288
  exports.findSegmentOverlap = findSegmentOverlap;
275
289
  exports.isBareDashToken = isBareDashToken;
276
290
  exports.isKineticCaptionStyle = isKineticCaptionStyle;
291
+ exports.isStaticTextCaptionSource = isStaticTextCaptionSource;
277
292
  exports.nonBlankCaptionText = nonBlankCaptionText;
278
293
  exports.normalizeCaptionNumericLevers = normalizeCaptionNumericLevers;
279
294
  exports.parseCaptionPlan = parseCaptionPlan;
@@ -281,5 +296,5 @@ exports.resolveCaptionLevers = resolveCaptionLevers;
281
296
  exports.resolveCaptionLook = resolveCaptionLook;
282
297
  exports.styleCaptionPlan = styleCaptionPlan;
283
298
  exports.trimEdgeDashTokens = trimEdgeDashTokens;
284
- //# sourceMappingURL=chunk-WRSWH7US.cjs.map
285
- //# sourceMappingURL=chunk-WRSWH7US.cjs.map
299
+ //# sourceMappingURL=chunk-6BRWPJPP.cjs.map
300
+ //# sourceMappingURL=chunk-6BRWPJPP.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/caption-styles.ts","../src/caption-plan.ts","../src/supported-fonts.ts","../src/caption-segment-schema.ts","../src/caption-edge-dash.ts","../src/add-captions-plan.ts"],"names":["z"],"mappings":";;;;;AAcO,IAAM,qBAAA,GAAwB,CAAC,UAAU;AACzC,IAAM,sBAAA,GAAyB;AAAA,EACpC,gBAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF;AACO,IAAM,kBAAA,GAAqB,CAAC,GAAG,qBAAA,EAAuB,GAAG,sBAAsB;AAMtF,IAAM,WAAA,GAAc,IAAI,GAAA,CAAY,sBAAsB,CAAA;AAEnD,SAAS,sBAAsB,KAAA,EAAgE;AACpG,EAAA,OAAO,UAAU,IAAA,IAAQ,KAAA,KAAU,MAAA,IAAa,WAAA,CAAY,IAAI,KAAK,CAAA;AACvE;AAOO,IAAM,gBAAA,GAAmB,CAAC,SAAA,EAAW,OAAO;AAM5C,IAAM,oBAAA,GAAsC;AAO5C,IAAM,qBAAA,GAAuC;AAc7C,IAAM,+BAAA,GAAkC;AAAA,EAC7C,gBAAA;AAAA,EACA;AACF;AAqBO,SAAS,wBAAwB,KAAA,EAc5B;AACV,EAAA,IAAI,MAAM,QAAA,IAAY,KAAA,CAAM,QAAA,CAAS,MAAA,GAAS,GAAG,OA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,EAAQ,OAAO,EAAE,KAAA,EAAO,OAAO,KAAA,EAAM;AACpD,EAAA,MAAM,UAAA,GAAa,qBAAA,CAAsB,QAAA,EAAU,MAAA,CAAO,SAAS,CAAA;AACnE,EAAA,MAAM,MAAA,GAAS,MAAA,CAAO,WAAA,CAAY,MAAA,CAAO,IAAA,EAAM,aAAa,EAAE,UAAA,EAAW,GAAI,MAAS,CAAA,CAAE,QAAA;AAKxF,EAAA,MAAM,WAAsC,EAAC;AAC7C,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,MAAA,CAAO,QAAQ,CAAA,EAAA,EAAK;AACtC,IAAA,MAAM,CAAA,GAAI,yBAAA,CAA0B,SAAA,CAAU,MAAA,CAAO,CAAC,CAAC,CAAA;AACvD,IAAA,IAAI,CAAC,CAAA,CAAE,OAAA,EAAS,OAAO,EAAE,OAAO,CAAA,sBAAA,EAAyB,CAAA,GAAI,CAAC,CAAA,EAAA,EAAK,EAAE,KAAA,CAAM,MAAA,CAAO,CAAC,CAAA,EAAG,OAAA,IAAW,SAAS,CAAA,CAAA,CAAA,EAAI;AAC9G,IAAA,QAAA,CAAS,IAAA,CAAK,EAAE,IAAI,CAAA;AAAA,EACtB;AACA,EAAA,MAAM,OAAA,GAAU,mBAAmB,QAAgD,CAAA;AACnF,EAAA,IAAI,SAAS,OAAO,EAAE,KAAA,EAAO,CAAA,cAAA,EAAiB,OAAO,CAAA,CAAA,CAAA,EAAI;AACzD,EAAA,OAAO,EAAE,QAAA,EAAS;AACpB","file":"chunk-6BRWPJPP.cjs","sourcesContent":["import type { SupportedFontName } from \"./supported-fonts.js\"\n\n/**\n * Caption styles for the add-captions node. Static path uses FFmpeg drawtext;\n * kinetic styles render via Remotion (BurnCaptions composition).\n *\n * Single source of truth — imported by:\n * - backend route Zod (add-captions.ts)\n * - backend worker handler (ffmpeg.ts)\n * - backend MCP tool (verbs-video.ts)\n * - backend plan schema (plan-schemas.ts)\n * - frontend node config + cost helper\n * - packages/remotion overlay dispatcher\n */\nexport const STATIC_CAPTION_STYLES = [\"subtitle\"] as const\nexport const KINETIC_CAPTION_STYLES = [\n \"word-highlight\",\n \"karaoke\",\n \"tiktok-words\",\n \"word-pop\",\n \"bouncy\",\n] as const\nexport const ALL_CAPTION_STYLES = [...STATIC_CAPTION_STYLES, ...KINETIC_CAPTION_STYLES] as const\n\nexport type StaticCaptionStyle = (typeof STATIC_CAPTION_STYLES)[number]\nexport type KineticCaptionStyle = (typeof KINETIC_CAPTION_STYLES)[number]\nexport type CaptionStyle = (typeof ALL_CAPTION_STYLES)[number]\n\nconst KINETIC_SET = new Set<string>(KINETIC_CAPTION_STYLES)\n\nexport function isKineticCaptionStyle(style: string | undefined | null): style is KineticCaptionStyle {\n return style !== null && style !== undefined && KINETIC_SET.has(style)\n}\n\n// ── Named \"looks\" ──────────────────────────────────────────────────────────\n// A look is a bundle of visual levers so a caption reads well with one field\n// instead of eight. Shared because the ids are wire contract (route Zod, MCP\n// schema, SDK type) and the value table is consumed by BOTH the worker (render)\n// and the canvas preview — deliberately given away, not creative doctrine.\nexport const CAPTION_LOOK_IDS = [\"outline\", \"clean\"] as const\nexport type CaptionLookId = (typeof CAPTION_LOOK_IDS)[number]\n\n/** What an unset `look` means on a KINETIC style. ONE-LINE FLIP: set to \"clean\"\n * to make an unset caption render as the pre-look-system lever set (face pinned)\n * instead. */\nexport const DEFAULT_CAPTION_LOOK: CaptionLookId = \"outline\"\n\n/** What an unset `look` means on the static `subtitle` style: the plain read —\n * a pinned neutral sans, no outline, no casing. A subtitle must never be left\n * with NO face: the Remotion render would fall back to headless Chrome's default\n * SERIF, so adding e.g. a stroke to a subtitle would silently flip its font away\n * from the sans the plain FFmpeg subtitle draws. */\nexport const DEFAULT_SUBTITLE_LOOK: CaptionLookId = \"clean\"\n\n/**\n * The lever field names that are MEANINGLESS on a `subtitle` render and so are\n * rejected on it: `highlightColor` (subtitle has no per-word spoken cursor to\n * colour) and `animate` (subtitle has no motion to switch off). The STYLING\n * levers (look/fontFamily/fontWeight/strokeColor/strokeWidth/uppercase/positionY)\n * are NOT here any more — a `subtitle` carrying any of them now routes to the\n * Remotion renderer (see `captionRoutesToRemotion`), which applies them exactly\n * as it does for the kinetic styles. Single source of truth for the route's\n * reject-on-subtitle guard and the frontend's \"don't send a stale lever\" strip.\n * `color`/`backgroundColor` are deliberately absent — FFmpeg subtitle honours\n * those too.\n */\nexport const KINETIC_ONLY_CAPTION_LEVER_KEYS = [\n \"highlightColor\",\n \"animate\",\n] as const\nexport type KineticOnlyCaptionLeverKey = (typeof KINETIC_ONLY_CAPTION_LEVER_KEYS)[number]\n\n/**\n * Does an add-captions request need the Remotion renderer, vs the cheap static\n * FFmpeg drawtext path? A caption routes to Remotion when it needs anything the\n * one-fixed-string drawtext pass cannot do:\n * - per-segment treatments (`segments`),\n * - a kinetic style,\n * - any STYLING lever (look/font/weight/stroke/uppercase/position_y/\n * max_words_per_line) — FFmpeg drawtext can't apply a webfont face, weight,\n * outline, casing, a free vertical position, or line grouping,\n * - TIMED captions (a wired `transcript` or an explicit `captions[]` array),\n * - auto-transcription, i.e. no `text` to burn as one static block.\n * Plain-`text` `subtitle` with no lever stays on FFmpeg (unchanged, cheap).\n *\n * SINGLE SOURCE for BOTH the worker dispatch (handleAddCaptions) AND the credit\n * id (buildAddCaptionsCreditId) so the renderer and the price never drift: a\n * Remotion render bills as `add-captions:kinetic`, a plain drawtext burn as\n * `add-captions`.\n */\nexport function captionRoutesToRemotion(input: {\n style?: string | null\n text?: string | null\n segments?: readonly unknown[] | null\n transcript?: unknown\n captions?: readonly unknown[] | null\n look?: unknown\n fontFamily?: unknown\n fontWeight?: unknown\n strokeColor?: unknown\n strokeWidth?: unknown\n uppercase?: unknown\n positionY?: unknown\n maxWordsPerLine?: unknown\n}): boolean {\n if (input.segments && input.segments.length > 0) return true\n if (isKineticCaptionStyle(input.style)) return true\n // From here the style is `subtitle` (or unset → the subtitle default).\n // `null` is \"not set\", exactly like `undefined`: stored node JSON (an agent's\n // write, an import, a cleared field) carries nulls, and a null lever that\n // counted as a lever would route a plain subtitle to Remotion — and its price\n // — for a lever nobody chose.\n const isSet = (v: unknown): boolean => v !== undefined && v !== null\n const hasStylingLever =\n isSet(input.look) ||\n isSet(input.fontFamily) ||\n isSet(input.fontWeight) ||\n isSet(input.strokeColor) ||\n isSet(input.strokeWidth) ||\n isSet(input.uppercase) ||\n isSet(input.positionY) ||\n isSet(input.maxWordsPerLine)\n if (hasStylingLever) return true\n if (input.transcript !== undefined && input.transcript !== null) return true\n if (input.captions && input.captions.length > 0) return true\n // No `text` to burn as one static block → the only caption source is\n // transcription, which produces TIMED captions the drawtext pass can't show.\n if (!input.text) return true\n return false\n}\n\n/**\n * Is this render's caption source a STATIC TEXT BLOCK — the caller's `text`,\n * burned once for the whole clip — rather than timed words?\n *\n * On `subtitle`, `text` IS the caption: one block, `\\n` a forced line break,\n * never transcribed over, whichever renderer draws it (the cheap FFmpeg drawtext\n * burn with no styling lever, the Remotion SubtitleOverlay with one). On a\n * KINETIC style the same `text` stays what it always was — a FALLBACK, spread\n * evenly across the clip as synthetic word timings when transcription returns\n * nothing.\n *\n * Source precedence is unchanged: `captions[]` > wired transcript > (`text` on\n * subtitle) > auto-transcription. `auto_transcribe` is deliberately NOT read: on\n * a subtitle the caller's text wins either way.\n *\n * Shared by the WORKER (which must not pay for a transcription it then discards)\n * and the ROUTE/DAG ingress, so the two cannot disagree about where the words\n * come from.\n */\nexport function isStaticTextCaptionSource(input: {\n style?: string | null\n text?: string | null\n captions?: readonly unknown[] | null\n transcript?: unknown\n segments?: readonly unknown[] | null\n}): boolean {\n if (input.segments && input.segments.length > 0) return false\n if (isKineticCaptionStyle(input.style)) return false\n if (input.captions && input.captions.length > 0) return false\n if (input.transcript !== undefined && input.transcript !== null) return false\n return typeof input.text === \"string\" && /\\S/.test(input.text)\n}\n\n/**\n * Whether an Add Captions render transcribes its audio: it carries no caption\n * source of its own — no captions, no wired transcript, no static text block —\n * auto-transcribe is not turned off, and its segments (when it has any) do not\n * all carry their own text or captions. The worker decides with it; the route's\n * credit guard asks it so a request is judged on its transcription model only\n * when one will run, and every place that prices a run on an engine charged by\n * the video's length (Nemotron 3.5 Transcribe) holds that price only when it does.\n */\nexport function captionsNeedTranscription(input: {\n style?: string | null\n text?: string | null\n captions?: readonly unknown[] | null\n transcript?: unknown\n segments?: ReadonlyArray<{ readonly text?: unknown; readonly captions?: readonly unknown[] | null }> | null\n auto_transcribe?: boolean | null\n}): boolean {\n const hasSegments = !!(input.segments && input.segments.length > 0)\n const hasTranscript = input.transcript !== undefined && input.transcript !== null\n const someSegmentNeedsShared = hasSegments && input.segments!.some((s) => !(s.text || (s.captions && s.captions.length > 0)))\n return (\n !isStaticTextCaptionSource(input) &&\n !input.captions?.length &&\n !hasTranscript &&\n input.auto_transcribe !== false &&\n (!hasSegments || someSegmentNeedsShared)\n )\n}\n\n/**\n * `maxWordsPerLine` — caps how many words a caption LINE (or tiktok-words page)\n * may hold, on top of the frame-width budget, sentence ends and pauses that\n * already close a line. 1–2 gives the punchy CapCut read; unset = fit the width.\n * Applies to every line/page-grouped render (word-highlight, karaoke, bouncy,\n * tiktok-words, and a Remotion-rendered subtitle); inert on word-pop (always one\n * word). Bounds single-sourced here for the route Zod, the plan schema, the MCP\n * schema, the CLI and the canvas panel.\n */\nexport const CAPTION_MAX_WORDS_PER_LINE_MIN = 1\nexport const CAPTION_MAX_WORDS_PER_LINE_MAX = 20\n\n/**\n * Numeric caption levers and their wire bounds — the SAME limits the route Zod\n * and the render-plan schema enforce. Single-sourced so the coercion below and\n * those schemas cannot disagree (a guard test pins the route to these).\n */\nexport const CAPTION_LEVER_BOUNDS = {\n fontSize: { min: 12, max: 200 },\n strokeWidth: { min: 0, max: 40 },\n positionY: { min: 0, max: 100 },\n fontWeight: { min: 100, max: 900 },\n maxWordsPerLine: { min: CAPTION_MAX_WORDS_PER_LINE_MIN, max: CAPTION_MAX_WORDS_PER_LINE_MAX },\n} as const\n\ntype CaptionNumericLeverKey = keyof typeof CAPTION_LEVER_BOUNDS\nconst CAPTION_NUMERIC_LEVER_KEYS = Object.keys(CAPTION_LEVER_BOUNDS) as CaptionNumericLeverKey[]\n\n/**\n * COERCE, never reject: bring the numeric caption levers of node data that\n * never passed a Zod (a workflow written by an agent, an import, a template, a\n * FieldMapping) into the range the render plan accepts. Without this an\n * out-of-range value only surfaces when the plan schema throws — mid-run, after\n * credits are reserved. A `null` / non-finite / non-numeric value is DROPPED (the\n * render default applies); an out-of-range one is clamped; `fontWeight` snaps to the\n * nearest 100 and `maxWordsPerLine` to a whole number. Pure; returns a copy and\n * leaves every other field untouched. Applied by payload-builder to the node's\n * top level and to each `segments[]` entry.\n */\nexport function normalizeCaptionNumericLevers<T extends Record<string, unknown>>(input: T): T {\n const out: Record<string, unknown> = { ...input }\n for (const key of CAPTION_NUMERIC_LEVER_KEYS) {\n if (!(key in out) || out[key] === undefined) continue\n // `null` is \"not set\": drop it rather than carry it — the render plan's\n // numeric schema rejects a null, mid-run, after credits are reserved.\n if (out[key] === null) {\n delete out[key]\n continue\n }\n const raw = typeof out[key] === \"string\" && (out[key] as string).trim() !== \"\" ? Number(out[key]) : out[key]\n if (typeof raw !== \"number\" || !Number.isFinite(raw)) {\n delete out[key]\n continue\n }\n const { min, max } = CAPTION_LEVER_BOUNDS[key]\n const shaped = key === \"fontWeight\" ? Math.round(raw / 100) * 100 : key === \"maxWordsPerLine\" ? Math.round(raw) : raw\n out[key] = Math.min(max, Math.max(min, shaped))\n }\n return out as T\n}\n\n/** The concrete levers a look (and any explicit override) resolves to. */\nexport interface CaptionLookLevers {\n fontFamily?: SupportedFontName\n fontWeight?: number\n color?: string\n backgroundColor?: string\n strokeColor?: string\n strokeWidth?: number\n highlightColor?: string\n uppercase?: boolean\n}\n\n/** Outline width = 10% of font size (min 2px). `paint-order: stroke fill` puts\n * half the stroke OUTSIDE the glyph, so the visible rim is ~5% of font size. */\nexport function autoStrokeWidth(fontSize: number): number {\n return Math.max(2, Math.round(fontSize * 0.1))\n}\n\n/** Each look is a function of font size (so the outline tracks the text size). */\nexport const CAPTION_LOOKS: Record<CaptionLookId, (fontSize: number) => CaptionLookLevers> = {\n // The TikTok / CapCut read: heavy geometric sans, caps, white on a thick black\n // outline, yellow spoken word.\n outline: (fs) => ({\n fontFamily: \"Montserrat\",\n fontWeight: 900,\n uppercase: true,\n color: \"#ffffff\",\n strokeColor: \"#000000\",\n strokeWidth: autoStrokeWidth(fs),\n highlightColor: \"#FFE600\",\n }),\n // The pre-look lever set with the face pinned (it never was): per-style weight,\n // soft shadow only, no casing, no outline.\n clean: () => ({ fontFamily: \"Inter\", color: \"#ffffff\" }),\n}\n\n/**\n * Resolve a look + explicit overrides into concrete levers. An explicit lever\n * always wins over the look; `strokeWidth: 0` explicitly means \"no outline\".\n * The plan then carries concrete levers only — nothing to resolve at render.\n */\nexport function resolveCaptionLook(\n look: CaptionLookId | undefined,\n explicit: CaptionLookLevers,\n fontSize: number,\n): CaptionLookLevers {\n // COERCE, never throw. The route Zod rejects a bad `look`, but the orchestrator /\n // authored-JSON / import / Copilot paths write `look` straight onto node data with\n // no validation (payload-builder passes `look: data.look` verbatim — the CLAUDE.md\n // pitfall 5b class). An unknown id here would throw AFTER a paid transcription and\n // fail the whole run, so an out-of-vocabulary look falls back to the default preset.\n const preset = CAPTION_LOOKS[look ?? DEFAULT_CAPTION_LOOK] ?? CAPTION_LOOKS[DEFAULT_CAPTION_LOOK]\n const out: CaptionLookLevers = { ...preset(fontSize) }\n for (const k of Object.keys(explicit) as (keyof CaptionLookLevers)[]) {\n if (explicit[k] !== undefined) (out[k] as CaptionLookLevers[typeof k]) = explicit[k]\n }\n return out\n}\n\n/**\n * Resolve the concrete render levers for a caption, applying the DEFAULT look the\n * way each STYLE expects: an unset `look` means `outline` on a kinetic style (the\n * TikTok/CapCut read) and `clean` on the static `subtitle` (the plain read — a\n * pinned neutral sans, no outline, no casing). So a subtitle that routes to\n * Remotion never inherits the outline house-style unless asked, AND is never left\n * with no face at all (which renders as headless Chrome's default serif). A named\n * look always wins; explicit levers override either. SINGLE SOURCE for the worker\n * top-level levers, the per-segment resolver, and the frontend config/preview\n * mirror, so the per-style default can't drift between them.\n */\nexport function resolveCaptionLevers(\n style: string | undefined | null,\n look: CaptionLookId | undefined,\n explicit: CaptionLookLevers,\n fontSize: number,\n): CaptionLookLevers {\n const effective = look ?? (isKineticCaptionStyle(style) ? DEFAULT_CAPTION_LOOK : DEFAULT_SUBTITLE_LOOK)\n return resolveCaptionLook(effective, explicit, fontSize)\n}\n","export interface CaptionWordTiming {\n readonly text: string\n readonly startMs: number\n readonly endMs: number\n}\n\n/**\n * A caption plan: the opening line, where it ends, and the timed words that\n * follow it. Times and words only — no styling travels on a plan; whoever\n * renders it applies the look. Times are milliseconds from the video's start.\n */\n/** The opening line and the body's words, timed. No styling. */\nexport interface CaptionPlan {\n readonly v: 1\n /** The opening line as written; sent as is, never trimmed. */\n readonly hookText: string\n /** Where the opening line ends; the body starts here. */\n readonly hookEndMs: number\n /** Where the body captions end, any tail included (the producer decides it). */\n readonly bodyEndMs: number\n /** The body's words, in milliseconds. */\n readonly captions: readonly CaptionWordTiming[]\n /** When known, the opening line and the body are clamped to it. */\n readonly videoDurationMs?: number\n /** Primary language tag: \"en\", \"he\", … */\n readonly language?: string\n}\n\nconst nonNegative = (v: unknown): v is number => typeof v === \"number\" && Number.isFinite(v) && v >= 0\n\n/**\n * A wired caption plan (object or JSON string) → the plan, or the first problem\n * named as \"Caption plan: <issue>.\" Only the CaptionPlan fields are kept.\n */\nexport function parseCaptionPlan(raw: unknown): { plan: CaptionPlan } | { error: string } {\n let value: unknown = raw\n if (typeof raw === \"string\") {\n try { value = JSON.parse(raw) } catch { return { error: \"Caption plan: not valid JSON.\" } }\n }\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return { error: \"Caption plan: not an object.\" }\n const o = value as Record<string, unknown>\n if (o.v !== 1) return { error: \"Caption plan: v must be 1.\" }\n if (typeof o.hookText !== \"string\") return { error: \"Caption plan: hookText must be text.\" }\n for (const f of [\"hookEndMs\", \"bodyEndMs\"] as const) {\n if (!nonNegative(o[f])) return { error: `Caption plan: ${f} must be a non-negative number.` }\n }\n if (o.videoDurationMs !== undefined && !nonNegative(o.videoDurationMs)) {\n return { error: \"Caption plan: videoDurationMs must be a non-negative number.\" }\n }\n if (o.language !== undefined && typeof o.language !== \"string\") return { error: \"Caption plan: language must be text.\" }\n if (!Array.isArray(o.captions)) return { error: \"Caption plan: captions must be a list.\" }\n const captions: CaptionWordTiming[] = []\n for (let i = 0; i < o.captions.length; i++) {\n const c = o.captions[i] as Record<string, unknown> | null\n if (!c || typeof c !== \"object\" || typeof c.text !== \"string\" || !nonNegative(c.startMs) || !nonNegative(c.endMs)) {\n return { error: `Caption plan: captions[${i}] needs text, startMs and endMs.` }\n }\n if (c.endMs < c.startMs) return { error: `Caption plan: captions[${i}] ends before it starts.` }\n captions.push({ text: c.text, startMs: c.startMs, endMs: c.endMs })\n }\n return {\n plan: {\n v: 1,\n hookText: o.hookText,\n hookEndMs: o.hookEndMs as number,\n bodyEndMs: o.bodyEndMs as number,\n captions,\n ...(o.videoDurationMs !== undefined ? { videoDurationMs: o.videoDurationMs as number } : {}),\n ...(o.language !== undefined ? { language: o.language as string } : {}),\n },\n }\n}\n","/**\n * Canonical list of font display names supported by the Remotion renderer.\n *\n * Single source of truth shared by:\n * - the backend Zod schemas (`z.enum(SUPPORTED_FONT_NAMES)`), which CANNOT\n * import `@nodaro/remotion` (its font-registry pulls the render runtime +\n * `@remotion/google-fonts` side-effects into a validation path), and\n * - `packages/remotion/src/lib/font-registry.ts`, which loads each face and\n * is kept in lock-step with this tuple by a compile-time `satisfies` guard.\n *\n * Order/spelling MUST match the keys of the `fonts` object in font-registry.ts.\n */\nexport const SUPPORTED_FONT_NAMES = [\n \"Inter\",\n \"Roboto\",\n \"Open Sans\",\n \"Montserrat\",\n \"Poppins\",\n \"Raleway\",\n \"Nunito\",\n \"Lato\",\n \"Playfair Display\",\n \"Merriweather\",\n \"Lora\",\n \"EB Garamond\",\n \"Bebas Neue\",\n \"Oswald\",\n \"Anton\",\n \"Dancing Script\",\n \"Pacifico\",\n \"Caveat\",\n \"Roboto Mono\",\n \"Fira Code\",\n \"Rubik\",\n \"Heebo\",\n \"Cairo\",\n \"Tajawal\",\n] as const\n\nexport type SupportedFontName = (typeof SUPPORTED_FONT_NAMES)[number]\n","import { z } from \"zod\"\nimport {\n ALL_CAPTION_STYLES,\n CAPTION_LOOK_IDS,\n CAPTION_MAX_WORDS_PER_LINE_MAX,\n CAPTION_MAX_WORDS_PER_LINE_MIN,\n} from \"./caption-styles.js\"\nimport { SUPPORTED_FONT_NAMES } from \"./supported-fonts.js\"\n\n/**\n * The add-captions SEGMENT contract — one definition for the route's Zod, the\n * provider's overlap check and both workflow engines' pre-reservation check of a\n * caption plan's segments (a DAG payload never passes the route's validation).\n * Moved here from backend/src/routes/add-captions.ts so the copies can never differ.\n */\n\n/** Caption font weight: 100..900 on the 100 grid. */\nexport const captionFontWeightSchema = z.number().int().min(100).max(900).multipleOf(100)\n\n/** A text caption source must carry a visible glyph (whitespace synthesises to zero words). */\nexport const nonBlankCaptionText = z.string().min(1).refine((t) => /\\S/.test(t), { message: \"text must contain a non-whitespace character\" })\n\n/** One word-timed caption entry. */\nexport const captionInputSchema = z.object({\n text: z.string(),\n // startMs/endMs are the visibility window and drive the highlight; timestampMs\n // is the word timestamp used by tiktok-words token timing; confidence is\n // metadata, ignored by rendering. timestampMs/confidence default to null.\n startMs: z.number().min(0),\n endMs: z.number().min(0),\n timestampMs: z.number().min(0).nullable().default(null),\n confidence: z.number().min(0).max(1).nullable().default(null),\n})\n\n/**\n * One caption SEGMENT: a time range, optional levers (each inherits the top-level\n * value when omitted) and optional own words (`text` or `captions[]`; falls back\n * to the shared transcript filtered to the range). A segmented render is entirely\n * Remotion, so any `style` (incl. subtitle) and any look lever is valid on a segment.\n */\nexport const captionSegmentInputSchema = z.object({\n startMs: z.number().min(0),\n endMs: z.number().min(0),\n style: z.enum(ALL_CAPTION_STYLES).optional(),\n position: z.enum([\"bottom\", \"top\", \"center\"]).optional(),\n fontSize: z.number().min(12).max(200).optional(),\n color: z.string().optional(),\n backgroundColor: z.string().optional(),\n // A named look preset (outline/clean); explicit levers below override it.\n look: z.enum(CAPTION_LOOK_IDS).optional(),\n fontFamily: z.enum(SUPPORTED_FONT_NAMES).optional(),\n fontWeight: captionFontWeightSchema.optional(),\n strokeColor: z.string().optional(),\n strokeWidth: z.number().min(0).max(40).optional(),\n highlightColor: z.string().optional(),\n uppercase: z.boolean().optional(),\n positionY: z.number().min(0).max(100).optional(),\n animate: z.boolean().optional(),\n maxWordsPerLine: z.number().int().min(CAPTION_MAX_WORDS_PER_LINE_MIN).max(CAPTION_MAX_WORDS_PER_LINE_MAX).optional(),\n text: nonBlankCaptionText.optional(),\n captions: z.array(captionInputSchema).optional(),\n}).refine((s) => s.endMs > s.startMs, { message: \"segment endMs must be greater than startMs\" })\n\nexport type CaptionSegmentInput = z.infer<typeof captionSegmentInputSchema>\n\n/** Every field a segment may carry, in schema order. */\nexport const CAPTION_SEGMENT_SCHEMA_KEYS: readonly string[] = Object.keys(captionSegmentInputSchema.shape)\n\n/**\n * Segments must be sorted and non-overlapping. Returns the first offending pair\n * as the route's 400 text; null when none overlap (abutting is fine).\n * `startMs < endMs` per segment is enforced by the schema; this is the cross-segment rule.\n */\nexport function findSegmentOverlap(segments: readonly { startMs: number; endMs: number }[]): string | null {\n const sorted = [...segments].sort((a, b) => a.startMs - b.startMs)\n for (let i = 1; i < sorted.length; i++) {\n if (sorted[i]!.startMs < sorted[i - 1]!.endMs) {\n return `segments overlap: [${sorted[i - 1]!.startMs}, ${sorted[i - 1]!.endMs}) and [${sorted[i]!.startMs}, ${sorted[i]!.endMs})`\n }\n }\n return null\n}\n","/**\n * A caption line never starts or ends on a lone dash.\n *\n * A speech engine times a dash written between two spaces (\"Nodaro — every model\")\n * as a token of its own, and forced alignment keeps it. Inside a line the dash\n * reads as written; at a line's edge — the line breaks right after it, or the\n * next line opens with it — it reads as a stray mark. The display drops such a\n * token from the edge of the line it lands on; the words keep their own timings.\n *\n * One rule for every place that breaks captions into lines: the render's line\n * grouping (word-timed captions) and the wrap of a static text block.\n */\n\n/** Dash characters only: hyphen-minus, the Unicode hyphens and dashes (U+2010–U+2015), minus, the Hebrew maqaf, and their small/full-width forms. */\nconst BARE_DASH = /^[-‐-―−־﹘﹣-]+$/u\n\n/** True when the token, trimmed, is nothing but dash characters (\"—\", \"–\", \"-\"). A hyphenated word (\"ה-AI\", \"re-run\") is not. */\nexport function isBareDashToken(text: string): boolean {\n return BARE_DASH.test(text.trim())\n}\n\n/**\n * The items with every lone-dash token at either end removed (a copy; the input\n * is never mutated). A line holding nothing but dashes comes back empty — the\n * caller drops it rather than show it.\n */\nexport function trimEdgeDashTokens<T>(items: readonly T[], textOf: (item: T) => string): T[] {\n let start = 0\n let end = items.length\n while (start < end && isBareDashToken(textOf(items[start]!))) start++\n while (end > start && isBareDashToken(textOf(items[end - 1]!))) end--\n return items.slice(start, end)\n}\n","import { parseCaptionPlan, type CaptionPlan } from \"./caption-plan.js\"\nimport { captionSegmentInputSchema, findSegmentOverlap } from \"./caption-segment-schema.js\"\n\n/** The styling half, injected so this package never imports @nodaro/prompts (each engine passes hookPlateCaptionSegments). */\nexport interface CaptionPlanStyler {\n readonly segmentsFor: (\n plan: CaptionPlan,\n opts?: { bodyLevers?: Readonly<Record<string, unknown>> },\n ) => { segments: Record<string, unknown>[]; dropped: readonly string[] }\n readonly leverKeys: readonly string[]\n}\n\n/** The node's own caption levers (set, non-null) — the body's style. Undefined when it sets none (the helper then applies Body Captions). */\nexport function captionPlanBodyLevers(\n nodeData: Readonly<Record<string, unknown>>,\n leverKeys: readonly string[],\n): Record<string, unknown> | undefined {\n const levers: Record<string, unknown> = {}\n for (const k of leverKeys) {\n const v = nodeData[k]\n if (v !== undefined && v !== null) levers[k] = v\n }\n return Object.keys(levers).length > 0 ? levers : undefined\n}\n\n/**\n * A wired caption plan → the timed segments of ONE add-captions request, checked\n * with the route's own segment schema and overlap rule (a DAG payload never\n * passes the route, so both engines check here, before any reservation). The\n * plate is always Hook Plate plus the plan's language levers; the body is the\n * node's own style (the helper's rules, SP7 §4.6.3). `segments: []` = no\n * captions — the caller passes the video through.\n */\nexport function styleCaptionPlan(\n raw: unknown,\n nodeData: Readonly<Record<string, unknown>>,\n styler: CaptionPlanStyler,\n): { segments: Record<string, unknown>[] } | { error: string } {\n const parsed = parseCaptionPlan(raw)\n if (\"error\" in parsed) return { error: parsed.error }\n const bodyLevers = captionPlanBodyLevers(nodeData, styler.leverKeys)\n const styled = styler.segmentsFor(parsed.plan, bodyLevers ? { bodyLevers } : undefined).segments\n // The PARSED segments go on, never the helper's raw ones: the route's schema\n // fills each word entry's defaults (`timestampMs` / `confidence` → null), and a\n // DAG payload never passes the route, so returning the raw list sent a server\n // run word entries the add-captions route itself would have completed.\n const segments: Record<string, unknown>[] = []\n for (let i = 0; i < styled.length; i++) {\n const r = captionSegmentInputSchema.safeParse(styled[i])\n if (!r.success) return { error: `Caption plan: segment ${i + 1}: ${r.error.issues[0]?.message ?? \"invalid\"}.` }\n segments.push(r.data)\n }\n const overlap = findSegmentOverlap(segments as { startMs: number; endMs: number }[])\n if (overlap) return { error: `Caption plan: ${overlap}.` }\n return { segments }\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { DEFAULT_DIALOGUE_PROVIDER } from './chunk-UDDVDQMF.js';
2
- import { MODEL_CATALOG } from './chunk-5YYN5X57.js';
1
+ import { DEFAULT_DIALOGUE_PROVIDER } from './chunk-W7KHHNZR.js';
2
+ import { MODEL_CATALOG } from './chunk-DZ4IOP3Q.js';
3
3
 
4
4
  // src/dialogue-capabilities.ts
5
5
  function findDialogueCapabilities(provider) {
@@ -27,5 +27,5 @@ function dialogueStabilityAccepted(provider, value) {
27
27
  }
28
28
 
29
29
  export { dialogueHasLever, dialogueProviderOf, dialogueStabilityAccepted, dialogueSupportsTimestamps, findDialogueCapabilities, getDialogueCapabilities };
30
- //# sourceMappingURL=chunk-S5TMRJMX.js.map
31
- //# sourceMappingURL=chunk-S5TMRJMX.js.map
30
+ //# sourceMappingURL=chunk-6YIV37V7.js.map
31
+ //# sourceMappingURL=chunk-6YIV37V7.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dialogue-capabilities.ts"],"names":[],"mappings":";;;;AAeO,SAAS,yBAAyB,QAAA,EAAgD;AACvF,EAAA,IAAI,OAAO,QAAA,KAAa,QAAA,IAAY,CAAC,UAAU,OAAO,MAAA;AACtD,EAAA,IAAI,CAAC,MAAA,CAAO,MAAA,CAAO,aAAA,EAAe,QAAQ,GAAG,OAAO,MAAA;AACpD,EAAA,MAAM,KAAA,GAAQ,cAAc,QAAQ,CAAA;AACpC,EAAA,OAAO,MAAM,KAAA,CAAM,QAAA,CAAS,UAAU,CAAA,GAAI,MAAM,GAAA,GAAM,MAAA;AACxD;AAGO,SAAS,mBAAmB,QAAA,EAAqC;AACtE,EAAA,OAAO,wBAAA,CAAyB,QAAQ,CAAA,GAAK,QAAA,GAAgC,yBAAA;AAC/E;AAGO,SAAS,wBAAwB,QAAA,EAAoC;AAC1E,EAAA,OAAO,aAAA,CAAc,kBAAA,CAAmB,QAAQ,CAAC,CAAA,CAAG,GAAA;AACtD;AAGO,SAAS,gBAAA,CAAiB,UAAmB,KAAA,EAAiC;AACnF,EAAA,OAAO,uBAAA,CAAwB,QAAQ,CAAA,CAAE,MAAA,CAAO,SAAS,KAAK,CAAA;AAChE;AAGO,SAAS,2BAA2B,QAAA,EAA4B;AACrE,EAAA,OAAO,uBAAA,CAAwB,QAAQ,CAAA,CAAE,UAAA;AAC3C;AAGO,SAAS,yBAAA,CAA0B,UAAmB,KAAA,EAAwB;AACnF,EAAA,IAAI,CAAC,OAAO,QAAA,CAAS,KAAK,KAAK,KAAA,GAAQ,CAAA,IAAK,KAAA,GAAQ,CAAA,EAAG,OAAO,KAAA;AAC9D,EAAA,MAAM,KAAA,GAAQ,uBAAA,CAAwB,QAAQ,CAAA,CAAE,cAAA;AAChD,EAAA,OAAO,KAAA,GAAQ,KAAA,CAAM,QAAA,CAAS,KAAK,CAAA,GAAI,IAAA;AACzC","file":"chunk-S5TMRJMX.js","sourcesContent":["/**\n * Capability lookups for the DIALOGUE lane (`/v1/text-to-dialogue`, the Text to\n * Dialogue node, the voiced-video multi-speaker track).\n *\n * The dialogue models carry a `tts` sheet in `MODEL_CATALOG` like the\n * text-to-speech models, but each lane answers only for its own models: the\n * text-to-speech lookups (`tts-capabilities.ts`) treat a dialogue id as unknown,\n * and these treat a text-to-speech id as unknown. An unknown id here runs as\n * {@link DEFAULT_DIALOGUE_PROVIDER} (v3 dialogue) — not as the text-to-speech\n * fallback (turbo), which has no dialogue form.\n */\nimport { MODEL_CATALOG, type TtsCapabilities, type TtsSettingLever } from \"./model-catalog.js\"\nimport { DEFAULT_DIALOGUE_PROVIDER, type DialogueProvider } from \"./model-constants.js\"\n\n/** The sheet of a dialogue model, or `undefined` when the id is not one. Own properties only; a non-string is unknown. */\nexport function findDialogueCapabilities(provider: unknown): TtsCapabilities | undefined {\n if (typeof provider !== \"string\" || !provider) return undefined\n if (!Object.hasOwn(MODEL_CATALOG, provider)) return undefined\n const entry = MODEL_CATALOG[provider]!\n return entry.modes.includes(\"dialogue\") ? entry.tts : undefined\n}\n\n/** The dialogue model a request naming `provider` runs on (and is billed as). */\nexport function dialogueProviderOf(provider: unknown): DialogueProvider {\n return findDialogueCapabilities(provider) ? (provider as DialogueProvider) : DEFAULT_DIALOGUE_PROVIDER\n}\n\n/** The sheet a dialogue request runs under. */\nexport function getDialogueCapabilities(provider: unknown): TtsCapabilities {\n return MODEL_CATALOG[dialogueProviderOf(provider)]!.tts!\n}\n\n/** The dialogue model honours this voice-setting lever. */\nexport function dialogueHasLever(provider: unknown, lever: TtsSettingLever): boolean {\n return getDialogueCapabilities(provider).levers.includes(lever)\n}\n\n/** The dialogue model answers `/v1/text-to-dialogue/with-timestamps` (character timings + per-line voice segments). */\nexport function dialogueSupportsTimestamps(provider: unknown): boolean {\n return getDialogueCapabilities(provider).timestamps\n}\n\n/** `value` is a stability this platform accepts for the dialogue model: one of its steps, or any finite 0–1 when it has none. */\nexport function dialogueStabilityAccepted(provider: unknown, value: number): boolean {\n if (!Number.isFinite(value) || value < 0 || value > 1) return false\n const steps = getDialogueCapabilities(provider).stabilitySteps\n return steps ? steps.includes(value) : true\n}\n"]}
1
+ {"version":3,"sources":["../src/dialogue-capabilities.ts"],"names":[],"mappings":";;;;AAeO,SAAS,yBAAyB,QAAA,EAAgD;AACvF,EAAA,IAAI,OAAO,QAAA,KAAa,QAAA,IAAY,CAAC,UAAU,OAAO,MAAA;AACtD,EAAA,IAAI,CAAC,MAAA,CAAO,MAAA,CAAO,aAAA,EAAe,QAAQ,GAAG,OAAO,MAAA;AACpD,EAAA,MAAM,KAAA,GAAQ,cAAc,QAAQ,CAAA;AACpC,EAAA,OAAO,MAAM,KAAA,CAAM,QAAA,CAAS,UAAU,CAAA,GAAI,MAAM,GAAA,GAAM,MAAA;AACxD;AAGO,SAAS,mBAAmB,QAAA,EAAqC;AACtE,EAAA,OAAO,wBAAA,CAAyB,QAAQ,CAAA,GAAK,QAAA,GAAgC,yBAAA;AAC/E;AAGO,SAAS,wBAAwB,QAAA,EAAoC;AAC1E,EAAA,OAAO,aAAA,CAAc,kBAAA,CAAmB,QAAQ,CAAC,CAAA,CAAG,GAAA;AACtD;AAGO,SAAS,gBAAA,CAAiB,UAAmB,KAAA,EAAiC;AACnF,EAAA,OAAO,uBAAA,CAAwB,QAAQ,CAAA,CAAE,MAAA,CAAO,SAAS,KAAK,CAAA;AAChE;AAGO,SAAS,2BAA2B,QAAA,EAA4B;AACrE,EAAA,OAAO,uBAAA,CAAwB,QAAQ,CAAA,CAAE,UAAA;AAC3C;AAGO,SAAS,yBAAA,CAA0B,UAAmB,KAAA,EAAwB;AACnF,EAAA,IAAI,CAAC,OAAO,QAAA,CAAS,KAAK,KAAK,KAAA,GAAQ,CAAA,IAAK,KAAA,GAAQ,CAAA,EAAG,OAAO,KAAA;AAC9D,EAAA,MAAM,KAAA,GAAQ,uBAAA,CAAwB,QAAQ,CAAA,CAAE,cAAA;AAChD,EAAA,OAAO,KAAA,GAAQ,KAAA,CAAM,QAAA,CAAS,KAAK,CAAA,GAAI,IAAA;AACzC","file":"chunk-6YIV37V7.js","sourcesContent":["/**\n * Capability lookups for the DIALOGUE lane (`/v1/text-to-dialogue`, the Text to\n * Dialogue node, the voiced-video multi-speaker track).\n *\n * The dialogue models carry a `tts` sheet in `MODEL_CATALOG` like the\n * text-to-speech models, but each lane answers only for its own models: the\n * text-to-speech lookups (`tts-capabilities.ts`) treat a dialogue id as unknown,\n * and these treat a text-to-speech id as unknown. An unknown id here runs as\n * {@link DEFAULT_DIALOGUE_PROVIDER} (v3 dialogue) — not as the text-to-speech\n * fallback (turbo), which has no dialogue form.\n */\nimport { MODEL_CATALOG, type TtsCapabilities, type TtsSettingLever } from \"./model-catalog.js\"\nimport { DEFAULT_DIALOGUE_PROVIDER, type DialogueProvider } from \"./model-constants.js\"\n\n/** The sheet of a dialogue model, or `undefined` when the id is not one. Own properties only; a non-string is unknown. */\nexport function findDialogueCapabilities(provider: unknown): TtsCapabilities | undefined {\n if (typeof provider !== \"string\" || !provider) return undefined\n if (!Object.hasOwn(MODEL_CATALOG, provider)) return undefined\n const entry = MODEL_CATALOG[provider]!\n return entry.modes.includes(\"dialogue\") ? entry.tts : undefined\n}\n\n/** The dialogue model a request naming `provider` runs on (and is billed as). */\nexport function dialogueProviderOf(provider: unknown): DialogueProvider {\n return findDialogueCapabilities(provider) ? (provider as DialogueProvider) : DEFAULT_DIALOGUE_PROVIDER\n}\n\n/** The sheet a dialogue request runs under. */\nexport function getDialogueCapabilities(provider: unknown): TtsCapabilities {\n return MODEL_CATALOG[dialogueProviderOf(provider)]!.tts!\n}\n\n/** The dialogue model honours this voice-setting lever. */\nexport function dialogueHasLever(provider: unknown, lever: TtsSettingLever): boolean {\n return getDialogueCapabilities(provider).levers.includes(lever)\n}\n\n/** The dialogue model answers `/v1/text-to-dialogue/with-timestamps` (character timings + per-line voice segments). */\nexport function dialogueSupportsTimestamps(provider: unknown): boolean {\n return getDialogueCapabilities(provider).timestamps\n}\n\n/** `value` is a stability this platform accepts for the dialogue model: one of its steps, or any finite 0–1 when it has none. */\nexport function dialogueStabilityAccepted(provider: unknown, value: number): boolean {\n if (!Number.isFinite(value) || value < 0 || value > 1) return false\n const steps = getDialogueCapabilities(provider).stabilitySteps\n return steps ? steps.includes(value) : true\n}\n"]}
@@ -97,6 +97,9 @@ var LLM_MODELS = [
97
97
  retired: true,
98
98
  vendor: "google",
99
99
  structuredOutputMode: "kie-response-format",
100
+ // The KIE endpoint is 3.8's, so it takes 3.8's rule: no `response_format`
101
+ // there, the schema in the prompt (see gemini-3.8-flash below).
102
+ kieSchemaInPrompt: true,
100
103
  supportsImages: true,
101
104
  // Google's own cap is 65,536, but the field feeds BOTH lanes and the KIE
102
105
  // flash endpoints cap at 8192 (the measured 3.6 posture) — stay at the
@@ -119,8 +122,9 @@ var LLM_MODELS = [
119
122
  series: "Gemini",
120
123
  // Inherits "Newest" from 3.7 (demoted above). Deliberately does NOT name
121
124
  // agentic video: that capability exists only on the direct Google lane
122
- // (Interactions API, not wired here) and the modality caps below withhold
123
- // video — a picker desc must not promise a lever this entry cannot expose.
125
+ // (Interactions API, not wired here). Plain video + audio input is wired
126
+ // (LLM_MODALITY_CAPS below) — a picker desc must not promise a lever this
127
+ // entry cannot expose.
124
128
  desc: "Newest fast Gemini, agentic-tuned",
125
129
  tier: "economy",
126
130
  kieFormat: "chat-completions",
@@ -134,6 +138,16 @@ var LLM_MODELS = [
134
138
  // is ENFORCED (the reply came back exact-schema valid, credits_consumed
135
139
  // present) — not merely accepted-and-ignored.
136
140
  structuredOutputMode: "kie-response-format",
141
+ // Since 2026-11-13 the KIE endpoint answers ANY request carrying
142
+ // `response_format` (json_schema strict or not, json_object; any effort or
143
+ // none; with or without media) with HTTP 200 and an in-band
144
+ // `{"code":500}` after ~34 s, while the same request without it answers;
145
+ // 3.6 Flash, 3.1 Pro and Carbon take the same body. So the KIE lane sends
146
+ // the schema in the prompt (measured: a real Video Analysis roll, video
147
+ // included, answered schema-valid that way). The direct lane keeps its
148
+ // enforced `responseJsonSchema` (asked once when a call's KIE answers never
149
+ // validate), and the trust this mode carries stays.
150
+ kieSchemaInPrompt: true,
137
151
  supportsImages: true,
138
152
  // 16384 here, NOT the 8192 its 3.6 / 3.7 siblings sit at. Those two stay at
139
153
  // the KIE-safe intersection because nobody measured their endpoints past
@@ -344,6 +358,54 @@ var LLM_MODELS = [
344
358
  // ended early (one declined the task, one stopped on RECITATION).
345
359
  thinkingDefaultOn: true
346
360
  },
361
+ {
362
+ id: "gemini-4-carbon",
363
+ displayName: "Gemini 4 Carbon",
364
+ series: "Gemini",
365
+ desc: "Deepest-reasoning Gemini, 1M context",
366
+ tier: "premium",
367
+ kieFormat: "chat-completions",
368
+ // KIE serves it on the OpenAI-compatible dialect under this slug
369
+ // (docs.kie.ai/market/gemini/gemini-4-carbon-openai — Argon's page with the
370
+ // name swapped). Unlike Argon's, this lane passed its probe (2026-11-12):
371
+ // every call answered, images read, a stream ended cleanly, no empty 200,
372
+ // no negative counts, no code-execution fences. KIE flags it "Chat only",
373
+ // like Argon: it may not back a tool-loop feature (none does today).
374
+ kieSlugOrModel: "gemini-4-carbon-openai",
375
+ vendor: "google",
376
+ // NO trusted `structuredOutputMode` (decided 2026-11-12): KIE did NOT
377
+ // enforce a `response_format` json_schema — both probe calls came back as
378
+ // JSON holding an off-enum value in the enum field ("cheerful and
379
+ // energized" for happy | sad). So it is not a STRUCTURED_VISION_MODELS
380
+ // member (not offered by describe-to-picker), and every answer is parsed,
381
+ // validated and re-asked by `llmCompleteStructured`.
382
+ // The schema still goes on the wire, as a hint (`structuredOutputHint`): as
383
+ // `response_format` on KIE (the probe's replies followed its shape, only the
384
+ // enum slipped) and as `responseJsonSchema` on the direct Google lane,
385
+ // which enforced it in the probe — on every attempt, the re-ask included.
386
+ structuredOutputHint: "kie-response-format",
387
+ supportsImages: true,
388
+ // The registry's usual 16384, as Argon. Every call is floored to the
389
+ // default 32768 (`thinkingDefaultOn`, below): Google lists an output cap of
390
+ // 32,768 (models.list) and accepted maxOutputTokens 65536; KIE's doc
391
+ // states up to 65,536 tokens, thinking included.
392
+ maxOutputTokens: 16384,
393
+ // KIE first, Google as the reliability fallback (and Advanced mode) — no
394
+ // `preferDirect`, no `directOnly`. Google serves `models/gemini-4-carbon`
395
+ // beside Argon (models.list, 2026-11-12).
396
+ directGeminiModel: "gemini-4-carbon",
397
+ // KIE's documented `reasoning_effort` enum, and the direct lane's ladder
398
+ // too: Google 400s thinkingLevel MINIMAL on this model ("not supported")
399
+ // and answers LOW / MEDIUM / HIGH (probed 2026-11-12) — Argon's shape. So
400
+ // no `none` (it maps to MINIMAL in the direct client) and no
401
+ // `directReasoningEfforts`: a `none` request clamps to Auto on both lanes.
402
+ reasoningEfforts: ["low", "medium", "high"],
403
+ // Reasons with no thinking param sent on both lanes: KIE's `total_tokens`
404
+ // ran well past prompt + completion on every no-effort call (its dialect
405
+ // reports no reasoning split), and Google's no-level call reported thought
406
+ // tokens. No `reasoningOutputFloor`: both lanes take the default 32768.
407
+ thinkingDefaultOn: true
408
+ },
347
409
  {
348
410
  id: "claude-opus-4.7",
349
411
  displayName: "Claude Opus 4.7",
@@ -587,6 +649,43 @@ var LLM_MODELS = [
587
649
  supportsTemperature: false,
588
650
  thinkingDefaultOn: true
589
651
  },
652
+ {
653
+ id: "gpt-6.1-terra",
654
+ displayName: "GPT-6.1 Terra",
655
+ series: "GPT",
656
+ desc: "Fast, efficient GPT-6.1, sharp visual reasoning",
657
+ tier: "standard",
658
+ kieFormat: "responses",
659
+ // The GPT-6 wire (codex/v1/responses, derived from `vendor`); KIE's doc is
660
+ // 6.1 Sol's page with the name swapped and `none` added to the effort enum.
661
+ // Live-probed 2026-11-12: non-stream 16/16, `text.format` json_schema
662
+ // ENFORCED (asked for prose, it returned schema JSON with the enum
663
+ // honoured), data-URI vision, SSE deltas. Unlike luna / sol / 6.1 sol it
664
+ // reports REAL top-level `usage.input_tokens` — see `kieInputUntrusted` in
665
+ // backend/src/lib/llm/kie-cost.ts.
666
+ //
667
+ // KIE's endpoint adds its own instructions to every call and counts them as
668
+ // input. The hold and the estimate count them too
669
+ // (backend/src/lib/pricing/llm-cost.ts, `llmLaneAddedInputTokens`). They
670
+ // were several times larger with an effort sent on the morning of
671
+ // 2026-11-12 and the same size either way by that afternoon, so its price
672
+ // does not depend on the effort: not `effortPriced` (re-measure if KIE's
673
+ // reported input jumps again).
674
+ kieSlugOrModel: "gpt-6-1-terra",
675
+ vendor: "openai",
676
+ structuredOutputMode: "responses-json-schema",
677
+ supportsImages: true,
678
+ maxOutputTokens: 16384,
679
+ // NO `none` (decided 2026-11-12): KIE answers it, but a `none` sent on the
680
+ // wire is answered as an effort (it echoed `medium`) while reasoning no
681
+ // more than Auto. Clamping maps a `none` request to nothing sent (Auto).
682
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
683
+ // Same doc as 6.1 Sol: no temperature lever.
684
+ supportsTemperature: false
685
+ // NO `thinkingDefaultOn`: with no effort sent (and at low / medium / high)
686
+ // the probe reported 0 reasoning tokens; only xhigh (8) and max (27)
687
+ // reasoned, and those already floor the cap (`raiseToReasoningFloor`).
688
+ },
590
689
  {
591
690
  id: "grok-4.6",
592
691
  displayName: "Grok 4.6",
@@ -816,12 +915,49 @@ var LLM_MODELS = [
816
915
  // KIE's documented enum. The endpoint accepted xhigh/none without error but
817
916
  // never echoes an effort back, so nothing beyond the doc is verifiable.
818
917
  reasoningEfforts: ["low", "medium", "high"],
918
+ // Decided 2026-11-12: a request below `low` (`none`) is sent as `low`,
919
+ // never as nothing — KIE runs Kimi at its highest level when no effort is
920
+ // sent (K3.1 Pro's no-effort replies echoed `max`). Auto still sends nothing.
921
+ effortBelowLowestSendsLowest: true,
819
922
  // The doc lists no `temperature` field at all.
820
923
  supportsTemperature: false,
821
924
  // "Reasons by default" per KIE's doc (its usage reports no reasoning-token
822
925
  // split, so this is the doc's word, not a measurement).
823
926
  thinkingDefaultOn: true
824
927
  },
928
+ {
929
+ id: "kimi-k3.1-pro",
930
+ displayName: "Kimi K3.1 Pro",
931
+ series: "Kimi",
932
+ desc: "Kimi tuned for coding and research, 1M context",
933
+ tier: "premium",
934
+ kieFormat: "responses",
935
+ // Same openai/v1/responses family path and wire as kimi-k3 (KIE's doc is
936
+ // K3's page with the name and the effort enum changed). Live-probed
937
+ // 2026-11-12: non-stream 9/9, `text.format` json_schema ENFORCED (asked for
938
+ // prose, it returned schema JSON with the enum honoured), data-URI vision,
939
+ // real `usage.input_tokens` and `credits_consumed`. Its stream sends
940
+ // `response.reasoning_text.delta` frames apart from the
941
+ // `response.output_text.delta` ones, and only the latter are the answer.
942
+ kieSlugOrModel: "kimi-k3-1-pro",
943
+ vendor: "moonshot",
944
+ structuredOutputMode: "responses-json-schema",
945
+ supportsImages: true,
946
+ maxOutputTokens: 16384,
947
+ // KIE's documented enum (K3's was low / medium / high). Each level was
948
+ // echoed back. An off-enum `medium` answered too (echoed as `high`), so it
949
+ // is not offered: a `medium` request clamps down to `low`.
950
+ reasoningEfforts: ["low", "high", "max"],
951
+ // Decided 2026-11-12: a request below `low` (`none`) is sent as `low`,
952
+ // never as nothing — with no effort sent KIE runs it at `max` (the probe's
953
+ // no-effort replies echoed `max`). Auto still sends nothing.
954
+ effortBelowLowestSendsLowest: true,
955
+ // The doc lists no `temperature` field at all, as K3's.
956
+ supportsTemperature: false,
957
+ // Measured: every probe call reported reasoning tokens (20 to 163), the
958
+ // no-effort ones included (they echoed effort `max`).
959
+ thinkingDefaultOn: true
960
+ },
825
961
  {
826
962
  id: "deepseek-v4.1-flash",
827
963
  displayName: "DeepSeek V4.1 Flash",
@@ -858,6 +994,14 @@ function pickableLlmModels(currentId) {
858
994
  var STRUCTURED_VISION_MODELS = LLM_MODELS.filter(
859
995
  (m) => m.supportsImages && m.structuredOutputMode != null
860
996
  );
997
+ function structuredWireMode(model) {
998
+ return model.structuredOutputMode ?? model.structuredOutputHint;
999
+ }
1000
+ function llmSendsSchema(modelId, feature) {
1001
+ const id = modelId || (feature ? LLM_FEATURE_DEFAULTS[feature] : void 0);
1002
+ const model = id ? getLlmModel(id) : void 0;
1003
+ return !model || structuredWireMode(model) !== void 0;
1004
+ }
861
1005
  var DESCRIBE_TO_PICKER_WITHHELD_MODELS = /* @__PURE__ */ new Set();
862
1006
  var LLM_STRUCTURED_WITHHELD_MODELS = DESCRIBE_TO_PICKER_WITHHELD_MODELS;
863
1007
  var DESCRIBE_TO_PICKER_MODELS = STRUCTURED_VISION_MODELS.filter(
@@ -948,6 +1092,10 @@ function defaultReasoningEffort(feature, modelId) {
948
1092
  return getLlmModel(effective)?.id === recipe.model ? recipe.effort : void 0;
949
1093
  }
950
1094
  var LLM_MODALITY_CAPS = {
1095
+ // Keeps full caps after KIE dropped its channel (2026-11-13): it stays a
1096
+ // VIDEO_ANALYSIS_LLM_MODELS member as the legacy `fast` backing (below), so a
1097
+ // stored raw `llmModel: "gemini-3-flash"` still resolves and prices under its
1098
+ // own credit family.
951
1099
  "gemini-3-flash": { image: true, video: true, audio: true },
952
1100
  "gemini-3.6-flash": { image: true, video: true, audio: true },
953
1101
  // gemini-3.7-flash is IMAGE-ONLY by DECISION, not omission: full video+audio
@@ -956,15 +1104,13 @@ var LLM_MODALITY_CAPS = {
956
1104
  // deferred while the smart-family A/B routes this model internally (#747).
957
1105
  // Flip these two flags ONLY together with that VA-side decision.
958
1106
  "gemini-3.7-flash": { image: true, video: false, audio: false },
959
- // gemini-3.8-flash is IMAGE-ONLY by DECISION, not omission — 3.7's rationale
960
- // exactly: full video+audio caps would auto-enroll it in
961
- // VIDEO_ANALYSIS_LLM_MODELS (derived below) and force a video-analysis tier +
962
- // pricing decision that stays deferred until the 3.8-vs-3.7 analysis A/B
963
- // concludes. Google's own 3.8 lane DOES understand video (agentic video, via
964
- // the Interactions API we don't wire) — which is precisely why withholding it
965
- // has to be a decision rather than a gap. Flip these two flags ONLY together
966
- // with that VA-side decision.
967
- "gemini-3.8-flash": { image: true, video: false, audio: false },
1107
+ // gemini-3.8-flash takes video + audio (decided 2026-11-13): it backs the
1108
+ // video-analysis `fast` tier (VIDEO_ANALYSIS_TIERS below) since KIE dropped
1109
+ // gemini-3-flash's channel, which is what enrols it in
1110
+ // VIDEO_ANALYSIS_LLM_MODELS. Its KIE lane reads a video URL sent as an
1111
+ // `image_url` part, the same channel gemini-3-flash used (live-verified
1112
+ // 2026-11-13 with the analysis request: prompt tokens include the clip).
1113
+ "gemini-3.8-flash": { image: true, video: true, audio: true },
968
1114
  "gemini-3.1-pro": { image: true, video: true, audio: true },
969
1115
  // gemini-4-argon is IMAGE-ONLY by DECISION, not omission (decided 2026-10-17):
970
1116
  // the model DOES read video and audio, but full caps would
@@ -972,6 +1118,12 @@ var LLM_MODALITY_CAPS = {
972
1118
  // video-analysis tier + pricing decision. That waits on a Video Analysis
973
1119
  // bake-off; flip these two flags ONLY together with its outcome.
974
1120
  "gemini-4-argon": { image: true, video: false, audio: false },
1121
+ // gemini-4-carbon is IMAGE-ONLY for now, by decision (2026-11-12): the model
1122
+ // reads video and audio, but full caps would auto-enroll it in
1123
+ // VIDEO_ANALYSIS_LLM_MODELS (derived below). Its video + audio input comes in
1124
+ // a follow-up change that also decides its Video Analysis enrolment; flip
1125
+ // these two flags ONLY together with that.
1126
+ "gemini-4-carbon": { image: true, video: false, audio: false },
975
1127
  "claude-haiku-4.5": { image: true, video: false, audio: false },
976
1128
  "claude-haiku-5.5": { image: true, video: false, audio: false },
977
1129
  "claude-sonnet-4.6": { image: true, video: false, audio: false },
@@ -988,6 +1140,8 @@ var LLM_MODALITY_CAPS = {
988
1140
  "gpt-6-luna": { image: true, video: false, audio: false },
989
1141
  "gpt-6-sol": { image: true, video: false, audio: false },
990
1142
  "gpt-6.1-sol": { image: true, video: false, audio: false },
1143
+ // KIE's doc also takes files (PDFs, documents); that input is not wired here.
1144
+ "gpt-6.1-terra": { image: true, video: false, audio: false },
991
1145
  "grok-4.6": { image: true, video: false, audio: false },
992
1146
  "grok-4.7": { image: true, video: false, audio: false },
993
1147
  "claude-sonnet-5": { image: true, video: false, audio: false },
@@ -998,6 +1152,7 @@ var LLM_MODALITY_CAPS = {
998
1152
  "claude-fable-5": { image: true, video: false, audio: false },
999
1153
  // KIE documents text + image input only for both.
1000
1154
  "kimi-k3": { image: true, video: false, audio: false },
1155
+ "kimi-k3.1-pro": { image: true, video: false, audio: false },
1001
1156
  "deepseek-v4.1-flash": { image: true, video: false, audio: false }
1002
1157
  };
1003
1158
  function getLlmModalityCaps(modelId) {
@@ -1044,6 +1199,7 @@ function effectiveReasoningEffort(modelId, requested, advanced = false) {
1044
1199
  for (const l of levels) {
1045
1200
  if (EFFORT_RANK[l] <= EFFORT_RANK[req] && (best === void 0 || EFFORT_RANK[l] > EFFORT_RANK[best])) best = l;
1046
1201
  }
1202
+ if (best === void 0 && getLlmModel(modelId ?? "")?.effortBelowLowestSendsLowest) return levels[0];
1047
1203
  return best;
1048
1204
  }
1049
1205
  var LLM_ROUTE_DEFAULTS = {
@@ -1088,7 +1244,26 @@ function llmServesDirect(modelId, reasoningEffort, advancedMode) {
1088
1244
  function llmPriceKey(feature, modelId, reasoningEffort, advancedMode) {
1089
1245
  if (!modelId) throw new TypeError(`llmPriceKey: modelId must be a resolved model id (feature "${feature}")`);
1090
1246
  const effort = reasoningEffort ?? defaultReasoningEffort(llmDefaultsFeature(feature), modelId);
1091
- return llmServesDirect(modelId, effort, advancedMode) ? `${feature}:${modelId}:direct` : `${feature}:${modelId}`;
1247
+ if (llmServesDirect(modelId, effort, advancedMode)) return `${feature}:${modelId}${LLM_PRICE_KEY_DIRECT}`;
1248
+ const sent = getLlmModel(modelId)?.effortPriced ? effectiveReasoningEffort(modelId, effort) : void 0;
1249
+ return sent ? `${feature}:${modelId}${LLM_PRICE_KEY_EFFORT}${sent}` : `${feature}:${modelId}`;
1250
+ }
1251
+ var LLM_PRICE_KEY_DIRECT = ":direct";
1252
+ var LLM_PRICE_KEY_EFFORT = ":effort-";
1253
+ var REGISTRY_MODEL_IDS = new Set(LLM_MODEL_IDS);
1254
+ function parseLlmPriceKeyModel(tail) {
1255
+ if (REGISTRY_MODEL_IDS.has(tail)) return { modelId: tail };
1256
+ if (tail.endsWith(LLM_PRICE_KEY_DIRECT)) {
1257
+ const modelId2 = tail.slice(0, -LLM_PRICE_KEY_DIRECT.length);
1258
+ return REGISTRY_MODEL_IDS.has(modelId2) ? { modelId: modelId2, lane: "direct" } : null;
1259
+ }
1260
+ const at = tail.lastIndexOf(LLM_PRICE_KEY_EFFORT);
1261
+ if (at <= 0) return null;
1262
+ const modelId = tail.slice(0, at);
1263
+ const level = tail.slice(at + LLM_PRICE_KEY_EFFORT.length);
1264
+ const model = REGISTRY_MODEL_IDS.has(modelId) ? getLlmModel(modelId) : void 0;
1265
+ if (!model?.effortPriced || !availableReasoningEfforts(modelId).includes(level)) return null;
1266
+ return { modelId, reasoningEffort: level };
1092
1267
  }
1093
1268
  var LLM_CREDIT_RUNGS = ["economy", "standard", "premium", "premium-direct"];
1094
1269
  function llmCreditIdForRung(feature, rung) {
@@ -1120,7 +1295,7 @@ function resolveLlmCreditId(feature, body) {
1120
1295
  );
1121
1296
  }
1122
1297
  var VIDEO_ANALYSIS_LLM_MODELS = LLM_MODELS.filter((m) => getLlmModalityCaps(m.id).video && getLlmModalityCaps(m.id).audio).map((m) => m.id);
1123
- var VIDEO_ANALYSIS_TIERS = { fast: "gemini-3-flash", pro: "gemini-3.1-pro" };
1298
+ var VIDEO_ANALYSIS_TIERS = { fast: "gemini-3.8-flash", pro: "gemini-3.1-pro" };
1124
1299
  var VIDEO_ANALYSIS_LEGACY_MODELS = {
1125
1300
  // Backed the fast tier from 2026-07 until 2026-07-29, when the economy tiers
1126
1301
  // moved to the cheaper lane and the older, cheaper flash. It is now the engine
@@ -1128,7 +1303,13 @@ var VIDEO_ANALYSIS_LEGACY_MODELS = {
1128
1303
  // id, so as far as this map is concerned it no longer backs a selectable tier and
1129
1304
  // belongs here: stored raw `llmModel` values keep resolving and keep pricing
1130
1305
  // under their own credit family.
1131
- "gemini-3.6-flash": "fast"
1306
+ "gemini-3.6-flash": "fast",
1307
+ // Backed the fast tier from 2026-07-29 until 2026-11-13, when KIE dropped its
1308
+ // channel (every call answers `code 422 "The channel is not supported"`) and
1309
+ // the fast tier moved to gemini-3.8-flash. Stored raw `llmModel` values keep
1310
+ // resolving and keep pricing under their own credit family; the analysis
1311
+ // engine serves their rolls with the current fast model.
1312
+ "gemini-3-flash": "fast"
1132
1313
  };
1133
1314
  var VIDEO_ANALYSIS_MIXED_TIERS = ["mixed", "mixed-fast", "smart"];
1134
1315
  var VIDEO_ANALYSIS_TIER_ORDER = ["smart", "pro", "fast", "mixed", "mixed-fast"];
@@ -1170,6 +1351,8 @@ exports.LLM_FEATURE_DEFAULT_EFFORTS = LLM_FEATURE_DEFAULT_EFFORTS;
1170
1351
  exports.LLM_MODALITY_CAPS = LLM_MODALITY_CAPS;
1171
1352
  exports.LLM_MODELS = LLM_MODELS;
1172
1353
  exports.LLM_MODEL_IDS = LLM_MODEL_IDS;
1354
+ exports.LLM_PRICE_KEY_DIRECT = LLM_PRICE_KEY_DIRECT;
1355
+ exports.LLM_PRICE_KEY_EFFORT = LLM_PRICE_KEY_EFFORT;
1173
1356
  exports.LLM_REASONING_EFFORTS = LLM_REASONING_EFFORTS;
1174
1357
  exports.LLM_ROUTE_DEFAULTS = LLM_ROUTE_DEFAULTS;
1175
1358
  exports.LLM_STRUCTURED_WITHHELD_MODELS = LLM_STRUCTURED_WITHHELD_MODELS;
@@ -1200,14 +1383,17 @@ exports.llmCreditRung = llmCreditRung;
1200
1383
  exports.llmDefaultsFeature = llmDefaultsFeature;
1201
1384
  exports.llmPriceKey = llmPriceKey;
1202
1385
  exports.llmRouteDefaults = llmRouteDefaults;
1386
+ exports.llmSendsSchema = llmSendsSchema;
1203
1387
  exports.llmServesDirect = llmServesDirect;
1204
1388
  exports.llmTierCreditIds = llmTierCreditIds;
1205
1389
  exports.motionGraphicsFeature = motionGraphicsFeature;
1206
1390
  exports.orderedLlmModels = orderedLlmModels;
1391
+ exports.parseLlmPriceKeyModel = parseLlmPriceKeyModel;
1207
1392
  exports.pickableLlmModels = pickableLlmModels;
1208
1393
  exports.reasoningOutputFloor = reasoningOutputFloor;
1209
1394
  exports.resolveLlmCreditId = resolveLlmCreditId;
1210
1395
  exports.resolveVideoAnalysisModel = resolveVideoAnalysisModel;
1396
+ exports.structuredWireMode = structuredWireMode;
1211
1397
  exports.supportsAdvancedMode = supportsAdvancedMode;
1212
- //# sourceMappingURL=chunk-3M4BNKFJ.cjs.map
1213
- //# sourceMappingURL=chunk-3M4BNKFJ.cjs.map
1398
+ //# sourceMappingURL=chunk-7AJGUI7L.cjs.map
1399
+ //# sourceMappingURL=chunk-7AJGUI7L.cjs.map