@nodaro/shared 3.55.0 → 3.57.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 (183) hide show
  1. package/dist/{chunk-MCIBQ5BF.js → chunk-2LRBQOKA.js} +9 -9
  2. package/dist/{chunk-MCIBQ5BF.js.map → chunk-2LRBQOKA.js.map} +1 -1
  3. package/dist/{chunk-OVIIJVXH.cjs → chunk-2LWHRJPB.cjs} +21 -21
  4. package/dist/{chunk-OVIIJVXH.cjs.map → chunk-2LWHRJPB.cjs.map} +1 -1
  5. package/dist/{chunk-C5S75476.js → chunk-3SH5ZUNJ.js} +9 -4
  6. package/dist/{chunk-C5S75476.js.map → chunk-3SH5ZUNJ.js.map} +1 -1
  7. package/dist/{chunk-KM35K2M5.cjs → chunk-4KKFO6YR.cjs} +143 -32
  8. package/dist/chunk-4KKFO6YR.cjs.map +1 -0
  9. package/dist/{chunk-3633VD2M.cjs → chunk-5SXI7IYW.cjs} +8 -8
  10. package/dist/{chunk-3633VD2M.cjs.map → chunk-5SXI7IYW.cjs.map} +1 -1
  11. package/dist/{chunk-ZKHQSG76.js → chunk-6NZWWMVY.js} +5 -5
  12. package/dist/chunk-6NZWWMVY.js.map +1 -0
  13. package/dist/{chunk-2OYV6K7D.cjs → chunk-7JM5EZF3.cjs} +13 -13
  14. package/dist/{chunk-2OYV6K7D.cjs.map → chunk-7JM5EZF3.cjs.map} +1 -1
  15. package/dist/chunk-ALVO5Q36.cjs +48 -0
  16. package/dist/chunk-ALVO5Q36.cjs.map +1 -0
  17. package/dist/{chunk-SEEQ3H22.cjs → chunk-ASSJKIZO.cjs} +59 -6
  18. package/dist/chunk-ASSJKIZO.cjs.map +1 -0
  19. package/dist/{chunk-HZL7QMXK.js → chunk-AWS4BWEC.js} +7 -3
  20. package/dist/chunk-AWS4BWEC.js.map +1 -0
  21. package/dist/chunk-BBMK5XNO.js +42 -0
  22. package/dist/chunk-BBMK5XNO.js.map +1 -0
  23. package/dist/{chunk-IPCWYKX5.cjs → chunk-BH2IDJVO.cjs} +60 -46
  24. package/dist/chunk-BH2IDJVO.cjs.map +1 -0
  25. package/dist/{chunk-HG3KKCJJ.js → chunk-C3E6UZS4.js} +3 -3
  26. package/dist/{chunk-HG3KKCJJ.js.map → chunk-C3E6UZS4.js.map} +1 -1
  27. package/dist/{chunk-N3WL6IOJ.js → chunk-D56ALOLY.js} +55 -5
  28. package/dist/chunk-D56ALOLY.js.map +1 -0
  29. package/dist/{chunk-SZUDEFX2.cjs → chunk-D5J332XS.cjs} +44 -39
  30. package/dist/{chunk-SZUDEFX2.cjs.map → chunk-D5J332XS.cjs.map} +1 -1
  31. package/dist/{chunk-ZWB3NG4M.js → chunk-EXCZD5ZY.js} +3 -3
  32. package/dist/{chunk-ZWB3NG4M.js.map → chunk-EXCZD5ZY.js.map} +1 -1
  33. package/dist/{chunk-5R6LTKE5.cjs → chunk-FFW2HTR2.cjs} +5 -5
  34. package/dist/{chunk-5R6LTKE5.cjs.map → chunk-FFW2HTR2.cjs.map} +1 -1
  35. package/dist/{chunk-KMSEU6FK.js → chunk-INGQNLY4.js} +3 -3
  36. package/dist/{chunk-KMSEU6FK.js.map → chunk-INGQNLY4.js.map} +1 -1
  37. package/dist/chunk-IOET54EV.js +39 -0
  38. package/dist/chunk-IOET54EV.js.map +1 -0
  39. package/dist/{chunk-3CHOZ573.js → chunk-IQS3WQXQ.js} +309 -18
  40. package/dist/chunk-IQS3WQXQ.js.map +1 -0
  41. package/dist/{chunk-2R74OU76.cjs → chunk-JYNW4QK7.cjs} +309 -17
  42. package/dist/chunk-JYNW4QK7.cjs.map +1 -0
  43. package/dist/{chunk-UWMXMLMV.js → chunk-KZTXGMVH.js} +3 -3
  44. package/dist/{chunk-UWMXMLMV.js.map → chunk-KZTXGMVH.js.map} +1 -1
  45. package/dist/{chunk-5DVDHL7Y.js → chunk-MBKJ7IBS.js} +21 -7
  46. package/dist/chunk-MBKJ7IBS.js.map +1 -0
  47. package/dist/{chunk-G7IUQKRU.cjs → chunk-NJTLBZIP.cjs} +51 -51
  48. package/dist/{chunk-G7IUQKRU.cjs.map → chunk-NJTLBZIP.cjs.map} +1 -1
  49. package/dist/{chunk-J4CVGAAV.cjs → chunk-NZRG5CXQ.cjs} +7 -2
  50. package/dist/chunk-NZRG5CXQ.cjs.map +1 -0
  51. package/dist/{chunk-AGTCHDG5.cjs → chunk-O33WVAYQ.cjs} +6 -6
  52. package/dist/{chunk-AGTCHDG5.cjs.map → chunk-O33WVAYQ.cjs.map} +1 -1
  53. package/dist/{chunk-WVACGZYV.cjs → chunk-OHQBQOGH.cjs} +8 -8
  54. package/dist/{chunk-WVACGZYV.cjs.map → chunk-OHQBQOGH.cjs.map} +1 -1
  55. package/dist/chunk-OWNPYQSH.cjs +283 -0
  56. package/dist/chunk-OWNPYQSH.cjs.map +1 -0
  57. package/dist/{chunk-C6IQCKJT.cjs → chunk-P5KH7GAI.cjs} +4 -4
  58. package/dist/{chunk-C6IQCKJT.cjs.map → chunk-P5KH7GAI.cjs.map} +1 -1
  59. package/dist/{chunk-25KAGSPT.js → chunk-QMP3W5GA.js} +3 -3
  60. package/dist/{chunk-25KAGSPT.js.map → chunk-QMP3W5GA.js.map} +1 -1
  61. package/dist/chunk-QSWUSXRL.cjs +53 -0
  62. package/dist/chunk-QSWUSXRL.cjs.map +1 -0
  63. package/dist/{chunk-E4YES25K.js → chunk-QTTVIQJP.js} +4 -4
  64. package/dist/{chunk-E4YES25K.js.map → chunk-QTTVIQJP.js.map} +1 -1
  65. package/dist/{chunk-6HUWQLF2.cjs → chunk-R3OIZ2BM.cjs} +6 -6
  66. package/dist/{chunk-6HUWQLF2.cjs.map → chunk-R3OIZ2BM.cjs.map} +1 -1
  67. package/dist/{chunk-YBZQXZ6A.js → chunk-R5GOPHYB.js} +115 -15
  68. package/dist/chunk-R5GOPHYB.js.map +1 -0
  69. package/dist/chunk-RKTWLAJO.cjs +27 -0
  70. package/dist/chunk-RKTWLAJO.cjs.map +1 -0
  71. package/dist/chunk-S7FCFQ6X.js +255 -0
  72. package/dist/chunk-S7FCFQ6X.js.map +1 -0
  73. package/dist/{chunk-HEF4BIMA.js → chunk-SWPTF7QJ.js} +4 -4
  74. package/dist/{chunk-HEF4BIMA.js.map → chunk-SWPTF7QJ.js.map} +1 -1
  75. package/dist/{chunk-LKCPFD5X.js → chunk-SWVGHAYO.js} +5 -3
  76. package/dist/chunk-SWVGHAYO.js.map +1 -0
  77. package/dist/{chunk-ZAK276QF.js → chunk-UFB36LWU.js} +4 -4
  78. package/dist/{chunk-ZAK276QF.js.map → chunk-UFB36LWU.js.map} +1 -1
  79. package/dist/{chunk-LYWJAXPT.js → chunk-UMPZR56R.js} +3 -3
  80. package/dist/{chunk-LYWJAXPT.js.map → chunk-UMPZR56R.js.map} +1 -1
  81. package/dist/{chunk-G5NTNQ7W.cjs → chunk-XROE3CAS.cjs} +5 -3
  82. package/dist/chunk-XROE3CAS.cjs.map +1 -0
  83. package/dist/{chunk-MTUNORQB.cjs → chunk-ZLSPGMES.cjs} +11 -11
  84. package/dist/{chunk-MTUNORQB.cjs.map → chunk-ZLSPGMES.cjs.map} +1 -1
  85. package/dist/{chunk-MGJR5OXO.js → chunk-ZPPFPQPO.js} +5 -5
  86. package/dist/{chunk-MGJR5OXO.js.map → chunk-ZPPFPQPO.js.map} +1 -1
  87. package/dist/{chunk-FIYVKW7F.cjs → chunk-ZSTL4JEJ.cjs} +12 -12
  88. package/dist/{chunk-FIYVKW7F.cjs.map → chunk-ZSTL4JEJ.cjs.map} +1 -1
  89. package/dist/entries/apps.cjs +43 -42
  90. package/dist/entries/apps.js +8 -7
  91. package/dist/entries/credits.cjs +151 -150
  92. package/dist/entries/credits.d.cts +4 -1
  93. package/dist/entries/credits.d.ts +4 -1
  94. package/dist/entries/credits.js +8 -7
  95. package/dist/entries/entities.cjs +125 -125
  96. package/dist/entries/entities.d.cts +1 -1
  97. package/dist/entries/entities.d.ts +1 -1
  98. package/dist/entries/entities.js +1 -1
  99. package/dist/entries/llm-models.d.cts +1 -1
  100. package/dist/entries/llm-models.d.ts +1 -1
  101. package/dist/entries/model-catalog.cjs +127 -66
  102. package/dist/entries/model-catalog.d.cts +61 -9
  103. package/dist/entries/model-catalog.d.ts +61 -9
  104. package/dist/entries/model-catalog.js +5 -4
  105. package/dist/entries/models.cjs +320 -276
  106. package/dist/entries/models.d.cts +3 -3
  107. package/dist/entries/models.d.ts +3 -3
  108. package/dist/entries/models.js +4 -4
  109. package/dist/entries/nodes.cjs +208 -207
  110. package/dist/entries/nodes.d.cts +1 -1
  111. package/dist/entries/nodes.d.ts +1 -1
  112. package/dist/entries/nodes.js +10 -9
  113. package/dist/entries/pipeline.cjs +161 -149
  114. package/dist/entries/pipeline.d.cts +165 -26
  115. package/dist/entries/pipeline.d.ts +165 -26
  116. package/dist/entries/pipeline.js +3 -3
  117. package/dist/entries/runtime-config.cjs +116 -0
  118. package/dist/entries/runtime-config.cjs.map +1 -0
  119. package/dist/entries/runtime-config.d.cts +308 -0
  120. package/dist/entries/runtime-config.d.ts +308 -0
  121. package/dist/entries/runtime-config.js +3 -0
  122. package/dist/entries/runtime-config.js.map +1 -0
  123. package/dist/entries/ugc.cjs +71 -71
  124. package/dist/entries/ugc.js +4 -4
  125. package/dist/entries/video.cjs +117 -117
  126. package/dist/entries/video.js +4 -4
  127. package/dist/entries/workflow.cjs +150 -146
  128. package/dist/entries/workflow.d.cts +8 -1
  129. package/dist/entries/workflow.d.ts +8 -1
  130. package/dist/entries/workflow.js +2 -2
  131. package/dist/index.cjs +3172 -2942
  132. package/dist/index.d.cts +6 -5
  133. package/dist/index.d.ts +6 -5
  134. package/dist/index.js +23 -21
  135. package/dist/{model-catalog-Dm2UiwUe.d.cts → model-catalog-CwkG9xi-.d.cts} +40 -4
  136. package/dist/{model-catalog-Dm2UiwUe.d.ts → model-catalog-CwkG9xi-.d.ts} +40 -4
  137. package/dist/{model-constants-DZUGVDOw.d.cts → model-constants-BbsZSVTA.d.cts} +57 -13
  138. package/dist/{model-constants-DZUGVDOw.d.ts → model-constants-BbsZSVTA.d.ts} +57 -13
  139. package/package.json +6 -1
  140. package/src/__tests__/fixtures/root-exports.baseline.json +2 -0
  141. package/src/__tests__/gpt-image-2-6.test.ts +277 -0
  142. package/src/__tests__/gvp-supported-providers.test.ts +2 -0
  143. package/src/__tests__/image-model-roles.test.ts +28 -9
  144. package/src/__tests__/runtime-config.test.ts +398 -0
  145. package/src/__tests__/seedance-25-catalog-modes.test.ts +35 -0
  146. package/src/__tests__/voice-library-values.test.ts +24 -0
  147. package/src/credit-identifiers.ts +45 -1
  148. package/src/entries/model-catalog.ts +17 -0
  149. package/src/entries/models.ts +13 -0
  150. package/src/entries/runtime-config.ts +51 -0
  151. package/src/entries/workflow.ts +1 -1
  152. package/src/gpt-image-2-6.ts +104 -0
  153. package/src/image-model-roles.ts +31 -10
  154. package/src/index.ts +1 -0
  155. package/src/model-catalog.ts +341 -17
  156. package/src/model-constants.ts +149 -9
  157. package/src/node-default-mappings.ts +5 -0
  158. package/src/node-refs.ts +11 -0
  159. package/src/pipeline-types.ts +2 -0
  160. package/src/reference-board-templates.ts +2 -0
  161. package/src/runtime-config/contract.ts +492 -0
  162. package/src/runtime-config/worlds.ts +77 -0
  163. package/src/video-ui-defaults.ts +2 -1
  164. package/src/voices.ts +175 -2
  165. package/dist/chunk-2R74OU76.cjs.map +0 -1
  166. package/dist/chunk-3CHOZ573.js.map +0 -1
  167. package/dist/chunk-5DVDHL7Y.js.map +0 -1
  168. package/dist/chunk-ATWLKUAI.cjs +0 -34
  169. package/dist/chunk-ATWLKUAI.cjs.map +0 -1
  170. package/dist/chunk-DUL5ZLTJ.js +0 -29
  171. package/dist/chunk-DUL5ZLTJ.js.map +0 -1
  172. package/dist/chunk-G5NTNQ7W.cjs.map +0 -1
  173. package/dist/chunk-HD45Y7QU.cjs +0 -27
  174. package/dist/chunk-HD45Y7QU.cjs.map +0 -1
  175. package/dist/chunk-HZL7QMXK.js.map +0 -1
  176. package/dist/chunk-IPCWYKX5.cjs.map +0 -1
  177. package/dist/chunk-J4CVGAAV.cjs.map +0 -1
  178. package/dist/chunk-KM35K2M5.cjs.map +0 -1
  179. package/dist/chunk-LKCPFD5X.js.map +0 -1
  180. package/dist/chunk-N3WL6IOJ.js.map +0 -1
  181. package/dist/chunk-SEEQ3H22.cjs.map +0 -1
  182. package/dist/chunk-YBZQXZ6A.js.map +0 -1
  183. package/dist/chunk-ZKHQSG76.js.map +0 -1
