@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
@@ -316,6 +316,9 @@ export interface ModelCatalogEntry {
316
316
  referenceSyntax?: "@image(n)" | "[Image N]"
317
317
  aspectRatios?: readonly string[]
318
318
  resolutions?: readonly string[]
319
+ /** The resolution a caller who names none lands on when it is not the
320
+ * cheapest entry (see `defaultResolutionFor`). */
321
+ defaultResolution?: string
319
322
  /**
320
323
  * What this model actually RENDERS for a resolution outside `resolutions`.
321
324
  *
@@ -335,6 +338,26 @@ export interface ModelCatalogEntry {
335
338
  */
336
339
  unlistedResolutionRendersAs?: string
337
340
  qualities?: readonly string[]
341
+ /**
342
+ * The quality a run renders at when none is named, where that is not the
343
+ * first listed. A value the model does not take snaps to it, as does a panel.
344
+ */
345
+ defaultQuality?: string
346
+ /**
347
+ * The image background settings this model takes (`auto`, `opaque`,
348
+ * `transparent`). Absent: no such setting, and a value sent is dropped.
349
+ */
350
+ backgrounds?: readonly string[]
351
+ /**
352
+ * The one resolution a transparent background renders at, where the provider
353
+ * limits it. `normalizeModelInput` moves the size there and says so.
354
+ */
355
+ transparentResolution?: string
356
+ /**
357
+ * The provider takes the background setting, whatever its value, only at
358
+ * `transparentResolution`. Above it nothing is sent.
359
+ */
360
+ backgroundOnlyAtTransparentResolution?: true
338
361
  durations?: readonly number[]
339
362
  /**
340
363
  * The length (seconds) this model renders when the request names no duration
@@ -381,6 +404,13 @@ export interface ModelCatalogEntry {
381
404
  * Frontend pickers ignore this flag.
382
405
  */
383
406
  mcpHidden?: boolean
407
+ /**
408
+ * Left out of the public docs' model tables and the model lists in the MCP
409
+ * tool descriptions, while a provider can't serve this model. Not an
410
+ * availability switch: what hides a model from every menu and refuses a run
411
+ * is the admin's `model_pricing.is_enabled` (backend lib/model-switch.ts).
412
+ */
413
+ docsHidden?: boolean
384
414
  /**
385
415
  * The provider's safety filter is known to be non-deterministic on this
386
416
  * model — the platform retries a blocked request once; `fallback` names
@@ -407,14 +437,14 @@ export interface ModelRecommendation {
407
437
 
408
438
  export const MODEL_RECOMMENDATIONS: readonly ModelRecommendation[] = [
409
439
  // image
410
- { intent: "best for typography / logos / text-heavy", modelIds: ["gpt-image-2", "gpt-image-2-5-flare"], note: "GPT Image 2 for exact copy, labels and non-Latin text; GPT Image 2.5 Flare is close and faster." },
440
+ { intent: "best for typography / logos / text-heavy", modelIds: ["gpt-image-2", "gpt-image-2-6-flare"], note: "GPT Image 2 for exact copy, labels and non-Latin text; GPT Image 2.6 Flare for posters and layouts, and faster." },
411
441
  // Notes name the RANKING, not the price — the price sits in the generated
412
442
  // table directly below them and in `pricing`, so restating it here just
413
443
  // creates a copy that rots (this one said "1 credit" long after it was 2).
414
444
  { intent: "cheapest realistic image", modelIds: ["z-image", "qwen", "imagen4-fast"], note: "Z-Image is the cheapest. Qwen / Imagen4 Fast for slightly higher quality." },
415
- { intent: "highest fidelity image", modelIds: ["gpt-image-2", "gpt-image-2-5-sunburst", "imagen4-ultra"], note: "GPT Image 2 for characters and identity; GPT Image 2.5 Sunburst for wide or in-between ratios GPT Image 2 can't draw." },
416
- { intent: "image edit / restyle", modelIds: ["gpt-image-2-5-flare-i2i", "gpt-image-2-i2i", "seedream-5-pro-i2i"], note: "GPT Image 2.5 Flare keeps pose, framing and product detail; GPT Image 2 i2i for identity-critical edits; Seedream 5 Pro for instruction-based edits." },
417
- { intent: "highest-resolution image", modelIds: ["topaz-image-upscale", "gpt-image-2", "gpt-image-2-5-sunburst"], note: "Generate at the model's top tier, then Topaz upscale 4x (Topaz's only lever is the 1x/2x/4x factor)." },
445
+ { intent: "highest fidelity image", modelIds: ["gpt-image-2", "gpt-image-2-6-sunburst", "imagen4-ultra"], note: "GPT Image 2 for characters and identity; GPT Image 2.6 Sunburst for wide or in-between ratios GPT Image 2 can't draw." },
446
+ { intent: "image edit / restyle", modelIds: ["gpt-image-2-6-flare-i2i", "gpt-image-2-i2i", "seedream-5-pro-i2i"], note: "GPT Image 2.6 Flare changes what you ask and keeps the rest; GPT Image 2 i2i for identity-critical edits; Seedream 5 Pro for instruction-based edits." },
447
+ { intent: "highest-resolution image", modelIds: ["topaz-image-upscale", "gpt-image-2", "gpt-image-2-6-sunburst"], note: "Generate at the model's top tier, then Topaz upscale 4x (Topaz's only lever is the 1x/2x/4x factor)." },
418
448
  { intent: "background removal / cutout", modelIds: ["recraft-remove-bg"], note: "Cheap, no prompt needed." },
419
449
  // video
420
450
  { intent: "best cinematic video", modelIds: ["veo3", "kling-3.0", "seedance-2"], note: "VEO 3.1 Quality for premium narrative; Kling 3.0 for music-synced motion; Seedance 2 for reference-driven consistency." },
@@ -459,6 +489,24 @@ const GPT_IMAGE_2_5_RATIOS = [
459
489
  "auto", "1:1", "3:2", "2:3", "4:3", "3:4", "16:9", "9:16",
460
490
  "21:9", "27:16", "16:27", "9:8", "8:9",
461
491
  ] as const
492
+ // GPT Image 2.6 Flare and Sunburst: auto plus fifteen ratios, Economy a shorter
493
+ // list of its own (docs.kie.ai/market/gpt/gpt-image-2-6-*).
494
+ const GPT_IMAGE_2_6_RATIOS = [
495
+ "auto", "1:1", "3:2", "2:3", "4:3", "3:4", "5:4", "4:5", "16:9", "9:16",
496
+ "2:1", "1:2", "21:9", "9:21", "3:1", "1:3",
497
+ ] as const
498
+ const GPT_IMAGE_2_6_ECONOMY_RATIOS = ["auto", "1:1", "16:9", "9:16", "3:2", "2:3", "21:9", "4:3"] as const
499
+ const GPT_IMAGE_2_6_VALUE_LABELS = {
500
+ "3:2": "3:2 (Landscape)", "2:3": "2:3 (Portrait)",
501
+ "5:4": "5:4 (Near-square)", "4:5": "4:5 (Near-square)",
502
+ "2:1": "2:1 (Wide)", "1:2": "1:2 (Vertical)",
503
+ "9:21": "9:21 (Ultra-tall)", "3:1": "3:1 (Banner)", "1:3": "1:3 (Vertical banner)",
504
+ // Auto takes the shared label; it is an aspect ratio on these models too.
505
+ "low": "Low", "medium": "Medium", "high": "High", "xhigh": "Extra High", "max": "Max",
506
+ } as const
507
+ // The GPT Image background setting. KIE renders a transparent one at 1K only
508
+ // (`transparentResolution`), which normalizeModelInput enforces.
509
+ const GPT_IMAGE_BACKGROUNDS = ["auto", "opaque", "transparent"] as const
462
510
  const IMAGEN4_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"] as const
463
511
  const IDEOGRAM_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"] as const
464
512
  const SEEDREAM_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "21:9"] as const
@@ -718,8 +766,8 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
718
766
  maker: "black-forest-labs",
719
767
  label: "Flux 2 Klein (Open)",
720
768
  series: "Flux",
721
- description: "Open Flux 2 9B from BFL — fast, no safety filter. Runs direct on Replicate.",
722
- useCases: ["realistic", "fast", "unfiltered"],
769
+ description: "Open Flux 2 9B from BFL — fast. Runs direct on Replicate.",
770
+ useCases: ["realistic", "fast"],
723
771
  features: ["reference-image"],
724
772
  aspectRatios: FLUX_RATIOS,
725
773
  resolutions: ["0.5 MP", "1 MP", "2 MP", "4 MP"],
@@ -737,8 +785,8 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
737
785
  maker: "black-forest-labs",
738
786
  label: "Kontext Multi (Open)",
739
787
  series: "Flux",
740
- description: "Multi-image Flux Kontext Pro via Replicate — up to 4 input images, no safety filter.",
741
- useCases: ["edit", "multi-reference", "unfiltered"],
788
+ description: "Multi-image Flux Kontext Pro via Replicate — up to 4 input images.",
789
+ useCases: ["edit", "multi-reference"],
742
790
  features: ["reference-image"],
743
791
  aspectRatios: KONTEXT_RATIOS,
744
792
  pricing: [{ identifier: "kontext-multi", credits: 30 }],
@@ -751,8 +799,8 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
751
799
  maker: "black-forest-labs",
752
800
  label: "Flux 2 Pro (Safety Tolerance)",
753
801
  series: "Flux",
754
- description: "BFL Flux 2 Pro flagship via Replicate — exposes the `safety_tolerance` lever pinned to 5 (max for Pro). Accepts up to 4 reference images.",
755
- useCases: ["realistic", "high-quality", "unfiltered", "reference"],
802
+ description: "BFL Flux 2 Pro flagship via Replicate. Accepts up to 4 reference images.",
803
+ useCases: ["realistic", "high-quality", "reference"],
756
804
  features: ["reference-image"],
757
805
  aspectRatios: FLUX_RATIOS,
758
806
  resolutions: ["0.5 MP", "1 MP", "2 MP", "4 MP"],
@@ -770,8 +818,8 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
770
818
  maker: "black-forest-labs",
771
819
  label: "Flux 2 Max (Safety Tolerance)",
772
820
  series: "Flux",
773
- description: "BFL Flux 2 Max — even larger sibling of Pro via Replicate, safety_tolerance=5, up to 8 reference images. Variable pricing by MP and ref count.",
774
- useCases: ["realistic", "high-quality", "unfiltered", "multi-reference"],
821
+ description: "BFL Flux 2 Max — even larger sibling of Pro via Replicate, up to 8 reference images. Variable pricing by MP and ref count.",
822
+ useCases: ["realistic", "high-quality", "multi-reference"],
775
823
  features: ["reference-image"],
776
824
  aspectRatios: FLUX_RATIOS,
777
825
  resolutions: ["0.5 MP", "1 MP", "2 MP", "4 MP"],
@@ -878,6 +926,9 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
878
926
  features: ["reference-image"],
879
927
  aspectRatios: GPT_IMAGE_2_5_RATIOS,
880
928
  resolutions: ["1K", "2K", "4K"],
929
+ backgrounds: GPT_IMAGE_BACKGROUNDS,
930
+ transparentResolution: "1K",
931
+ backgroundOnlyAtTransparentResolution: true,
881
932
  pricing: [
882
933
  { identifier: "gpt-image-2-5-flare", credits: 15, note: "1K default" },
883
934
  { identifier: "gpt-image-2-5-flare:2K", credits: 25, note: "2K" },
@@ -903,6 +954,9 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
903
954
  features: ["reference-image"],
904
955
  aspectRatios: GPT_IMAGE_2_5_RATIOS,
905
956
  resolutions: ["1K", "2K", "4K"],
957
+ backgrounds: GPT_IMAGE_BACKGROUNDS,
958
+ transparentResolution: "1K",
959
+ backgroundOnlyAtTransparentResolution: true,
906
960
  pricing: [
907
961
  { identifier: "gpt-image-2-5-flare-i2i", credits: 15, note: "1K default" },
908
962
  { identifier: "gpt-image-2-5-flare-i2i:2K", credits: 25, note: "2K" },
@@ -928,6 +982,9 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
928
982
  features: ["reference-image"],
929
983
  aspectRatios: GPT_IMAGE_2_5_RATIOS,
930
984
  resolutions: ["1K", "2K", "4K"],
985
+ backgrounds: GPT_IMAGE_BACKGROUNDS,
986
+ transparentResolution: "1K",
987
+ backgroundOnlyAtTransparentResolution: true,
931
988
  pricing: [
932
989
  { identifier: "gpt-image-2-5-sunburst", credits: 15, note: "1K default" },
933
990
  { identifier: "gpt-image-2-5-sunburst:2K", credits: 25, note: "2K" },
@@ -953,6 +1010,9 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
953
1010
  features: ["reference-image"],
954
1011
  aspectRatios: GPT_IMAGE_2_5_RATIOS,
955
1012
  resolutions: ["1K", "2K", "4K"],
1013
+ backgrounds: GPT_IMAGE_BACKGROUNDS,
1014
+ transparentResolution: "1K",
1015
+ backgroundOnlyAtTransparentResolution: true,
956
1016
  pricing: [
957
1017
  { identifier: "gpt-image-2-5-sunburst-i2i", credits: 15, note: "1K default" },
958
1018
  { identifier: "gpt-image-2-5-sunburst-i2i:2K", credits: 25, note: "2K" },
@@ -965,6 +1025,185 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
965
1025
  },
966
1026
  safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
967
1027
  },
1028
+ "gpt-image-2-6-flare": {
1029
+ id: "gpt-image-2-6-flare",
1030
+ kind: "image",
1031
+ modes: ["t2i"] as const,
1032
+ family: "OpenAI",
1033
+ maker: "openai",
1034
+ label: "GPT Image 2.6 Flare",
1035
+ series: "GPT Image",
1036
+ description: "Fast GPT Image 2.6 - pick it for speed: posters, product shots and quick iteration, with stronger layouts. Up to 4K, quality from low to max or auto (priced up to the max), a transparent background at 1K.",
1037
+ useCases: ["typography", "high-res", "general", "draft"],
1038
+ features: ["reference-image"],
1039
+ aspectRatios: GPT_IMAGE_2_6_RATIOS,
1040
+ resolutions: ["1K", "2K", "4K"],
1041
+ qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
1042
+ defaultQuality: "medium",
1043
+ backgrounds: GPT_IMAGE_BACKGROUNDS,
1044
+ transparentResolution: "1K",
1045
+ pricing: [
1046
+ { identifier: "gpt-image-2-6-flare", credits: 20, note: "medium, 1K default" },
1047
+ { identifier: "gpt-image-2-6-flare:low:1K", credits: 12, note: "low, 1K" },
1048
+ { identifier: "gpt-image-2-6-flare:low:2K", credits: 23, note: "low, 2K" },
1049
+ { identifier: "gpt-image-2-6-flare:low:4K", credits: 38, note: "low, 4K" },
1050
+ { identifier: "gpt-image-2-6-flare:medium:1K", credits: 20, note: "medium, 1K" },
1051
+ { identifier: "gpt-image-2-6-flare:medium:2K", credits: 40, note: "medium, 2K" },
1052
+ { identifier: "gpt-image-2-6-flare:medium:4K", credits: 67, note: "medium, 4K" },
1053
+ { identifier: "gpt-image-2-6-flare:high:1K", credits: 24, note: "high, 1K" },
1054
+ { identifier: "gpt-image-2-6-flare:high:2K", credits: 49, note: "high, 2K" },
1055
+ { identifier: "gpt-image-2-6-flare:high:4K", credits: 81, note: "high, 4K" },
1056
+ { identifier: "gpt-image-2-6-flare:xhigh:1K", credits: 43, note: "extra high, 1K" },
1057
+ { identifier: "gpt-image-2-6-flare:xhigh:2K", credits: 86, note: "extra high, 2K" },
1058
+ { identifier: "gpt-image-2-6-flare:xhigh:4K", credits: 143, note: "extra high, 4K" },
1059
+ { identifier: "gpt-image-2-6-flare:max:1K", credits: 96, note: "max, 1K" },
1060
+ { identifier: "gpt-image-2-6-flare:max:2K", credits: 193, note: "max, 2K" },
1061
+ { identifier: "gpt-image-2-6-flare:max:4K", credits: 321, note: "max, 4K" },
1062
+ { identifier: "gpt-image-2-6-flare:auto:1K", credits: 96, note: "auto, 1K: the most it can cost, settled on what it really cost" },
1063
+ { identifier: "gpt-image-2-6-flare:auto:2K", credits: 193, note: "auto, 2K: the most it can cost, settled on what it really cost" },
1064
+ { identifier: "gpt-image-2-6-flare:auto:4K", credits: 321, note: "auto, 4K: the most it can cost, settled on what it really cost" },
1065
+ ],
1066
+ valueLabels: GPT_IMAGE_2_6_VALUE_LABELS,
1067
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
1068
+ },
1069
+ "gpt-image-2-6-flare-i2i": {
1070
+ id: "gpt-image-2-6-flare-i2i",
1071
+ kind: "image",
1072
+ modes: ["i2i"] as const,
1073
+ family: "OpenAI",
1074
+ maker: "openai",
1075
+ label: "GPT Image 2.6 Flare (I2I)",
1076
+ series: "GPT Image",
1077
+ description: "Fast GPT Image 2.6 edits - up to 16 input images, priced per image. Pick it while iterating.",
1078
+ useCases: ["edit", "high-res"],
1079
+ features: ["reference-image"],
1080
+ aspectRatios: GPT_IMAGE_2_6_RATIOS,
1081
+ resolutions: ["1K", "2K", "4K"],
1082
+ qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
1083
+ defaultQuality: "medium",
1084
+ backgrounds: GPT_IMAGE_BACKGROUNDS,
1085
+ transparentResolution: "1K",
1086
+ pricing: [
1087
+ { identifier: "gpt-image-2-6-flare-i2i", credits: 20, note: "medium, 1K default" },
1088
+ { identifier: "gpt-image-2-6-flare-i2i:low:1K:1ref", credits: 17, note: "low, 1K, one input image (the least)" },
1089
+ { identifier: "gpt-image-2-6-flare-i2i:medium:1K:1ref", credits: 26, note: "medium, 1K, one input image" },
1090
+ { identifier: "gpt-image-2-6-flare-i2i:high:4K:16ref", credits: 169, note: "high, 4K, sixteen input images" },
1091
+ { identifier: "gpt-image-2-6-flare-i2i:max:4K:16ref", credits: 409, note: "max, 4K, sixteen input images (the most)" },
1092
+ { identifier: "gpt-image-2-6-flare-i2i:auto:1K:1ref", credits: 101, note: "auto, 1K, one input image: the most it can cost, settled on what it really cost" },
1093
+ ],
1094
+ valueLabels: GPT_IMAGE_2_6_VALUE_LABELS,
1095
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
1096
+ },
1097
+ "gpt-image-2-6-sunburst": {
1098
+ id: "gpt-image-2-6-sunburst",
1099
+ kind: "image",
1100
+ modes: ["t2i"] as const,
1101
+ family: "OpenAI",
1102
+ maker: "openai",
1103
+ label: "GPT Image 2.6 Sunburst",
1104
+ series: "GPT Image",
1105
+ description: "Precision GPT Image 2.6 - pick it when every detail counts: the strongest consistency across edits and the finest detail. Up to 4K, quality from low to max or auto (priced up to the max), a transparent background at 1K.",
1106
+ useCases: ["typography", "high-res", "general"],
1107
+ features: ["reference-image"],
1108
+ aspectRatios: GPT_IMAGE_2_6_RATIOS,
1109
+ resolutions: ["1K", "2K", "4K"],
1110
+ qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
1111
+ defaultQuality: "medium",
1112
+ backgrounds: GPT_IMAGE_BACKGROUNDS,
1113
+ transparentResolution: "1K",
1114
+ pricing: [
1115
+ { identifier: "gpt-image-2-6-sunburst", credits: 20, note: "medium, 1K default" },
1116
+ { identifier: "gpt-image-2-6-sunburst:low:1K", credits: 12, note: "low, 1K" },
1117
+ { identifier: "gpt-image-2-6-sunburst:low:2K", credits: 23, note: "low, 2K" },
1118
+ { identifier: "gpt-image-2-6-sunburst:low:4K", credits: 38, note: "low, 4K" },
1119
+ { identifier: "gpt-image-2-6-sunburst:medium:1K", credits: 20, note: "medium, 1K" },
1120
+ { identifier: "gpt-image-2-6-sunburst:medium:2K", credits: 40, note: "medium, 2K" },
1121
+ { identifier: "gpt-image-2-6-sunburst:medium:4K", credits: 67, note: "medium, 4K" },
1122
+ { identifier: "gpt-image-2-6-sunburst:high:1K", credits: 24, note: "high, 1K" },
1123
+ { identifier: "gpt-image-2-6-sunburst:high:2K", credits: 49, note: "high, 2K" },
1124
+ { identifier: "gpt-image-2-6-sunburst:high:4K", credits: 81, note: "high, 4K" },
1125
+ { identifier: "gpt-image-2-6-sunburst:xhigh:1K", credits: 43, note: "extra high, 1K" },
1126
+ { identifier: "gpt-image-2-6-sunburst:xhigh:2K", credits: 86, note: "extra high, 2K" },
1127
+ { identifier: "gpt-image-2-6-sunburst:xhigh:4K", credits: 143, note: "extra high, 4K" },
1128
+ { identifier: "gpt-image-2-6-sunburst:max:1K", credits: 96, note: "max, 1K" },
1129
+ { identifier: "gpt-image-2-6-sunburst:max:2K", credits: 193, note: "max, 2K" },
1130
+ { identifier: "gpt-image-2-6-sunburst:max:4K", credits: 321, note: "max, 4K" },
1131
+ { identifier: "gpt-image-2-6-sunburst:auto:1K", credits: 96, note: "auto, 1K: the most it can cost, settled on what it really cost" },
1132
+ { identifier: "gpt-image-2-6-sunburst:auto:2K", credits: 193, note: "auto, 2K: the most it can cost, settled on what it really cost" },
1133
+ { identifier: "gpt-image-2-6-sunburst:auto:4K", credits: 321, note: "auto, 4K: the most it can cost, settled on what it really cost" },
1134
+ ],
1135
+ valueLabels: GPT_IMAGE_2_6_VALUE_LABELS,
1136
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
1137
+ },
1138
+ "gpt-image-2-6-sunburst-i2i": {
1139
+ id: "gpt-image-2-6-sunburst-i2i",
1140
+ kind: "image",
1141
+ modes: ["i2i"] as const,
1142
+ family: "OpenAI",
1143
+ maker: "openai",
1144
+ label: "GPT Image 2.6 Sunburst (I2I)",
1145
+ series: "GPT Image",
1146
+ description: "Precision GPT Image 2.6 edits - up to 16 input images, priced per image. Pick it for finished, detail-critical edits.",
1147
+ useCases: ["edit", "high-res"],
1148
+ features: ["reference-image"],
1149
+ aspectRatios: GPT_IMAGE_2_6_RATIOS,
1150
+ resolutions: ["1K", "2K", "4K"],
1151
+ qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
1152
+ defaultQuality: "medium",
1153
+ backgrounds: GPT_IMAGE_BACKGROUNDS,
1154
+ transparentResolution: "1K",
1155
+ pricing: [
1156
+ { identifier: "gpt-image-2-6-sunburst-i2i", credits: 20, note: "medium, 1K default" },
1157
+ { identifier: "gpt-image-2-6-sunburst-i2i:low:1K:1ref", credits: 17, note: "low, 1K, one input image (the least)" },
1158
+ { identifier: "gpt-image-2-6-sunburst-i2i:medium:1K:1ref", credits: 26, note: "medium, 1K, one input image" },
1159
+ { identifier: "gpt-image-2-6-sunburst-i2i:high:4K:16ref", credits: 169, note: "high, 4K, sixteen input images" },
1160
+ { identifier: "gpt-image-2-6-sunburst-i2i:max:4K:16ref", credits: 409, note: "max, 4K, sixteen input images (the most)" },
1161
+ { identifier: "gpt-image-2-6-sunburst-i2i:auto:1K:1ref", credits: 101, note: "auto, 1K, one input image: the most it can cost, settled on what it really cost" },
1162
+ ],
1163
+ valueLabels: GPT_IMAGE_2_6_VALUE_LABELS,
1164
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
1165
+ },
1166
+ // Economy is withheld since 2026-11-09: KIE answers every Economy request with
1167
+ // an internal error, on its own playground too. Migration 611 switched the two
1168
+ // ids off (`model_pricing.is_enabled`), which hides them from every menu and
1169
+ // refuses a run. Turning the two rows on at /admin/models brings them back;
1170
+ // `docsHidden` keeps them out of the docs until it is removed here.
1171
+ "gpt-image-2-6-economy": {
1172
+ id: "gpt-image-2-6-economy",
1173
+ kind: "image",
1174
+ modes: ["t2i"] as const,
1175
+ family: "OpenAI",
1176
+ maker: "openai",
1177
+ label: "GPT Image 2.6 Economy",
1178
+ docsHidden: true,
1179
+ series: "GPT Image",
1180
+ description: "The same GPT Image 2.6 at a flat low price, 1K only - pick it for volume.",
1181
+ useCases: ["general", "draft"],
1182
+ features: ["reference-image"],
1183
+ aspectRatios: GPT_IMAGE_2_6_ECONOMY_RATIOS,
1184
+ backgrounds: GPT_IMAGE_BACKGROUNDS,
1185
+ pricing: [{ identifier: "gpt-image-2-6-economy", credits: 13, note: "1K flat" }],
1186
+ valueLabels: GPT_IMAGE_2_6_VALUE_LABELS,
1187
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
1188
+ },
1189
+ "gpt-image-2-6-economy-i2i": {
1190
+ id: "gpt-image-2-6-economy-i2i",
1191
+ kind: "image",
1192
+ modes: ["i2i"] as const,
1193
+ family: "OpenAI",
1194
+ maker: "openai",
1195
+ label: "GPT Image 2.6 Economy (I2I)",
1196
+ docsHidden: true,
1197
+ series: "GPT Image",
1198
+ description: "Flat-price GPT Image 2.6 edits, 1K only, up to 16 input images - pick it for volume.",
1199
+ useCases: ["edit", "draft"],
1200
+ features: ["reference-image"],
1201
+ aspectRatios: GPT_IMAGE_2_6_ECONOMY_RATIOS,
1202
+ backgrounds: GPT_IMAGE_BACKGROUNDS,
1203
+ pricing: [{ identifier: "gpt-image-2-6-economy-i2i", credits: 13, note: "1K flat" }],
1204
+ valueLabels: GPT_IMAGE_2_6_VALUE_LABELS,
1205
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" },
1206
+ },
968
1207
 
969
1208
  // ── Ideogram ──
970
1209
  // Ideogram models use a `rendering_speed` (TURBO / BALANCED / QUALITY)
@@ -1690,6 +1929,32 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
1690
1929
  { identifier: "gemini-omni-flash:4k:vref", credits: 630, note: "video-edit 4K" },
1691
1930
  ],
1692
1931
  },
1932
+ "gemini-omni-flash-1-2": {
1933
+ id: "gemini-omni-flash-1-2",
1934
+ kind: "video",
1935
+ modes: ["i2v", "t2v"] as const, // V2V is served via the i2v handle, not a catalog mode
1936
+ family: "Google",
1937
+ maker: "google",
1938
+ label: "Gemini Omni Flash 1.2",
1939
+ series: "Gemini",
1940
+ description: "Google Gemini Omni Flash 1.2 — 3–15s video with native sound, from 360p to 4K: from text, up to 6 reference images, exact first and last frames, or a video edit. Priced per second.",
1941
+ useCases: ["cinematic", "fast"],
1942
+ features: ["audio", "reference-image", "reference-to-video", "end-frame"],
1943
+ aspectRatios: ["16:9", "9:16", "auto"],
1944
+ resolutions: ["360p", "720p", "1080p", "4k"],
1945
+ defaultResolution: "720p",
1946
+ unlistedResolutionRendersAs: "720p",
1947
+ durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1948
+ defaultDuration: 8,
1949
+ pricing: [
1950
+ { identifier: "gemini-omni-flash-1-2", credits: 180, note: "default 8s 720p — see :Ns:res variants" },
1951
+ { identifier: "gemini-omni-flash-1-2:3s:360p", credits: 30, note: "3s 360p (min)" },
1952
+ { identifier: "gemini-omni-flash-1-2:8s:720p", credits: 180, note: "8s 720p (the default tier)" },
1953
+ { identifier: "gemini-omni-flash-1-2:8s:1080p", credits: 200, note: "8s 1080p" },
1954
+ { identifier: "gemini-omni-flash-1-2:8s:4k", credits: 440, note: "8s 4K" },
1955
+ { identifier: "gemini-omni-flash-1-2:15s:4k", credits: 830, note: "15s 4K (max)" },
1956
+ ],
1957
+ },
1693
1958
 
1694
1959
  // ── Kling ──
1695
1960
  "kling": {
@@ -2010,7 +2275,10 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
2010
2275
  "seedance-2-5": {
2011
2276
  id: "seedance-2-5",
2012
2277
  kind: "video",
2013
- modes: ["i2v", "t2v"] as const,
2278
+ // `v2v`: it edits a clip by instruction on the same route as the other edit
2279
+ // models (/v1/video-to-video, through its reference lane, in the clip's own
2280
+ // ratio and length). It still makes a clip from words or a picture.
2281
+ modes: ["i2v", "t2v", "v2v"] as const,
2014
2282
  family: "Bytedance",
2015
2283
  maker: "bytedance",
2016
2284
  label: "Seedance 2.5",
@@ -3676,10 +3944,14 @@ export function validateModelInput(
3676
3944
  * The resolution a Flux 2 model should land on when its stored value is absent
3677
3945
  * or invalid. Flux 2 exposes ascending megapixel options ("0.5 MP"…"4 MP"), so
3678
3946
  * snapping to `options[0]` would silently downgrade every node to the cheapest
3679
- * tier; each variant has a sensible mid default instead. Returns undefined for
3680
- * every non-Flux-2 model (they snap to `options[0]` normally).
3947
+ * tier; each variant has a sensible mid default instead. A model can also
3948
+ * declare one (`defaultResolution`, Gemini Omni Flash 1.2: its cheapest tier is
3949
+ * a 360p preview). Returns undefined for every other model (they snap to
3950
+ * `options[0]` normally).
3681
3951
  */
3682
3952
  export function defaultResolutionFor(modelId: string): string | undefined {
3953
+ const declared = MODEL_CATALOG[modelId]?.defaultResolution
3954
+ if (declared) return declared
3683
3955
  if (!isFlux2Model(modelId)) return undefined
3684
3956
  return modelId === "flux-2-klein" ? "1 MP" : "2 MP"
3685
3957
  }
@@ -3704,7 +3976,7 @@ function sameOptionValue(a: string | number, b: string | number): boolean {
3704
3976
 
3705
3977
  /** One correction `normalizeModelInput` made, for disclosure to the user. */
3706
3978
  export interface ModelInputAdjustment {
3707
- field: "aspectRatio" | "resolution" | "quality" | "duration"
3979
+ field: "aspectRatio" | "resolution" | "quality" | "duration" | "background"
3708
3980
  /** The value that was asked for. */
3709
3981
  from: string | number
3710
3982
  /** What it became — `undefined` means the lever was dropped entirely. */
@@ -3717,6 +3989,7 @@ export interface NormalizedModelInput {
3717
3989
  resolution?: string
3718
3990
  quality?: string
3719
3991
  duration?: number
3992
+ background?: string
3720
3993
  /** Empty when the input was already valid. */
3721
3994
  adjustments: ModelInputAdjustment[]
3722
3995
  }
@@ -3838,6 +4111,7 @@ export function normalizeModelInput(
3838
4111
  resolution?: string
3839
4112
  quality?: string
3840
4113
  duration?: number
4114
+ background?: string
3841
4115
  },
3842
4116
  context: ModelInputContext = {},
3843
4117
  ): NormalizedModelInput {
@@ -3904,7 +4178,8 @@ export function normalizeModelInput(
3904
4178
  m.resolutions,
3905
4179
  defaultResolutionFor(modelId),
3906
4180
  )
3907
- out.quality = snap("quality", input.quality, m.qualities)
4181
+ out.quality = snap("quality", input.quality, m.qualities, m.defaultQuality)
4182
+ out.background = snap("background", input.background, m.backgrounds)
3908
4183
  out.duration =
3909
4184
  m.autoDuration === true && isAutoVideoDuration(input.duration)
3910
4185
  ? input.duration
@@ -3933,6 +4208,42 @@ export function normalizeModelInput(
3933
4208
  }
3934
4209
  }
3935
4210
 
4211
+ // A transparent background only renders at the size the provider allows it.
4212
+ // Priced after this, so the run pays for the size it renders.
4213
+ if (
4214
+ out.background === "transparent" &&
4215
+ m.transparentResolution !== undefined &&
4216
+ out.resolution !== undefined &&
4217
+ out.resolution !== m.transparentResolution
4218
+ ) {
4219
+ adjustments.push({
4220
+ field: "resolution",
4221
+ from: out.resolution,
4222
+ to: m.transparentResolution,
4223
+ reason: `${m.label} only renders a transparent background at ${m.transparentResolution}.`,
4224
+ })
4225
+ out.resolution = m.transparentResolution
4226
+ }
4227
+
4228
+ // Above that size such a model takes no background setting at all. `auto` is
4229
+ // what it does anyway, so only `opaque` is a change worth saying.
4230
+ if (
4231
+ m.backgroundOnlyAtTransparentResolution &&
4232
+ out.background !== undefined &&
4233
+ out.resolution !== undefined &&
4234
+ out.resolution !== m.transparentResolution
4235
+ ) {
4236
+ if (out.background !== "auto") {
4237
+ adjustments.push({
4238
+ field: "background",
4239
+ from: out.background,
4240
+ to: undefined,
4241
+ reason: `${m.label} only takes a background setting at ${m.transparentResolution}.`,
4242
+ })
4243
+ }
4244
+ out.background = undefined
4245
+ }
4246
+
3936
4247
  return out
3937
4248
  }
3938
4249
 
@@ -4175,6 +4486,7 @@ const MODEL_VALUE_LABELS: Record<string, string> = {
4175
4486
  "2k": "2K",
4176
4487
  "8K": "8K (Ultra)",
4177
4488
  // qualities
4489
+ "low": "Low (Fast)",
4178
4490
  "medium": "Medium (Balanced)",
4179
4491
  "high": "High (Detailed)",
4180
4492
  "basic": "Basic (2K)",
@@ -4318,6 +4630,17 @@ export function qualityOptionsByKind(kind: ModelKind): Record<string, LabeledOpt
4318
4630
  return out
4319
4631
  }
4320
4632
 
4633
+ /** Same shape as `qualityOptionsByKind` but for `backgrounds`. */
4634
+ export function backgroundOptionsByKind(kind: ModelKind): Record<string, LabeledOption[]> {
4635
+ const out: Record<string, LabeledOption[]> = {}
4636
+ for (const m of Object.values(MODEL_CATALOG)) {
4637
+ if (m.kind !== kind) continue
4638
+ if (!m.backgrounds) continue
4639
+ out[m.id] = m.backgrounds.map((v) => ({ value: v, label: decorateLabel(m, v) }))
4640
+ }
4641
+ return out
4642
+ }
4643
+
4321
4644
  /** One shaped model row for a picker — capabilities derived from the catalog. */
4322
4645
  export interface ModelMenuOption {
4323
4646
  /** Catalog id (the API enum value). */
@@ -4398,6 +4721,7 @@ export function modelIdsByKindMode(
4398
4721
  .filter((m) => (kind === null ? true : m.kind === kind))
4399
4722
  .filter((m) => m.modes.some((md) => modes.includes(md)))
4400
4723
  .filter((m) => includeHidden || !m.mcpHidden)
4724
+ .filter((m) => !m.docsHidden)
4401
4725
  .map((m) => m.id)
4402
4726
  .sort()
4403
4727
  if (ids.length === 0) {