@nodaro/shared 3.31.0 → 3.32.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 (372) hide show
  1. package/README.md +17 -0
  2. package/dist/chunk-2NIQO2J3.cjs +54 -0
  3. package/dist/chunk-2NIQO2J3.cjs.map +1 -0
  4. package/dist/chunk-2OJIVO7R.cjs +32 -0
  5. package/dist/chunk-2OJIVO7R.cjs.map +1 -0
  6. package/dist/chunk-2RF4Z7KG.cjs +803 -0
  7. package/dist/chunk-2RF4Z7KG.cjs.map +1 -0
  8. package/dist/chunk-3CUFITU7.js +1905 -0
  9. package/dist/chunk-3CUFITU7.js.map +1 -0
  10. package/dist/chunk-3RYKIUAE.js +86 -0
  11. package/dist/chunk-3RYKIUAE.js.map +1 -0
  12. package/dist/chunk-44I73CQS.cjs +194 -0
  13. package/dist/chunk-44I73CQS.cjs.map +1 -0
  14. package/dist/chunk-5AUSSJIM.cjs +3372 -0
  15. package/dist/chunk-5AUSSJIM.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-5THUHJ3E.js +46 -0
  21. package/dist/chunk-5THUHJ3E.js.map +1 -0
  22. package/dist/chunk-5U7VLG43.js +141 -0
  23. package/dist/chunk-5U7VLG43.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-6DKDOWBL.js +1567 -0
  27. package/dist/chunk-6DKDOWBL.js.map +1 -0
  28. package/dist/chunk-6IJOPRZP.cjs +197 -0
  29. package/dist/chunk-6IJOPRZP.cjs.map +1 -0
  30. package/dist/chunk-7G7G42KS.js +86 -0
  31. package/dist/chunk-7G7G42KS.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-AROWPFO2.js +773 -0
  35. package/dist/chunk-AROWPFO2.js.map +1 -0
  36. package/dist/chunk-AVQK77G6.cjs +2000 -0
  37. package/dist/chunk-AVQK77G6.cjs.map +1 -0
  38. package/dist/chunk-C57NEO3X.js +3327 -0
  39. package/dist/chunk-C57NEO3X.js.map +1 -0
  40. package/dist/chunk-CK3GK34R.js +1381 -0
  41. package/dist/chunk-CK3GK34R.js.map +1 -0
  42. package/dist/chunk-E2TGXG6X.cjs +1770 -0
  43. package/dist/chunk-E2TGXG6X.cjs.map +1 -0
  44. package/dist/chunk-EK362Q45.cjs +38 -0
  45. package/dist/chunk-EK362Q45.cjs.map +1 -0
  46. package/dist/chunk-FBV5DF6D.js +95 -0
  47. package/dist/chunk-FBV5DF6D.js.map +1 -0
  48. package/dist/chunk-FG4E7MTG.cjs +4 -0
  49. package/dist/chunk-FG4E7MTG.cjs.map +1 -0
  50. package/dist/chunk-G6IIVKMO.js +26 -0
  51. package/dist/chunk-G6IIVKMO.js.map +1 -0
  52. package/dist/chunk-HGC5JNVA.cjs +1503 -0
  53. package/dist/chunk-HGC5JNVA.cjs.map +1 -0
  54. package/dist/chunk-HSHCCBIV.js +255 -0
  55. package/dist/chunk-HSHCCBIV.js.map +1 -0
  56. package/dist/chunk-IEBZHTPE.js +254 -0
  57. package/dist/chunk-IEBZHTPE.js.map +1 -0
  58. package/dist/chunk-ISJDAFKS.js +1604 -0
  59. package/dist/chunk-ISJDAFKS.js.map +1 -0
  60. package/dist/chunk-J6KHW2E5.cjs +1963 -0
  61. package/dist/chunk-J6KHW2E5.cjs.map +1 -0
  62. package/dist/chunk-J7BMO73N.cjs +114 -0
  63. package/dist/chunk-J7BMO73N.cjs.map +1 -0
  64. package/dist/chunk-JL4C5VJ7.cjs +488 -0
  65. package/dist/chunk-JL4C5VJ7.cjs.map +1 -0
  66. package/dist/chunk-JSGIEF6Z.cjs +1087 -0
  67. package/dist/chunk-JSGIEF6Z.cjs.map +1 -0
  68. package/dist/chunk-JSNV5O2F.cjs +34 -0
  69. package/dist/chunk-JSNV5O2F.cjs.map +1 -0
  70. package/dist/chunk-JWA5SGCS.js +203 -0
  71. package/dist/chunk-JWA5SGCS.js.map +1 -0
  72. package/dist/chunk-JX5YZ4DH.cjs +430 -0
  73. package/dist/chunk-JX5YZ4DH.cjs.map +1 -0
  74. package/dist/chunk-KHCBJ7KD.js +42 -0
  75. package/dist/chunk-KHCBJ7KD.js.map +1 -0
  76. package/dist/chunk-KU6S7IYV.cjs +210 -0
  77. package/dist/chunk-KU6S7IYV.cjs.map +1 -0
  78. package/dist/chunk-LKAIXWK3.js +181 -0
  79. package/dist/chunk-LKAIXWK3.js.map +1 -0
  80. package/dist/chunk-LPW3XNC2.js +471 -0
  81. package/dist/chunk-LPW3XNC2.js.map +1 -0
  82. package/dist/chunk-M36G6SRP.js +447 -0
  83. package/dist/chunk-M36G6SRP.js.map +1 -0
  84. package/dist/chunk-MRXGWL42.cjs +4 -0
  85. package/dist/chunk-MRXGWL42.cjs.map +1 -0
  86. package/dist/chunk-NB72XWXQ.cjs +54 -0
  87. package/dist/chunk-NB72XWXQ.cjs.map +1 -0
  88. package/dist/chunk-NEJ2PV4C.cjs +211 -0
  89. package/dist/chunk-NEJ2PV4C.cjs.map +1 -0
  90. package/dist/chunk-NT6IJH4L.cjs +273 -0
  91. package/dist/chunk-NT6IJH4L.cjs.map +1 -0
  92. package/dist/chunk-O5MP52U2.cjs +526 -0
  93. package/dist/chunk-O5MP52U2.cjs.map +1 -0
  94. package/dist/chunk-O7PUQLJ3.cjs +818 -0
  95. package/dist/chunk-O7PUQLJ3.cjs.map +1 -0
  96. package/dist/chunk-PQHS255G.js +1369 -0
  97. package/dist/chunk-PQHS255G.js.map +1 -0
  98. package/dist/chunk-PRYE7AZQ.cjs +1227 -0
  99. package/dist/chunk-PRYE7AZQ.cjs.map +1 -0
  100. package/dist/chunk-Q4CDQ2KO.js +21 -0
  101. package/dist/chunk-Q4CDQ2KO.js.map +1 -0
  102. package/dist/chunk-QELDJGDK.cjs +1714 -0
  103. package/dist/chunk-QELDJGDK.cjs.map +1 -0
  104. package/dist/chunk-QJRP44ZO.js +769 -0
  105. package/dist/chunk-QJRP44ZO.js.map +1 -0
  106. package/dist/chunk-QNGNOU4Z.js +29 -0
  107. package/dist/chunk-QNGNOU4Z.js.map +1 -0
  108. package/dist/chunk-RJL7RCEM.cjs +159 -0
  109. package/dist/chunk-RJL7RCEM.cjs.map +1 -0
  110. package/dist/chunk-RN3RMBJZ.js +1164 -0
  111. package/dist/chunk-RN3RMBJZ.js.map +1 -0
  112. package/dist/chunk-S5DMKUWK.cjs +1273 -0
  113. package/dist/chunk-S5DMKUWK.cjs.map +1 -0
  114. package/dist/chunk-SES6GDBQ.cjs +624 -0
  115. package/dist/chunk-SES6GDBQ.cjs.map +1 -0
  116. package/dist/chunk-TNPDV7I4.cjs +2346 -0
  117. package/dist/chunk-TNPDV7I4.cjs.map +1 -0
  118. package/dist/chunk-TZBIY5C3.js +187 -0
  119. package/dist/chunk-TZBIY5C3.js.map +1 -0
  120. package/dist/chunk-TZE673G6.js +3 -0
  121. package/dist/chunk-TZE673G6.js.map +1 -0
  122. package/dist/chunk-ULXI7A6Q.cjs +1047 -0
  123. package/dist/chunk-ULXI7A6Q.cjs.map +1 -0
  124. package/dist/chunk-VIWSWVAW.js +1782 -0
  125. package/dist/chunk-VIWSWVAW.js.map +1 -0
  126. package/dist/chunk-VWGNPMJZ.cjs +19 -0
  127. package/dist/chunk-VWGNPMJZ.cjs.map +1 -0
  128. package/dist/chunk-WDIBOWAA.js +1054 -0
  129. package/dist/chunk-WDIBOWAA.js.map +1 -0
  130. package/dist/chunk-WNG7HRVA.cjs +25 -0
  131. package/dist/chunk-WNG7HRVA.cjs.map +1 -0
  132. package/dist/chunk-WNVQ3SMB.cjs +96 -0
  133. package/dist/chunk-WNVQ3SMB.cjs.map +1 -0
  134. package/dist/chunk-WRSWH7US.cjs +285 -0
  135. package/dist/chunk-WRSWH7US.cjs.map +1 -0
  136. package/dist/chunk-XAMC4S53.js +17 -0
  137. package/dist/chunk-XAMC4S53.js.map +1 -0
  138. package/dist/chunk-XNISPHTZ.js +1039 -0
  139. package/dist/chunk-XNISPHTZ.js.map +1 -0
  140. package/dist/chunk-Y2PM3FFL.js +3 -0
  141. package/dist/chunk-Y2PM3FFL.js.map +1 -0
  142. package/dist/chunk-YBPBK5KI.js +1030 -0
  143. package/dist/chunk-YBPBK5KI.js.map +1 -0
  144. package/dist/chunk-YHRG7UOC.js +31 -0
  145. package/dist/chunk-YHRG7UOC.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-Z4AZW6FY.js +920 -0
  153. package/dist/chunk-Z4AZW6FY.js.map +1 -0
  154. package/dist/chunk-ZDFHA2EC.js +572 -0
  155. package/dist/chunk-ZDFHA2EC.js.map +1 -0
  156. package/dist/chunk-ZNZDQAXN.js +175 -0
  157. package/dist/chunk-ZNZDQAXN.js.map +1 -0
  158. package/dist/chunk-ZRL2UFTH.cjs +1073 -0
  159. package/dist/chunk-ZRL2UFTH.cjs.map +1 -0
  160. package/dist/chunk-ZT77RY6R.js +404 -0
  161. package/dist/chunk-ZT77RY6R.js.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 +283 -0
  165. package/dist/entries/apps.d.ts +283 -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 +592 -0
  181. package/dist/entries/credits.cjs.map +1 -0
  182. package/dist/entries/credits.d.cts +1429 -0
  183. package/dist/entries/credits.d.ts +1429 -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 +247 -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 +1733 -0
  279. package/dist/entries/workflow.d.ts +1733 -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 +7731 -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-flJYaa-g.d.cts +561 -0
  295. package/dist/model-catalog-flJYaa-g.d.ts +561 -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-BIqiCzSA.d.cts +90 -0
  299. package/dist/presentation-utils-BdiObtwq.d.ts +90 -0
  300. package/dist/scene-node-types-DjenYFLO.d.cts +1949 -0
  301. package/dist/scene-node-types-DjenYFLO.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__/no-internal-imports.test.ts +1 -1
  314. package/src/__tests__/node-aspect-ratio.test.ts +25 -0
  315. package/src/__tests__/node-runtime-keys.test.ts +9 -0
  316. package/src/__tests__/package-entries.test.ts +50 -0
  317. package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
  318. package/src/__tests__/preview-gate-use-case.test.ts +151 -0
  319. package/src/__tests__/run-continuation.test.ts +7 -1
  320. package/src/__tests__/site-capture-node.test.ts +58 -0
  321. package/src/__tests__/ugc-lane-wires.test.ts +228 -0
  322. package/src/__tests__/ugc-node-wires.test.ts +9 -3
  323. package/src/__tests__/ugc-run-state.test.ts +5 -4
  324. package/src/__tests__/video-analysis-catalog-sync.test.ts +1 -1
  325. package/src/__tests__/video-analysis-pricing.test.ts +6 -6
  326. package/src/__tests__/voice-changer-pro-quote.test.ts +79 -0
  327. package/src/add-captions-plan.ts +9 -3
  328. package/src/caption-edge-dash.ts +33 -0
  329. package/src/credit-estimators/index.ts +22 -1
  330. package/src/credit-estimators/pitch-tempo.ts +15 -1
  331. package/src/credit-estimators/speech.ts +72 -4
  332. package/src/credit-estimators/unit-quote.ts +52 -0
  333. package/src/credit-estimators/video-sfx.ts +15 -0
  334. package/src/credit-estimators/voice-changer-pro-quote.ts +138 -0
  335. package/src/entity-image-handle.ts +2 -0
  336. package/src/entries/apps.ts +63 -0
  337. package/src/entries/captions.ts +34 -0
  338. package/src/entries/catalogs.ts +65 -0
  339. package/src/entries/credits.ts +104 -0
  340. package/src/entries/edl.ts +42 -0
  341. package/src/entries/entities.ts +144 -0
  342. package/src/entries/i18n.ts +31 -0
  343. package/src/entries/llm-models.ts +63 -0
  344. package/src/entries/media.ts +36 -0
  345. package/src/entries/model-catalog.ts +89 -0
  346. package/src/entries/models.ts +266 -0
  347. package/src/entries/nodes.ts +245 -0
  348. package/src/entries/organizations.ts +9 -0
  349. package/src/entries/pipeline.ts +43 -0
  350. package/src/entries/scene3d.ts +27 -0
  351. package/src/entries/social.ts +297 -0
  352. package/src/entries/types.ts +26 -0
  353. package/src/entries/ugc.ts +14 -0
  354. package/src/entries/video.ts +59 -0
  355. package/src/entries/workflow.ts +172 -0
  356. package/src/fan-out-rows.ts +2 -0
  357. package/src/index.ts +25 -1845
  358. package/src/json-kinds.ts +4 -0
  359. package/src/model-catalog.ts +36 -34
  360. package/src/node-mappable-fields.ts +1 -0
  361. package/src/node-run-routes.ts +2 -0
  362. package/src/node-runtime-keys.ts +8 -0
  363. package/src/normalize-node-params.ts +30 -0
  364. package/src/presentation-utils.ts +5 -0
  365. package/src/preview-gate.ts +92 -14
  366. package/src/producer-types.ts +16 -2
  367. package/src/run-continuation.ts +21 -0
  368. package/src/site-capture-node.ts +82 -0
  369. package/src/ugc-lane-wires.ts +246 -0
  370. package/src/ugc-node-wires.ts +37 -7
  371. package/src/ugc-run-state.ts +5 -3
  372. package/src/video-analysis-pricing.ts +31 -29