@@ -48,6 +48,9 @@ export const IMAGE_ASPECT_RATIO_VALUES = [
48
48
  // GPT Image 2.5 (Flare + Sunburst) additions: near-square and ultra-wide/tall
49
49
  // cinema ratios (docs.kie.ai/market/gpt/gpt-image-2-5-*).
50
50
  "27:16", "16:27", "9:8", "8:9",
51
+ // GPT Image 2.6 additions: wide and tall ratios of its own
52
+ // (docs.kie.ai/market/gpt/gpt-image-2-6-*).
53
+ "2:1", "1:2", "9:21", "3:1", "1:3",
51
54
  ] as const
52
55
 
53
56
  /** A ratio string the image routes accept (pre-snap vocabulary, not a per-model guarantee). */
@@ -64,9 +67,13 @@ export const IMAGE_RESOLUTION_VALUES = ["1K", "2K", "4K", "0.5 MP", "1 MP", "2 M
64
67
  export type ImageResolution = typeof IMAGE_RESOLUTION_VALUES[number]
65
68
 
66
69
  /** The `quality` vocabulary of the same two routes (vocabulary bound; the catalog snap gates per model). */
67
- export const IMAGE_QUALITY_VALUES = ["medium", "high", "basic"] as const
70
+ export const IMAGE_QUALITY_VALUES = ["auto", "low", "medium", "high", "xhigh", "max", "basic"] as const
68
71
  export type ImageQuality = typeof IMAGE_QUALITY_VALUES[number]
69
72
 
73
+ /** The `background` vocabulary of the same two routes (vocabulary bound; the catalog snap gates per model). */
74
+ export const IMAGE_BACKGROUND_VALUES = ["auto", "opaque", "transparent"] as const
75
+ export type ImageBackground = typeof IMAGE_BACKGROUND_VALUES[number]
76
+
70
77
  /** The `renderingSpeed` vocabulary (Ideogram's speed tiers — see {@link RENDERING_SPEED_SUPPORT}). */
71
78
  export const IMAGE_RENDERING_SPEED_VALUES = ["TURBO", "BALANCED", "QUALITY"] as const
72
79
  export type ImageRenderingSpeed = typeof IMAGE_RENDERING_SPEED_VALUES[number]
@@ -108,6 +115,14 @@ export const MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER: Record<string, number> = {
108
115
  "gpt-image-2-5-flare-i2i": 20000, // docs.kie.ai/market/gpt/gpt-image-2-5-flare-image-to-image
109
116
  "gpt-image-2-5-sunburst": 20000, // docs.kie.ai/market/gpt/gpt-image-2-5-sunburst-text-to-image
110
117
  "gpt-image-2-5-sunburst-i2i": 20000, // docs.kie.ai/market/gpt/gpt-image-2-5-sunburst-image-to-image
118
+ // GPT Image 2.6 — Flare and Sunburst document 32000 chars, Economy 20000.
119
+ // PROMPT_HARD_CEILING (30000) is what the routes accept, so that is the cap.
120
+ "gpt-image-2-6-flare": 30000, // docs.kie.ai/market/gpt/gpt-image-2-6-flare-text-to-image
121
+ "gpt-image-2-6-flare-i2i": 30000, // docs.kie.ai/market/gpt/gpt-image-2-6-flare-image-to-image
122
+ "gpt-image-2-6-sunburst": 30000, // docs.kie.ai/market/gpt/gpt-image-2-6-sunburst-text-to-image
123
+ "gpt-image-2-6-sunburst-i2i": 30000, // docs.kie.ai/market/gpt/gpt-image-2-6-sunburst-image-to-image
124
+ "gpt-image-2-6-economy": 20000, // docs.kie.ai/market/gpt/gpt-image-2-6-economy-text-to-image
125
+ "gpt-image-2-6-economy-i2i": 20000, // docs.kie.ai/market/gpt/gpt-image-2-6-economy-image-to-image
111
126
  // ── lower than the 5000 default (over-send risk if left at default) ──
112
127
  "seedream": 3000, // docs.kie.ai/market/seedream/4-5-text-to-image
113
128
  "seedream-edit": 3000, // docs.kie.ai/market/seedream/4-5-edit
@@ -240,6 +255,8 @@ export const MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER: Record<string, number> = {
240
255
  // Gemini Omni Flash 1.1 — same 20000-char prompt surface as the pro sibling
241
256
  // (docs.kie.ai/market/google/gemini-omni-flash-1-1).
242
257
  "gemini-omni-flash": 20000,
258
+ // (docs.kie.ai/market/google/gemini-omni-flash-1-2).
259
+ "gemini-omni-flash-1-2": 20000,
243
260
  // Wan 3.0 / 3.0 Prime — 20000 chars, excess truncated by the provider
244
261
  // (docs.kie.ai/market/wan/3-0-video and /3-0-video-prime).
245
262
  "wan-3": 20000,
@@ -527,6 +544,9 @@ export const MODELS_WITH_REFERENCE_IMAGE_SUPPORT = new Set([
527
544
  "gpt-image-2",
528
545
  "gpt-image-2-5-flare",
529
546
  "gpt-image-2-5-sunburst",
547
+ "gpt-image-2-6-flare",
548
+ "gpt-image-2-6-sunburst",
549
+ "gpt-image-2-6-economy",
530
550
  "grok",
531
551
  "grok-2",
532
552
  "qwen",
@@ -542,6 +562,9 @@ export const MODELS_WITH_REFERENCE_IMAGE_SUPPORT = new Set([
542
562
  "gpt-image-2-i2i",
543
563
  "gpt-image-2-5-flare-i2i",
544
564
  "gpt-image-2-5-sunburst-i2i",
565
+ "gpt-image-2-6-flare-i2i",
566
+ "gpt-image-2-6-sunburst-i2i",
567
+ "gpt-image-2-6-economy-i2i",
545
568
  "grok-2-i2i",
546
569
  "flux-i2i",
547
570
  "flux-pro-i2i",
@@ -582,6 +605,9 @@ export const T2I_TO_I2I_VARIANT: Record<string, string> = {
582
605
  "gpt-image-2": "gpt-image-2-i2i",
583
606
  "gpt-image-2-5-flare": "gpt-image-2-5-flare-i2i",
584
607
  "gpt-image-2-5-sunburst": "gpt-image-2-5-sunburst-i2i",
608
+ "gpt-image-2-6-flare": "gpt-image-2-6-flare-i2i",
609
+ "gpt-image-2-6-sunburst": "gpt-image-2-6-sunburst-i2i",
610
+ "gpt-image-2-6-economy": "gpt-image-2-6-economy-i2i",
585
611
  "grok": "grok-i2i",
586
612
  // grok-2's t2i takes NO image input; its "i2i" is the segment-map(image_url)
587
613
  // → image-edit(task_id) chain in the KIE provider (single reference).
@@ -621,6 +647,9 @@ export const REF_IMAGE_MAX_LIMITS: Record<string, number> = {
621
647
  "gpt-image-2-i2i": 16,
622
648
  "gpt-image-2-5-flare-i2i": 16,
623
649
  "gpt-image-2-5-sunburst-i2i": 16,
650
+ "gpt-image-2-6-flare-i2i": 16,
651
+ "gpt-image-2-6-sunburst-i2i": 16,
652
+ "gpt-image-2-6-economy-i2i": 16,
624
653
  "flux-i2i": 4,
625
654
  "flux-pro-i2i": 4,
626
655
  "seedream-edit": 16,
@@ -682,6 +711,32 @@ export function imageReferenceLimit(provider: string | undefined): number {
682
711
  return REF_IMAGE_MAX_LIMITS[effective] ?? DEFAULT_REF_IMAGE_MAX
683
712
  }
684
713
 
714
+ /** The most input images one request may carry, on a model with no row below. */
715
+ export const DEFAULT_REQUEST_IMAGE_LIMIT = 14
716
+
717
+ /**
718
+ * Models a request may give more input images than
719
+ * {@link DEFAULT_REQUEST_IMAGE_LIMIT}. Separate from
720
+ * {@link REF_IMAGE_MAX_LIMITS}, the cap the canvas and the assembler honour: the
721
+ * routes have their own, lower ceiling, and it rises per model only here.
722
+ */
723
+ const REQUEST_IMAGE_LIMITS: Record<string, number> = {
724
+ "gpt-image-2-6-flare-i2i": 16,
725
+ "gpt-image-2-6-sunburst-i2i": 16,
726
+ }
727
+
728
+ /** The largest per-model limit: the outer bound of the routes' array schemas. */
729
+ export const MAX_REQUEST_IMAGE_LIMIT = Math.max(DEFAULT_REQUEST_IMAGE_LIMIT, ...Object.values(REQUEST_IMAGE_LIMITS))
730
+
731
+ /**
732
+ * The most input images one request may carry for `provider` (a text-to-image
733
+ * id reads its edit sibling's row, the model that consumes them).
734
+ */
735
+ export function requestImageLimit(provider: string | undefined): number {
736
+ const effective = provider ? (T2I_TO_I2I_VARIANT[provider] ?? provider) : undefined
737
+ return (effective !== undefined ? REQUEST_IMAGE_LIMITS[effective] : undefined) ?? DEFAULT_REQUEST_IMAGE_LIMIT
738
+ }
739
+
685
740
  // Variable pricing: which setting type affects cost per provider
686
741
  export const VARIABLE_PRICING_MODELS: Record<string, "quality" | "resolution" | "rendering-speed"> = {
687
742
  "gpt-image": "quality",
@@ -760,6 +815,9 @@ export const IMAGE_GEN_PROVIDERS = [
760
815
  "gpt-image-2",
761
816
  "gpt-image-2-5-flare",
762
817
  "gpt-image-2-5-sunburst",
818
+ "gpt-image-2-6-flare",
819
+ "gpt-image-2-6-sunburst",
820
+ "gpt-image-2-6-economy",
763
821
  "imagen4",
764
822
  "imagen4-fast",
765
823
  "imagen4-ultra",
@@ -795,6 +853,9 @@ export const IMAGE_I2I_PROVIDERS = [
795
853
  "gpt-image-2-i2i",
796
854
  "gpt-image-2-5-flare-i2i",
797
855
  "gpt-image-2-5-sunburst-i2i",
856
+ "gpt-image-2-6-flare-i2i",
857
+ "gpt-image-2-6-sunburst-i2i",
858
+ "gpt-image-2-6-economy-i2i",
798
859
  "grok-2-i2i",
799
860
  "ideogram-edit",
800
861
  "ideogram-remix",
@@ -808,11 +869,11 @@ export const IMAGE_I2I_PROVIDERS = [
808
869
  "flux-kontext-max",
809
870
  // Replicate Open (uncensored) — multi-image Kontext via Replicate
810
871
  "kontext-multi",
811
- // BFL Flux 2 Pro — runs through Replicate with safety_tolerance=5 (max for Pro)
872
+ // BFL Flux 2 Pro — runs through Replicate
812
873
  "flux-2-pro",
813
874
  // BFL FLUX Fill Pro — dedicated masked inpainting via Replicate (white = edit area)
814
875
  "flux-fill",
815
- // BFL Flux 2 Max — runs through Replicate with safety_tolerance=5, up to 8 refs
876
+ // BFL Flux 2 Max — runs through Replicate, up to 8 refs
816
877
  "flux-2-max",
817
878
  // BFL FLUX Fill Pro — dedicated inpainting via Replicate (image + mask + prompt,
818
879
  // white = edit area). Second mask-capable i2i provider alongside ideogram-edit.
@@ -913,6 +974,7 @@ export const IMAGE_TO_VIDEO_PROVIDERS = [
913
974
  "kling-3-omni",
914
975
  "gemini-omni-video",
915
976
  "gemini-omni-flash",
977
+ "gemini-omni-flash-1-2",
916
978
  // Wan 3.0 family — one id per SKU serves BOTH modes (no t2v twin, no alias),
917
979
  // so each id is listed in this array AND in TEXT_TO_VIDEO_PROVIDERS.
918
980
  "wan-3",
@@ -964,6 +1026,7 @@ export const TEXT_TO_VIDEO_PROVIDERS = [
964
1026
  "runway-kie",
965
1027
  "gemini-omni-video",
966
1028
  "gemini-omni-flash",
1029
+ "gemini-omni-flash-1-2",
967
1030
  // Wan 3.0 family — REAL t2v (prompt-only runs are the documented default
968
1031
  // mode), so they belong in this main section and must NOT be gated by
969
1032
  // VIDEO_PROVIDERS_REQUIRING_IMAGE.
@@ -1405,6 +1468,25 @@ export const TTS_PROVIDERS = [
1405
1468
  ] as const
1406
1469
  export type TtsProvider = typeof TTS_PROVIDERS[number]
1407
1470
 
1471
+ /**
1472
+ * The file a speech request can ask for (`outputFormat` on `/v1/text-to-speech`
1473
+ * and the `text-to-speech` node run), named as the vendor names its formats:
1474
+ * `codec_samplerate_bitrate`. Omitted ⇒ the first, which is exactly what every
1475
+ * request delivered before the field existed. The list is deliberately short:
1476
+ * the three the hosted deployment's vendor account serves (measured 2026-11-08);
1477
+ * a self-hosted install's account must serve them too, or a run asking for one
1478
+ * fails with the vendor's own message.
1479
+ */
1480
+ export const TTS_OUTPUT_FORMATS = ["mp3_44100_128", "mp3_44100_192", "wav_24000"] as const
1481
+ export type TtsOutputFormat = typeof TTS_OUTPUT_FORMATS[number]
1482
+ export const DEFAULT_TTS_OUTPUT_FORMAT: TtsOutputFormat = "mp3_44100_128"
1483
+ /** How each format is stored and served: the file extension and the MIME type. */
1484
+ export const TTS_OUTPUT_FORMAT_FILES: Readonly<Record<TtsOutputFormat, { readonly ext: "mp3" | "wav"; readonly mime: "audio/mpeg" | "audio/wav" }>> = {
1485
+ mp3_44100_128: { ext: "mp3", mime: "audio/mpeg" },
1486
+ mp3_44100_192: { ext: "mp3", mime: "audio/mpeg" },
1487
+ wav_24000: { ext: "wav", mime: "audio/wav" },
1488
+ }
1489
+
1408
1490
  /**
1409
1491
  * Text-to-dialogue models (the `provider` of `/v1/text-to-dialogue` and of the
1410
1492
  * Text to Dialogue node). Each IS its catalog id and its credit identifier.
@@ -1707,6 +1789,9 @@ export const IMAGE_MASK_MODE: Record<ImageGenProvider, ImageMaskMode> = {
1707
1789
  "gpt-image-2": "prompt",
1708
1790
  "gpt-image-2-5-flare": "prompt",
1709
1791
  "gpt-image-2-5-sunburst": "prompt",
1792
+ "gpt-image-2-6-flare": "prompt",
1793
+ "gpt-image-2-6-sunburst": "prompt",
1794
+ "gpt-image-2-6-economy": "prompt",
1710
1795
  "seedream": "prompt",
1711
1796
  "seedream-5-lite": "prompt",
1712
1797
  "seedream-5-pro": "prompt",
@@ -1799,6 +1884,10 @@ export const DURATION_PRICED_PROVIDERS = new Set([
1799
1884
  // video rate on `kling-4`, see VIDEO_REF_RATE_PROVIDERS).
1800
1885
  "kling-4",
1801
1886
  "kling-4-keyframes",
1887
+ // Gemini Omni Flash 1.2 — per-second billing at four resolution rates. The
1888
+ // only Omni SKU here: the per-clip SKUs price in their own branch of
1889
+ // buildVideoCreditModelIdentifier.
1890
+ "gemini-omni-flash-1-2",
1802
1891
  ])
1803
1892
 
1804
1893
  /**
@@ -2004,12 +2093,38 @@ export function kling4KeyframeFrameCap(durationSec: number | string | undefined)
2004
2093
  export const GEMINI_OMNI_PROVIDERS = new Set<string>([
2005
2094
  "gemini-omni-video",
2006
2095
  "gemini-omni-flash",
2096
+ // Own request builder and per-second price: GEMINI_OMNI_PER_SECOND_PROVIDERS.
2097
+ "gemini-omni-flash-1-2",
2007
2098
  ])
2008
2099
 
2009
2100
  export function isGeminiOmniProvider(provider: string | undefined): boolean {
2010
2101
  return !!provider && GEMINI_OMNI_PROVIDERS.has(provider)
2011
2102
  }
2012
2103
 
2104
+ /**
2105
+ * The Gemini Omni SKUs billed per second of video (Gemini Omni Flash 1.2). What
2106
+ * the family shares (V2V through the i2v handle, the panels) comes from
2107
+ * {@link GEMINI_OMNI_PROVIDERS}. These differ in two ways: the price is a
2108
+ * `:<N>s:<res>` ladder, and a run with a source video bills that clip's own
2109
+ * seconds and nothing else (the output follows the clip), so they also answer
2110
+ * {@link billsReferenceVideoSeconds}.
2111
+ */
2112
+ export const GEMINI_OMNI_PER_SECOND_PROVIDERS = new Set<string>([
2113
+ "gemini-omni-flash-1-2",
2114
+ ])
2115
+
2116
+ export function isGeminiOmniPerSecondProvider(provider: string | undefined): boolean {
2117
+ return !!provider && GEMINI_OMNI_PER_SECOND_PROVIDERS.has(provider)
2118
+ }
2119
+
2120
+ /** The longest source clip Gemini Omni Flash 1.2 takes (docs.kie.ai/market/google/gemini-omni-flash-1-2). */
2121
+ export const GEMINI_OMNI_12_MAX_SOURCE_SEC = 15
2122
+
2123
+ /** The widest trim window a request may set on a Gemini Omni source clip, in seconds. */
2124
+ export function videoSourceTrimMaxSec(provider: string | undefined): number {
2125
+ return isGeminiOmniPerSecondProvider(provider) ? GEMINI_OMNI_12_MAX_SOURCE_SEC : 10
2126
+ }
2127
+
2013
2128
  /**
2014
2129
  * Video models that are CATALOGUED and priced but have NO working dispatch
2015
2130
  * path today — selecting one fails at the router, not at validation.
@@ -2531,6 +2646,10 @@ export const VIDEO_REF_LIMITS_BY_PROVIDER: Record<
2531
2646
  // Gemini Omni Flash 1.1 — identical quota to the pro sibling
2532
2647
  // (images + 2×videos + character_ids ≤ 7).
2533
2648
  "gemini-omni-flash": { images: 7, videos: 1, characters: 3, voices: 3 },
2649
+ // Gemini Omni Flash 1.2 — up to 6 images, one source video, and images +
2650
+ // 2 for a video ≤ 7, so 5 images beside a video (the request builder holds
2651
+ // that). No `character_ids` / `audio_ids` in its schema: no characters, no voices.
2652
+ "gemini-omni-flash-1-2": { images: 6, videos: 1 },
2534
2653
  "kling-3-omni": { images: 7 }, // catalog/docs: "end frame + up to 7 reference images"
2535
2654
  // Kling 4.0 Reference — 10 images, 5 videos, 7 subjects (`characters`,
2536
2655
  // KIE `elements`) and 3 voices (reference audio, KIE `voices`), 15 in all
@@ -2703,6 +2822,9 @@ export const RESOLUTION_DURATION_PRICING: Record<string, readonly string[]> = {
2703
2822
  // (VIDEO_REF_RATE_PROVIDERS).
2704
2823
  "kling-4": ["720p", "1080p"],
2705
2824
  "kling-4-keyframes": ["720p", "1080p"],
2825
+ // Gemini Omni Flash 1.2 — per-second billing at four resolution rates.
2826
+ // Ascending; the billed default (720p) is declared in PRICING_DEFAULT_RESOLUTION.
2827
+ "gemini-omni-flash-1-2": ["360p", "720p", "1080p", "4k"],
2706
2828
  }
2707
2829
 
2708
2830
  /**
@@ -2718,15 +2840,18 @@ export const VIDEO_REF_RATE_PROVIDERS = new Set<string>([
2718
2840
 
2719
2841
  /**
2720
2842
  * Video models whose reference-VIDEO runs also bill the clips' own seconds:
2721
- * the Seedance 2 family (`unit × (input + output)`) and the
2722
- * VIDEO_REF_RATE_PROVIDERS (Kling 4.0: `unit × (output + max(output, input))`).
2843
+ * the Seedance 2 family (`unit × (input + output)`), the
2844
+ * VIDEO_REF_RATE_PROVIDERS (Kling 4.0: `unit × (output + max(output, input))`)
2845
+ * and the per-second Gemini Omni SKUs (`unit × source clip`, the output follows it).
2723
2846
  * The reservation holds the worst case from the probed clips and the
2724
2847
  * settlement meters down to what was delivered (backend
2725
2848
  * ee/billing/seedance2-ref-video-credits.ts) — this is the one gate every lane
2726
2849
  * (routes, orchestrator, worker settlement, reconcile) asks.
2727
2850
  */
2728
2851
  export function billsReferenceVideoSeconds(provider: string | undefined): boolean {
2729
- return isSeedance2Provider(provider) || (!!provider && VIDEO_REF_RATE_PROVIDERS.has(provider))
2852
+ return isSeedance2Provider(provider)
2853
+ || isGeminiOmniPerSecondProvider(provider)
2854
+ || (!!provider && VIDEO_REF_RATE_PROVIDERS.has(provider))
2730
2855
  }
2731
2856
 
2732
2857
  /**
@@ -2819,8 +2944,8 @@ export function videoProviderRequiresImage(provider: string | undefined): boolea
2819
2944
  * reference mode takes a lone last frame as the sole reference image plus a
2820
2945
  * closing-frame prompt hint. NOTHING else does: VEO ships `[imageUrl,
2821
2946
  * endFrameUrl]` verbatim (a lone end frame would reach KIE as `[null, url]`),
2822
- * the Gemini Omni branch drops the frame when there is no start frame, and the
2823
- * generic KIE path sends `end_frame` with no image param at all. So the
2947
+ * the per-clip Gemini Omni branch drops the frame when there is no start frame (Omni
2948
+ * Flash 1.2 folds it, with its own builder), and the generic KIE path sends `end_frame` with no image param at all. So the
2824
2949
  * exemption is keyed to the FOLD, not to "carries image references" — the
2825
2950
  * catalog has no capability for it, and these three family predicates are the
2826
2951
  * same membership the provider layer itself branches on (the backend's
@@ -2829,7 +2954,7 @@ export function videoProviderRequiresImage(provider: string | undefined): boolea
2829
2954
  * family here; one that does not keeps the honest `image_required` 400.
2830
2955
  */
2831
2956
  export function videoProviderFoldsLoneEndFrame(provider: string): boolean {
2832
- return isSeedance2Provider(provider) || isMinimaxH3Provider(provider) || isWan3Provider(provider)
2957
+ return isSeedance2Provider(provider) || isMinimaxH3Provider(provider) || isWan3Provider(provider) || isGeminiOmniPerSecondProvider(provider)
2833
2958
  }
2834
2959
 
2835
2960
  /**
@@ -2960,6 +3085,8 @@ export const VIDEO_AUDIO_CAPABILITY: Record<string, VideoAudioCapability> = {
2960
3085
  // dialogue; priced into the per-second rate.
2961
3086
  "kling-4": { mode: "ambient", alwaysOn: true, defaultOn: true },
2962
3087
  "kling-4-keyframes": { mode: "ambient", alwaysOn: true, defaultOn: true },
3088
+ // Gemini Omni Flash 1.2 — native audio with no on/off input in its schema.
3089
+ "gemini-omni-flash-1-2": { mode: "ambient", alwaysOn: true },
2963
3090
  // Gemini Omni (both SKUs — the pro `gemini-omni-video` and the faster
2964
3091
  // `gemini-omni-flash`; one model at two speeds, so their rows are identical
2965
3092
  // and a test pins that). Settled 2026-09-03 from Google's own documentation
@@ -3131,6 +3258,9 @@ export const VIDEO_VARIABLE_PRICING: Record<string, "duration" | "duration+audio
3131
3258
  // reference-video rate.
3132
3259
  "kling-4": "duration+resolution+ref",
3133
3260
  "kling-4-keyframes": "duration+resolution",
3261
+ // Gemini Omni Flash 1.2 — per-second at four resolution rates; a video edit
3262
+ // bills the same rates over the source clip.
3263
+ "gemini-omni-flash-1-2": "duration+resolution",
3134
3264
  }
3135
3265
 
3136
3266
  /**
@@ -3250,8 +3380,17 @@ export const PRICING_DEFAULT_RESOLUTION: Record<string, string> = {
3250
3380
  // normalizeKling4Resolution pins the same tier for anything unknown.
3251
3381
  "kling-4": "720p",
3252
3382
  "kling-4-keyframes": "720p",
3383
+ // Gemini Omni Flash 1.2 — KIE renders 720p when `resolution` is omitted, and
3384
+ // the runner sends 720p for anything off its list.
3385
+ "gemini-omni-flash-1-2": "720p",
3253
3386
  }
3254
3387
 
3388
+ /** Gemini Omni Flash 1.2 per-second tiers — one per allowed duration (3–15s). */
3389
+ const GEMINI_OMNI_12_DURATION_TIERS: Array<{ maxSeconds: number; suffix: string }> = Array.from(
3390
+ { length: 13 },
3391
+ (_, i) => ({ maxSeconds: i + 3, suffix: `${i + 3}s` }),
3392
+ )
3393
+
3255
3394
  /** HappyHorse 1.1 per-second tiers — one per allowed duration (3–15s), shared
3256
3395
  * by all three modes (t2v/i2v/ref2v) which bill at identical published rates. */
3257
3396
  const HAPPYHORSE_DURATION_TIERS: Array<{ maxSeconds: number; suffix: string }> = Array.from(
@@ -3385,6 +3524,7 @@ export const VIDEO_DURATION_TIERS: Record<string, Array<{ maxSeconds: number; su
3385
3524
  "vidu-q4": VIDU_Q4_DURATION_TIERS,
3386
3525
  "kling-4": KLING_4_DURATION_TIERS,
3387
3526
  "kling-4-keyframes": KLING_4_DURATION_TIERS,
3527
+ "gemini-omni-flash-1-2": GEMINI_OMNI_12_DURATION_TIERS,
3388
3528
  // MiniMax Hailuo 3 — true per-second billing (KIE 36.5 cr/s @2K, 22.5 cr/s
3389
3529
  // @768P). One tier per allowed second (4-15s) so the composite identifier
3390
3530
  // maps 1:1 to the seeded price — no rounding/overcharge for any on-menu
@@ -172,6 +172,10 @@ const QUALITY_MAP: Record<string, QualityMapping> = {
172
172
  "gpt-image-2-5-flare-i2i": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
173
173
  "gpt-image-2-5-sunburst": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
174
174
  "gpt-image-2-5-sunburst-i2i": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
175
+ "gpt-image-2-6-flare": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
176
+ "gpt-image-2-6-flare-i2i": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
177
+ "gpt-image-2-6-sunburst": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
178
+ "gpt-image-2-6-sunburst-i2i": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
175
179
  // Image gen — quality-style (medium/high or basic/high)
176
180
  "gpt-image": { field: "quality", values: { low: "medium", mid: "medium", high: "high" } },
177
181
  "gpt-image-i2i": { field: "quality", values: { low: "medium", mid: "medium", high: "high" } },
@@ -219,6 +223,7 @@ const QUALITY_MAP: Record<string, QualityMapping> = {
219
223
  "ltx-2.3-fast": { field: "resolution", values: { low: "1080p", mid: "2k", high: "4k" } },
220
224
  "gemini-omni-video": { field: "resolution", values: { low: "720p", mid: "1080p", high: "4k" } },
221
225
  "gemini-omni-flash": { field: "resolution", values: { low: "720p", mid: "1080p", high: "4k" } },
226
+ "gemini-omni-flash-1-2": { field: "resolution", values: { low: "720p", mid: "1080p", high: "4k" } },
222
227
  // Grok Imagine Video 1.5 — only 480p/720p (no 1080p tier); high clamps to 720p.
223
228
  "grok-imagine-video-1.5": { field: "resolution", values: { low: "480p", mid: "720p", high: "720p" } },
224
229
  // Replicate Flux 2 family — MP-based resolution (matching IMAGE_RESOLUTION_OPTIONS["flux-2-*"]).
package/src/node-refs.ts CHANGED
@@ -190,6 +190,17 @@ export function countRefModalityEdges(
190
190
  return n
191
191
  }
192
192
 
193
+ /**
194
+ * The wires that bring a node the images a run sends, besides its own source:
195
+ * its reference images, each identity node on the `assets` handle (one image at
196
+ * least), and every `image` wire after the first (the first is the source, which
197
+ * an edit's estimate counts itself). For a model priced per input image.
198
+ */
199
+ export function countImageInputEdges(edges: ReadonlyArray<RefModalityEdge>, nodeId: string): number {
200
+ const onHandle = (handle: string) => edges.filter((e) => e.target === nodeId && e.targetHandle === handle).length
201
+ return countRefModalityEdges(edges, nodeId, "image") + onHandle("assets") + Math.max(0, onHandle("image") - 1)
202
+ }
203
+
193
204
  /** A candidate contribution to the `{label}` map: the node's label, its resolved
194
205
  * output, and its direct-parent handle category (-1 = not combinable / deeper). */
195
206
  export interface RefCandidate {
@@ -57,6 +57,8 @@ export const PIPELINE_PINNABLE_IMAGE_MODELS = [
57
57
  "gpt-image-2",
58
58
  "gpt-image-2-5-flare",
59
59
  "gpt-image-2-5-sunburst",
60
+ "gpt-image-2-6-flare",
61
+ "gpt-image-2-6-sunburst",
60
62
  ] as const
61
63
  export type PipelinePinnableImageModel = (typeof PIPELINE_PINNABLE_IMAGE_MODELS)[number]
62
64
 
@@ -5,6 +5,8 @@ export const REFERENCE_BOARD_PROVIDERS = [
5
5
  "gpt-image-2",
6
6
  "gpt-image-2-5-flare",
7
7
  "gpt-image-2-5-sunburst",
8
+ "gpt-image-2-6-flare",
9
+ "gpt-image-2-6-sunburst",
8
10
  ] as const
9
11
  export type ReferenceBoardProvider = (typeof REFERENCE_BOARD_PROVIDERS)[number]
10
12