@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
@@ -0,0 +1,51 @@
1
+ /**
2
+ * `@nodaro/shared/runtime-config` — The deployment runtime config contract: `/config.js`'s keys and their shapes, a lenient parser, and the worlds a deployment can offer.
3
+ *
4
+ * One of the package's subpath entries (see `src/index.ts`). The root
5
+ * re-exports every entry, so each name here is also importable from
6
+ * `@nodaro/shared`.
7
+ */
8
+ export {
9
+ WORLD_IDS,
10
+ WORLD_REQUIRED_NODE_TYPES,
11
+ isWorldId,
12
+ worldAllowed,
13
+ orderWorlds,
14
+ type WorldId,
15
+ type SurfaceWorlds,
16
+ } from "../runtime-config/worlds.js"
17
+ export {
18
+ RUNTIME_CONFIG_GLOBAL,
19
+ RUNTIME_CONFIG_KEYS,
20
+ SURFACE_HEADER_MODES,
21
+ SURFACE_CATALOG_IMAGES,
22
+ RUNTIME_SURFACE_DEFAULT,
23
+ UI_STRING_PRODUCTS,
24
+ isSsoOnly,
25
+ surfaceRequiresSignIn,
26
+ isBrandLogoRef,
27
+ isSameSitePath,
28
+ isHttpsOrigin,
29
+ resolveRuntimeApiBase,
30
+ resolveRuntimeSupabaseUrl,
31
+ parseRuntimeSurface,
32
+ parseRuntimeStrings,
33
+ parseRuntimeConfig,
34
+ readRuntimeConfig,
35
+ surfaceStringOverride,
36
+ surfaceUnitLabel,
37
+ uiStringManifestFile,
38
+ uiStringPlaceholders,
39
+ buildUiStringManifest,
40
+ type UiStringManifest,
41
+ type RuntimeConfigKey,
42
+ type SurfaceHeaderMode,
43
+ type SurfaceCatalogImages,
44
+ type RuntimeSurfaceSibling,
45
+ type RuntimeSurfaceBrand,
46
+ type RuntimeSurfaceBilling,
47
+ type RuntimeSurfaceStrings,
48
+ type RuntimeSurface,
49
+ type UiStringProduct,
50
+ type NodaroRuntimeConfig,
51
+ } from "../runtime-config/contract.js"
@@ -142,7 +142,7 @@ export {
142
142
  export { VARIABLES_HANDLE_ID, buildConditionVariables } from "../condition-variables.js"
143
143
  export { extractAllGeneratedResults, extractGeneratedJsonAsList, spreadJsonArrayIfSingleton } from "../generated-results.js"
144
144
  export { resolveFieldMappings, resolveLocationFields, type FieldEdgeSource } from "../resolve-field-mappings.js"
145
- export { resolveNodeRefs, parseNodeRef, canonicalVarName, NODE_REF_PATTERN, RESERVED_TEMPLATE_VARS, extractReferencedLabels, combineSameLabelRefs, refHandleCategory, REF_HANDLE_CATEGORY, REFERENCE_HANDLE_MAP, referenceModalityForHandle, FRAME_TARGET_HANDLES, countRefModalityEdges, REF_TOKEN_NAMESPACE_PREFIXES, classifyRefToken, unresolvedRefTokens } from "../node-refs.js"
145
+ export { resolveNodeRefs, parseNodeRef, canonicalVarName, NODE_REF_PATTERN, RESERVED_TEMPLATE_VARS, extractReferencedLabels, combineSameLabelRefs, refHandleCategory, REF_HANDLE_CATEGORY, REFERENCE_HANDLE_MAP, referenceModalityForHandle, FRAME_TARGET_HANDLES, countImageInputEdges, countRefModalityEdges, REF_TOKEN_NAMESPACE_PREFIXES, classifyRefToken, unresolvedRefTokens } from "../node-refs.js"
146
146
  export type { RefCandidate, ReferenceModality, RefModalityEdge, RefTokenKind } from "../node-refs.js"
147
147
  export { resolveSourceThroughConnectedList } from "../list-source-resolver.js"
148
148
  export { zipMergeLists } from "../list-merge.js"
@@ -0,0 +1,104 @@
1
+ /**
2
+ * What makes GPT Image 2.6 Flare and Sunburst price differently from every
3
+ * other image model: a quality setting AND a size, and on an edit the number of
4
+ * input images as well. Economy is a flat price and is not listed here.
5
+ *
6
+ * Only the ids and levers live in this published package. The rates and the
7
+ * formula are `backend/src/ee/billing/gpt-image-2-6-pricing.ts`.
8
+ */
9
+
10
+ export const GPT_IMAGE_2_6_TIERED_T2I = ["gpt-image-2-6-flare", "gpt-image-2-6-sunburst"] as const
11
+ export const GPT_IMAGE_2_6_TIERED_I2I = ["gpt-image-2-6-flare-i2i", "gpt-image-2-6-sunburst-i2i"] as const
12
+ export type GptImage26TieredModel =
13
+ | (typeof GPT_IMAGE_2_6_TIERED_T2I)[number]
14
+ | (typeof GPT_IMAGE_2_6_TIERED_I2I)[number]
15
+
16
+ export const GPT_IMAGE_2_6_QUALITIES = ["auto", "low", "medium", "high", "xhigh", "max"] as const
17
+ export type GptImage26Quality = (typeof GPT_IMAGE_2_6_QUALITIES)[number]
18
+ /**
19
+ * The quality whose price is known only after the run: KIE picks the level. It
20
+ * is reserved at the Max row and settled on what KIE really billed; every other
21
+ * quality keeps its fixed row.
22
+ */
23
+ export const GPT_IMAGE_2_6_METERED_QUALITY: GptImage26Quality = "auto"
24
+ export const GPT_IMAGE_2_6_RESOLUTIONS = ["1K", "2K", "4K"] as const
25
+ export type GptImage26Resolution = (typeof GPT_IMAGE_2_6_RESOLUTIONS)[number]
26
+
27
+ export const GPT_IMAGE_2_6_DEFAULT_QUALITY: GptImage26Quality = "medium"
28
+ export const GPT_IMAGE_2_6_DEFAULT_RESOLUTION: GptImage26Resolution = "1K"
29
+ /** The most input images an edit is priced for (`REF_IMAGE_MAX_LIMITS`). */
30
+ export const GPT_IMAGE_2_6_MAX_INPUT_IMAGES = 16
31
+
32
+ export function isGptImage26I2i(model: string): boolean {
33
+ return (GPT_IMAGE_2_6_TIERED_I2I as readonly string[]).includes(model)
34
+ }
35
+
36
+ export function isGptImage26Tiered(model: string): model is GptImage26TieredModel {
37
+ return isGptImage26I2i(model) || (GPT_IMAGE_2_6_TIERED_T2I as readonly string[]).includes(model)
38
+ }
39
+
40
+ /** True for a run whose charge is settled on KIE's own bill: Flare or Sunburst at quality Auto. */
41
+ export function isGptImage26AutoRun(provider: unknown, quality: unknown): boolean {
42
+ return typeof provider === "string" && isGptImage26Tiered(provider) && quality === GPT_IMAGE_2_6_METERED_QUALITY
43
+ }
44
+
45
+ /**
46
+ * The images a Generate Image run sends to KIE on GPT Image 2.6: its references
47
+ * and, when it edits a base image, that image too (the worker puts it first,
48
+ * unless it is already one of the references). Any other model is priced on its
49
+ * references alone.
50
+ */
51
+ export function gptImage26SentImages(
52
+ provider: string | undefined,
53
+ references: readonly string[],
54
+ baseImageUrl: unknown,
55
+ ): number {
56
+ const countsBase =
57
+ provider !== undefined &&
58
+ isGptImage26Tiered(provider) &&
59
+ typeof baseImageUrl === "string" &&
60
+ baseImageUrl.length > 0 &&
61
+ !references.includes(baseImageUrl)
62
+ return references.length + (countsBase ? 1 : 0)
63
+ }
64
+
65
+ /**
66
+ * The most pictures a saved moodboard holds. A run sends them as references in
67
+ * the seats the node's own images leave free. An estimate cannot read the
68
+ * moodboard, so it counts this many.
69
+ */
70
+ export const GPT_IMAGE_2_6_MOODBOARD_MAX_IMAGES = 12
71
+
72
+ function namesMoodboard(direction: unknown): boolean {
73
+ if (direction === null || typeof direction !== "object") return false
74
+ const style = (direction as Record<string, unknown>).style
75
+ return (Array.isArray(style) ? style : [style]).some(
76
+ (value) => typeof value === "string" && value.startsWith("moodboard:"),
77
+ )
78
+ }
79
+
80
+ /**
81
+ * The input images a workflow estimate counts for one node on a model priced
82
+ * per input image: every list on the node, its source or base image, what is
83
+ * wired in, a moodboard its direction names, and an image-to-image model's own
84
+ * source. An estimate may over-quote, never under.
85
+ */
86
+ export function gptImage26EstimatedImages(
87
+ model: string,
88
+ data: Record<string, unknown>,
89
+ wiredImages: number,
90
+ ): number {
91
+ const listed = (v: unknown) => (Array.isArray(v) ? v.length : 0)
92
+ const single = (v: unknown) => (typeof v === "string" && v.length > 0 ? 1 : 0)
93
+ return (
94
+ listed(data.referenceImageUrls) +
95
+ listed(data.characterDefinitionIds) +
96
+ listed(data.extraRefs) +
97
+ single(data.referenceImageUrl) +
98
+ single(data.baseImageUrl) +
99
+ single(data.sourceImageUrl) +
100
+ wiredImages +
101
+ (namesMoodboard(data.direction) ? GPT_IMAGE_2_6_MOODBOARD_MAX_IMAGES : 0) +
102
+ (isGptImage26I2i(model) ? 1 : 0)
103
+ )
104
+ }
@@ -12,19 +12,20 @@ import { MODEL_CATALOG } from "./model-catalog.js"
12
12
  * Decided on 2026-10-08 from a blind five-model comparison, quality
13
13
  * first and price second:
14
14
  * - characters, general text-to-image and video anchors on GPT Image 2;
15
- * - edits on GPT Image 2.5 Flare.
15
+ * - edits on the current GPT Image Flare (2.6 since 2026-11-09), which renders
16
+ * at its default Medium when a run names no quality.
16
17
  * With reference images attached, GPT Image 2 runs as its i2i sibling (the
17
18
  * provider swaps it), so `character` covers identity-from-reference too.
18
19
  *
19
20
  * Nano Banana Pro is no longer a default. It remains a FALLBACK only: last in
20
- * the ratio chain below (it is the one model here that draws 4:5 and 5:4), the
21
- * GPT-family safety-block retry, and the swimwear dressing model.
21
+ * the ratio chain below, the GPT-family safety-block retry, and the swimwear
22
+ * dressing model.
22
23
  */
23
24
  export const IMAGE_MODEL_ROLE_DEFAULTS = {
24
25
  character: "gpt-image-2",
25
26
  general: "gpt-image-2",
26
27
  anchor: "gpt-image-2",
27
- edit: "gpt-image-2-5-flare-i2i",
28
+ edit: "gpt-image-2-6-flare-i2i",
28
29
  } as const
29
30
 
30
31
  export type ImageModelRole = keyof typeof IMAGE_MODEL_ROLE_DEFAULTS
@@ -32,14 +33,15 @@ export type ImageModelRole = keyof typeof IMAGE_MODEL_ROLE_DEFAULTS
32
33
  /**
33
34
  * Where a role's model goes when it cannot draw the requested aspect ratio.
34
35
  * GPT Image 2 draws only auto / 1:1 / 16:9 / 9:16 / 4:3 / 3:4, so 21:9, 3:2,
35
- * 2:3 and the other wide or in-between ratios move to GPT Image 2.5 Sunburst,
36
- * and 4:5 / 5:4 (which neither GPT generation draws) to Nano Banana Pro.
36
+ * 2:3, 4:5, 5:4 and the other wide or in-between ratios move to GPT Image 2.6
37
+ * Sunburst. GPT Image 2.5 Sunburst stays behind it for the ratios only 2.5
38
+ * draws, and Nano Banana Pro comes last.
37
39
  */
38
40
  export const IMAGE_MODEL_RATIO_FALLBACKS: Readonly<Record<ImageModelRole, readonly string[]>> = {
39
- character: ["gpt-image-2-5-sunburst", "nano-banana-pro"],
40
- general: ["gpt-image-2-5-sunburst", "nano-banana-pro"],
41
- anchor: ["gpt-image-2-5-sunburst", "nano-banana-pro"],
42
- edit: ["gpt-image-2-5-sunburst-i2i", "nano-banana-pro"],
41
+ character: ["gpt-image-2-6-sunburst", "gpt-image-2-5-sunburst", "nano-banana-pro"],
42
+ general: ["gpt-image-2-6-sunburst", "gpt-image-2-5-sunburst", "nano-banana-pro"],
43
+ anchor: ["gpt-image-2-6-sunburst", "gpt-image-2-5-sunburst", "nano-banana-pro"],
44
+ edit: ["gpt-image-2-6-sunburst-i2i", "gpt-image-2-5-sunburst-i2i", "nano-banana-pro"],
43
45
  }
44
46
 
45
47
  /** True when the model's catalog entry lists the ratio (or no ratio was asked for). */
@@ -60,3 +62,22 @@ export function defaultImageModel(role: ImageModelRole, aspectRatio?: string | n
60
62
  if (imageModelDrawsRatio(primary, aspectRatio)) return primary
61
63
  return IMAGE_MODEL_RATIO_FALLBACKS[role].find((id) => imageModelDrawsRatio(id, aspectRatio)) ?? primary
62
64
  }
65
+
66
+ /**
67
+ * The model an image node that names none runs on, by node type: the same
68
+ * default its route and its workflow branch apply. For the node types that
69
+ * have one; undefined for any other.
70
+ */
71
+ export function defaultImageModelForNode(nodeType: string, aspectRatio?: string | null): string | undefined {
72
+ switch (nodeType) {
73
+ case "generate-image":
74
+ return defaultImageModel("general", aspectRatio)
75
+ case "image-to-image":
76
+ case "modify-image":
77
+ return defaultImageModel("edit", aspectRatio)
78
+ case "reference-board":
79
+ return defaultImageModel("character", aspectRatio)
80
+ default:
81
+ return undefined
82
+ }
83
+ }
package/src/index.ts CHANGED
@@ -17,6 +17,7 @@ export * from "./entries/models.js"
17
17
  export * from "./entries/nodes.js"
18
18
  export * from "./entries/organizations.js"
19
19
  export * from "./entries/pipeline.js"
20
+ export * from "./entries/runtime-config.js"
20
21
  export * from "./entries/scene3d.js"
21
22
  export * from "./entries/social.js"
22
23
  export * from "./entries/types.js"