@@ -0,0 +1,1030 @@
1
+ // src/llm-models.ts
2
+ var LLM_REASONING_EFFORTS = ["none", "low", "medium", "high", "xhigh", "max"];
3
+ var EFFORT_TIER_BUMP = /* @__PURE__ */ new Set(["xhigh", "max"]);
4
+ var EFFORT_RANK = { none: 0, low: 1, medium: 2, high: 3, xhigh: 4, max: 5 };
5
+ var REASONING_OUTPUT_FLOOR = 32768;
6
+ function reasoningOutputFloor(model) {
7
+ return model.reasoningOutputFloor ?? REASONING_OUTPUT_FLOOR;
8
+ }
9
+ var LLM_MODELS = [
10
+ {
11
+ id: "gemini-3-flash",
12
+ displayName: "Gemini 3 Flash",
13
+ desc: "Fast and cheap, good for simple tasks",
14
+ tier: "economy",
15
+ kieFormat: "chat-completions",
16
+ kieSlugOrModel: "gemini-3-flash",
17
+ vendor: "google",
18
+ structuredOutputMode: "kie-response-format",
19
+ supportsImages: true,
20
+ maxOutputTokens: 8192,
21
+ // KIE-first: no `preferDirect` — direct is the reliability fallback only.
22
+ // (Per-lane rates are deliberately NOT in this published package; see
23
+ // backend/src/lib/pricing/llm-cost.ts.)
24
+ directGeminiModel: "gemini-3-flash-preview",
25
+ // No `reasoningEfforts` at all on the KIE lane, but the vendor API accepts
26
+ // the full minimal→high ladder (`none` maps to Google's `minimal`).
27
+ directReasoningEfforts: ["none", "low", "medium", "high"],
28
+ // Reasons with no thinking param sent — Google's Gemini 3 default (dynamic
29
+ // thinking; `minimal` is its floor, never off), measured on 3.6 in #1588.
30
+ // Floored at the KIE-safe 8192, the same intersection as `maxOutputTokens`.
31
+ thinkingDefaultOn: true,
32
+ reasoningOutputFloor: 8192
33
+ },
34
+ {
35
+ id: "gemini-3.6-flash",
36
+ displayName: "Gemini 3.6 Flash",
37
+ // Demoted 2026-09-06 alongside 3.7: superlatives belong to the CURRENT top
38
+ // model of a family only, and 3.8 now holds that slot.
39
+ desc: "Fast Gemini, sharper reasoning",
40
+ tier: "economy",
41
+ kieFormat: "chat-completions",
42
+ // KIE serves Gemini 3.6 Flash on the OpenAI-compatible dialect under this
43
+ // slug (docs.kie.ai/market/gemini/gemini-3-6-flash-openai.md) — same
44
+ // chat-completions path shape as gemini-3-flash, different slug prefix.
45
+ kieSlugOrModel: "gemini-3-6-flash-openai",
46
+ vendor: "google",
47
+ structuredOutputMode: "kie-response-format",
48
+ supportsImages: true,
49
+ maxOutputTokens: 8192,
50
+ // KIE's 3.6 endpoint accepts `reasoning_effort: low | high` (thinking
51
+ // level) — exactly the chat-completions wire mapping deriveParams sends.
52
+ // Google's own API additionally accepts `minimal` and `medium` on this
53
+ // model; the set stays at the KIE-safe intersection because ONE field
54
+ // feeds both lanes and this model is KIE-first. Widen it only if/when
55
+ // `preferDirect` is set here.
56
+ reasoningEfforts: ["low", "high"],
57
+ // Google's own API additionally accepts `minimal` and `medium` here —
58
+ // live-verified 2026-07-28. Advanced mode unlocks them.
59
+ directReasoningEfforts: ["none", "low", "medium", "high"],
60
+ // KIE-first: this model backs 5 of the LLM_FEATURE_DEFAULTS plus the
61
+ // video-analysis fast tier, so it carries the highest call volume of any
62
+ // Gemini entry — the lane with the lower unit cost wins by default and
63
+ // direct is the reliability fallback only.
64
+ directGeminiModel: "gemini-3.6-flash",
65
+ // Reasons with NO thinking param sent — measured, issue #1588: a Generate
66
+ // Text node capped at 1,100 tokens fell back to the direct lane (KIE 500),
67
+ // spent ~1,060 of them reasoning, and returned 120 characters cut mid-URL.
68
+ // On the same input the KIE runs used ~500 output tokens in all, so only
69
+ // the fallback runs broke — every other run of a 5-minute schedule.
70
+ // Floored at 8192, NOT the default 32768: the floor rides the KIE endpoint
71
+ // too, and 8192 is all it is known to take (see `maxOutputTokens`).
72
+ thinkingDefaultOn: true,
73
+ reasoningOutputFloor: 8192
74
+ },
75
+ {
76
+ id: "gemini-3.7-flash",
77
+ displayName: "Gemini 3.7 Flash",
78
+ // Demoted 2026-09-06 when 3.8 registered below: superlatives belong to the
79
+ // CURRENT top model of a family only (same rule the Opus entries follow) —
80
+ // `desc` renders in every picker, so leaving "Newest" on the older flash
81
+ // steers the A/B's traffic backwards.
82
+ desc: "Fast Gemini, agentic-tuned",
83
+ tier: "economy",
84
+ kieFormat: "chat-completions",
85
+ // KIE serves it on the OpenAI-compatible dialect under this slug
86
+ // (docs.kie.ai/market/gemini/gemini-3-7-flash-openai.md) — same
87
+ // chat-completions path shape as gemini-3.6-flash.
88
+ kieSlugOrModel: "gemini-3-7-flash-openai",
89
+ vendor: "google",
90
+ structuredOutputMode: "kie-response-format",
91
+ supportsImages: true,
92
+ // Google's own cap is 65,536, but the field feeds BOTH lanes and the KIE
93
+ // flash endpoints cap at 8192 (the measured 3.6 posture) — stay at the
94
+ // KIE-safe intersection, same reasoning as `reasoningEfforts` below.
95
+ maxOutputTokens: 8192,
96
+ // KIE's 3.7 endpoint enumerates reasoning_effort low | high (verified
97
+ // against its OpenAPI spec 2026-08-18), identical to 3.6.
98
+ reasoningEfforts: ["low", "high"],
99
+ // Assumed parity with 3.6 pending a live probe on the direct lane.
100
+ directReasoningEfforts: ["none", "low", "medium", "high"],
101
+ directGeminiModel: "gemini-3.7-flash",
102
+ // Gemini 3 default: reasons with no thinking param sent (measured on 3.6,
103
+ // #1588). KIE-safe floor, same intersection as `maxOutputTokens`.
104
+ thinkingDefaultOn: true,
105
+ reasoningOutputFloor: 8192
106
+ },
107
+ {
108
+ id: "gemini-3.8-flash",
109
+ displayName: "Gemini 3.8 Flash",
110
+ // Inherits "Newest" from 3.7 (demoted above). Deliberately does NOT name
111
+ // agentic video: that capability exists only on the direct Google lane
112
+ // (Interactions API, not wired here) and the modality caps below withhold
113
+ // video — a picker desc must not promise a lever this entry cannot expose.
114
+ desc: "Newest fast Gemini, agentic-tuned",
115
+ tier: "economy",
116
+ kieFormat: "chat-completions",
117
+ // KIE serves it on the OpenAI-compatible dialect under this slug
118
+ // (docs.kie.ai/market/gemini/gemini-3-8-flash-openai.md) — identical
119
+ // chat-completions path shape to gemini-3.7-flash / gemini-3.6-flash,
120
+ // different slug prefix.
121
+ kieSlugOrModel: "gemini-3-8-flash-openai",
122
+ vendor: "google",
123
+ // Live-verified 2026-09-06 on the KIE lane: `response_format: json_schema`
124
+ // is ENFORCED (the reply came back exact-schema valid, credits_consumed
125
+ // present) — not merely accepted-and-ignored.
126
+ structuredOutputMode: "kie-response-format",
127
+ supportsImages: true,
128
+ // 16384 here, NOT the 8192 its 3.6 / 3.7 siblings sit at. Those two stay at
129
+ // the KIE-safe intersection because nobody measured their endpoints past
130
+ // it; 3.8's WAS measured — live-verified 2026-09-06, `max_tokens: 20000`
131
+ // was honored for 14,892 completion tokens with finish_reason "stop" (no
132
+ // truncation), so the KIE lane is not the binding constraint. 16384 keeps
133
+ // it level with the rest of the registry's ceiling rather than at the cap.
134
+ maxOutputTokens: 16384,
135
+ // KIE's 3.8 endpoint enumerates reasoning_effort low | high (its doc enum),
136
+ // and usage carries completion_tokens_details.reasoning_tokens — same
137
+ // KIE-safe intersection as 3.6 / 3.7, because ONE field feeds both lanes
138
+ // and this model is KIE-first.
139
+ reasoningEfforts: ["low", "high"],
140
+ // Google's own API accepts the full minimal→high ladder here (`none` maps
141
+ // to `minimal`), same as 3.7. Advanced mode is what unlocks it.
142
+ directReasoningEfforts: ["none", "low", "medium", "high"],
143
+ // KIE-first (no `preferDirect`) — 3.7's posture exactly: the cheap lane
144
+ // serves the A/B, direct is Advanced mode + the reliability fallback.
145
+ directGeminiModel: "gemini-3.8-flash",
146
+ // Gemini 3 default: reasons with no thinking param sent (measured on 3.6,
147
+ // #1588). Floored at its own 16384, inside the 20000 its KIE endpoint was
148
+ // measured to honour.
149
+ thinkingDefaultOn: true,
150
+ reasoningOutputFloor: 16384
151
+ },
152
+ {
153
+ id: "claude-haiku-4.5",
154
+ displayName: "Claude Haiku 4.5",
155
+ // Demoted 2026-10-10 when claude-haiku-5.5 registered.
156
+ desc: "Previous Haiku, fast economy",
157
+ tier: "economy",
158
+ kieFormat: "messages",
159
+ kieSlugOrModel: "claude-haiku-4-5",
160
+ vendor: "anthropic",
161
+ structuredOutputMode: "anthropic-tool",
162
+ supportsImages: true,
163
+ maxOutputTokens: 8192,
164
+ directFallbackModel: "claude-haiku-4-5-20251001",
165
+ // KIE-first since 2026-10-08 (a call is priced on the lane it runs on);
166
+ // KIE served it plain and with a tool on its streaming wire that day.
167
+ preferKie: true
168
+ },
169
+ {
170
+ id: "claude-haiku-5.5",
171
+ displayName: "Claude Haiku 5.5",
172
+ desc: "Latest Haiku, fast and low-cost with reasoning",
173
+ tier: "economy",
174
+ kieFormat: "messages",
175
+ // KIE plain id on the Claude-native messages dialect
176
+ // (docs.kie.ai/market/claude/claude-haiku-5-5.md). Live-probed 2026-10-10
177
+ // on the streaming wire: plain, system prompt, base64 image, a forced tool
178
+ // and an auto + strict tool (both came back as a real tool_use block), and
179
+ // `max_tokens: 32768` were all served.
180
+ kieSlugOrModel: "claude-haiku-5-5",
181
+ vendor: "anthropic",
182
+ structuredOutputMode: "anthropic-tool",
183
+ // NO `supportsForcedToolChoice: false`, unlike Sonnet 5.5 / Opus 5.5: this
184
+ // model ACCEPTS a forced tool_choice (probed on Anthropic's API 2026-10-10).
185
+ // A forced call skips thinking (same usage with and without an effort), and
186
+ // an effort-bearing structured call is already sent the auto choice.
187
+ //
188
+ // A thinking block is valid only while everything before it is unchanged
189
+ // (vendor docs: the same history check the other 5.5 models run).
190
+ conversationBoundThinking: true,
191
+ supportsImages: true,
192
+ maxOutputTokens: 16384,
193
+ directFallbackModel: "claude-haiku-5-5",
194
+ // The first Haiku with effort levels. The vendor default is `medium`, where
195
+ // most of the family defaults to `high`.
196
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
197
+ // KIE ignores effort on this slug too — measured 2026-10-10 on a
198
+ // reasoning-heavy prompt: none / low / max / KIE's own `thinkingFlag` gave
199
+ // 2,076 / 1,886 / 2,223 / 1,927 output tokens and no thinking block, while
200
+ // Anthropic's API gave 2,059 at low and 28,097 at max. An effort call runs
201
+ // direct and bills as Advanced.
202
+ effortRequiresDirect: true,
203
+ // Anthropic 400s a non-default sampling value ("`temperature` is deprecated
204
+ // for this model", probed 2026-10-10); KIE's proxy accepted temperature: 0.2.
205
+ supportsTemperature: false,
206
+ preferKie: true,
207
+ // Adaptive thinking runs when no thinking param is sent (vendor default),
208
+ // on BOTH lanes: a no-effort KIE call spent ~2,000 output tokens on a
209
+ // ~350-token answer and returned no thinking block.
210
+ thinkingDefaultOn: true
211
+ },
212
+ {
213
+ id: "claude-sonnet-4.6",
214
+ displayName: "Claude Sonnet 4.6",
215
+ desc: "Balanced quality and speed",
216
+ tier: "standard",
217
+ kieFormat: "messages",
218
+ kieSlugOrModel: "claude-sonnet-4-6",
219
+ vendor: "anthropic",
220
+ structuredOutputMode: "anthropic-tool",
221
+ supportsImages: true,
222
+ maxOutputTokens: 16384,
223
+ directFallbackModel: "claude-sonnet-4-6",
224
+ // KIE-first since 2026-10-08 (a call is priced on the lane it runs on);
225
+ // KIE served it plain and with a tool on its streaming wire that day.
226
+ preferKie: true,
227
+ reasoningEfforts: ["low", "medium", "high", "max"],
228
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
229
+ effortRequiresDirect: true
230
+ },
231
+ {
232
+ id: "gpt-5.2",
233
+ displayName: "GPT-5.2",
234
+ desc: "Strong general purpose",
235
+ tier: "standard",
236
+ kieFormat: "chat-completions",
237
+ kieSlugOrModel: "gpt-5-2",
238
+ vendor: "openai",
239
+ supportsImages: true,
240
+ maxOutputTokens: 16384
241
+ },
242
+ {
243
+ id: "gemini-3.1-pro",
244
+ displayName: "Gemini 3.1 Pro",
245
+ desc: "Advanced reasoning, large context",
246
+ tier: "premium",
247
+ kieFormat: "chat-completions",
248
+ kieSlugOrModel: "gemini-3.1-pro",
249
+ vendor: "google",
250
+ structuredOutputMode: "kie-response-format",
251
+ supportsImages: true,
252
+ maxOutputTokens: 16384,
253
+ directGeminiModel: "gemini-3.1-pro-preview",
254
+ // Google documents low/medium/high for 3.1 Pro — no `minimal` tier, so
255
+ // this ladder is deliberately shorter than the flash models'.
256
+ directReasoningEfforts: ["low", "medium", "high"],
257
+ // NO `reasoningEfforts` (the proxied ladder) ON PURPOSE, not an omission.
258
+ // That endpoint accepts `reasoning_effort: low | high` and already DEFAULTS
259
+ // to "high", so leaving it unset gets its deepest setting and a ladder here
260
+ // would unlock nothing. The two lanes are NOT equivalent at their maxima:
261
+ // verified 2026-07-29 on identical input, the proxy's ceiling produces
262
+ // roughly a quarter of the reasoning tokens that the direct lane's
263
+ // `thinkingLevel: HIGH` does, and it does not expose Google's deeper tiers
264
+ // at all. That difference is visible in fine-detail reading (small on-screen
265
+ // text such as a name badge), which is exactly what video-analysis casts
266
+ // identities from — so adding an entry here would silently move analysis to
267
+ // the shallower lane. Don't. Full comparison lives with the analysis engine.
268
+ // KIE-first since 2026-10-08 (decided: a call is priced on the lane it runs
269
+ // on, so the base premium price buys the KIE lane; the direct lane is
270
+ // Advanced mode, billed `premium-direct`). It was the one direct-first
271
+ // Gemini before. What the direct lane buys, now behind Advanced: real
272
+ // `thinkingLevel` control, native media ingestion, and a `responseJsonSchema`
273
+ // that honours `additionalProperties` (KIE's `response_format` silently DROPS
274
+ // record/map-shaped fields — see the z.record rule in backend/CLAUDE.md).
275
+ // Video-analysis is unaffected: it pins `requireLane: "direct"` itself.
276
+ // Reasons with no thinking param sent on both lanes — the proxied endpoint
277
+ // DEFAULTS to "high" (above), and the direct lane reasons harder still.
278
+ // Floored at its own 16384: its KIE fallback is not known to take more.
279
+ thinkingDefaultOn: true,
280
+ reasoningOutputFloor: 16384
281
+ },
282
+ {
283
+ id: "claude-opus-4.7",
284
+ displayName: "Claude Opus 4.7",
285
+ // Superlatives belong to the CURRENT top model only — `desc` renders in every
286
+ // model picker, so leaving "highest quality" on an older Opus steers
287
+ // quality-critical work backwards (all three Opus entries bill premium, so
288
+ // the mis-steer is invisible on the invoice).
289
+ desc: "Older Opus, complex tasks",
290
+ tier: "premium",
291
+ kieFormat: "messages",
292
+ kieSlugOrModel: "claude-opus-4-7",
293
+ vendor: "anthropic",
294
+ structuredOutputMode: "anthropic-tool",
295
+ supportsImages: true,
296
+ maxOutputTokens: 16384,
297
+ directFallbackModel: "claude-opus-4-7",
298
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
299
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
300
+ effortRequiresDirect: true,
301
+ supportsTemperature: false,
302
+ preferKie: true
303
+ },
304
+ {
305
+ id: "gpt-5.4",
306
+ displayName: "GPT-5.4",
307
+ // Demoted 2026-09-06: two GPT generations have shipped above it, so
308
+ // "Latest" steered the picker at the oldest premium GPT in the registry.
309
+ desc: "Older GPT, premium quality",
310
+ tier: "premium",
311
+ kieFormat: "responses",
312
+ kieSlugOrModel: "gpt-5-4",
313
+ vendor: "openai",
314
+ structuredOutputMode: "responses-json-schema",
315
+ supportsImages: true,
316
+ maxOutputTokens: 16384,
317
+ reasoningEfforts: ["low", "medium", "high"]
318
+ },
319
+ {
320
+ id: "gpt-5.5",
321
+ displayName: "GPT-5.5",
322
+ desc: "Previous flagship GPT, deep reasoning",
323
+ tier: "premium",
324
+ kieFormat: "responses",
325
+ kieSlugOrModel: "gpt-5-5",
326
+ vendor: "openai",
327
+ structuredOutputMode: "responses-json-schema",
328
+ supportsImages: true,
329
+ maxOutputTokens: 16384,
330
+ reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
331
+ supportsTemperature: false
332
+ },
333
+ {
334
+ id: "gpt-5.6-luna",
335
+ displayName: "GPT-5.6 Luna",
336
+ desc: "Fastest GPT-5.6, high-volume workloads",
337
+ tier: "economy",
338
+ kieFormat: "responses",
339
+ kieSlugOrModel: "gpt-5-6-luna",
340
+ vendor: "openai",
341
+ structuredOutputMode: "responses-json-schema",
342
+ supportsImages: true,
343
+ maxOutputTokens: 16384,
344
+ reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
345
+ supportsTemperature: false
346
+ },
347
+ {
348
+ id: "gpt-5.6-terra",
349
+ displayName: "GPT-5.6 Terra",
350
+ desc: "Balanced GPT-5.6 for production work",
351
+ tier: "standard",
352
+ kieFormat: "responses",
353
+ kieSlugOrModel: "gpt-5-6-terra",
354
+ vendor: "openai",
355
+ structuredOutputMode: "responses-json-schema",
356
+ supportsImages: true,
357
+ maxOutputTokens: 16384,
358
+ reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
359
+ supportsTemperature: false
360
+ },
361
+ {
362
+ id: "gpt-5.6-sol",
363
+ displayName: "GPT-5.6 Sol",
364
+ // Demoted 2026-09-06 when gpt-6-astra registered below — "Flagship /
365
+ // deepest" is the current top GPT's copy only. Worded to stay distinct
366
+ // from gpt-5.5's "Previous flagship GPT, deep reasoning": all three read
367
+ // premium on the invoice, so a stale superlative mis-steers silently.
368
+ desc: "Previous flagship GPT-5.6, deep reasoning",
369
+ tier: "premium",
370
+ kieFormat: "responses",
371
+ kieSlugOrModel: "gpt-5-6-sol",
372
+ vendor: "openai",
373
+ structuredOutputMode: "responses-json-schema",
374
+ supportsImages: true,
375
+ maxOutputTokens: 16384,
376
+ reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
377
+ supportsTemperature: false,
378
+ // SERVED COLLAPSED, on the astra precedent (2026-09-17). The 2026-07-14
379
+ // verification that KIE's non-stream responses endpoint serves the GPT-5.6
380
+ // family reliably no longer holds: a live call — a recast continuity
381
+ // review, ~3k tokens, `reasoning.effort: high`, `text.format: json_schema`
382
+ // — came back `500 {"error":{"type":"server_error"}}` / "Server exception,
383
+ // please try again later". Same endpoint family, same dialect and the same
384
+ // signature astra was measured on (12 calls: non-stream 2/6, streaming
385
+ // 5/6; a schema-less non-stream call 500'd too, so the lane is the trigger
386
+ // and not the schema). ONE sighting here rather than a fresh 12-call probe
387
+ // — the precedent is strong and the flag is cheap to reverse.
388
+ //
389
+ // THE COST: SSE does not reliably carry `credits_consumed`, so this model's
390
+ // provider cost becomes the rate-table estimate instead of the billed
391
+ // figure. That is the price of a lane that answers, and it is the same
392
+ // trade astra already makes.
393
+ kieCollapseStream: true
394
+ },
395
+ {
396
+ id: "gpt-6-astra",
397
+ displayName: "GPT-6 Astra",
398
+ desc: "Flagship GPT-6, deepest reasoning",
399
+ tier: "premium",
400
+ kieFormat: "responses",
401
+ // KIE serves GPT-6 on the responses dialect under the OpenAI family path —
402
+ // codex/v1/responses, which llm-client DERIVES from `vendor` (the same
403
+ // derivation that keeps Grok on grok/v1/responses). So this field is the
404
+ // body `model` only, not a path segment. Live-verified 2026-09-06 on the
405
+ // streaming path (array `input`, SSE deltas), which is the ONLY path we
406
+ // serve it on — see `kieCollapseStream` below. The non-stream reply does
407
+ // carry `credits_consumed` (and cached_tokens/cache_write_tokens in usage)
408
+ // on the ~1 call in 3 that returns one, but we no longer take that reply,
409
+ // so provider cost here is the rate-table estimate.
410
+ // KIE's codex/v1/responses injects its own Codex-agent `instructions`
411
+ // prompt ABOVE the caller's `developer` message — observed in the
412
+ // 2026-07-14 live probe of that endpoint, and unchanged for GPT-6. Budget
413
+ // for it when a developer message has to dominate.
414
+ kieSlugOrModel: "gpt-6-astra",
415
+ vendor: "openai",
416
+ // Live-verified 2026-09-06: `text.format: json_schema` is passed through
417
+ // and ENFORCED — the server echoed `strict: true` and returned
418
+ // schema-valid JSON.
419
+ structuredOutputMode: "responses-json-schema",
420
+ // text + image + file inputs per KIE's doc. No video/audio — see the
421
+ // image-only LLM_MODALITY_CAPS row below.
422
+ supportsImages: true,
423
+ maxOutputTokens: 16384,
424
+ // KIE's documented enum for this endpoint. No `none` on purpose: the
425
+ // endpoint reasons unconditionally (see thinkingDefaultOn below), so a
426
+ // "none" level would be a lie the wire silently overrides.
427
+ reasoningEfforts: ["low", "medium", "high", "xhigh"],
428
+ // Live-probed 2026-09-06: `temperature: 0.2` was sent and the request echo
429
+ // stayed at 1.0 — silently IGNORED, so never send it. Same treatment as the
430
+ // GPT-5.6 family and grok-4.6.
431
+ supportsTemperature: false,
432
+ // With NO reasoning param sent, the server echoed effort "medium" — it
433
+ // reasons by default (2026-09-06), so reasoning tokens share `max_tokens`
434
+ // on EVERY call, not just effort-bearing ones. Consumers must floor output
435
+ // headroom off this flag or a premium answer truncates into a paid-for
436
+ // empty reply.
437
+ thinkingDefaultOn: true,
438
+ // Measured 2026-09-06, 12 identical requests (developer + user message,
439
+ // reasoning.effort low, text.format json_schema): `stream: false`
440
+ // succeeded 2/6 in 4–5 s and 500'd 4/6 with
441
+ // {"error":{"type":"server_error"}} after 34, 34, 35 and 64 s, while the
442
+ // same body with `stream: true` succeeded 5/6 in the same 4–5 s. An
443
+ // earlier non-stream probe timed out at 90 s with 0 bytes, and a
444
+ // non-stream call WITHOUT a schema 500'd after 65 s — the schema is not
445
+ // the trigger, the non-stream lane is. The very same endpoint serves
446
+ // gpt-5.4/5.5/5.6 non-stream reliably (live-verified 2026-07-14), which is
447
+ // why this is per-model and not a lane-wide flag.
448
+ kieCollapseStream: true
449
+ },
450
+ // ── GPT-6 Luna / Sol / 6.1 Sol ────────────────────────────────────────────
451
+ // Same KIE endpoint and dialect as gpt-6-astra (codex/v1/responses; the doc
452
+ // pages differ only in the model name). Live-probed 2026-10-08, per model:
453
+ // `text.format` json_schema ENFORCED (echo `strict: true`, schema-valid
454
+ // reply), `temperature: 0.2` echoed back as 1 → silently ignored, no
455
+ // reasoning param → echo "medium" (reasons by default), and data-URI vision.
456
+ // Unlike astra, the NON-stream lane served them reliably — luna 10/10 and sol
457
+ // 10/10, 6.1 sol 8/8 at levels other than `none` (incl. 4 long structured
458
+ // calls each, 500–1,500 output tokens) — so none of them is collapsed:
459
+ // `credits_consumed` stays the real provider charge.
460
+ // Their ladder is WIDER than astra's doc-enum one: `none` and `max` were each
461
+ // sent and echoed back by the endpoint (6.1 sol excepted below).
462
+ {
463
+ id: "gpt-6-luna",
464
+ displayName: "GPT-6 Luna",
465
+ desc: "Fastest GPT-6, high-volume workloads",
466
+ tier: "economy",
467
+ kieFormat: "responses",
468
+ kieSlugOrModel: "gpt-6-luna",
469
+ vendor: "openai",
470
+ structuredOutputMode: "responses-json-schema",
471
+ supportsImages: true,
472
+ maxOutputTokens: 16384,
473
+ reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
474
+ supportsTemperature: false,
475
+ thinkingDefaultOn: true
476
+ },
477
+ {
478
+ id: "gpt-6-sol",
479
+ displayName: "GPT-6 Sol",
480
+ desc: "Strong GPT-6, deep reasoning at lower cost",
481
+ // Premium by decision (2026-10-08), not by unit cost — "Sol" is the
482
+ // deep-reasoning rung of the family, and gpt-5.6-sol bills premium too.
483
+ tier: "premium",
484
+ kieFormat: "responses",
485
+ kieSlugOrModel: "gpt-6-sol",
486
+ vendor: "openai",
487
+ structuredOutputMode: "responses-json-schema",
488
+ supportsImages: true,
489
+ maxOutputTokens: 16384,
490
+ reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
491
+ supportsTemperature: false,
492
+ thinkingDefaultOn: true
493
+ },
494
+ {
495
+ id: "gpt-6.1-sol",
496
+ displayName: "GPT-6.1 Sol",
497
+ // Measured slow: 30–76 s for 500–1,100 output tokens (2026-10-08), roughly
498
+ // twice gpt-6-sol on the same request — say so where the picker shows it.
499
+ desc: "Newest GPT-6 Sol, thorough but slower",
500
+ tier: "premium",
501
+ kieFormat: "responses",
502
+ kieSlugOrModel: "gpt-6-1-sol",
503
+ vendor: "openai",
504
+ structuredOutputMode: "responses-json-schema",
505
+ supportsImages: true,
506
+ maxOutputTokens: 16384,
507
+ // NO `none`: every probe at `reasoning.effort: none` failed (502, a 120 s
508
+ // timeout, 502, 429 — 0/4, 2026-10-08) while every other level answered,
509
+ // and the same request at `none` succeeded on luna and sol. Clamping maps a
510
+ // `none` request to nothing sent (Auto) rather than to a level that fails.
511
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
512
+ supportsTemperature: false,
513
+ thinkingDefaultOn: true
514
+ },
515
+ {
516
+ id: "grok-4.6",
517
+ displayName: "Grok 4.6",
518
+ // Demoted 2026-10-08 when grok-4.7 registered — the flagship copy moved up.
519
+ desc: "Previous Grok, strong reasoning",
520
+ tier: "standard",
521
+ kieFormat: "responses",
522
+ // KIE serves Grok on the responses dialect under its own family path —
523
+ // grok/v1/responses, NOT codex/v1/responses (llm-client derives the path
524
+ // from `vendor`). Live-verified end-to-end 2026-08-18: array `input`,
525
+ // `developer` system role, `input_image` URL vision, `text.format`
526
+ // json_schema enforcement, SSE `response.output_text.delta` stream, and
527
+ // `credits_consumed` actual-cost capture. (grok-4.5 was deferred 2026-07-13
528
+ // because none of this was live; 4.6 is its activation.)
529
+ kieSlugOrModel: "grok-4-6",
530
+ vendor: "xai",
531
+ structuredOutputMode: "responses-json-schema",
532
+ supportsImages: true,
533
+ maxOutputTokens: 16384,
534
+ // KIE's documented enum, each level live-verified (echoed back) 2026-08-18.
535
+ // No `none`: the endpoint reasons unconditionally (see thinkingDefaultOn).
536
+ reasoningEfforts: ["low", "medium", "high", "xhigh"],
537
+ // Live-probed 2026-08-18: `temperature` is silently IGNORED (request echo
538
+ // stays at the 0.7 default), so never send it — same treatment as GPT-5.5+.
539
+ supportsTemperature: false,
540
+ // Reasons with NO reasoning param sent (effort defaults to "low" server-side
541
+ // — a trivial probe spent 169 of 170 output tokens on reasoning), so every
542
+ // call needs output headroom, not just xhigh.
543
+ thinkingDefaultOn: true
544
+ },
545
+ {
546
+ id: "grok-4.7",
547
+ displayName: "Grok 4.7",
548
+ desc: "xAI flagship, strong reasoning",
549
+ tier: "standard",
550
+ kieFormat: "responses",
551
+ // Same grok/v1/responses family path and wire as grok-4.6 (the KIE doc
552
+ // pages differ only in the model name). Live-probed 2026-10-08: non-stream
553
+ // 6/6, `text.format` json_schema enforced, data-URI vision, SSE deltas.
554
+ kieSlugOrModel: "grok-4-7",
555
+ vendor: "xai",
556
+ structuredOutputMode: "responses-json-schema",
557
+ supportsImages: true,
558
+ maxOutputTokens: 16384,
559
+ // 4.6's ladder. `none` is NOT honoured: the endpoint echoed it back as
560
+ // "minimal" and still reasoned (33 of 35 output tokens), so offering it
561
+ // would promise a lever the wire overrides.
562
+ reasoningEfforts: ["low", "medium", "high", "xhigh"],
563
+ // `temperature: 0.2` → echo stayed at the 0.7 default: ignored.
564
+ supportsTemperature: false,
565
+ // "Capital of France" with no reasoning param spent 310 of 311 output
566
+ // tokens reasoning.
567
+ thinkingDefaultOn: true
568
+ },
569
+ {
570
+ id: "claude-sonnet-5",
571
+ displayName: "Claude Sonnet 5",
572
+ // Demoted 2026-10-08 when claude-sonnet-5.5 registered.
573
+ desc: "Previous Sonnet, near-Opus quality",
574
+ tier: "standard",
575
+ kieFormat: "messages",
576
+ kieSlugOrModel: "claude-sonnet-5",
577
+ vendor: "anthropic",
578
+ structuredOutputMode: "anthropic-tool",
579
+ supportsImages: true,
580
+ maxOutputTokens: 16384,
581
+ directFallbackModel: "claude-sonnet-5",
582
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
583
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
584
+ effortRequiresDirect: true,
585
+ supportsTemperature: false,
586
+ preferKie: true
587
+ },
588
+ {
589
+ id: "claude-sonnet-5.5",
590
+ displayName: "Claude Sonnet 5.5",
591
+ desc: "Latest Sonnet, near-Opus quality at Sonnet cost",
592
+ tier: "standard",
593
+ kieFormat: "messages",
594
+ // KIE serves it on the Claude-native messages dialect under its plain id
595
+ // (docs.kie.ai/market/claude/claude-sonnet-5-5.md — the page is
596
+ // claude-opus-5's with the model name swapped). Live-probed 2026-10-08 on
597
+ // the streaming wire: plain, effort, and forced/auto+strict tool calls all
598
+ // answered.
599
+ kieSlugOrModel: "claude-sonnet-5-5",
600
+ vendor: "anthropic",
601
+ structuredOutputMode: "anthropic-tool",
602
+ // Anthropic 400s a forced tool_choice on this model. KIE's proxy happened
603
+ // to accept one in the probe, but the direct lane is where every
604
+ // effort-bearing and every streamed structured call goes.
605
+ supportsForcedToolChoice: false,
606
+ conversationBoundThinking: true,
607
+ supportsImages: true,
608
+ maxOutputTokens: 16384,
609
+ directFallbackModel: "claude-sonnet-5-5",
610
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
611
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
612
+ effortRequiresDirect: true,
613
+ // Anthropic rejects non-default sampling values on this model (KIE's proxy
614
+ // accepted temperature: 0.2 in the probe; the direct lane is the contract).
615
+ supportsTemperature: false,
616
+ preferKie: true,
617
+ // Adaptive thinking runs when no thinking param is sent (vendor default).
618
+ thinkingDefaultOn: true
619
+ },
620
+ {
621
+ id: "claude-opus-4.8",
622
+ displayName: "Claude Opus 4.8",
623
+ desc: "Previous-gen Opus, long-horizon work",
624
+ tier: "premium",
625
+ kieFormat: "messages",
626
+ kieSlugOrModel: "claude-opus-4-8",
627
+ vendor: "anthropic",
628
+ structuredOutputMode: "anthropic-tool",
629
+ supportsImages: true,
630
+ maxOutputTokens: 16384,
631
+ directFallbackModel: "claude-opus-4-8",
632
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
633
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
634
+ effortRequiresDirect: true,
635
+ supportsTemperature: false,
636
+ preferKie: true
637
+ },
638
+ {
639
+ id: "claude-opus-5",
640
+ displayName: "Claude Opus 5",
641
+ // Demoted 2026-10-08 when claude-opus-5.5 registered.
642
+ desc: "Previous Opus, deep agentic reasoning",
643
+ tier: "premium",
644
+ kieFormat: "messages",
645
+ // KIE serves Opus 5 on the Claude-native messages dialect under the plain
646
+ // id (docs.kie.ai/market/claude/claude-opus-5.md) — same path shape as
647
+ // claude-opus-4-8 / claude-fable-5.
648
+ kieSlugOrModel: "claude-opus-5",
649
+ vendor: "anthropic",
650
+ structuredOutputMode: "anthropic-tool",
651
+ supportsImages: true,
652
+ maxOutputTokens: 16384,
653
+ directFallbackModel: "claude-opus-5",
654
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
655
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
656
+ effortRequiresDirect: true,
657
+ supportsTemperature: false,
658
+ preferKie: true,
659
+ // Opus 5 reasons with NO thinking param sent (vendor default flipped from
660
+ // Opus 4.8/4.7) — so every call needs output headroom, not just xhigh/max.
661
+ thinkingDefaultOn: true
662
+ },
663
+ {
664
+ id: "claude-opus-5.5",
665
+ displayName: "Claude Opus 5.5",
666
+ // Positioned as Fable-class (decided 2026-10-08: offered wherever Fable is).
667
+ desc: "Latest Opus, frontier-class reasoning",
668
+ tier: "premium",
669
+ kieFormat: "messages",
670
+ // KIE plain id on the messages dialect (docs.kie.ai/market/claude/
671
+ // claude-opus-5-5 — claude-opus-5's page with the name swapped).
672
+ // Live-probed 2026-10-08 on the streaming wire (plain + effort); the KIE
673
+ // Claude lane was erroring for claude-opus-5 too during the tool probes.
674
+ kieSlugOrModel: "claude-opus-5-5",
675
+ vendor: "anthropic",
676
+ structuredOutputMode: "anthropic-tool",
677
+ // Forced tool_choice is a 400 on this model (vendor docs) — see the field.
678
+ supportsForcedToolChoice: false,
679
+ conversationBoundThinking: true,
680
+ supportsImages: true,
681
+ maxOutputTokens: 16384,
682
+ directFallbackModel: "claude-opus-5-5",
683
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
684
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
685
+ effortRequiresDirect: true,
686
+ supportsTemperature: false,
687
+ preferKie: true,
688
+ // Thinking cannot be turned off on this model at all (`disabled` is a 400
689
+ // at every effort); with no effort sent it runs adaptive at the vendor's
690
+ // `medium` default. Nothing on our wire sends `disabled`.
691
+ thinkingDefaultOn: true
692
+ },
693
+ {
694
+ id: "claude-fable-5",
695
+ displayName: "Claude Fable 5",
696
+ desc: "Frontier Claude above Opus, hardest problems",
697
+ tier: "premium",
698
+ kieFormat: "messages",
699
+ kieSlugOrModel: "claude-fable-5",
700
+ vendor: "anthropic",
701
+ structuredOutputMode: "anthropic-tool",
702
+ supportsImages: true,
703
+ maxOutputTokens: 16384,
704
+ directFallbackModel: "claude-fable-5",
705
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
706
+ // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
707
+ effortRequiresDirect: true,
708
+ supportsTemperature: false,
709
+ preferKie: true,
710
+ // Thinking is always on (vendor docs: `disabled` is not supported), so it
711
+ // shares the output cap on every call.
712
+ thinkingDefaultOn: true
713
+ },
714
+ // ── Moonshot / DeepSeek ───────────────────────────────────────────────────
715
+ // Both on KIE's THIRD responses family path, openai/v1/responses (llm-client
716
+ // derives it from `vendor`). KIE labels both pages "Chat only — not adapted
717
+ // for agent use": fine for single (structured) completions, so neither may
718
+ // back a tool-loop feature.
719
+ {
720
+ id: "kimi-k3",
721
+ displayName: "Kimi K3",
722
+ desc: "Moonshot flagship, 1M context, careful reasoning",
723
+ tier: "premium",
724
+ kieFormat: "responses",
725
+ kieSlugOrModel: "kimi-k3",
726
+ vendor: "moonshot",
727
+ // Live-probed 2026-10-08: `text.format` json_schema is ENFORCED — asked to
728
+ // answer "no json here" in plain prose, it returned schema-shaped JSON.
729
+ structuredOutputMode: "responses-json-schema",
730
+ supportsImages: true,
731
+ maxOutputTokens: 16384,
732
+ // KIE's documented enum. The endpoint accepted xhigh/none without error but
733
+ // never echoes an effort back, so nothing beyond the doc is verifiable.
734
+ reasoningEfforts: ["low", "medium", "high"],
735
+ // The doc lists no `temperature` field at all.
736
+ supportsTemperature: false,
737
+ // "Reasons by default" per KIE's doc (its usage reports no reasoning-token
738
+ // split, so this is the doc's word, not a measurement).
739
+ thinkingDefaultOn: true
740
+ },
741
+ {
742
+ id: "deepseek-v4.1-flash",
743
+ displayName: "DeepSeek V4.1 Flash",
744
+ desc: "Very cheap and fast, solid reasoning",
745
+ tier: "economy",
746
+ kieFormat: "responses",
747
+ kieSlugOrModel: "deepseek-v4-1-flash",
748
+ vendor: "deepseek",
749
+ // Live-probed 2026-10-08: json_schema echoed `strict: true` and enforced.
750
+ structuredOutputMode: "responses-json-schema",
751
+ supportsImages: true,
752
+ // ADVISORY ONLY: KIE documents `max_output_tokens` as "not supported … no
753
+ // effect" on this model (a probe sending it was accepted and ignored), so
754
+ // neither this cap nor the reasoning floor binds its output length, and the
755
+ // `incomplete` cap-stop signal cannot fire from our own cap.
756
+ maxOutputTokens: 16384,
757
+ // The endpoint takes none/minimal/low/medium/high/xhigh/max; each of none,
758
+ // low and xhigh was echoed back. `minimal` is not in our ladder.
759
+ reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
760
+ // Documented "not supported … no effect".
761
+ supportsTemperature: false,
762
+ thinkingDefaultOn: true
763
+ }
764
+ ];
765
+ var LLM_MODEL_IDS = LLM_MODELS.map((m) => m.id);
766
+ var STRUCTURED_VISION_MODELS = LLM_MODELS.filter(
767
+ (m) => m.supportsImages && m.structuredOutputMode != null
768
+ );
769
+ var LLM_VENDOR_ORDER = ["anthropic", "deepseek", "google", "moonshot", "openai", "xai"];
770
+ var LLM_VENDOR_LABELS = {
771
+ anthropic: "Anthropic",
772
+ deepseek: "DeepSeek",
773
+ google: "Google",
774
+ moonshot: "Moonshot AI",
775
+ openai: "OpenAI",
776
+ xai: "xAI"
777
+ };
778
+ var TIER_RANK = { economy: 0, standard: 1, premium: 2 };
779
+ function groupLlmModelsByVendor(models = LLM_MODELS) {
780
+ const groups = [];
781
+ for (const vendor of LLM_VENDOR_ORDER) {
782
+ const members = models.filter((m) => m.vendor === vendor).sort((a, b) => TIER_RANK[a.tier] - TIER_RANK[b.tier]);
783
+ if (members.length > 0) groups.push({ vendor, label: LLM_VENDOR_LABELS[vendor], models: members });
784
+ }
785
+ return groups;
786
+ }
787
+ function orderedLlmModels(models = LLM_MODELS) {
788
+ return groupLlmModelsByVendor(models).flatMap((g) => g.models);
789
+ }
790
+ function motionGraphicsFeature(engine) {
791
+ return engine === "lottie" ? "motion-graphics-lottie" : "motion-graphics";
792
+ }
793
+ var LLM_FEATURE_DEFAULTS = {
794
+ "ai-writer": "claude-sonnet-4.6",
795
+ "llm-chat": "gemini-3.6-flash",
796
+ "prompt-helper": "gemini-3.6-flash",
797
+ "scene-graph-ai": "claude-sonnet-4.6",
798
+ "after-effects": "claude-sonnet-4.6",
799
+ "motion-graphics": "claude-sonnet-4.6",
800
+ "motion-graphics-lottie": "claude-sonnet-4.6",
801
+ "lottie-overlay": "claude-sonnet-4.6",
802
+ "3d-title": "claude-sonnet-4.6",
803
+ "3d-scene": "claude-sonnet-4.6",
804
+ "image-to-text": "claude-sonnet-4.6",
805
+ // Economy on purpose: the analysis reads ONE frame + the copy per ad and
806
+ // runs once per returned ad — volume, not depth. Must stay an image-capable
807
+ // structured-output model (STRUCTURED_VISION_MODELS); a registry test pins it.
808
+ "meta-ads-analysis": "gemini-3.6-flash",
809
+ // Moved from claude-opus-5 on 2026-10-08 (decided: Opus 5.5 takes the Opus 5
810
+ // defaults). Still an image-capable structured model — a registry test pins it.
811
+ "describe-to-picker": "claude-opus-5.5",
812
+ "qa-check": "gemini-3.6-flash",
813
+ "generate-script": "gemini-3.6-flash",
814
+ "translate": "gemini-3.6-flash",
815
+ "image-critic": "claude-sonnet-4.6",
816
+ "pick-best-llm": "claude-sonnet-4.6",
817
+ "workflow-copilot": "claude-sonnet-5",
818
+ // Both economy on purpose — measured: ten ideas in Hebrew took ~1 min here
819
+ // and ~3.5 min (two calls) on claude-sonnet-4.6. The private plugin keeps
820
+ // the same two defaults for API callers that omit the model.
821
+ "content-recipe": "gemini-3.6-flash",
822
+ "content-ideas": "gemini-3.6-flash"
823
+ };
824
+ var LLM_FEATURE_DEFAULT_EFFORTS = {
825
+ // Decided 2026-10-09 from the picker bake-off v2: Opus 5.5 at `high` read
826
+ // 4/4 portraits with the most attributes per image, ~9 s a read. Its effort
827
+ // only takes effect on Anthropic's own API (`effortRequiresDirect`), so the
828
+ // default analysis runs direct — and bills as such (`llmServesDirect`).
829
+ "describe-to-picker": "high"
830
+ };
831
+ function defaultReasoningEffort(feature, modelId) {
832
+ const effort = LLM_FEATURE_DEFAULT_EFFORTS[feature];
833
+ if (!effort) return void 0;
834
+ if (!modelId) return effort;
835
+ return getLlmModel(modelId)?.id === LLM_FEATURE_DEFAULTS[feature] ? effort : void 0;
836
+ }
837
+ var LLM_MODALITY_CAPS = {
838
+ "gemini-3-flash": { image: true, video: true, audio: true },
839
+ "gemini-3.6-flash": { image: true, video: true, audio: true },
840
+ // gemini-3.7-flash is IMAGE-ONLY by DECISION, not omission: full video+audio
841
+ // caps would auto-enroll it in VIDEO_ANALYSIS_LLM_MODELS (derived below) and
842
+ // force a video-analysis tier + pricing decision that is deliberately
843
+ // deferred while the smart-family A/B routes this model internally (#747).
844
+ // Flip these two flags ONLY together with that VA-side decision.
845
+ "gemini-3.7-flash": { image: true, video: false, audio: false },
846
+ // gemini-3.8-flash is IMAGE-ONLY by DECISION, not omission — 3.7's rationale
847
+ // exactly: full video+audio caps would auto-enroll it in
848
+ // VIDEO_ANALYSIS_LLM_MODELS (derived below) and force a video-analysis tier +
849
+ // pricing decision that stays deferred until the 3.8-vs-3.7 analysis A/B
850
+ // concludes. Google's own 3.8 lane DOES understand video (agentic video, via
851
+ // the Interactions API we don't wire) — which is precisely why withholding it
852
+ // has to be a decision rather than a gap. Flip these two flags ONLY together
853
+ // with that VA-side decision.
854
+ "gemini-3.8-flash": { image: true, video: false, audio: false },
855
+ "gemini-3.1-pro": { image: true, video: true, audio: true },
856
+ "claude-haiku-4.5": { image: true, video: false, audio: false },
857
+ "claude-haiku-5.5": { image: true, video: false, audio: false },
858
+ "claude-sonnet-4.6": { image: true, video: false, audio: false },
859
+ "claude-opus-4.7": { image: true, video: false, audio: false },
860
+ "gpt-5.2": { image: true, video: false, audio: false },
861
+ "gpt-5.4": { image: true, video: false, audio: false },
862
+ "gpt-5.5": { image: true, video: false, audio: false },
863
+ "gpt-5.6-luna": { image: true, video: false, audio: false },
864
+ "gpt-5.6-terra": { image: true, video: false, audio: false },
865
+ "gpt-5.6-sol": { image: true, video: false, audio: false },
866
+ // KIE's GPT-6 doc lists text + image + file inputs only — no video, no audio.
867
+ "gpt-6-astra": { image: true, video: false, audio: false },
868
+ // Same KIE doc as astra: text + image + file inputs only.
869
+ "gpt-6-luna": { image: true, video: false, audio: false },
870
+ "gpt-6-sol": { image: true, video: false, audio: false },
871
+ "gpt-6.1-sol": { image: true, video: false, audio: false },
872
+ "grok-4.6": { image: true, video: false, audio: false },
873
+ "grok-4.7": { image: true, video: false, audio: false },
874
+ "claude-sonnet-5": { image: true, video: false, audio: false },
875
+ "claude-sonnet-5.5": { image: true, video: false, audio: false },
876
+ "claude-opus-4.8": { image: true, video: false, audio: false },
877
+ "claude-opus-5": { image: true, video: false, audio: false },
878
+ "claude-opus-5.5": { image: true, video: false, audio: false },
879
+ "claude-fable-5": { image: true, video: false, audio: false },
880
+ // KIE documents text + image input only for both.
881
+ "kimi-k3": { image: true, video: false, audio: false },
882
+ "deepseek-v4.1-flash": { image: true, video: false, audio: false }
883
+ };
884
+ function getLlmModalityCaps(modelId) {
885
+ if (!modelId) return { image: true, video: false, audio: false };
886
+ return LLM_MODALITY_CAPS[modelId] ?? { image: true, video: false, audio: false };
887
+ }
888
+ function dashAliasToCanonical(id) {
889
+ return id.replace(/-(\d+)-(\d+)$/, "-$1.$2");
890
+ }
891
+ function getLlmModel(id) {
892
+ const exact = LLM_MODELS.find((m) => m.id === id);
893
+ if (exact) return exact;
894
+ const canonical = dashAliasToCanonical(id);
895
+ if (canonical !== id) {
896
+ const aliased = LLM_MODELS.find((m) => m.id === canonical);
897
+ if (aliased) return aliased;
898
+ }
899
+ return LLM_MODELS.find(
900
+ (m) => m.kieSlugOrModel === id || m.directFallbackModel === id || m.directGeminiModel === id
901
+ );
902
+ }
903
+ function getLlmTier(id) {
904
+ return getLlmModel(id)?.tier ?? "standard";
905
+ }
906
+ function availableReasoningEfforts(modelId, advanced = false) {
907
+ const model = getLlmModel(modelId ?? "");
908
+ if (!model) return [];
909
+ if (advanced && supportsAdvancedMode(modelId)) {
910
+ return model.directReasoningEfforts ?? model.reasoningEfforts ?? [];
911
+ }
912
+ return model.reasoningEfforts ?? [];
913
+ }
914
+ function effectiveReasoningEffort(modelId, requested, advanced = false) {
915
+ if (!requested || !(requested in EFFORT_RANK)) return void 0;
916
+ const levels = availableReasoningEfforts(modelId, advanced);
917
+ if (!levels || levels.length === 0) return void 0;
918
+ const req = requested;
919
+ let best;
920
+ for (const l of levels) {
921
+ if (EFFORT_RANK[l] <= EFFORT_RANK[req] && (best === void 0 || EFFORT_RANK[l] > EFFORT_RANK[best])) best = l;
922
+ }
923
+ return best;
924
+ }
925
+ var LLM_ROUTE_DEFAULTS = {
926
+ "llm-chat": { temperature: 0.7, maxTokens: 8192 },
927
+ "ai-writer": { temperature: 0.7, maxTokens: 8192 },
928
+ "prompt-helper": { temperature: 0.7, maxTokens: 8192, structuredOutput: true },
929
+ "generate-script": { maxTokens: 16384, structuredOutput: true },
930
+ "qa-check": { maxTokens: 1024, structuredOutput: true },
931
+ "image-critic": { maxTokens: 1024, structuredOutput: true },
932
+ "image-to-text": { maxTokens: 1024 },
933
+ "describe-to-picker": { structuredOutput: true },
934
+ "scene-graph-ai": { temperature: 0.3, maxTokens: 4096, structuredOutput: true },
935
+ "after-effects": { temperature: 0.3, maxTokens: 2048, structuredOutput: true },
936
+ "lottie-overlay": { temperature: 0.3, maxTokens: 2048, structuredOutput: true },
937
+ "motion-graphics": { temperature: 0.3, maxTokens: 2048, structuredOutput: true },
938
+ "motion-graphics-lottie": { temperature: 0.3, maxTokens: 8192, structuredOutput: true },
939
+ "3d-title": { temperature: 0.4, maxTokens: 3072, structuredOutput: true },
940
+ // A 100-object plan with keyframe tracks is the biggest structured payload
941
+ // any composer feature emits — 3072 (3d-title's cap) truncates it mid-array.
942
+ "3d-scene": { temperature: 0.3, maxTokens: 8192, structuredOutput: true }
943
+ };
944
+ function llmRouteDefaults(feature) {
945
+ return feature && LLM_ROUTE_DEFAULTS[feature] || {};
946
+ }
947
+ function bumpTier(tier) {
948
+ if (tier === "economy") return "standard";
949
+ if (tier === "standard") return "premium";
950
+ return tier;
951
+ }
952
+ function supportsAdvancedMode(modelId) {
953
+ const model = modelId ? getLlmModel(modelId) : void 0;
954
+ return Boolean(model?.directGeminiModel || model?.directFallbackModel);
955
+ }
956
+ var ADVANCED_MODE_UNAVAILABLE_REASON = "Advanced mode is available on Gemini and Claude models \u2014 switch the model to enable it.";
957
+ function llmServesDirect(modelId, reasoningEffort, advancedMode) {
958
+ if (!supportsAdvancedMode(modelId)) return false;
959
+ if (advancedMode) return true;
960
+ return Boolean(
961
+ getLlmModel(modelId)?.effortRequiresDirect && effectiveReasoningEffort(modelId, reasoningEffort) !== void 0
962
+ );
963
+ }
964
+ var LLM_CREDIT_RUNGS = ["economy", "standard", "premium", "premium-direct"];
965
+ function llmCreditIdForRung(feature, rung) {
966
+ return rung === "standard" ? feature : `${feature}:${rung}`;
967
+ }
968
+ function llmTierCreditIds(feature) {
969
+ return LLM_CREDIT_RUNGS.map((rung) => llmCreditIdForRung(feature, rung));
970
+ }
971
+ function buildLlmCreditIdentifier(feature, modelId, reasoningEffort, advancedMode) {
972
+ if (!modelId) return feature;
973
+ let tier = getLlmTier(modelId);
974
+ const eff = effectiveReasoningEffort(modelId, reasoningEffort);
975
+ if (eff !== void 0 && EFFORT_TIER_BUMP.has(eff)) tier = bumpTier(tier);
976
+ const rung = llmServesDirect(modelId, reasoningEffort, advancedMode) ? bumpToDirectRung(tier) : tier;
977
+ return llmCreditIdForRung(feature, rung);
978
+ }
979
+ function bumpToDirectRung(tier) {
980
+ return tier === "premium" ? "premium-direct" : bumpTier(tier);
981
+ }
982
+ function resolveLlmCreditId(feature, body) {
983
+ const b = body;
984
+ return buildLlmCreditIdentifier(
985
+ feature,
986
+ b?.llmModel,
987
+ b?.reasoningEffort,
988
+ b?.advancedMode === true
989
+ );
990
+ }
991
+ var VIDEO_ANALYSIS_LLM_MODELS = LLM_MODELS.filter((m) => getLlmModalityCaps(m.id).video && getLlmModalityCaps(m.id).audio).map((m) => m.id);
992
+ var VIDEO_ANALYSIS_TIERS = { fast: "gemini-3-flash", pro: "gemini-3.1-pro" };
993
+ var VIDEO_ANALYSIS_LEGACY_MODELS = {
994
+ // Backed the fast tier from 2026-07 until 2026-07-29, when the economy tiers
995
+ // moved to the cheaper lane and the older, cheaper flash. It is now the engine
996
+ // behind the `smart` tier — but `smart` is a SENTINEL that never exposes a model
997
+ // id, so as far as this map is concerned it no longer backs a selectable tier and
998
+ // belongs here: stored raw `llmModel` values keep resolving and keep pricing
999
+ // under their own credit family.
1000
+ "gemini-3.6-flash": "fast"
1001
+ };
1002
+ var VIDEO_ANALYSIS_MIXED_TIERS = ["mixed", "mixed-fast", "smart"];
1003
+ var VIDEO_ANALYSIS_TIER_ORDER = ["smart", "pro", "fast", "mixed", "mixed-fast"];
1004
+ var DEFAULT_VIDEO_ANALYSIS_TIER = "pro";
1005
+ var DEFAULT_VIDEO_ANALYSIS_MODEL = VIDEO_ANALYSIS_TIERS[DEFAULT_VIDEO_ANALYSIS_TIER];
1006
+ var VIDEO_ANALYSIS_TIER_LABELS = {
1007
+ smart: "Smart",
1008
+ fast: "Fast",
1009
+ pro: "Pro",
1010
+ mixed: "Mixed",
1011
+ "mixed-fast": "Mixed (consistent)"
1012
+ };
1013
+ function isVideoAnalysisTier(v) {
1014
+ return VIDEO_ANALYSIS_TIER_ORDER.includes(v);
1015
+ }
1016
+ function isVideoAnalysisMixedTier(v) {
1017
+ return VIDEO_ANALYSIS_MIXED_TIERS.includes(v);
1018
+ }
1019
+ function resolveVideoAnalysisModel(input) {
1020
+ if (input && isVideoAnalysisMixedTier(input)) return input;
1021
+ if (input && Object.prototype.hasOwnProperty.call(VIDEO_ANALYSIS_TIERS, input)) {
1022
+ return VIDEO_ANALYSIS_TIERS[input];
1023
+ }
1024
+ if (input && VIDEO_ANALYSIS_LLM_MODELS.includes(input)) return input;
1025
+ return DEFAULT_VIDEO_ANALYSIS_MODEL;
1026
+ }
1027
+
1028
+ export { ADVANCED_MODE_UNAVAILABLE_REASON, DEFAULT_VIDEO_ANALYSIS_MODEL, DEFAULT_VIDEO_ANALYSIS_TIER, EFFORT_TIER_BUMP, LLM_CREDIT_RUNGS, LLM_FEATURE_DEFAULTS, LLM_FEATURE_DEFAULT_EFFORTS, LLM_MODALITY_CAPS, LLM_MODELS, LLM_MODEL_IDS, LLM_REASONING_EFFORTS, LLM_ROUTE_DEFAULTS, LLM_VENDOR_LABELS, LLM_VENDOR_ORDER, REASONING_OUTPUT_FLOOR, STRUCTURED_VISION_MODELS, VIDEO_ANALYSIS_LEGACY_MODELS, VIDEO_ANALYSIS_LLM_MODELS, VIDEO_ANALYSIS_MIXED_TIERS, VIDEO_ANALYSIS_TIERS, VIDEO_ANALYSIS_TIER_LABELS, VIDEO_ANALYSIS_TIER_ORDER, availableReasoningEfforts, buildLlmCreditIdentifier, defaultReasoningEffort, effectiveReasoningEffort, getLlmModalityCaps, getLlmModel, getLlmTier, groupLlmModelsByVendor, isVideoAnalysisMixedTier, isVideoAnalysisTier, llmCreditIdForRung, llmRouteDefaults, llmServesDirect, llmTierCreditIds, motionGraphicsFeature, orderedLlmModels, reasoningOutputFloor, resolveLlmCreditId, resolveVideoAnalysisModel, supportsAdvancedMode };
1029
+ //# sourceMappingURL=chunk-YBPBK5KI.js.map
1030
+ //# sourceMappingURL=chunk-YBPBK5KI.js.map