@nodaro/shared 3.31.0 → 3.33.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 (378) hide show
  1. package/README.md +17 -0
  2. package/dist/chunk-23FJQTEA.js +1604 -0
  3. package/dist/chunk-23FJQTEA.js.map +1 -0
  4. package/dist/chunk-2NIQO2J3.cjs +54 -0
  5. package/dist/chunk-2NIQO2J3.cjs.map +1 -0
  6. package/dist/chunk-2NQLSLSN.cjs +19 -0
  7. package/dist/chunk-2NQLSLSN.cjs.map +1 -0
  8. package/dist/chunk-2OJIVO7R.cjs +32 -0
  9. package/dist/chunk-2OJIVO7R.cjs.map +1 -0
  10. package/dist/chunk-2RF4Z7KG.cjs +803 -0
  11. package/dist/chunk-2RF4Z7KG.cjs.map +1 -0
  12. package/dist/chunk-3RYKIUAE.js +86 -0
  13. package/dist/chunk-3RYKIUAE.js.map +1 -0
  14. package/dist/chunk-44I73CQS.cjs +194 -0
  15. package/dist/chunk-44I73CQS.cjs.map +1 -0
  16. package/dist/chunk-5PC6JBGJ.cjs +1419 -0
  17. package/dist/chunk-5PC6JBGJ.cjs.map +1 -0
  18. package/dist/chunk-5RU2HCW2.js +30 -0
  19. package/dist/chunk-5RU2HCW2.js.map +1 -0
  20. package/dist/chunk-5RYLK3MQ.js +267 -0
  21. package/dist/chunk-5RYLK3MQ.js.map +1 -0
  22. package/dist/chunk-5THUHJ3E.js +46 -0
  23. package/dist/chunk-5THUHJ3E.js.map +1 -0
  24. package/dist/chunk-6DAWSVX2.cjs +103 -0
  25. package/dist/chunk-6DAWSVX2.cjs.map +1 -0
  26. package/dist/chunk-6WZ2VN7V.js +920 -0
  27. package/dist/chunk-6WZ2VN7V.js.map +1 -0
  28. package/dist/chunk-7G7G42KS.js +86 -0
  29. package/dist/chunk-7G7G42KS.js.map +1 -0
  30. package/dist/chunk-7Z5LUTGU.js +1567 -0
  31. package/dist/chunk-7Z5LUTGU.js.map +1 -0
  32. package/dist/chunk-AINCI23X.js +2171 -0
  33. package/dist/chunk-AINCI23X.js.map +1 -0
  34. package/dist/chunk-BG5D5CZ6.js +1922 -0
  35. package/dist/chunk-BG5D5CZ6.js.map +1 -0
  36. package/dist/chunk-CK3GK34R.js +1381 -0
  37. package/dist/chunk-CK3GK34R.js.map +1 -0
  38. package/dist/chunk-CUH22J4D.js +17 -0
  39. package/dist/chunk-CUH22J4D.js.map +1 -0
  40. package/dist/chunk-D26ENTN2.cjs +1770 -0
  41. package/dist/chunk-D26ENTN2.cjs.map +1 -0
  42. package/dist/chunk-D6GNRSCV.cjs +2017 -0
  43. package/dist/chunk-D6GNRSCV.cjs.map +1 -0
  44. package/dist/chunk-FBV5DF6D.js +95 -0
  45. package/dist/chunk-FBV5DF6D.js.map +1 -0
  46. package/dist/chunk-FG4E7MTG.cjs +4 -0
  47. package/dist/chunk-FG4E7MTG.cjs.map +1 -0
  48. package/dist/chunk-FT5CF6IA.js +42 -0
  49. package/dist/chunk-FT5CF6IA.js.map +1 -0
  50. package/dist/chunk-G6IIVKMO.js +26 -0
  51. package/dist/chunk-G6IIVKMO.js.map +1 -0
  52. package/dist/chunk-HC7VKIV5.cjs +430 -0
  53. package/dist/chunk-HC7VKIV5.cjs.map +1 -0
  54. package/dist/chunk-HGC5JNVA.cjs +1503 -0
  55. package/dist/chunk-HGC5JNVA.cjs.map +1 -0
  56. package/dist/chunk-HKFMXNVQ.cjs +1273 -0
  57. package/dist/chunk-HKFMXNVQ.cjs.map +1 -0
  58. package/dist/chunk-HRXEZ3SX.cjs +526 -0
  59. package/dist/chunk-HRXEZ3SX.cjs.map +1 -0
  60. package/dist/chunk-HSHCCBIV.js +255 -0
  61. package/dist/chunk-HSHCCBIV.js.map +1 -0
  62. package/dist/chunk-HUR6ZJ7S.cjs +159 -0
  63. package/dist/chunk-HUR6ZJ7S.cjs.map +1 -0
  64. package/dist/chunk-J7BMO73N.cjs +114 -0
  65. package/dist/chunk-J7BMO73N.cjs.map +1 -0
  66. package/dist/chunk-JFS3NWZ5.cjs +1714 -0
  67. package/dist/chunk-JFS3NWZ5.cjs.map +1 -0
  68. package/dist/chunk-JL4C5VJ7.cjs +488 -0
  69. package/dist/chunk-JL4C5VJ7.cjs.map +1 -0
  70. package/dist/chunk-JSGIEF6Z.cjs +1087 -0
  71. package/dist/chunk-JSGIEF6Z.cjs.map +1 -0
  72. package/dist/chunk-JWA5SGCS.js +203 -0
  73. package/dist/chunk-JWA5SGCS.js.map +1 -0
  74. package/dist/chunk-K3LLGRK7.cjs +3545 -0
  75. package/dist/chunk-K3LLGRK7.cjs.map +1 -0
  76. package/dist/chunk-KU6S7IYV.cjs +210 -0
  77. package/dist/chunk-KU6S7IYV.cjs.map +1 -0
  78. package/dist/chunk-M36G6SRP.js +447 -0
  79. package/dist/chunk-M36G6SRP.js.map +1 -0
  80. package/dist/chunk-M7GQBRZU.cjs +1963 -0
  81. package/dist/chunk-M7GQBRZU.cjs.map +1 -0
  82. package/dist/chunk-MRXGWL42.cjs +4 -0
  83. package/dist/chunk-MRXGWL42.cjs.map +1 -0
  84. package/dist/chunk-NEJ2PV4C.cjs +211 -0
  85. package/dist/chunk-NEJ2PV4C.cjs.map +1 -0
  86. package/dist/chunk-OTATNBMD.js +141 -0
  87. package/dist/chunk-OTATNBMD.js.map +1 -0
  88. package/dist/chunk-OZSACQ2V.js +471 -0
  89. package/dist/chunk-OZSACQ2V.js.map +1 -0
  90. package/dist/chunk-PHZ23DP3.js +1782 -0
  91. package/dist/chunk-PHZ23DP3.js.map +1 -0
  92. package/dist/chunk-PQHS255G.js +1369 -0
  93. package/dist/chunk-PQHS255G.js.map +1 -0
  94. package/dist/chunk-PRYE7AZQ.cjs +1227 -0
  95. package/dist/chunk-PRYE7AZQ.cjs.map +1 -0
  96. package/dist/chunk-PVJBAPYJ.js +404 -0
  97. package/dist/chunk-PVJBAPYJ.js.map +1 -0
  98. package/dist/chunk-PXFQVLBX.js +776 -0
  99. package/dist/chunk-PXFQVLBX.js.map +1 -0
  100. package/dist/chunk-QA3MVQ32.js +21 -0
  101. package/dist/chunk-QA3MVQ32.js.map +1 -0
  102. package/dist/chunk-QJRP44ZO.js +769 -0
  103. package/dist/chunk-QJRP44ZO.js.map +1 -0
  104. package/dist/chunk-SAW5OK36.cjs +54 -0
  105. package/dist/chunk-SAW5OK36.cjs.map +1 -0
  106. package/dist/chunk-SES6GDBQ.cjs +624 -0
  107. package/dist/chunk-SES6GDBQ.cjs.map +1 -0
  108. package/dist/chunk-SFW3UB2P.js +31 -0
  109. package/dist/chunk-SFW3UB2P.js.map +1 -0
  110. package/dist/chunk-TNPDV7I4.cjs +2346 -0
  111. package/dist/chunk-TNPDV7I4.cjs.map +1 -0
  112. package/dist/chunk-TU33KYKW.cjs +25 -0
  113. package/dist/chunk-TU33KYKW.cjs.map +1 -0
  114. package/dist/chunk-TZBIY5C3.js +187 -0
  115. package/dist/chunk-TZBIY5C3.js.map +1 -0
  116. package/dist/chunk-TZE673G6.js +3 -0
  117. package/dist/chunk-TZE673G6.js.map +1 -0
  118. package/dist/chunk-UCFWI6D4.js +29 -0
  119. package/dist/chunk-UCFWI6D4.js.map +1 -0
  120. package/dist/chunk-UTQSSKSG.js +1164 -0
  121. package/dist/chunk-UTQSSKSG.js.map +1 -0
  122. package/dist/chunk-VA42637J.cjs +287 -0
  123. package/dist/chunk-VA42637J.cjs.map +1 -0
  124. package/dist/chunk-VNQRI2RO.cjs +1047 -0
  125. package/dist/chunk-VNQRI2RO.cjs.map +1 -0
  126. package/dist/chunk-VXPLKQWY.cjs +821 -0
  127. package/dist/chunk-VXPLKQWY.cjs.map +1 -0
  128. package/dist/chunk-WD6HJRBG.cjs +197 -0
  129. package/dist/chunk-WD6HJRBG.cjs.map +1 -0
  130. package/dist/chunk-WDIBOWAA.js +1054 -0
  131. package/dist/chunk-WDIBOWAA.js.map +1 -0
  132. package/dist/chunk-WKOIGLQX.cjs +38 -0
  133. package/dist/chunk-WKOIGLQX.cjs.map +1 -0
  134. package/dist/chunk-WNVQ3SMB.cjs +96 -0
  135. package/dist/chunk-WNVQ3SMB.cjs.map +1 -0
  136. package/dist/chunk-WRSWH7US.cjs +285 -0
  137. package/dist/chunk-WRSWH7US.cjs.map +1 -0
  138. package/dist/chunk-XGFTL5XY.js +181 -0
  139. package/dist/chunk-XGFTL5XY.js.map +1 -0
  140. package/dist/chunk-XNISPHTZ.js +1039 -0
  141. package/dist/chunk-XNISPHTZ.js.map +1 -0
  142. package/dist/chunk-Y2PM3FFL.js +3 -0
  143. package/dist/chunk-Y2PM3FFL.js.map +1 -0
  144. package/dist/chunk-YBPBK5KI.js +1030 -0
  145. package/dist/chunk-YBPBK5KI.js.map +1 -0
  146. package/dist/chunk-YWNYGYI7.cjs +31 -0
  147. package/dist/chunk-YWNYGYI7.cjs.map +1 -0
  148. package/dist/chunk-YYV35XOS.js +122 -0
  149. package/dist/chunk-YYV35XOS.js.map +1 -0
  150. package/dist/chunk-Z2OL5AJD.cjs +133 -0
  151. package/dist/chunk-Z2OL5AJD.cjs.map +1 -0
  152. package/dist/chunk-ZDFHA2EC.js +572 -0
  153. package/dist/chunk-ZDFHA2EC.js.map +1 -0
  154. package/dist/chunk-ZL7UM6PU.cjs +34 -0
  155. package/dist/chunk-ZL7UM6PU.cjs.map +1 -0
  156. package/dist/chunk-ZNZDQAXN.js +175 -0
  157. package/dist/chunk-ZNZDQAXN.js.map +1 -0
  158. package/dist/chunk-ZO5PBBFX.js +3497 -0
  159. package/dist/chunk-ZO5PBBFX.js.map +1 -0
  160. package/dist/chunk-ZRL2UFTH.cjs +1073 -0
  161. package/dist/chunk-ZRL2UFTH.cjs.map +1 -0
  162. package/dist/entries/apps.cjs +155 -0
  163. package/dist/entries/apps.cjs.map +1 -0
  164. package/dist/entries/apps.d.cts +292 -0
  165. package/dist/entries/apps.d.ts +292 -0
  166. package/dist/entries/apps.js +10 -0
  167. package/dist/entries/apps.js.map +1 -0
  168. package/dist/entries/captions.cjs +124 -0
  169. package/dist/entries/captions.cjs.map +1 -0
  170. package/dist/entries/captions.d.cts +354 -0
  171. package/dist/entries/captions.d.ts +354 -0
  172. package/dist/entries/captions.js +3 -0
  173. package/dist/entries/captions.js.map +1 -0
  174. package/dist/entries/catalogs.cjs +165 -0
  175. package/dist/entries/catalogs.cjs.map +1 -0
  176. package/dist/entries/catalogs.d.cts +385 -0
  177. package/dist/entries/catalogs.d.ts +385 -0
  178. package/dist/entries/catalogs.js +4 -0
  179. package/dist/entries/catalogs.js.map +1 -0
  180. package/dist/entries/credits.cjs +596 -0
  181. package/dist/entries/credits.cjs.map +1 -0
  182. package/dist/entries/credits.d.cts +1460 -0
  183. package/dist/entries/credits.d.ts +1460 -0
  184. package/dist/entries/credits.js +11 -0
  185. package/dist/entries/credits.js.map +1 -0
  186. package/dist/entries/edl.cjs +409 -0
  187. package/dist/entries/edl.cjs.map +1 -0
  188. package/dist/entries/edl.d.cts +1199 -0
  189. package/dist/entries/edl.d.ts +1199 -0
  190. package/dist/entries/edl.js +4 -0
  191. package/dist/entries/edl.js.map +1 -0
  192. package/dist/entries/entities.cjs +530 -0
  193. package/dist/entries/entities.cjs.map +1 -0
  194. package/dist/entries/entities.d.cts +1371 -0
  195. package/dist/entries/entities.d.ts +1371 -0
  196. package/dist/entries/entities.js +5 -0
  197. package/dist/entries/entities.js.map +1 -0
  198. package/dist/entries/i18n.cjs +48 -0
  199. package/dist/entries/i18n.cjs.map +1 -0
  200. package/dist/entries/i18n.d.cts +69 -0
  201. package/dist/entries/i18n.d.ts +69 -0
  202. package/dist/entries/i18n.js +3 -0
  203. package/dist/entries/i18n.js.map +1 -0
  204. package/dist/entries/llm-models.cjs +177 -0
  205. package/dist/entries/llm-models.cjs.map +1 -0
  206. package/dist/entries/llm-models.d.cts +435 -0
  207. package/dist/entries/llm-models.d.ts +435 -0
  208. package/dist/entries/llm-models.js +4 -0
  209. package/dist/entries/llm-models.js.map +1 -0
  210. package/dist/entries/media.cjs +335 -0
  211. package/dist/entries/media.cjs.map +1 -0
  212. package/dist/entries/media.d.cts +518 -0
  213. package/dist/entries/media.d.ts +518 -0
  214. package/dist/entries/media.js +6 -0
  215. package/dist/entries/media.js.map +1 -0
  216. package/dist/entries/model-catalog.cjs +259 -0
  217. package/dist/entries/model-catalog.cjs.map +1 -0
  218. package/dist/entries/model-catalog.d.cts +202 -0
  219. package/dist/entries/model-catalog.d.ts +202 -0
  220. package/dist/entries/model-catalog.js +6 -0
  221. package/dist/entries/model-catalog.js.map +1 -0
  222. package/dist/entries/models.cjs +833 -0
  223. package/dist/entries/models.cjs.map +1 -0
  224. package/dist/entries/models.d.cts +287 -0
  225. package/dist/entries/models.d.ts +287 -0
  226. package/dist/entries/models.js +8 -0
  227. package/dist/entries/models.js.map +1 -0
  228. package/dist/entries/nodes.cjs +789 -0
  229. package/dist/entries/nodes.cjs.map +1 -0
  230. package/dist/entries/nodes.d.cts +1600 -0
  231. package/dist/entries/nodes.d.ts +1600 -0
  232. package/dist/entries/nodes.js +16 -0
  233. package/dist/entries/nodes.js.map +1 -0
  234. package/dist/entries/organizations.cjs +80 -0
  235. package/dist/entries/organizations.cjs.map +1 -0
  236. package/dist/entries/organizations.d.cts +466 -0
  237. package/dist/entries/organizations.d.ts +466 -0
  238. package/dist/entries/organizations.js +3 -0
  239. package/dist/entries/organizations.js.map +1 -0
  240. package/dist/entries/pipeline.cjs +594 -0
  241. package/dist/entries/pipeline.cjs.map +1 -0
  242. package/dist/entries/pipeline.d.cts +2617 -0
  243. package/dist/entries/pipeline.d.ts +2617 -0
  244. package/dist/entries/pipeline.js +5 -0
  245. package/dist/entries/pipeline.js.map +1 -0
  246. package/dist/entries/scene3d.cjs +704 -0
  247. package/dist/entries/scene3d.cjs.map +1 -0
  248. package/dist/entries/scene3d.d.cts +4284 -0
  249. package/dist/entries/scene3d.d.ts +4284 -0
  250. package/dist/entries/scene3d.js +3 -0
  251. package/dist/entries/scene3d.js.map +1 -0
  252. package/dist/entries/social.cjs +714 -0
  253. package/dist/entries/social.cjs.map +1 -0
  254. package/dist/entries/social.d.cts +1366 -0
  255. package/dist/entries/social.d.ts +1366 -0
  256. package/dist/entries/social.js +5 -0
  257. package/dist/entries/social.js.map +1 -0
  258. package/dist/entries/types.cjs +13 -0
  259. package/dist/entries/types.cjs.map +1 -0
  260. package/dist/entries/types.d.cts +162 -0
  261. package/dist/entries/types.d.ts +162 -0
  262. package/dist/entries/types.js +4 -0
  263. package/dist/entries/types.js.map +1 -0
  264. package/dist/entries/ugc.cjs +279 -0
  265. package/dist/entries/ugc.cjs.map +1 -0
  266. package/dist/entries/ugc.d.cts +575 -0
  267. package/dist/entries/ugc.d.ts +575 -0
  268. package/dist/entries/ugc.js +6 -0
  269. package/dist/entries/ugc.js.map +1 -0
  270. package/dist/entries/video.cjs +549 -0
  271. package/dist/entries/video.cjs.map +1 -0
  272. package/dist/entries/video.d.cts +1791 -0
  273. package/dist/entries/video.d.ts +1791 -0
  274. package/dist/entries/video.js +8 -0
  275. package/dist/entries/video.js.map +1 -0
  276. package/dist/entries/workflow.cjs +574 -0
  277. package/dist/entries/workflow.cjs.map +1 -0
  278. package/dist/entries/workflow.d.cts +1743 -0
  279. package/dist/entries/workflow.d.ts +1743 -0
  280. package/dist/entries/workflow.js +5 -0
  281. package/dist/entries/workflow.js.map +1 -0
  282. package/dist/fan-out-meta-Bu6VyXcZ.d.cts +19 -0
  283. package/dist/fan-out-meta-Bu6VyXcZ.d.ts +19 -0
  284. package/dist/gemini-omni-voices-zeRXxSbZ.d.cts +174 -0
  285. package/dist/gemini-omni-voices-zeRXxSbZ.d.ts +174 -0
  286. package/dist/image-overlay-layers-CyBfRhxJ.d.cts +208 -0
  287. package/dist/image-overlay-layers-CyBfRhxJ.d.ts +208 -0
  288. package/dist/index.cjs +7747 -27084
  289. package/dist/index.cjs.map +1 -1
  290. package/dist/index.d.cts +32 -24198
  291. package/dist/index.d.ts +32 -24198
  292. package/dist/index.js +40 -25220
  293. package/dist/index.js.map +1 -1
  294. package/dist/model-catalog-V-ZNzRSd.d.cts +651 -0
  295. package/dist/model-catalog-V-ZNzRSd.d.ts +651 -0
  296. package/dist/presentation-types-0ENOCjoj.d.cts +61 -0
  297. package/dist/presentation-types-0ENOCjoj.d.ts +61 -0
  298. package/dist/presentation-utils-D0kxsWf9.d.cts +92 -0
  299. package/dist/presentation-utils-pZwlEAzo.d.ts +92 -0
  300. package/dist/scene-node-types-C3kl_zyK.d.cts +1949 -0
  301. package/dist/scene-node-types-C3kl_zyK.d.ts +1949 -0
  302. package/dist/supported-fonts-CRoF1gOy.d.cts +16 -0
  303. package/dist/supported-fonts-CRoF1gOy.d.ts +16 -0
  304. package/dist/types-BRlFPEru.d.cts +511 -0
  305. package/dist/types-BRlFPEru.d.ts +511 -0
  306. package/dist/types-DffyGSy5.d.cts +67 -0
  307. package/dist/types-DffyGSy5.d.ts +67 -0
  308. package/package.json +102 -1
  309. package/src/__tests__/add-captions-plan.test.ts +6 -2
  310. package/src/__tests__/caption-edge-dash.test.ts +23 -0
  311. package/src/__tests__/fixtures/root-exports.baseline.json +4625 -0
  312. package/src/__tests__/input-field-extra-keys.test.ts +1 -0
  313. package/src/__tests__/model-makers.test.ts +76 -0
  314. package/src/__tests__/no-internal-imports.test.ts +1 -1
  315. package/src/__tests__/node-aspect-ratio.test.ts +25 -0
  316. package/src/__tests__/node-runtime-keys.test.ts +9 -0
  317. package/src/__tests__/package-entries.test.ts +50 -0
  318. package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
  319. package/src/__tests__/presentation-utils.test.ts +15 -0
  320. package/src/__tests__/preview-gate-use-case.test.ts +151 -0
  321. package/src/__tests__/private-host.test.ts +53 -0
  322. package/src/__tests__/run-continuation.test.ts +7 -1
  323. package/src/__tests__/site-capture-node.test.ts +58 -0
  324. package/src/__tests__/ugc-lane-wires.test.ts +228 -0
  325. package/src/__tests__/ugc-node-wires.test.ts +9 -3
  326. package/src/__tests__/ugc-run-state.test.ts +5 -4
  327. package/src/__tests__/video-analysis-catalog-sync.test.ts +1 -1
  328. package/src/__tests__/video-analysis-pricing.test.ts +6 -6
  329. package/src/__tests__/voice-changer-pro-quote.test.ts +79 -0
  330. package/src/add-captions-plan.ts +9 -3
  331. package/src/caption-edge-dash.ts +33 -0
  332. package/src/component-types.ts +9 -0
  333. package/src/credit-estimators/index.ts +22 -1
  334. package/src/credit-estimators/pitch-tempo.ts +15 -1
  335. package/src/credit-estimators/speech.ts +72 -4
  336. package/src/credit-estimators/unit-quote.ts +52 -0
  337. package/src/credit-estimators/video-sfx.ts +15 -0
  338. package/src/credit-estimators/voice-changer-pro-quote.ts +138 -0
  339. package/src/credit-identifiers.ts +62 -17
  340. package/src/entity-image-handle.ts +2 -0
  341. package/src/entries/apps.ts +63 -0
  342. package/src/entries/captions.ts +34 -0
  343. package/src/entries/catalogs.ts +65 -0
  344. package/src/entries/credits.ts +105 -0
  345. package/src/entries/edl.ts +42 -0
  346. package/src/entries/entities.ts +144 -0
  347. package/src/entries/i18n.ts +31 -0
  348. package/src/entries/llm-models.ts +63 -0
  349. package/src/entries/media.ts +36 -0
  350. package/src/entries/model-catalog.ts +95 -0
  351. package/src/entries/models.ts +266 -0
  352. package/src/entries/nodes.ts +245 -0
  353. package/src/entries/organizations.ts +9 -0
  354. package/src/entries/pipeline.ts +43 -0
  355. package/src/entries/scene3d.ts +27 -0
  356. package/src/entries/social.ts +297 -0
  357. package/src/entries/types.ts +26 -0
  358. package/src/entries/ugc.ts +14 -0
  359. package/src/entries/video.ts +59 -0
  360. package/src/entries/workflow.ts +172 -0
  361. package/src/fan-out-rows.ts +2 -0
  362. package/src/index.ts +25 -1845
  363. package/src/json-kinds.ts +4 -0
  364. package/src/model-catalog.ts +243 -34
  365. package/src/node-mappable-fields.ts +1 -0
  366. package/src/node-run-routes.ts +2 -0
  367. package/src/node-runtime-keys.ts +8 -0
  368. package/src/normalize-node-params.ts +30 -0
  369. package/src/presentation-utils.ts +12 -0
  370. package/src/preview-gate.ts +92 -14
  371. package/src/private-host.ts +89 -59
  372. package/src/producer-types.ts +16 -2
  373. package/src/run-continuation.ts +21 -0
  374. package/src/site-capture-node.ts +82 -0
  375. package/src/ugc-lane-wires.ts +246 -0
  376. package/src/ugc-node-wires.ts +37 -7
  377. package/src/ugc-run-state.ts +5 -3
  378. package/src/video-analysis-pricing.ts +31 -29
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/llm-models.ts"],"names":[],"mappings":";;;AAmBO,IAAM,wBAAwB,CAAC,MAAA,EAAQ,OAAO,QAAA,EAAU,MAAA,EAAQ,SAAS,KAAK;AAG9E,IAAM,mCAAoD,IAAI,GAAA,CAAI,CAAC,OAAA,EAAS,KAAK,CAAC;AACzF,IAAM,WAAA,GAAkD,EAAE,IAAA,EAAM,CAAA,EAAG,GAAA,EAAK,CAAA,EAAG,MAAA,EAAQ,CAAA,EAAG,IAAA,EAAM,CAAA,EAAG,KAAA,EAAO,CAAA,EAAG,KAAK,CAAA,EAAE;AAiKzG,IAAM,sBAAA,GAAyB;AAG/B,SAAS,qBAAqB,KAAA,EAA4B;AAC/D,EAAA,OAAO,MAAM,oBAAA,IAAwB,sBAAA;AACvC;AAEO,IAAM,UAAA,GAAqC;AAAA,EAChD;AAAA,IACE,EAAA,EAAI,gBAAA;AAAA,IACJ,WAAA,EAAa,gBAAA;AAAA,IACb,IAAA,EAAM,uCAAA;AAAA,IACN,IAAA,EAAM,SAAA;AAAA,IACN,SAAA,EAAW,kBAAA;AAAA,IACX,cAAA,EAAgB,gBAAA;AAAA,IAChB,MAAA,EAAQ,QAAA;AAAA,IACR,oBAAA,EAAsB,qBAAA;AAAA,IACtB,cAAA,EAAgB,IAAA;AAAA,IAChB,eAAA,EAAiB,IAAA;AAAA;AAAA;AAAA;AAAA,IAIjB,iBAAA,EAAmB,wBAAA;AAAA;AAAA;AAAA,IAGnB,sBAAA,EAAwB,CAAC,MAAA,EAAQ,KAAA,EAAO,UAAU,MAAM,CAAA;AAAA;AAAA;AAAA;AAAA,IAIxD,iBAAA,EAAmB,IAAA;AA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AA,EAA+B;AACvE,EAAA,IAAI,KAAA,IAAS,wBAAA,CAAyB,KAAK,CAAA,EAAG,OAAO,KAAA;AACrD,EAAA,IAAI,SAAS,MAAA,CAAO,SAAA,CAAU,eAAe,IAAA,CAAK,oBAAA,EAAsB,KAAK,CAAA,EAAG;AAC9E,IAAA,OAAO,qBAAqB,KAA+B,CAAA;AAAA,EAC7D;AACA,EAAA,IAAI,KAAA,IAAS,yBAAA,CAA0B,QAAA,CAAS,KAAK,GAAG,OAAO,KAAA;AAC/D,EAAA,OAAO,4BAAA;AACT","file":"chunk-ZRL2UFTH.cjs","sourcesContent":["/**\n * LLM Model Registry — shared between frontend and backend.\n *\n * Single source of truth for available chat/LLM models routed through KIE.ai,\n * with direct Anthropic SDK fallback for Claude models. This is the\n * NON-monetary side of the registry (model ids, capabilities, tiers,\n * feature defaults). The provider-$ per-token rate table and the\n * `calculateLlmCost` formula derived from it live in\n * `backend/src/lib/pricing/llm-cost.ts` (core, not ee/ — internal LLM cost\n * logging needs them regardless of edition). They were moved out of this\n * package (published Apache-2.0 on npm — an irrevocable grant) per the\n * 2026-07-06 public-flip IP audit, S5: \"Keep the model-id enum; strip prices\n * + measurement notes.\"\n */\n\nexport type LlmTier = \"economy\" | \"standard\" | \"premium\"\nexport type KieApiFormat = \"chat-completions\" | \"messages\" | \"responses\"\nexport type LlmVendor = \"anthropic\" | \"deepseek\" | \"google\" | \"moonshot\" | \"openai\" | \"xai\"\n\nexport const LLM_REASONING_EFFORTS = [\"none\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"] as const\nexport type LlmReasoningEffort = (typeof LLM_REASONING_EFFORTS)[number]\n/** Levels that bill one tier up. `high` is the Claude-family server default — it never bumps. */\nexport const EFFORT_TIER_BUMP: ReadonlySet<LlmReasoningEffort> = new Set([\"xhigh\", \"max\"])\nconst EFFORT_RANK: Record<LlmReasoningEffort, number> = { none: 0, low: 1, medium: 2, high: 3, xhigh: 4, max: 5 }\n\nexport interface LlmModelDef {\n id: string\n displayName: string\n desc: string\n tier: LlmTier\n kieFormat: KieApiFormat\n /** For chat-completions: the slug prefix (e.g. \"gemini-3-flash\").\n * For messages: the model id sent in the body (e.g. \"claude-haiku-4-5-v1messages\").\n * For responses: the model id sent in the body (e.g. \"gpt-5-4\"). */\n kieSlugOrModel: string\n vendor: LlmVendor\n supportsImages: boolean\n maxOutputTokens: number\n /**\n * How this model can be forced into schema-valid structured output.\n * - \"anthropic-tool\" → forced tool_choice on the Claude wire (direct SDK\n * guaranteed; KIE's proxy re-serializes the tool call\n * as a `<tool_calls>` text tag — decoded in llm-client).\n * - \"kie-response-format\" → KIE chat-completions `response_format: json_schema`\n * (verified enforced for Gemini via KIE).\n * - \"responses-json-schema\" → KIE codex/v1/responses `text.format: json_schema`\n * (live-verified 2026-07-14 for gpt-5.4/5.5 and the\n * whole GPT-5.6 family, text AND vision inputs).\n * - undefined → no native mode; callers fall back to parse + retry.\n * Capability-driven so `llmCompleteStructured` never hardcodes provider ids.\n */\n structuredOutputMode?: \"anthropic-tool\" | \"kie-response-format\" | \"responses-json-schema\"\n /** If set, fallback to direct Anthropic SDK with this model ID when KIE.ai fails */\n directFallbackModel?: string\n /**\n * Google Gemini API model id for the DIRECT lane (generativelanguage, keyed\n * by `GEMINI_API_KEY`) — the Google-side twin of `directFallbackModel`.\n * Presence declares \"this model CAN be served straight from Google\"; absence\n * pins it to KIE forever. Stated, never derived: Google carries `-preview`\n * suffixes on unreleased models, so the id routinely differs from both `id`\n * and `kieSlugOrModel` (`gemini-3.1-pro` → `gemini-3.1-pro-preview`).\n */\n directGeminiModel?: string\n /**\n * Try the direct-vendor lane FIRST for this model, with KIE as the failure\n * fallback. Absent (while `directGeminiModel` is set) = KIE first, direct\n * only when KIE fails.\n *\n * This is a per-model COST decision, not just a routing one: the two lanes\n * bill the same model at materially different unit rates, so a model that\n * backs a high-volume default (see `LLM_FEATURE_DEFAULTS`) is usually better\n * left on whichever lane is cheaper. The rate tables for both lanes live in\n * `backend/src/lib/pricing/llm-cost.ts` — deliberately not in this package,\n * which is published to npm.\n *\n * Mutually exclusive with `preferKie` — the Claude-side half of the same\n * idea. Guarded by a registry test so the two can't both be set.\n */\n preferDirect?: true\n /** Effort levels this model accepts (ascending). Absent/empty = no effort lever, picker hidden. */\n reasoningEfforts?: readonly LlmReasoningEffort[]\n /**\n * Effort levels available on the DIRECT lane, when the vendor's own API\n * accepts more than the aggregator does. Absent = the direct lane offers the\n * same set as `reasoningEfforts`.\n *\n * This exists because `reasoningEfforts` has to stay at the KIE-safe\n * intersection — sending a level KIE rejects is a hard failure — while the\n * vendor API accepts the full ladder. Unlocking those extra levels is one of\n * the concrete things Advanced mode buys.\n */\n directReasoningEfforts?: readonly LlmReasoningEffort[]\n /** false = model rejects `temperature` (Claude 5-era, GPT-5.6). Absent = accepts. */\n supportsTemperature?: false\n /**\n * false = the model 400s on a FORCED `tool_choice` (`{ type: \"tool\" }` /\n * `{ type: \"any\" }`) — Claude Sonnet 5.5 and Opus 5.5 (vendor docs: \"not\n * supported for this model\"). Absent = forcing is accepted.\n *\n * Only meaningful with `structuredOutputMode: \"anthropic-tool\"`: such a model\n * is asked with `tool_choice: auto` plus an instruction naming the tool, and\n * the tool carries `strict: true` whenever its schema is expressible in the\n * vendor's strict subset (`anthropicStrictToolSchema` in llm-client). The\n * caller's Zod still validates every answer, so nothing the wire withholds is\n * lost. Declared per model, never matched on a model name.\n */\n supportsForcedToolChoice?: false\n /**\n * true = the model binds each thinking block to the exact conversation prefix\n * that produced it (\"preserved thinking\" — Claude Sonnet 5.5 / Opus 5.5 /\n * Haiku 5.5):\n * replaying a block after an earlier turn was edited, dropped or rebuilt is a\n * 400 on accounts the vendor enforces. A caller that trims or rebuilds stored\n * history between requests (the Workflow Copilot keeps a token budget by\n * dropping its oldest turns) must strip thinking blocks from the turns it\n * replays. Within one request's own tool loop the history only grows, so\n * blocks produced there stay valid.\n */\n conversationBoundThinking?: true\n /**\n * true = this model's reasoning effort takes effect ONLY on the vendor's own\n * API: the aggregator accepts the field and silently ignores it. Measured\n * 2026-10-08 for the Claude family on KIE — `low`, `max` and no effort gave\n * the same output length on a reasoning-heavy prompt, and no thinking block\n * ever came back, even on Sonnet 4.6 at `max`.\n *\n * So an effort-bearing call on such a model is SERVED direct, and it bills\n * as Advanced mode does — one rung up (decided 2026-10-08: \"effort =\n * Advanced\"). {@link llmServesDirect} is the one place that decides it, for\n * the credit identifier and the routing alike.\n */\n effortRequiresDirect?: true\n /** Claude-only: KIE is the preferred routing, direct Anthropic the fallback. */\n preferKie?: true\n /**\n * KIE's NON-streaming endpoint for this model is unreliable (measured);\n * `llmComplete` serves it by opening the streaming wire and collapsing it to\n * one response. Streaming responses do not reliably carry\n * `credits_consumed`, so provider cost on this path comes from the rate\n * table (`backend/src/lib/pricing/llm-cost.ts`) rather than the real charge.\n *\n * Declared per model — a per-model condition on KIE's side, like the\n * Claude-lane one behind `callKieMessagesCollapsed`. The flag says WHICH\n * model is affected, and `llm-client` reads it instead of matching model\n * names. Today only the `responses` dispatcher in `callKie` honours it (the\n * one format where the condition has been measured); a chat-completions or\n * messages model that needs the same treatment must also teach its `callKie`\n * case to read the flag — declaring it alone changes nothing there.\n */\n kieCollapseStream?: true\n /**\n * true = the model reasons even when NO thinking parameter is sent, so its\n * reasoning tokens share the `max_tokens` budget on EVERY call — not just\n * effort-bearing ones. Claude Opus 5 flipped this default (on Opus 4.8/4.7\n * and Sonnet 5, omitting `thinking` means no thinking at all).\n *\n * Consumers MUST give such a model output headroom regardless of the\n * requested effort, or reasoning silently eats a small legacy cap and the\n * answer truncates with `stop_reason: max_tokens` — a paid-for empty reply\n * (since #1588 the client fails such a call rather than return the\n * fragment, but the floor is what keeps it from happening). `deriveParams`\n * (llm-client.ts) floors to {@link reasoningOutputFloor}; the film\n * pipeline's `callLLM` — Anthropic SDK only, so only its Claude members\n * matter — floors at the default. Keep the flag in sync with the vendor's\n * documented default rather than inferring it from the model name.\n */\n thinkingDefaultOn?: true\n /**\n * The output-token cap a REASONING call on this model is floored to — the\n * room its thinking shares with the answer (`thinkingDefaultOn`, or an\n * xhigh/max effort). Absent = {@link REASONING_OUTPUT_FLOOR}; read it through\n * {@link reasoningOutputFloor}, never directly.\n *\n * Declare it ONLY where a lane serving this model is not known to accept the\n * default: the floor rides every lane the model can be served on (KIE AND its\n * direct fallback), so it has to sit at the intersection of what they take —\n * the rule `maxOutputTokens` already follows for the Gemini flash entries.\n * Never below `maxOutputTokens` (a floor under the default cap is not a\n * floor — guarded by a registry test).\n */\n reasoningOutputFloor?: number\n}\n\n/** The reasoning floor for a model that declares no lane limit of its own. */\nexport const REASONING_OUTPUT_FLOOR = 32768\n\n/** The output cap a reasoning call on `model` is floored to (see `LlmModelDef.reasoningOutputFloor`). */\nexport function reasoningOutputFloor(model: LlmModelDef): number {\n return model.reasoningOutputFloor ?? REASONING_OUTPUT_FLOOR\n}\n\nexport const LLM_MODELS: readonly LlmModelDef[] = [\n {\n id: \"gemini-3-flash\",\n displayName: \"Gemini 3 Flash\",\n desc: \"Fast and cheap, good for simple tasks\",\n tier: \"economy\",\n kieFormat: \"chat-completions\",\n kieSlugOrModel: \"gemini-3-flash\",\n vendor: \"google\",\n structuredOutputMode: \"kie-response-format\",\n supportsImages: true,\n maxOutputTokens: 8192,\n // KIE-first: no `preferDirect` — direct is the reliability fallback only.\n // (Per-lane rates are deliberately NOT in this published package; see\n // backend/src/lib/pricing/llm-cost.ts.)\n directGeminiModel: \"gemini-3-flash-preview\",\n // No `reasoningEfforts` at all on the KIE lane, but the vendor API accepts\n // the full minimal→high ladder (`none` maps to Google's `minimal`).\n directReasoningEfforts: [\"none\", \"low\", \"medium\", \"high\"],\n // Reasons with no thinking param sent — Google's Gemini 3 default (dynamic\n // thinking; `minimal` is its floor, never off), measured on 3.6 in #1588.\n // Floored at the KIE-safe 8192, the same intersection as `maxOutputTokens`.\n thinkingDefaultOn: true,\n reasoningOutputFloor: 8192,\n },\n {\n id: \"gemini-3.6-flash\",\n displayName: \"Gemini 3.6 Flash\",\n // Demoted 2026-09-06 alongside 3.7: superlatives belong to the CURRENT top\n // model of a family only, and 3.8 now holds that slot.\n desc: \"Fast Gemini, sharper reasoning\",\n tier: \"economy\",\n kieFormat: \"chat-completions\",\n // KIE serves Gemini 3.6 Flash on the OpenAI-compatible dialect under this\n // slug (docs.kie.ai/market/gemini/gemini-3-6-flash-openai.md) — same\n // chat-completions path shape as gemini-3-flash, different slug prefix.\n kieSlugOrModel: \"gemini-3-6-flash-openai\",\n vendor: \"google\",\n structuredOutputMode: \"kie-response-format\",\n supportsImages: true,\n maxOutputTokens: 8192,\n // KIE's 3.6 endpoint accepts `reasoning_effort: low | high` (thinking\n // level) — exactly the chat-completions wire mapping deriveParams sends.\n // Google's own API additionally accepts `minimal` and `medium` on this\n // model; the set stays at the KIE-safe intersection because ONE field\n // feeds both lanes and this model is KIE-first. Widen it only if/when\n // `preferDirect` is set here.\n reasoningEfforts: [\"low\", \"high\"],\n // Google's own API additionally accepts `minimal` and `medium` here —\n // live-verified 2026-07-28. Advanced mode unlocks them.\n directReasoningEfforts: [\"none\", \"low\", \"medium\", \"high\"],\n // KIE-first: this model backs 5 of the LLM_FEATURE_DEFAULTS plus the\n // video-analysis fast tier, so it carries the highest call volume of any\n // Gemini entry — the lane with the lower unit cost wins by default and\n // direct is the reliability fallback only.\n directGeminiModel: \"gemini-3.6-flash\",\n // Reasons with NO thinking param sent — measured, issue #1588: a Generate\n // Text node capped at 1,100 tokens fell back to the direct lane (KIE 500),\n // spent ~1,060 of them reasoning, and returned 120 characters cut mid-URL.\n // On the same input the KIE runs used ~500 output tokens in all, so only\n // the fallback runs broke — every other run of a 5-minute schedule.\n // Floored at 8192, NOT the default 32768: the floor rides the KIE endpoint\n // too, and 8192 is all it is known to take (see `maxOutputTokens`).\n thinkingDefaultOn: true,\n reasoningOutputFloor: 8192,\n },\n {\n id: \"gemini-3.7-flash\",\n displayName: \"Gemini 3.7 Flash\",\n // Demoted 2026-09-06 when 3.8 registered below: superlatives belong to the\n // CURRENT top model of a family only (same rule the Opus entries follow) —\n // `desc` renders in every picker, so leaving \"Newest\" on the older flash\n // steers the A/B's traffic backwards.\n desc: \"Fast Gemini, agentic-tuned\",\n tier: \"economy\",\n kieFormat: \"chat-completions\",\n // KIE serves it on the OpenAI-compatible dialect under this slug\n // (docs.kie.ai/market/gemini/gemini-3-7-flash-openai.md) — same\n // chat-completions path shape as gemini-3.6-flash.\n kieSlugOrModel: \"gemini-3-7-flash-openai\",\n vendor: \"google\",\n structuredOutputMode: \"kie-response-format\",\n supportsImages: true,\n // Google's own cap is 65,536, but the field feeds BOTH lanes and the KIE\n // flash endpoints cap at 8192 (the measured 3.6 posture) — stay at the\n // KIE-safe intersection, same reasoning as `reasoningEfforts` below.\n maxOutputTokens: 8192,\n // KIE's 3.7 endpoint enumerates reasoning_effort low | high (verified\n // against its OpenAPI spec 2026-08-18), identical to 3.6.\n reasoningEfforts: [\"low\", \"high\"],\n // Assumed parity with 3.6 pending a live probe on the direct lane.\n directReasoningEfforts: [\"none\", \"low\", \"medium\", \"high\"],\n directGeminiModel: \"gemini-3.7-flash\",\n // Gemini 3 default: reasons with no thinking param sent (measured on 3.6,\n // #1588). KIE-safe floor, same intersection as `maxOutputTokens`.\n thinkingDefaultOn: true,\n reasoningOutputFloor: 8192,\n },\n {\n id: \"gemini-3.8-flash\",\n displayName: \"Gemini 3.8 Flash\",\n // Inherits \"Newest\" from 3.7 (demoted above). Deliberately does NOT name\n // agentic video: that capability exists only on the direct Google lane\n // (Interactions API, not wired here) and the modality caps below withhold\n // video — a picker desc must not promise a lever this entry cannot expose.\n desc: \"Newest fast Gemini, agentic-tuned\",\n tier: \"economy\",\n kieFormat: \"chat-completions\",\n // KIE serves it on the OpenAI-compatible dialect under this slug\n // (docs.kie.ai/market/gemini/gemini-3-8-flash-openai.md) — identical\n // chat-completions path shape to gemini-3.7-flash / gemini-3.6-flash,\n // different slug prefix.\n kieSlugOrModel: \"gemini-3-8-flash-openai\",\n vendor: \"google\",\n // Live-verified 2026-09-06 on the KIE lane: `response_format: json_schema`\n // is ENFORCED (the reply came back exact-schema valid, credits_consumed\n // present) — not merely accepted-and-ignored.\n structuredOutputMode: \"kie-response-format\",\n supportsImages: true,\n // 16384 here, NOT the 8192 its 3.6 / 3.7 siblings sit at. Those two stay at\n // the KIE-safe intersection because nobody measured their endpoints past\n // it; 3.8's WAS measured — live-verified 2026-09-06, `max_tokens: 20000`\n // was honored for 14,892 completion tokens with finish_reason \"stop\" (no\n // truncation), so the KIE lane is not the binding constraint. 16384 keeps\n // it level with the rest of the registry's ceiling rather than at the cap.\n maxOutputTokens: 16384,\n // KIE's 3.8 endpoint enumerates reasoning_effort low | high (its doc enum),\n // and usage carries completion_tokens_details.reasoning_tokens — same\n // KIE-safe intersection as 3.6 / 3.7, because ONE field feeds both lanes\n // and this model is KIE-first.\n reasoningEfforts: [\"low\", \"high\"],\n // Google's own API accepts the full minimal→high ladder here (`none` maps\n // to `minimal`), same as 3.7. Advanced mode is what unlocks it.\n directReasoningEfforts: [\"none\", \"low\", \"medium\", \"high\"],\n // KIE-first (no `preferDirect`) — 3.7's posture exactly: the cheap lane\n // serves the A/B, direct is Advanced mode + the reliability fallback.\n directGeminiModel: \"gemini-3.8-flash\",\n // Gemini 3 default: reasons with no thinking param sent (measured on 3.6,\n // #1588). Floored at its own 16384, inside the 20000 its KIE endpoint was\n // measured to honour.\n thinkingDefaultOn: true,\n reasoningOutputFloor: 16384,\n },\n {\n id: \"claude-haiku-4.5\",\n displayName: \"Claude Haiku 4.5\",\n // Demoted 2026-10-10 when claude-haiku-5.5 registered.\n desc: \"Previous Haiku, fast economy\",\n tier: \"economy\",\n kieFormat: \"messages\",\n kieSlugOrModel: \"claude-haiku-4-5\",\n vendor: \"anthropic\",\n structuredOutputMode: \"anthropic-tool\",\n supportsImages: true,\n maxOutputTokens: 8192,\n directFallbackModel: \"claude-haiku-4-5-20251001\",\n // KIE-first since 2026-10-08 (a call is priced on the lane it runs on);\n // KIE served it plain and with a tool on its streaming wire that day.\n preferKie: true,\n },\n {\n id: \"claude-haiku-5.5\",\n displayName: \"Claude Haiku 5.5\",\n desc: \"Latest Haiku, fast and low-cost with reasoning\",\n tier: \"economy\",\n kieFormat: \"messages\",\n // KIE plain id on the Claude-native messages dialect\n // (docs.kie.ai/market/claude/claude-haiku-5-5.md). Live-probed 2026-10-10\n // on the streaming wire: plain, system prompt, base64 image, a forced tool\n // and an auto + strict tool (both came back as a real tool_use block), and\n // `max_tokens: 32768` were all served.\n kieSlugOrModel: \"claude-haiku-5-5\",\n vendor: \"anthropic\",\n structuredOutputMode: \"anthropic-tool\",\n // NO `supportsForcedToolChoice: false`, unlike Sonnet 5.5 / Opus 5.5: this\n // model ACCEPTS a forced tool_choice (probed on Anthropic's API 2026-10-10).\n // A forced call skips thinking (same usage with and without an effort), and\n // an effort-bearing structured call is already sent the auto choice.\n //\n // A thinking block is valid only while everything before it is unchanged\n // (vendor docs: the same history check the other 5.5 models run).\n conversationBoundThinking: true,\n supportsImages: true,\n maxOutputTokens: 16384,\n directFallbackModel: \"claude-haiku-5-5\",\n // The first Haiku with effort levels. The vendor default is `medium`, where\n // most of the family defaults to `high`.\n reasoningEfforts: [\"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n // KIE ignores effort on this slug too — measured 2026-10-10 on a\n // reasoning-heavy prompt: none / low / max / KIE's own `thinkingFlag` gave\n // 2,076 / 1,886 / 2,223 / 1,927 output tokens and no thinking block, while\n // Anthropic's API gave 2,059 at low and 28,097 at max. An effort call runs\n // direct and bills as Advanced.\n effortRequiresDirect: true,\n // Anthropic 400s a non-default sampling value (\"`temperature` is deprecated\n // for this model\", probed 2026-10-10); KIE's proxy accepted temperature: 0.2.\n supportsTemperature: false,\n preferKie: true,\n // Adaptive thinking runs when no thinking param is sent (vendor default),\n // on BOTH lanes: a no-effort KIE call spent ~2,000 output tokens on a\n // ~350-token answer and returned no thinking block.\n thinkingDefaultOn: true,\n },\n {\n id: \"claude-sonnet-4.6\",\n displayName: \"Claude Sonnet 4.6\",\n desc: \"Balanced quality and speed\",\n tier: \"standard\",\n kieFormat: \"messages\",\n kieSlugOrModel: \"claude-sonnet-4-6\",\n vendor: \"anthropic\",\n structuredOutputMode: \"anthropic-tool\",\n supportsImages: true,\n maxOutputTokens: 16384,\n directFallbackModel: \"claude-sonnet-4-6\",\n // KIE-first since 2026-10-08 (a call is priced on the lane it runs on);\n // KIE served it plain and with a tool on its streaming wire that day.\n preferKie: true,\n reasoningEfforts: [\"low\", \"medium\", \"high\", \"max\"],\n // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.\n effortRequiresDirect: true,\n },\n {\n id: \"gpt-5.2\",\n displayName: \"GPT-5.2\",\n desc: \"Strong general purpose\",\n tier: \"standard\",\n kieFormat: \"chat-completions\",\n kieSlugOrModel: \"gpt-5-2\",\n vendor: \"openai\",\n supportsImages: true,\n maxOutputTokens: 16384,\n },\n {\n id: \"gemini-3.1-pro\",\n displayName: \"Gemini 3.1 Pro\",\n desc: \"Advanced reasoning, large context\",\n tier: \"premium\",\n kieFormat: \"chat-completions\",\n kieSlugOrModel: \"gemini-3.1-pro\",\n vendor: \"google\",\n structuredOutputMode: \"kie-response-format\",\n supportsImages: true,\n maxOutputTokens: 16384,\n directGeminiModel: \"gemini-3.1-pro-preview\",\n // Google documents low/medium/high for 3.1 Pro — no `minimal` tier, so\n // this ladder is deliberately shorter than the flash models'.\n directReasoningEfforts: [\"low\", \"medium\", \"high\"],\n // NO `reasoningEfforts` (the proxied ladder) ON PURPOSE, not an omission.\n // That endpoint accepts `reasoning_effort: low | high` and already DEFAULTS\n // to \"high\", so leaving it unset gets its deepest setting and a ladder here\n // would unlock nothing. The two lanes are NOT equivalent at their maxima:\n // verified 2026-07-29 on identical input, the proxy's ceiling produces\n // roughly a quarter of the reasoning tokens that the direct lane's\n // `thinkingLevel: HIGH` does, and it does not expose Google's deeper tiers\n // at all. That difference is visible in fine-detail reading (small on-screen\n // text such as a name badge), which is exactly what video-analysis casts\n // identities from — so adding an entry here would silently move analysis to\n // the shallower lane. Don't. Full comparison lives with the analysis engine.\n // KIE-first since 2026-10-08 (decided: a call is priced on the lane it runs\n // on, so the base premium price buys the KIE lane; the direct lane is\n // Advanced mode, billed `premium-direct`). It was the one direct-first\n // Gemini before. What the direct lane buys, now behind Advanced: real\n // `thinkingLevel` control, native media ingestion, and a `responseJsonSchema`\n // that honours `additionalProperties` (KIE's `response_format` silently DROPS\n // record/map-shaped fields — see the z.record rule in backend/CLAUDE.md).\n // Video-analysis is unaffected: it pins `requireLane: \"direct\"` itself.\n // Reasons with no thinking param sent on both lanes — the proxied endpoint\n // DEFAULTS to \"high\" (above), and the direct lane reasons harder still.\n // Floored at its own 16384: its KIE fallback is not known to take more.\n thinkingDefaultOn: true,\n reasoningOutputFloor: 16384,\n },\n {\n id: \"claude-opus-4.7\",\n displayName: \"Claude Opus 4.7\",\n // Superlatives belong to the CURRENT top model only — `desc` renders in every\n // model picker, so leaving \"highest quality\" on an older Opus steers\n // quality-critical work backwards (all three Opus entries bill premium, so\n // the mis-steer is invisible on the invoice).\n desc: \"Older Opus, complex tasks\",\n tier: \"premium\",\n kieFormat: \"messages\",\n kieSlugOrModel: \"claude-opus-4-7\",\n vendor: \"anthropic\",\n structuredOutputMode: \"anthropic-tool\",\n supportsImages: true,\n maxOutputTokens: 16384,\n directFallbackModel: \"claude-opus-4-7\",\n reasoningEfforts: [\"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.\n effortRequiresDirect: true,\n supportsTemperature: false,\n preferKie: true,\n },\n {\n id: \"gpt-5.4\",\n displayName: \"GPT-5.4\",\n // Demoted 2026-09-06: two GPT generations have shipped above it, so\n // \"Latest\" steered the picker at the oldest premium GPT in the registry.\n desc: \"Older GPT, premium quality\",\n tier: \"premium\",\n kieFormat: \"responses\",\n kieSlugOrModel: \"gpt-5-4\",\n vendor: \"openai\",\n structuredOutputMode: \"responses-json-schema\",\n supportsImages: true,\n maxOutputTokens: 16384,\n reasoningEfforts: [\"low\", \"medium\", \"high\"],\n },\n {\n id: \"gpt-5.5\",\n displayName: \"GPT-5.5\",\n desc: \"Previous flagship GPT, deep reasoning\",\n tier: \"premium\",\n kieFormat: \"responses\",\n kieSlugOrModel: \"gpt-5-5\",\n vendor: \"openai\",\n structuredOutputMode: \"responses-json-schema\",\n supportsImages: true,\n maxOutputTokens: 16384,\n reasoningEfforts: [\"none\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n supportsTemperature: false,\n },\n {\n id: \"gpt-5.6-luna\",\n displayName: \"GPT-5.6 Luna\",\n desc: \"Fastest GPT-5.6, high-volume workloads\",\n tier: \"economy\",\n kieFormat: \"responses\",\n kieSlugOrModel: \"gpt-5-6-luna\",\n vendor: \"openai\",\n structuredOutputMode: \"responses-json-schema\",\n supportsImages: true,\n maxOutputTokens: 16384,\n reasoningEfforts: [\"none\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n supportsTemperature: false,\n },\n {\n id: \"gpt-5.6-terra\",\n displayName: \"GPT-5.6 Terra\",\n desc: \"Balanced GPT-5.6 for production work\",\n tier: \"standard\",\n kieFormat: \"responses\",\n kieSlugOrModel: \"gpt-5-6-terra\",\n vendor: \"openai\",\n structuredOutputMode: \"responses-json-schema\",\n supportsImages: true,\n maxOutputTokens: 16384,\n reasoningEfforts: [\"none\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n supportsTemperature: false,\n },\n {\n id: \"gpt-5.6-sol\",\n displayName: \"GPT-5.6 Sol\",\n // Demoted 2026-09-06 when gpt-6-astra registered below — \"Flagship /\n // deepest\" is the current top GPT's copy only. Worded to stay distinct\n // from gpt-5.5's \"Previous flagship GPT, deep reasoning\": all three read\n // premium on the invoice, so a stale superlative mis-steers silently.\n desc: \"Previous flagship GPT-5.6, deep reasoning\",\n tier: \"premium\",\n kieFormat: \"responses\",\n kieSlugOrModel: \"gpt-5-6-sol\",\n vendor: \"openai\",\n structuredOutputMode: \"responses-json-schema\",\n supportsImages: true,\n maxOutputTokens: 16384,\n reasoningEfforts: [\"none\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n supportsTemperature: false,\n // SERVED COLLAPSED, on the astra precedent (2026-09-17). The 2026-07-14\n // verification that KIE's non-stream responses endpoint serves the GPT-5.6\n // family reliably no longer holds: a live call — a recast continuity\n // review, ~3k tokens, `reasoning.effort: high`, `text.format: json_schema`\n // — came back `500 {\"error\":{\"type\":\"server_error\"}}` / \"Server exception,\n // please try again later\". Same endpoint family, same dialect and the same\n // signature astra was measured on (12 calls: non-stream 2/6, streaming\n // 5/6; a schema-less non-stream call 500'd too, so the lane is the trigger\n // and not the schema). ONE sighting here rather than a fresh 12-call probe\n // — the precedent is strong and the flag is cheap to reverse.\n //\n // THE COST: SSE does not reliably carry `credits_consumed`, so this model's\n // provider cost becomes the rate-table estimate instead of the billed\n // figure. That is the price of a lane that answers, and it is the same\n // trade astra already makes.\n kieCollapseStream: true,\n },\n {\n id: \"gpt-6-astra\",\n displayName: \"GPT-6 Astra\",\n desc: \"Flagship GPT-6, deepest reasoning\",\n tier: \"premium\",\n kieFormat: \"responses\",\n // KIE serves GPT-6 on the responses dialect under the OpenAI family path —\n // codex/v1/responses, which llm-client DERIVES from `vendor` (the same\n // derivation that keeps Grok on grok/v1/responses). So this field is the\n // body `model` only, not a path segment. Live-verified 2026-09-06 on the\n // streaming path (array `input`, SSE deltas), which is the ONLY path we\n // serve it on — see `kieCollapseStream` below. The non-stream reply does\n // carry `credits_consumed` (and cached_tokens/cache_write_tokens in usage)\n // on the ~1 call in 3 that returns one, but we no longer take that reply,\n // so provider cost here is the rate-table estimate.\n // KIE's codex/v1/responses injects its own Codex-agent `instructions`\n // prompt ABOVE the caller's `developer` message — observed in the\n // 2026-07-14 live probe of that endpoint, and unchanged for GPT-6. Budget\n // for it when a developer message has to dominate.\n kieSlugOrModel: \"gpt-6-astra\",\n vendor: \"openai\",\n // Live-verified 2026-09-06: `text.format: json_schema` is passed through\n // and ENFORCED — the server echoed `strict: true` and returned\n // schema-valid JSON.\n structuredOutputMode: \"responses-json-schema\",\n // text + image + file inputs per KIE's doc. No video/audio — see the\n // image-only LLM_MODALITY_CAPS row below.\n supportsImages: true,\n maxOutputTokens: 16384,\n // KIE's documented enum for this endpoint. No `none` on purpose: the\n // endpoint reasons unconditionally (see thinkingDefaultOn below), so a\n // \"none\" level would be a lie the wire silently overrides.\n reasoningEfforts: [\"low\", \"medium\", \"high\", \"xhigh\"],\n // Live-probed 2026-09-06: `temperature: 0.2` was sent and the request echo\n // stayed at 1.0 — silently IGNORED, so never send it. Same treatment as the\n // GPT-5.6 family and grok-4.6.\n supportsTemperature: false,\n // With NO reasoning param sent, the server echoed effort \"medium\" — it\n // reasons by default (2026-09-06), so reasoning tokens share `max_tokens`\n // on EVERY call, not just effort-bearing ones. Consumers must floor output\n // headroom off this flag or a premium answer truncates into a paid-for\n // empty reply.\n thinkingDefaultOn: true,\n // Measured 2026-09-06, 12 identical requests (developer + user message,\n // reasoning.effort low, text.format json_schema): `stream: false`\n // succeeded 2/6 in 4–5 s and 500'd 4/6 with\n // {\"error\":{\"type\":\"server_error\"}} after 34, 34, 35 and 64 s, while the\n // same body with `stream: true` succeeded 5/6 in the same 4–5 s. An\n // earlier non-stream probe timed out at 90 s with 0 bytes, and a\n // non-stream call WITHOUT a schema 500'd after 65 s — the schema is not\n // the trigger, the non-stream lane is. The very same endpoint serves\n // gpt-5.4/5.5/5.6 non-stream reliably (live-verified 2026-07-14), which is\n // why this is per-model and not a lane-wide flag.\n kieCollapseStream: true,\n },\n // ── GPT-6 Luna / Sol / 6.1 Sol ────────────────────────────────────────────\n // Same KIE endpoint and dialect as gpt-6-astra (codex/v1/responses; the doc\n // pages differ only in the model name). Live-probed 2026-10-08, per model:\n // `text.format` json_schema ENFORCED (echo `strict: true`, schema-valid\n // reply), `temperature: 0.2` echoed back as 1 → silently ignored, no\n // reasoning param → echo \"medium\" (reasons by default), and data-URI vision.\n // Unlike astra, the NON-stream lane served them reliably — luna 10/10 and sol\n // 10/10, 6.1 sol 8/8 at levels other than `none` (incl. 4 long structured\n // calls each, 500–1,500 output tokens) — so none of them is collapsed:\n // `credits_consumed` stays the real provider charge.\n // Their ladder is WIDER than astra's doc-enum one: `none` and `max` were each\n // sent and echoed back by the endpoint (6.1 sol excepted below).\n {\n id: \"gpt-6-luna\",\n displayName: \"GPT-6 Luna\",\n desc: \"Fastest GPT-6, high-volume workloads\",\n tier: \"economy\",\n kieFormat: \"responses\",\n kieSlugOrModel: \"gpt-6-luna\",\n vendor: \"openai\",\n structuredOutputMode: \"responses-json-schema\",\n supportsImages: true,\n maxOutputTokens: 16384,\n reasoningEfforts: [\"none\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n supportsTemperature: false,\n thinkingDefaultOn: true,\n },\n {\n id: \"gpt-6-sol\",\n displayName: \"GPT-6 Sol\",\n desc: \"Strong GPT-6, deep reasoning at lower cost\",\n // Premium by decision (2026-10-08), not by unit cost — \"Sol\" is the\n // deep-reasoning rung of the family, and gpt-5.6-sol bills premium too.\n tier: \"premium\",\n kieFormat: \"responses\",\n kieSlugOrModel: \"gpt-6-sol\",\n vendor: \"openai\",\n structuredOutputMode: \"responses-json-schema\",\n supportsImages: true,\n maxOutputTokens: 16384,\n reasoningEfforts: [\"none\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n supportsTemperature: false,\n thinkingDefaultOn: true,\n },\n {\n id: \"gpt-6.1-sol\",\n displayName: \"GPT-6.1 Sol\",\n // Measured slow: 30–76 s for 500–1,100 output tokens (2026-10-08), roughly\n // twice gpt-6-sol on the same request — say so where the picker shows it.\n desc: \"Newest GPT-6 Sol, thorough but slower\",\n tier: \"premium\",\n kieFormat: \"responses\",\n kieSlugOrModel: \"gpt-6-1-sol\",\n vendor: \"openai\",\n structuredOutputMode: \"responses-json-schema\",\n supportsImages: true,\n maxOutputTokens: 16384,\n // NO `none`: every probe at `reasoning.effort: none` failed (502, a 120 s\n // timeout, 502, 429 — 0/4, 2026-10-08) while every other level answered,\n // and the same request at `none` succeeded on luna and sol. Clamping maps a\n // `none` request to nothing sent (Auto) rather than to a level that fails.\n reasoningEfforts: [\"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n supportsTemperature: false,\n thinkingDefaultOn: true,\n },\n {\n id: \"grok-4.6\",\n displayName: \"Grok 4.6\",\n // Demoted 2026-10-08 when grok-4.7 registered — the flagship copy moved up.\n desc: \"Previous Grok, strong reasoning\",\n tier: \"standard\",\n kieFormat: \"responses\",\n // KIE serves Grok on the responses dialect under its own family path —\n // grok/v1/responses, NOT codex/v1/responses (llm-client derives the path\n // from `vendor`). Live-verified end-to-end 2026-08-18: array `input`,\n // `developer` system role, `input_image` URL vision, `text.format`\n // json_schema enforcement, SSE `response.output_text.delta` stream, and\n // `credits_consumed` actual-cost capture. (grok-4.5 was deferred 2026-07-13\n // because none of this was live; 4.6 is its activation.)\n kieSlugOrModel: \"grok-4-6\",\n vendor: \"xai\",\n structuredOutputMode: \"responses-json-schema\",\n supportsImages: true,\n maxOutputTokens: 16384,\n // KIE's documented enum, each level live-verified (echoed back) 2026-08-18.\n // No `none`: the endpoint reasons unconditionally (see thinkingDefaultOn).\n reasoningEfforts: [\"low\", \"medium\", \"high\", \"xhigh\"],\n // Live-probed 2026-08-18: `temperature` is silently IGNORED (request echo\n // stays at the 0.7 default), so never send it — same treatment as GPT-5.5+.\n supportsTemperature: false,\n // Reasons with NO reasoning param sent (effort defaults to \"low\" server-side\n // — a trivial probe spent 169 of 170 output tokens on reasoning), so every\n // call needs output headroom, not just xhigh.\n thinkingDefaultOn: true,\n },\n {\n id: \"grok-4.7\",\n displayName: \"Grok 4.7\",\n desc: \"xAI flagship, strong reasoning\",\n tier: \"standard\",\n kieFormat: \"responses\",\n // Same grok/v1/responses family path and wire as grok-4.6 (the KIE doc\n // pages differ only in the model name). Live-probed 2026-10-08: non-stream\n // 6/6, `text.format` json_schema enforced, data-URI vision, SSE deltas.\n kieSlugOrModel: \"grok-4-7\",\n vendor: \"xai\",\n structuredOutputMode: \"responses-json-schema\",\n supportsImages: true,\n maxOutputTokens: 16384,\n // 4.6's ladder. `none` is NOT honoured: the endpoint echoed it back as\n // \"minimal\" and still reasoned (33 of 35 output tokens), so offering it\n // would promise a lever the wire overrides.\n reasoningEfforts: [\"low\", \"medium\", \"high\", \"xhigh\"],\n // `temperature: 0.2` → echo stayed at the 0.7 default: ignored.\n supportsTemperature: false,\n // \"Capital of France\" with no reasoning param spent 310 of 311 output\n // tokens reasoning.\n thinkingDefaultOn: true,\n },\n {\n id: \"claude-sonnet-5\",\n displayName: \"Claude Sonnet 5\",\n // Demoted 2026-10-08 when claude-sonnet-5.5 registered.\n desc: \"Previous Sonnet, near-Opus quality\",\n tier: \"standard\",\n kieFormat: \"messages\",\n kieSlugOrModel: \"claude-sonnet-5\",\n vendor: \"anthropic\",\n structuredOutputMode: \"anthropic-tool\",\n supportsImages: true,\n maxOutputTokens: 16384,\n directFallbackModel: \"claude-sonnet-5\",\n reasoningEfforts: [\"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.\n effortRequiresDirect: true,\n supportsTemperature: false,\n preferKie: true,\n },\n {\n id: \"claude-sonnet-5.5\",\n displayName: \"Claude Sonnet 5.5\",\n desc: \"Latest Sonnet, near-Opus quality at Sonnet cost\",\n tier: \"standard\",\n kieFormat: \"messages\",\n // KIE serves it on the Claude-native messages dialect under its plain id\n // (docs.kie.ai/market/claude/claude-sonnet-5-5.md — the page is\n // claude-opus-5's with the model name swapped). Live-probed 2026-10-08 on\n // the streaming wire: plain, effort, and forced/auto+strict tool calls all\n // answered.\n kieSlugOrModel: \"claude-sonnet-5-5\",\n vendor: \"anthropic\",\n structuredOutputMode: \"anthropic-tool\",\n // Anthropic 400s a forced tool_choice on this model. KIE's proxy happened\n // to accept one in the probe, but the direct lane is where every\n // effort-bearing and every streamed structured call goes.\n supportsForcedToolChoice: false,\n conversationBoundThinking: true,\n supportsImages: true,\n maxOutputTokens: 16384,\n directFallbackModel: \"claude-sonnet-5-5\",\n reasoningEfforts: [\"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.\n effortRequiresDirect: true,\n // Anthropic rejects non-default sampling values on this model (KIE's proxy\n // accepted temperature: 0.2 in the probe; the direct lane is the contract).\n supportsTemperature: false,\n preferKie: true,\n // Adaptive thinking runs when no thinking param is sent (vendor default).\n thinkingDefaultOn: true,\n },\n {\n id: \"claude-opus-4.8\",\n displayName: \"Claude Opus 4.8\",\n desc: \"Previous-gen Opus, long-horizon work\",\n tier: \"premium\",\n kieFormat: \"messages\",\n kieSlugOrModel: \"claude-opus-4-8\",\n vendor: \"anthropic\",\n structuredOutputMode: \"anthropic-tool\",\n supportsImages: true,\n maxOutputTokens: 16384,\n directFallbackModel: \"claude-opus-4-8\",\n reasoningEfforts: [\"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.\n effortRequiresDirect: true,\n supportsTemperature: false,\n preferKie: true,\n },\n {\n id: \"claude-opus-5\",\n displayName: \"Claude Opus 5\",\n // Demoted 2026-10-08 when claude-opus-5.5 registered.\n desc: \"Previous Opus, deep agentic reasoning\",\n tier: \"premium\",\n kieFormat: \"messages\",\n // KIE serves Opus 5 on the Claude-native messages dialect under the plain\n // id (docs.kie.ai/market/claude/claude-opus-5.md) — same path shape as\n // claude-opus-4-8 / claude-fable-5.\n kieSlugOrModel: \"claude-opus-5\",\n vendor: \"anthropic\",\n structuredOutputMode: \"anthropic-tool\",\n supportsImages: true,\n maxOutputTokens: 16384,\n directFallbackModel: \"claude-opus-5\",\n reasoningEfforts: [\"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.\n effortRequiresDirect: true,\n supportsTemperature: false,\n preferKie: true,\n // Opus 5 reasons with NO thinking param sent (vendor default flipped from\n // Opus 4.8/4.7) — so every call needs output headroom, not just xhigh/max.\n thinkingDefaultOn: true,\n },\n {\n id: \"claude-opus-5.5\",\n displayName: \"Claude Opus 5.5\",\n // Positioned as Fable-class (decided 2026-10-08: offered wherever Fable is).\n desc: \"Latest Opus, frontier-class reasoning\",\n tier: \"premium\",\n kieFormat: \"messages\",\n // KIE plain id on the messages dialect (docs.kie.ai/market/claude/\n // claude-opus-5-5 — claude-opus-5's page with the name swapped).\n // Live-probed 2026-10-08 on the streaming wire (plain + effort); the KIE\n // Claude lane was erroring for claude-opus-5 too during the tool probes.\n kieSlugOrModel: \"claude-opus-5-5\",\n vendor: \"anthropic\",\n structuredOutputMode: \"anthropic-tool\",\n // Forced tool_choice is a 400 on this model (vendor docs) — see the field.\n supportsForcedToolChoice: false,\n conversationBoundThinking: true,\n supportsImages: true,\n maxOutputTokens: 16384,\n directFallbackModel: \"claude-opus-5-5\",\n reasoningEfforts: [\"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.\n effortRequiresDirect: true,\n supportsTemperature: false,\n preferKie: true,\n // Thinking cannot be turned off on this model at all (`disabled` is a 400\n // at every effort); with no effort sent it runs adaptive at the vendor's\n // `medium` default. Nothing on our wire sends `disabled`.\n thinkingDefaultOn: true,\n },\n {\n id: \"claude-fable-5\",\n displayName: \"Claude Fable 5\",\n desc: \"Frontier Claude above Opus, hardest problems\",\n tier: \"premium\",\n kieFormat: \"messages\",\n kieSlugOrModel: \"claude-fable-5\",\n vendor: \"anthropic\",\n structuredOutputMode: \"anthropic-tool\",\n supportsImages: true,\n maxOutputTokens: 16384,\n directFallbackModel: \"claude-fable-5\",\n reasoningEfforts: [\"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.\n effortRequiresDirect: true,\n supportsTemperature: false,\n preferKie: true,\n // Thinking is always on (vendor docs: `disabled` is not supported), so it\n // shares the output cap on every call.\n thinkingDefaultOn: true,\n },\n // ── Moonshot / DeepSeek ───────────────────────────────────────────────────\n // Both on KIE's THIRD responses family path, openai/v1/responses (llm-client\n // derives it from `vendor`). KIE labels both pages \"Chat only — not adapted\n // for agent use\": fine for single (structured) completions, so neither may\n // back a tool-loop feature.\n {\n id: \"kimi-k3\",\n displayName: \"Kimi K3\",\n desc: \"Moonshot flagship, 1M context, careful reasoning\",\n tier: \"premium\",\n kieFormat: \"responses\",\n kieSlugOrModel: \"kimi-k3\",\n vendor: \"moonshot\",\n // Live-probed 2026-10-08: `text.format` json_schema is ENFORCED — asked to\n // answer \"no json here\" in plain prose, it returned schema-shaped JSON.\n structuredOutputMode: \"responses-json-schema\",\n supportsImages: true,\n maxOutputTokens: 16384,\n // KIE's documented enum. The endpoint accepted xhigh/none without error but\n // never echoes an effort back, so nothing beyond the doc is verifiable.\n reasoningEfforts: [\"low\", \"medium\", \"high\"],\n // The doc lists no `temperature` field at all.\n supportsTemperature: false,\n // \"Reasons by default\" per KIE's doc (its usage reports no reasoning-token\n // split, so this is the doc's word, not a measurement).\n thinkingDefaultOn: true,\n },\n {\n id: \"deepseek-v4.1-flash\",\n displayName: \"DeepSeek V4.1 Flash\",\n desc: \"Very cheap and fast, solid reasoning\",\n tier: \"economy\",\n kieFormat: \"responses\",\n kieSlugOrModel: \"deepseek-v4-1-flash\",\n vendor: \"deepseek\",\n // Live-probed 2026-10-08: json_schema echoed `strict: true` and enforced.\n structuredOutputMode: \"responses-json-schema\",\n supportsImages: true,\n // ADVISORY ONLY: KIE documents `max_output_tokens` as \"not supported … no\n // effect\" on this model (a probe sending it was accepted and ignored), so\n // neither this cap nor the reasoning floor binds its output length, and the\n // `incomplete` cap-stop signal cannot fire from our own cap.\n maxOutputTokens: 16384,\n // The endpoint takes none/minimal/low/medium/high/xhigh/max; each of none,\n // low and xhigh was echoed back. `minimal` is not in our ladder.\n reasoningEfforts: [\"none\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"],\n // Documented \"not supported … no effect\".\n supportsTemperature: false,\n thinkingDefaultOn: true,\n },\n] as const\n\nexport const LLM_MODEL_IDS = LLM_MODELS.map((m) => m.id)\n\n/** Vision models that can return GUARANTEED structured output — the\n * describe-to-picker analyzer forces a schema over an image, so its model\n * pickers AND the backend route gate offer exactly these: Anthropic (forced\n * tool), Gemini (KIE `response_format`), and GPT responses-format models\n * (KIE `text.format` json_schema — vision+schema live-verified 2026-07-14).\n * Single source of truth so the picker, the config panel, and the route gate\n * can't drift. */\nexport const STRUCTURED_VISION_MODELS = LLM_MODELS.filter(\n (m) => m.supportsImages && m.structuredOutputMode != null,\n)\n\n/**\n * Vendor presentation order + labels for model pickers. Every LlmVendor MUST\n * appear in the order list (guarded by a registry test) so a new vendor can't\n * ship with its models silently sorted to the end of every menu unlabeled.\n * Alphabetical on purpose: stable, and no vendor-preference fights.\n */\nexport const LLM_VENDOR_ORDER: readonly LlmVendor[] = [\"anthropic\", \"deepseek\", \"google\", \"moonshot\", \"openai\", \"xai\"]\nexport const LLM_VENDOR_LABELS: Record<LlmVendor, string> = {\n anthropic: \"Anthropic\",\n deepseek: \"DeepSeek\",\n google: \"Google\",\n moonshot: \"Moonshot AI\",\n openai: \"OpenAI\",\n xai: \"xAI\",\n}\n\nconst TIER_RANK: Record<LlmTier, number> = { economy: 0, standard: 1, premium: 2 }\n\nexport interface LlmModelGroup {\n vendor: LlmVendor\n /** Display heading for the group (LLM_VENDOR_LABELS[vendor]). */\n label: string\n models: LlmModelDef[]\n}\n\n/**\n * The ONE ordering every LLM model menu renders: grouped by vendor (in\n * LLM_VENDOR_ORDER), and inside each group sorted economy → standard → premium\n * (registry order breaks ties, which keeps family generations adjacent).\n * A flat registry-order dump was genuinely hard to scan at 17 models — every\n * picker (config panel, quick strips, quick toolbar) derives from this so the\n * menus can't drift apart. Groups with no models (after `filter`) are omitted.\n */\nexport function groupLlmModelsByVendor(models: readonly LlmModelDef[] = LLM_MODELS): LlmModelGroup[] {\n const groups: LlmModelGroup[] = []\n for (const vendor of LLM_VENDOR_ORDER) {\n const members = models\n .filter((m) => m.vendor === vendor)\n .sort((a, b) => TIER_RANK[a.tier] - TIER_RANK[b.tier])\n if (members.length > 0) groups.push({ vendor, label: LLM_VENDOR_LABELS[vendor], models: members })\n }\n return groups\n}\n\n/** {@link groupLlmModelsByVendor} flattened — for menus that can't render\n * group headers (e.g. the compact node quick strips) but should still read\n * vendor-clustered and tier-ordered. */\nexport function orderedLlmModels(models: readonly LlmModelDef[] = LLM_MODELS): LlmModelDef[] {\n return groupLlmModelsByVendor(models).flatMap((g) => g.models)\n}\n\nexport type LlmFeature =\n | \"ai-writer\"\n | \"llm-chat\"\n | \"prompt-helper\"\n | \"scene-graph-ai\"\n | \"after-effects\"\n | \"motion-graphics\"\n | \"motion-graphics-lottie\"\n | \"lottie-overlay\"\n | \"3d-title\"\n // Scene3D previz authoring — generate-3d-scene AND edit-3d-scene share one\n // feature: both send the model a scene (the edit sends the WHOLE plan in) and\n // both get back structured geometry, so the token profile is the same shape.\n // The deterministic edit lane never reaches an LLM and bills the separate\n // zero-cost `3d-scene-ops` identifier instead.\n | \"3d-scene\"\n | \"image-to-text\"\n // Per-ad creative analysis on the social scraper nodes (Meta Ads first):\n // one structured vision call per ad, priced per REQUESTED ad by tier and\n // folded into the scrape's own identifier (packages/shared/meta-ads-scrape).\n | \"meta-ads-analysis\"\n | \"describe-to-picker\"\n | \"qa-check\"\n | \"generate-script\"\n | \"translate\"\n | \"image-critic\"\n // Choose Best (reduce) — the pick-best-llm strategy's judge. Its own\n // feature (not ai-writer, which it used to piggyback on) so the model\n // default and the tiered credit ids are the strategy's own.\n | \"pick-best-llm\"\n // In-app Workflow Copilot turns (backend agent loop; metered, reservation\n // ceiling under `STATIC_CREDIT_COSTS[\"workflow-copilot\"]`).\n | \"workflow-copilot\"\n // \"Steal the format\": Content Recipe (why a post worked, one structured\n // call over its analysis) and Content Ideas (recipes + brand → ideas, a\n // call per five ideas). Cloud-only; the implementation is a private plugin.\n // Ideas are priced per batch of five — see content-recipe-ideas.ts.\n | \"content-recipe\"\n | \"content-ideas\"\n\n/** Engine-dependent LlmFeature for the motion-graphics node (design §8: every credit-id site must branch on engine). */\nexport function motionGraphicsFeature(engine?: string): LlmFeature {\n return engine === \"lottie\" ? \"motion-graphics-lottie\" : \"motion-graphics\"\n}\n\n/** Feature → default model when user hasn't selected one */\nexport const LLM_FEATURE_DEFAULTS: Record<LlmFeature, string> = {\n \"ai-writer\": \"claude-sonnet-4.6\",\n \"llm-chat\": \"gemini-3.6-flash\",\n \"prompt-helper\": \"gemini-3.6-flash\",\n \"scene-graph-ai\": \"claude-sonnet-4.6\",\n \"after-effects\": \"claude-sonnet-4.6\",\n \"motion-graphics\": \"claude-sonnet-4.6\",\n \"motion-graphics-lottie\": \"claude-sonnet-4.6\",\n \"lottie-overlay\": \"claude-sonnet-4.6\",\n \"3d-title\": \"claude-sonnet-4.6\",\n \"3d-scene\": \"claude-sonnet-4.6\",\n \"image-to-text\": \"claude-sonnet-4.6\",\n // Economy on purpose: the analysis reads ONE frame + the copy per ad and\n // runs once per returned ad — volume, not depth. Must stay an image-capable\n // structured-output model (STRUCTURED_VISION_MODELS); a registry test pins it.\n \"meta-ads-analysis\": \"gemini-3.6-flash\",\n // Moved from claude-opus-5 on 2026-10-08 (decided: Opus 5.5 takes the Opus 5\n // defaults). Still an image-capable structured model — a registry test pins it.\n \"describe-to-picker\": \"claude-opus-5.5\",\n \"qa-check\": \"gemini-3.6-flash\",\n \"generate-script\": \"gemini-3.6-flash\",\n \"translate\": \"gemini-3.6-flash\",\n \"image-critic\": \"claude-sonnet-4.6\",\n \"pick-best-llm\": \"claude-sonnet-4.6\",\n \"workflow-copilot\": \"claude-sonnet-5\",\n // Both economy on purpose — measured: ten ideas in Hebrew took ~1 min here\n // and ~3.5 min (two calls) on claude-sonnet-4.6. The private plugin keeps\n // the same two defaults for API callers that omit the model.\n \"content-recipe\": \"gemini-3.6-flash\",\n \"content-ideas\": \"gemini-3.6-flash\",\n}\n\n/**\n * Feature → the reasoning effort its DEFAULT model runs at when the caller\n * sends none. Read it through {@link defaultReasoningEffort}, never directly:\n * the effort belongs to the default model, so a call on any other model must\n * not pick it up.\n */\nexport const LLM_FEATURE_DEFAULT_EFFORTS: Partial<Record<LlmFeature, LlmReasoningEffort>> = {\n // Decided 2026-10-09 from the picker bake-off v2: Opus 5.5 at `high` read\n // 4/4 portraits with the most attributes per image, ~9 s a read. Its effort\n // only takes effect on Anthropic's own API (`effortRequiresDirect`), so the\n // default analysis runs direct — and bills as such (`llmServesDirect`).\n \"describe-to-picker\": \"high\",\n}\n\n/**\n * The reasoning effort a `feature` call runs at when the caller sends none:\n * the feature's default effort ({@link LLM_FEATURE_DEFAULT_EFFORTS}), but ONLY\n * while the call runs on the feature's default model — named, or omitted\n * (`undefined` / `\"\"`) so the default model applies. A caller who picked\n * another model and no effort gets `undefined`: that model's Auto, as before.\n *\n * WHY only on the default model: the default effort is part of the default\n * model's recipe, not a global policy. Forcing `high` on a Gemini or GPT call\n * that never asked for it would change the timing of every existing workflow\n * that picked one (and, on a Claude model, its lane and its bill).\n *\n * The one place the route, the node's credit badge and its effort pickers\n * read, so what runs, what is billed and what is shown cannot disagree.\n */\nexport function defaultReasoningEffort(feature: string, modelId?: string): LlmReasoningEffort | undefined {\n const effort = LLM_FEATURE_DEFAULT_EFFORTS[feature as LlmFeature]\n if (!effort) return undefined\n if (!modelId) return effort\n return getLlmModel(modelId)?.id === LLM_FEATURE_DEFAULTS[feature as LlmFeature] ? effort : undefined\n}\n\n/**\n * Per-model multimodal input capabilities. Drives both frontend UI gating\n * and backend route-level filtering for the LLM Chat node references.\n *\n * As of 2026-05: Claude Messages API supports text + image only (no audio,\n * no video). Gemini 2/3 family supports image + video + audio natively.\n * GPT-5.x via KIE chat-completions / responses supports image only — audio\n * input requires a separate audio-capable model we don't route to today.\n */\nexport const LLM_MODALITY_CAPS: Record<string, { image: boolean; video: boolean; audio: boolean }> = {\n \"gemini-3-flash\": { image: true, video: true, audio: true },\n \"gemini-3.6-flash\": { image: true, video: true, audio: true },\n // gemini-3.7-flash is IMAGE-ONLY by DECISION, not omission: full video+audio\n // caps would auto-enroll it in VIDEO_ANALYSIS_LLM_MODELS (derived below) and\n // force a video-analysis tier + pricing decision that is deliberately\n // deferred while the smart-family A/B routes this model internally (#747).\n // Flip these two flags ONLY together with that VA-side decision.\n \"gemini-3.7-flash\": { image: true, video: false, audio: false },\n // gemini-3.8-flash is IMAGE-ONLY by DECISION, not omission — 3.7's rationale\n // exactly: full video+audio caps would auto-enroll it in\n // VIDEO_ANALYSIS_LLM_MODELS (derived below) and force a video-analysis tier +\n // pricing decision that stays deferred until the 3.8-vs-3.7 analysis A/B\n // concludes. Google's own 3.8 lane DOES understand video (agentic video, via\n // the Interactions API we don't wire) — which is precisely why withholding it\n // has to be a decision rather than a gap. Flip these two flags ONLY together\n // with that VA-side decision.\n \"gemini-3.8-flash\": { image: true, video: false, audio: false },\n \"gemini-3.1-pro\": { image: true, video: true, audio: true },\n \"claude-haiku-4.5\": { image: true, video: false, audio: false },\n \"claude-haiku-5.5\": { image: true, video: false, audio: false },\n \"claude-sonnet-4.6\": { image: true, video: false, audio: false },\n \"claude-opus-4.7\": { image: true, video: false, audio: false },\n \"gpt-5.2\": { image: true, video: false, audio: false },\n \"gpt-5.4\": { image: true, video: false, audio: false },\n \"gpt-5.5\": { image: true, video: false, audio: false },\n \"gpt-5.6-luna\": { image: true, video: false, audio: false },\n \"gpt-5.6-terra\": { image: true, video: false, audio: false },\n \"gpt-5.6-sol\": { image: true, video: false, audio: false },\n // KIE's GPT-6 doc lists text + image + file inputs only — no video, no audio.\n \"gpt-6-astra\": { image: true, video: false, audio: false },\n // Same KIE doc as astra: text + image + file inputs only.\n \"gpt-6-luna\": { image: true, video: false, audio: false },\n \"gpt-6-sol\": { image: true, video: false, audio: false },\n \"gpt-6.1-sol\": { image: true, video: false, audio: false },\n \"grok-4.6\": { image: true, video: false, audio: false },\n \"grok-4.7\": { image: true, video: false, audio: false },\n \"claude-sonnet-5\": { image: true, video: false, audio: false },\n \"claude-sonnet-5.5\": { image: true, video: false, audio: false },\n \"claude-opus-4.8\": { image: true, video: false, audio: false },\n \"claude-opus-5\": { image: true, video: false, audio: false },\n \"claude-opus-5.5\": { image: true, video: false, audio: false },\n \"claude-fable-5\": { image: true, video: false, audio: false },\n // KIE documents text + image input only for both.\n \"kimi-k3\": { image: true, video: false, audio: false },\n \"deepseek-v4.1-flash\": { image: true, video: false, audio: false },\n}\n\n/** Capability lookup with safe default — unknown models get image-only. */\nexport function getLlmModalityCaps(modelId: string | undefined): { image: boolean; video: boolean; audio: boolean } {\n if (!modelId) return { image: true, video: false, audio: false }\n return LLM_MODALITY_CAPS[modelId] ?? { image: true, video: false, audio: false }\n}\n\n/**\n * Dash-form aliases resolve to their canonical dot-form ids. Several wire\n * contracts carry dash forms (`PIPELINE_PINNABLE_SCRIPT_LLMS`, provider slugs,\n * configs persisted before the id scheme settled), while `LLM_MODELS` keys the\n * canonical `major.minor` form — an exact-only lookup makes every such caller\n * throw \"Unknown LLM model\" at run time. Normalizing here (instead of editing\n * the enums) keeps stored configs and published-package consumers valid.\n */\nfunction dashAliasToCanonical(id: string): string {\n return id.replace(/-(\\d+)-(\\d+)$/, \"-$1.$2\")\n}\n\nexport function getLlmModel(id: string): LlmModelDef | undefined {\n const exact = LLM_MODELS.find((m) => m.id === id)\n if (exact) return exact\n const canonical = dashAliasToCanonical(id)\n if (canonical !== id) {\n const aliased = LLM_MODELS.find((m) => m.id === canonical)\n if (aliased) return aliased\n }\n // Last resort: provider slugs double as historical aliases (e.g. the\n // dated Anthropic slugs, the `-preview`-suffixed Google ids) — accept any\n // model whose slug matches exactly, on either lane.\n return LLM_MODELS.find(\n (m) => m.kieSlugOrModel === id || m.directFallbackModel === id || m.directGeminiModel === id,\n )\n}\n\nexport function getLlmTier(id: string): LlmTier {\n return getLlmModel(id)?.tier ?? \"standard\"\n}\n\n/**\n * Effort levels this model actually accepts on the lane it will be served on.\n *\n * The two lanes do NOT offer the same ladder: the aggregator accepts a narrower\n * set than the vendor's own API does, which is one of the concrete things\n * Advanced mode buys. Kept as one lookup so the UI picker and the wire-side\n * clamp can never disagree about what's selectable.\n */\nexport function availableReasoningEfforts(\n modelId: string | undefined,\n advanced = false,\n): readonly LlmReasoningEffort[] {\n const model = getLlmModel(modelId ?? \"\")\n if (!model) return []\n if (advanced && supportsAdvancedMode(modelId)) {\n return model.directReasoningEfforts ?? model.reasoningEfforts ?? []\n }\n return model.reasoningEfforts ?? []\n}\n\n/** Highest level the model supports that is ≤ the requested level; undefined = treat as Auto. */\nexport function effectiveReasoningEffort(\n modelId: string | undefined,\n requested?: string,\n advanced = false,\n): LlmReasoningEffort | undefined {\n if (!requested || !(requested in EFFORT_RANK)) return undefined\n const levels = availableReasoningEfforts(modelId, advanced)\n if (!levels || levels.length === 0) return undefined\n const req = requested as LlmReasoningEffort\n let best: LlmReasoningEffort | undefined\n for (const l of levels) {\n if (EFFORT_RANK[l] <= EFFORT_RANK[req] && (best === undefined || EFFORT_RANK[l] > EFFORT_RANK[best])) best = l\n }\n return best\n}\n\n/**\n * Build a composite credit identifier for an LLM feature.\n * - economy tier → \"ai-writer:economy\"\n * - standard tier → \"ai-writer\" (no suffix — backward compatible)\n * - premium tier → \"ai-writer:premium\"\n * A reasoning effort of \"xhigh\" or \"max\" (after clamping to what the model\n * actually supports) bills one tier up (economy→standard, standard→premium;\n * premium stays premium). `high` is the Claude-family server default and\n * never bumps.\n */\n\n/**\n * The sampling defaults each LLM feature's route sends when Advanced mode is\n * OFF — and therefore the values its Advanced panel must seed the sliders with.\n *\n * SINGLE SOURCE because the two used to disagree: the routes hardcoded their\n * own literals while the toggle fell back to 0.7/2048, so the panel displayed\n * a temperature the run never used, and one arrow-key press on 3D Title's Max\n * Tokens silently cut its budget from 3072 to 2048 on a node that emits\n * structured JSON.\n *\n * `structuredOutput` marks the features whose prompt asks the model for JSON —\n * a high temperature measurably degrades schema adherence there, so the panel\n * warns. Absent `temperature` means the route sends none (vendor default).\n */\nexport interface LlmRouteDefaults {\n temperature?: number\n maxTokens?: number\n structuredOutput?: true\n}\n\nexport const LLM_ROUTE_DEFAULTS: Record<string, LlmRouteDefaults> = {\n \"llm-chat\": { temperature: 0.7, maxTokens: 8192 },\n \"ai-writer\": { temperature: 0.7, maxTokens: 8192 },\n \"prompt-helper\": { temperature: 0.7, maxTokens: 8192, structuredOutput: true },\n \"generate-script\": { maxTokens: 16384, structuredOutput: true },\n \"qa-check\": { maxTokens: 1024, structuredOutput: true },\n \"image-critic\": { maxTokens: 1024, structuredOutput: true },\n \"image-to-text\": { maxTokens: 1024 },\n \"describe-to-picker\": { structuredOutput: true },\n \"scene-graph-ai\": { temperature: 0.3, maxTokens: 4096, structuredOutput: true },\n \"after-effects\": { temperature: 0.3, maxTokens: 2048, structuredOutput: true },\n \"lottie-overlay\": { temperature: 0.3, maxTokens: 2048, structuredOutput: true },\n \"motion-graphics\": { temperature: 0.3, maxTokens: 2048, structuredOutput: true },\n \"motion-graphics-lottie\": { temperature: 0.3, maxTokens: 8192, structuredOutput: true },\n \"3d-title\": { temperature: 0.4, maxTokens: 3072, structuredOutput: true },\n // A 100-object plan with keyframe tracks is the biggest structured payload\n // any composer feature emits — 3072 (3d-title's cap) truncates it mid-array.\n \"3d-scene\": { temperature: 0.3, maxTokens: 8192, structuredOutput: true },\n}\n\n/** Route defaults for a feature; `{}` for an unknown one. */\nexport function llmRouteDefaults(feature: string | undefined): LlmRouteDefaults {\n return (feature && LLM_ROUTE_DEFAULTS[feature]) || {}\n}\n\n/** One step up the economy → standard → premium ladder. Premium is the ceiling. */\nfunction bumpTier(tier: LlmTier): LlmTier {\n if (tier === \"economy\") return \"standard\"\n if (tier === \"standard\") return \"premium\"\n return tier\n}\n\n/**\n * Can this model be run in Advanced mode?\n *\n * Advanced mode pins the call to the vendor's own API, which is the only lane\n * where sampling levers (`temperature`, `maxTokens`) and the full effort range\n * actually take effect. Capability-derived from the registry — a model without\n * a direct lane simply cannot offer it, so UI and routes both gate on this\n * rather than on a hand-maintained model list.\n */\nexport function supportsAdvancedMode(modelId: string | undefined): boolean {\n const model = modelId ? getLlmModel(modelId) : undefined\n return Boolean(model?.directGeminiModel || model?.directFallbackModel)\n}\n\n/** User-facing reason a model can't offer Advanced mode. Single-sourced so the\n * config panel's disabled hint and the route's 400 say the same thing. */\nexport const ADVANCED_MODE_UNAVAILABLE_REASON =\n \"Advanced mode is available on Gemini and Claude models — switch the model to enable it.\"\n\n/**\n * Is this call served on the vendor's own API — and therefore billed as such?\n *\n * The rule (decided 2026-10-08): a call is priced on the lane it runs on.\n * It runs direct when Advanced mode is on, or when it carries a reasoning\n * effort on a model whose effort only works there (`effortRequiresDirect` —\n * the Claude family). Everything else runs on the aggregator at its price,\n * falling back to the vendor's API only if the aggregator fails (at no extra\n * charge).\n *\n * The SINGLE decision both the credit identifier and the LLM client's routing\n * read, so what is billed and where it runs cannot disagree. Ignores a stale\n * `advancedMode` on a model with no direct lane, like the bump always has.\n */\nexport function llmServesDirect(\n modelId: string | undefined,\n reasoningEffort?: string,\n advancedMode?: boolean,\n): boolean {\n if (!supportsAdvancedMode(modelId)) return false\n if (advancedMode) return true\n return Boolean(\n getLlmModel(modelId!)?.effortRequiresDirect && effectiveReasoningEffort(modelId, reasoningEffort) !== undefined,\n )\n}\n\n/**\n * The credit rungs an LLM feature bills on, cheapest first. `premium-direct` is\n * reached only by a premium model served direct (decided 2026-10-08): the bump\n * for running direct moves one rung on THIS ladder, so a premium model has\n * somewhere to go. The effort bump keeps the three-rung ladder.\n */\nexport const LLM_CREDIT_RUNGS = [\"economy\", \"standard\", \"premium\", \"premium-direct\"] as const\nexport type LlmCreditRung = (typeof LLM_CREDIT_RUNGS)[number]\n\n/** The credit identifier for `feature` on one rung — the standard rung is the bare feature id. */\nexport function llmCreditIdForRung(feature: string, rung: LlmCreditRung): string {\n return rung === \"standard\" ? feature : `${feature}:${rung}`\n}\n\n/** Every credit identifier a tier-priced LLM feature can bill under, in rung order. */\nexport function llmTierCreditIds(feature: string): string[] {\n return LLM_CREDIT_RUNGS.map((rung) => llmCreditIdForRung(feature, rung))\n}\n\nexport function buildLlmCreditIdentifier(\n feature: string,\n modelId?: string,\n reasoningEffort?: string,\n advancedMode?: boolean,\n): string {\n if (!modelId) return feature\n let tier = getLlmTier(modelId)\n const eff = effectiveReasoningEffort(modelId, reasoningEffort)\n if (eff !== undefined && EFFORT_TIER_BUMP.has(eff)) tier = bumpTier(tier)\n // A call served on the vendor's own API (Advanced mode, or an effort on a\n // model whose effort only works there — llmServesDirect) bills materially\n // more per token than the aggregator. It bumps INDEPENDENTLY of the effort\n // bump — the two are separate cost levers and genuinely stack, so a\n // max-effort advanced economy call lands at premium — and on the four-rung\n // ladder, so a premium model served direct lands at `premium-direct`. A stale\n // flag on a model with no direct lane never inflates a bill.\n const rung: LlmCreditRung = llmServesDirect(modelId, reasoningEffort, advancedMode) ? bumpToDirectRung(tier) : tier\n return llmCreditIdForRung(feature, rung)\n}\n\n/** One rung up the four-rung ladder — the direct-lane bump. */\nfunction bumpToDirectRung(tier: LlmTier): LlmCreditRung {\n return tier === \"premium\" ? \"premium-direct\" : bumpTier(tier)\n}\n\n/**\n * Resolve llmModel (+ reasoningEffort, advancedMode) from raw body for the\n * creditGuard preHandler (before Zod parsing). Returns the credit identifier\n * for the given feature.\n */\nexport function resolveLlmCreditId(feature: string, body: unknown): string {\n const b = body as Record<string, unknown> | undefined\n return buildLlmCreditIdentifier(\n feature,\n b?.llmModel as string | undefined,\n b?.reasoningEffort as string | undefined,\n b?.advancedMode === true,\n )\n}\n\n/** Models capable of video-analysis: capability-derived, never hand-listed (route-enum-sync convention). */\nexport const VIDEO_ANALYSIS_LLM_MODELS: string[] = LLM_MODELS\n .filter((m) => getLlmModalityCaps(m.id).video && getLlmModalityCaps(m.id).audio)\n .map((m) => m.id)\n\n/**\n * Video-analysis quality TIERS — the ONLY analyzer identifiers exposed to users\n * (API, UI, docs). Each maps to an internal analysis model; the underlying\n * vendor/model name is never surfaced. Default is `pro`. The guard test\n * (video-analysis-pricing.test.ts) asserts every tier target is a real\n * VIDEO_ANALYSIS_LLM_MODELS member AND every such model is reachable by a tier,\n * so adding a video model forces a tier decision instead of silently leaking.\n */\nexport const VIDEO_ANALYSIS_TIERS = { fast: \"gemini-3-flash\", pro: \"gemini-3.1-pro\" } as const\nexport type VideoAnalysisModelTier = keyof typeof VIDEO_ANALYSIS_TIERS\n/**\n * Models that PREVIOUSLY backed a tier, mapped to the tier they backed.\n * They stay video+audio-capable (so they remain in VIDEO_ANALYSIS_LLM_MODELS):\n * stored raw `llmModel` values keep resolving via the passthrough in\n * `resolveVideoAnalysisModel` and keep pricing under their own credit family —\n * but no tier reaches them for NEW runs. UIs use this map to reverse a stored\n * raw id to the tier the user originally chose (video-configs fail-safe).\n * The tier guard test requires every video-capable model to be a tier target\n * OR a key here, so replacing a tier's backing model stays an explicit,\n * two-sided decision.\n */\nexport const VIDEO_ANALYSIS_LEGACY_MODELS: Record<string, VideoAnalysisModelTier> = {\n // Backed the fast tier from 2026-07 until 2026-07-29, when the economy tiers\n // moved to the cheaper lane and the older, cheaper flash. It is now the engine\n // behind the `smart` tier — but `smart` is a SENTINEL that never exposes a model\n // id, so as far as this map is concerned it no longer backs a selectable tier and\n // belongs here: stored raw `llmModel` values keep resolving and keep pricing\n // under their own credit family.\n \"gemini-3.6-flash\": \"fast\",\n}\n/**\n * MIXED tiers — advanced multi-engine analysis plans whose identifier resolves\n * to an engine-plan SENTINEL consumed by the analysis engine, never to a single\n * model id. Two variants, same price (one shared `video-analysis:mixed:*`\n * credit family): `mixed` targets maximum result quality; `mixed-fast` targets\n * run-to-run output consistency. What each plan does internally is deliberately\n * NOT published here (Apache irrevocability; only the wire vocabulary below is\n * contract — the engine lives in the private analysis plugin).\n */\nexport const VIDEO_ANALYSIS_MIXED_TIERS = [\"mixed\", \"mixed-fast\", \"smart\"] as const\nexport type VideoAnalysisMixedTier = (typeof VIDEO_ANALYSIS_MIXED_TIERS)[number]\n/**\n * `smart` is an ENGINE-PLAN sentinel like the mixed tiers — it names a plan, not a\n * model — but it is a different SHAPE of plan, and the distinction is the whole\n * reason it exists as a separate tier rather than a repricing of the others.\n *\n * The economy tiers (`fast`, `pro`, `mixed`, `mixed-fast`) run several passes on\n * the cheaper proxied transport and vote. That transport is cheaper per token and\n * additionally does no deep reasoning, which is why they cost less — and also why\n * they are less accurate. `smart` is a HYBRID plan (2026-08-03 re-plan): one\n * native-transport skeleton pass with everything turned up, blended with several\n * economy-transport donor rolls, and the merged result is always refined —\n * `selectionMode` (the `choose`/`combine` toggle the other tiers expose) does not\n * apply to `smart`; it always applies the equivalent of `combine`.\n *\n * As with the mixed sentinels, what the plan does internally is deliberately not\n * published here; only the wire vocabulary is contract.\n */\n/** UI/listing order — recommended (smart) first. */\nexport const VIDEO_ANALYSIS_TIER_ORDER = [\"smart\", \"pro\", \"fast\", \"mixed\", \"mixed-fast\"] as const\nexport type VideoAnalysisTier = (typeof VIDEO_ANALYSIS_TIER_ORDER)[number]\nexport const DEFAULT_VIDEO_ANALYSIS_TIER: VideoAnalysisTier = \"pro\"\nexport const DEFAULT_VIDEO_ANALYSIS_MODEL: string = VIDEO_ANALYSIS_TIERS[DEFAULT_VIDEO_ANALYSIS_TIER]\n/** Neutral, vendor-free display labels for the UI. */\nexport const VIDEO_ANALYSIS_TIER_LABELS: Record<VideoAnalysisTier, string> = {\n smart: \"Smart\",\n fast: \"Fast\",\n pro: \"Pro\",\n mixed: \"Mixed\",\n \"mixed-fast\": \"Mixed (consistent)\",\n}\n\nexport function isVideoAnalysisTier(v: string): v is VideoAnalysisTier {\n return (VIDEO_ANALYSIS_TIER_ORDER as readonly string[]).includes(v)\n}\n\nexport function isVideoAnalysisMixedTier(v: string): v is VideoAnalysisMixedTier {\n return (VIDEO_ANALYSIS_MIXED_TIERS as readonly string[]).includes(v)\n}\n\n/**\n * Resolve a user-supplied tier OR a raw internal model id to the analysis\n * ENGINE IDENTIFIER carried in the worker payload:\n * - model-backed tiers (\"fast\"/\"pro\") → the internal model id;\n * - mixed tiers (\"mixed\"/\"mixed-fast\") → the sentinel ITSELF (the engine\n * expands it to a multi-model roll plan);\n * - raw model ids pass through (back-compat for stored `llmModel` values);\n * - empty/unknown → the default tier's model (never an error).\n */\nexport function resolveVideoAnalysisModel(input?: string | null): string {\n if (input && isVideoAnalysisMixedTier(input)) return input\n if (input && Object.prototype.hasOwnProperty.call(VIDEO_ANALYSIS_TIERS, input)) {\n return VIDEO_ANALYSIS_TIERS[input as VideoAnalysisModelTier]\n }\n if (input && VIDEO_ANALYSIS_LLM_MODELS.includes(input)) return input\n return DEFAULT_VIDEO_ANALYSIS_MODEL\n}\n"]}
@@ -0,0 +1,155 @@
1
+ 'use strict';
2
+
3
+ var chunkHUR6ZJ7S_cjs = require('../chunk-HUR6ZJ7S.cjs');
4
+ var chunkVXPLKQWY_cjs = require('../chunk-VXPLKQWY.cjs');
5
+ require('../chunk-HRXEZ3SX.cjs');
6
+ require('../chunk-NEJ2PV4C.cjs');
7
+ require('../chunk-VA42637J.cjs');
8
+ require('../chunk-TU33KYKW.cjs');
9
+ require('../chunk-M7GQBRZU.cjs');
10
+ require('../chunk-K3LLGRK7.cjs');
11
+
12
+
13
+
14
+ Object.defineProperty(exports, "DEFAULT_TEMPLATE_CATEGORY", {
15
+ enumerable: true,
16
+ get: function () { return chunkHUR6ZJ7S_cjs.DEFAULT_TEMPLATE_CATEGORY; }
17
+ });
18
+ Object.defineProperty(exports, "HANDLE_PORT_SEPARATOR", {
19
+ enumerable: true,
20
+ get: function () { return chunkHUR6ZJ7S_cjs.HANDLE_PORT_SEPARATOR; }
21
+ });
22
+ Object.defineProperty(exports, "INPUT_FIELD_MAP", {
23
+ enumerable: true,
24
+ get: function () { return chunkHUR6ZJ7S_cjs.INPUT_FIELD_MAP; }
25
+ });
26
+ Object.defineProperty(exports, "LEGACY_TEMPLATE_CATEGORIES", {
27
+ enumerable: true,
28
+ get: function () { return chunkHUR6ZJ7S_cjs.LEGACY_TEMPLATE_CATEGORIES; }
29
+ });
30
+ Object.defineProperty(exports, "OAUTH_SCOPES", {
31
+ enumerable: true,
32
+ get: function () { return chunkHUR6ZJ7S_cjs.OAUTH_SCOPES; }
33
+ });
34
+ Object.defineProperty(exports, "OUTPUT_FIELD_MAP", {
35
+ enumerable: true,
36
+ get: function () { return chunkHUR6ZJ7S_cjs.OUTPUT_FIELD_MAP; }
37
+ });
38
+ Object.defineProperty(exports, "RECAST_SEGMENT_PACKS", {
39
+ enumerable: true,
40
+ get: function () { return chunkHUR6ZJ7S_cjs.RECAST_SEGMENT_PACKS; }
41
+ });
42
+ Object.defineProperty(exports, "TEMPLATE_CATEGORIES", {
43
+ enumerable: true,
44
+ get: function () { return chunkHUR6ZJ7S_cjs.TEMPLATE_CATEGORIES; }
45
+ });
46
+ Object.defineProperty(exports, "applyHandleInputOverride", {
47
+ enumerable: true,
48
+ get: function () { return chunkHUR6ZJ7S_cjs.applyHandleInputOverride; }
49
+ });
50
+ Object.defineProperty(exports, "findRestrictedPickerValue", {
51
+ enumerable: true,
52
+ get: function () { return chunkHUR6ZJ7S_cjs.findRestrictedPickerValue; }
53
+ });
54
+ Object.defineProperty(exports, "isHandleInputWired", {
55
+ enumerable: true,
56
+ get: function () { return chunkHUR6ZJ7S_cjs.isHandleInputWired; }
57
+ });
58
+ Object.defineProperty(exports, "isTemplateCategory", {
59
+ enumerable: true,
60
+ get: function () { return chunkHUR6ZJ7S_cjs.isTemplateCategory; }
61
+ });
62
+ Object.defineProperty(exports, "mergeExposedSettings", {
63
+ enumerable: true,
64
+ get: function () { return chunkHUR6ZJ7S_cjs.mergeExposedSettings; }
65
+ });
66
+ Object.defineProperty(exports, "normalizeTemplateCategory", {
67
+ enumerable: true,
68
+ get: function () { return chunkHUR6ZJ7S_cjs.normalizeTemplateCategory; }
69
+ });
70
+ Object.defineProperty(exports, "parseHandleId", {
71
+ enumerable: true,
72
+ get: function () { return chunkHUR6ZJ7S_cjs.parseHandleId; }
73
+ });
74
+ Object.defineProperty(exports, "resolveTemplateCategory", {
75
+ enumerable: true,
76
+ get: function () { return chunkHUR6ZJ7S_cjs.resolveTemplateCategory; }
77
+ });
78
+ Object.defineProperty(exports, "templateCategoryStoredValues", {
79
+ enumerable: true,
80
+ get: function () { return chunkHUR6ZJ7S_cjs.templateCategoryStoredValues; }
81
+ });
82
+ Object.defineProperty(exports, "INPUT_FIELD_EXTRA_KEYS", {
83
+ enumerable: true,
84
+ get: function () { return chunkVXPLKQWY_cjs.INPUT_FIELD_EXTRA_KEYS; }
85
+ });
86
+ Object.defineProperty(exports, "INPUT_NODE_TYPES", {
87
+ enumerable: true,
88
+ get: function () { return chunkVXPLKQWY_cjs.INPUT_NODE_TYPES; }
89
+ });
90
+ Object.defineProperty(exports, "LEGACY_EXPOSED_FIELD_KEYS", {
91
+ enumerable: true,
92
+ get: function () { return chunkVXPLKQWY_cjs.LEGACY_EXPOSED_FIELD_KEYS; }
93
+ });
94
+ Object.defineProperty(exports, "canonicalExposedFieldKey", {
95
+ enumerable: true,
96
+ get: function () { return chunkVXPLKQWY_cjs.canonicalExposedFieldKey; }
97
+ });
98
+ Object.defineProperty(exports, "canonicalizeOverrideKeys", {
99
+ enumerable: true,
100
+ get: function () { return chunkVXPLKQWY_cjs.canonicalizeOverrideKeys; }
101
+ });
102
+ Object.defineProperty(exports, "cleanOrphanedItems", {
103
+ enumerable: true,
104
+ get: function () { return chunkVXPLKQWY_cjs.cleanOrphanedItems; }
105
+ });
106
+ Object.defineProperty(exports, "flattenItems", {
107
+ enumerable: true,
108
+ get: function () { return chunkVXPLKQWY_cjs.flattenItems; }
109
+ });
110
+ Object.defineProperty(exports, "getInputFieldExtraKeys", {
111
+ enumerable: true,
112
+ get: function () { return chunkVXPLKQWY_cjs.getInputFieldExtraKeys; }
113
+ });
114
+ Object.defineProperty(exports, "getInputFieldSchema", {
115
+ enumerable: true,
116
+ get: function () { return chunkVXPLKQWY_cjs.getInputFieldSchema; }
117
+ });
118
+ Object.defineProperty(exports, "getInputNodes", {
119
+ enumerable: true,
120
+ get: function () { return chunkVXPLKQWY_cjs.getInputNodes; }
121
+ });
122
+ Object.defineProperty(exports, "getItemSortId", {
123
+ enumerable: true,
124
+ get: function () { return chunkVXPLKQWY_cjs.getItemSortId; }
125
+ });
126
+ Object.defineProperty(exports, "getNodeLabel", {
127
+ enumerable: true,
128
+ get: function () { return chunkVXPLKQWY_cjs.getNodeLabel; }
129
+ });
130
+ Object.defineProperty(exports, "getNodeResult", {
131
+ enumerable: true,
132
+ get: function () { return chunkVXPLKQWY_cjs.getNodeResult; }
133
+ });
134
+ Object.defineProperty(exports, "getOutputNodes", {
135
+ enumerable: true,
136
+ get: function () { return chunkVXPLKQWY_cjs.getOutputNodes; }
137
+ });
138
+ Object.defineProperty(exports, "getOutputType", {
139
+ enumerable: true,
140
+ get: function () { return chunkVXPLKQWY_cjs.getOutputType; }
141
+ });
142
+ Object.defineProperty(exports, "mergeNodeInputOverrides", {
143
+ enumerable: true,
144
+ get: function () { return chunkVXPLKQWY_cjs.mergeNodeInputOverrides; }
145
+ });
146
+ Object.defineProperty(exports, "migrateToItems", {
147
+ enumerable: true,
148
+ get: function () { return chunkVXPLKQWY_cjs.migrateToItems; }
149
+ });
150
+ Object.defineProperty(exports, "validateNoNestedGroups", {
151
+ enumerable: true,
152
+ get: function () { return chunkVXPLKQWY_cjs.validateNoNestedGroups; }
153
+ });
154
+ //# sourceMappingURL=apps.cjs.map
155
+ //# sourceMappingURL=apps.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"apps.cjs"}