@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.
- package/dist/{chunk-MCIBQ5BF.js → chunk-2LRBQOKA.js} +9 -9
- package/dist/{chunk-MCIBQ5BF.js.map → chunk-2LRBQOKA.js.map} +1 -1
- package/dist/{chunk-OVIIJVXH.cjs → chunk-2LWHRJPB.cjs} +21 -21
- package/dist/{chunk-OVIIJVXH.cjs.map → chunk-2LWHRJPB.cjs.map} +1 -1
- package/dist/{chunk-C5S75476.js → chunk-3SH5ZUNJ.js} +9 -4
- package/dist/{chunk-C5S75476.js.map → chunk-3SH5ZUNJ.js.map} +1 -1
- package/dist/{chunk-KM35K2M5.cjs → chunk-4KKFO6YR.cjs} +143 -32
- package/dist/chunk-4KKFO6YR.cjs.map +1 -0
- package/dist/{chunk-3633VD2M.cjs → chunk-5SXI7IYW.cjs} +8 -8
- package/dist/{chunk-3633VD2M.cjs.map → chunk-5SXI7IYW.cjs.map} +1 -1
- package/dist/{chunk-ZKHQSG76.js → chunk-6NZWWMVY.js} +5 -5
- package/dist/chunk-6NZWWMVY.js.map +1 -0
- package/dist/{chunk-2OYV6K7D.cjs → chunk-7JM5EZF3.cjs} +13 -13
- package/dist/{chunk-2OYV6K7D.cjs.map → chunk-7JM5EZF3.cjs.map} +1 -1
- package/dist/chunk-ALVO5Q36.cjs +48 -0
- package/dist/chunk-ALVO5Q36.cjs.map +1 -0
- package/dist/{chunk-SEEQ3H22.cjs → chunk-ASSJKIZO.cjs} +59 -6
- package/dist/chunk-ASSJKIZO.cjs.map +1 -0
- package/dist/{chunk-HZL7QMXK.js → chunk-AWS4BWEC.js} +7 -3
- package/dist/chunk-AWS4BWEC.js.map +1 -0
- package/dist/chunk-BBMK5XNO.js +42 -0
- package/dist/chunk-BBMK5XNO.js.map +1 -0
- package/dist/{chunk-IPCWYKX5.cjs → chunk-BH2IDJVO.cjs} +60 -46
- package/dist/chunk-BH2IDJVO.cjs.map +1 -0
- package/dist/{chunk-HG3KKCJJ.js → chunk-C3E6UZS4.js} +3 -3
- package/dist/{chunk-HG3KKCJJ.js.map → chunk-C3E6UZS4.js.map} +1 -1
- package/dist/{chunk-N3WL6IOJ.js → chunk-D56ALOLY.js} +55 -5
- package/dist/chunk-D56ALOLY.js.map +1 -0
- package/dist/{chunk-SZUDEFX2.cjs → chunk-D5J332XS.cjs} +44 -39
- package/dist/{chunk-SZUDEFX2.cjs.map → chunk-D5J332XS.cjs.map} +1 -1
- package/dist/{chunk-ZWB3NG4M.js → chunk-EXCZD5ZY.js} +3 -3
- package/dist/{chunk-ZWB3NG4M.js.map → chunk-EXCZD5ZY.js.map} +1 -1
- package/dist/{chunk-5R6LTKE5.cjs → chunk-FFW2HTR2.cjs} +5 -5
- package/dist/{chunk-5R6LTKE5.cjs.map → chunk-FFW2HTR2.cjs.map} +1 -1
- package/dist/{chunk-KMSEU6FK.js → chunk-INGQNLY4.js} +3 -3
- package/dist/{chunk-KMSEU6FK.js.map → chunk-INGQNLY4.js.map} +1 -1
- package/dist/chunk-IOET54EV.js +39 -0
- package/dist/chunk-IOET54EV.js.map +1 -0
- package/dist/{chunk-3CHOZ573.js → chunk-IQS3WQXQ.js} +309 -18
- package/dist/chunk-IQS3WQXQ.js.map +1 -0
- package/dist/{chunk-2R74OU76.cjs → chunk-JYNW4QK7.cjs} +309 -17
- package/dist/chunk-JYNW4QK7.cjs.map +1 -0
- package/dist/{chunk-UWMXMLMV.js → chunk-KZTXGMVH.js} +3 -3
- package/dist/{chunk-UWMXMLMV.js.map → chunk-KZTXGMVH.js.map} +1 -1
- package/dist/{chunk-5DVDHL7Y.js → chunk-MBKJ7IBS.js} +21 -7
- package/dist/chunk-MBKJ7IBS.js.map +1 -0
- package/dist/{chunk-G7IUQKRU.cjs → chunk-NJTLBZIP.cjs} +51 -51
- package/dist/{chunk-G7IUQKRU.cjs.map → chunk-NJTLBZIP.cjs.map} +1 -1
- package/dist/{chunk-J4CVGAAV.cjs → chunk-NZRG5CXQ.cjs} +7 -2
- package/dist/chunk-NZRG5CXQ.cjs.map +1 -0
- package/dist/{chunk-AGTCHDG5.cjs → chunk-O33WVAYQ.cjs} +6 -6
- package/dist/{chunk-AGTCHDG5.cjs.map → chunk-O33WVAYQ.cjs.map} +1 -1
- package/dist/{chunk-WVACGZYV.cjs → chunk-OHQBQOGH.cjs} +8 -8
- package/dist/{chunk-WVACGZYV.cjs.map → chunk-OHQBQOGH.cjs.map} +1 -1
- package/dist/chunk-OWNPYQSH.cjs +283 -0
- package/dist/chunk-OWNPYQSH.cjs.map +1 -0
- package/dist/{chunk-C6IQCKJT.cjs → chunk-P5KH7GAI.cjs} +4 -4
- package/dist/{chunk-C6IQCKJT.cjs.map → chunk-P5KH7GAI.cjs.map} +1 -1
- package/dist/{chunk-25KAGSPT.js → chunk-QMP3W5GA.js} +3 -3
- package/dist/{chunk-25KAGSPT.js.map → chunk-QMP3W5GA.js.map} +1 -1
- package/dist/chunk-QSWUSXRL.cjs +53 -0
- package/dist/chunk-QSWUSXRL.cjs.map +1 -0
- package/dist/{chunk-E4YES25K.js → chunk-QTTVIQJP.js} +4 -4
- package/dist/{chunk-E4YES25K.js.map → chunk-QTTVIQJP.js.map} +1 -1
- package/dist/{chunk-6HUWQLF2.cjs → chunk-R3OIZ2BM.cjs} +6 -6
- package/dist/{chunk-6HUWQLF2.cjs.map → chunk-R3OIZ2BM.cjs.map} +1 -1
- package/dist/{chunk-YBZQXZ6A.js → chunk-R5GOPHYB.js} +115 -15
- package/dist/chunk-R5GOPHYB.js.map +1 -0
- package/dist/chunk-RKTWLAJO.cjs +27 -0
- package/dist/chunk-RKTWLAJO.cjs.map +1 -0
- package/dist/chunk-S7FCFQ6X.js +255 -0
- package/dist/chunk-S7FCFQ6X.js.map +1 -0
- package/dist/{chunk-HEF4BIMA.js → chunk-SWPTF7QJ.js} +4 -4
- package/dist/{chunk-HEF4BIMA.js.map → chunk-SWPTF7QJ.js.map} +1 -1
- package/dist/{chunk-LKCPFD5X.js → chunk-SWVGHAYO.js} +5 -3
- package/dist/chunk-SWVGHAYO.js.map +1 -0
- package/dist/{chunk-ZAK276QF.js → chunk-UFB36LWU.js} +4 -4
- package/dist/{chunk-ZAK276QF.js.map → chunk-UFB36LWU.js.map} +1 -1
- package/dist/{chunk-LYWJAXPT.js → chunk-UMPZR56R.js} +3 -3
- package/dist/{chunk-LYWJAXPT.js.map → chunk-UMPZR56R.js.map} +1 -1
- package/dist/{chunk-G5NTNQ7W.cjs → chunk-XROE3CAS.cjs} +5 -3
- package/dist/chunk-XROE3CAS.cjs.map +1 -0
- package/dist/{chunk-MTUNORQB.cjs → chunk-ZLSPGMES.cjs} +11 -11
- package/dist/{chunk-MTUNORQB.cjs.map → chunk-ZLSPGMES.cjs.map} +1 -1
- package/dist/{chunk-MGJR5OXO.js → chunk-ZPPFPQPO.js} +5 -5
- package/dist/{chunk-MGJR5OXO.js.map → chunk-ZPPFPQPO.js.map} +1 -1
- package/dist/{chunk-FIYVKW7F.cjs → chunk-ZSTL4JEJ.cjs} +12 -12
- package/dist/{chunk-FIYVKW7F.cjs.map → chunk-ZSTL4JEJ.cjs.map} +1 -1
- package/dist/entries/apps.cjs +43 -42
- package/dist/entries/apps.js +8 -7
- package/dist/entries/credits.cjs +151 -150
- package/dist/entries/credits.d.cts +4 -1
- package/dist/entries/credits.d.ts +4 -1
- package/dist/entries/credits.js +8 -7
- package/dist/entries/entities.cjs +125 -125
- package/dist/entries/entities.d.cts +1 -1
- package/dist/entries/entities.d.ts +1 -1
- package/dist/entries/entities.js +1 -1
- package/dist/entries/llm-models.d.cts +1 -1
- package/dist/entries/llm-models.d.ts +1 -1
- package/dist/entries/model-catalog.cjs +127 -66
- package/dist/entries/model-catalog.d.cts +61 -9
- package/dist/entries/model-catalog.d.ts +61 -9
- package/dist/entries/model-catalog.js +5 -4
- package/dist/entries/models.cjs +320 -276
- package/dist/entries/models.d.cts +3 -3
- package/dist/entries/models.d.ts +3 -3
- package/dist/entries/models.js +4 -4
- package/dist/entries/nodes.cjs +208 -207
- package/dist/entries/nodes.d.cts +1 -1
- package/dist/entries/nodes.d.ts +1 -1
- package/dist/entries/nodes.js +10 -9
- package/dist/entries/pipeline.cjs +161 -149
- package/dist/entries/pipeline.d.cts +165 -26
- package/dist/entries/pipeline.d.ts +165 -26
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/runtime-config.cjs +116 -0
- package/dist/entries/runtime-config.cjs.map +1 -0
- package/dist/entries/runtime-config.d.cts +308 -0
- package/dist/entries/runtime-config.d.ts +308 -0
- package/dist/entries/runtime-config.js +3 -0
- package/dist/entries/runtime-config.js.map +1 -0
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +117 -117
- package/dist/entries/video.js +4 -4
- package/dist/entries/workflow.cjs +150 -146
- package/dist/entries/workflow.d.cts +8 -1
- package/dist/entries/workflow.d.ts +8 -1
- package/dist/entries/workflow.js +2 -2
- package/dist/index.cjs +3172 -2942
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +23 -21
- package/dist/{model-catalog-Dm2UiwUe.d.cts → model-catalog-CwkG9xi-.d.cts} +40 -4
- package/dist/{model-catalog-Dm2UiwUe.d.ts → model-catalog-CwkG9xi-.d.ts} +40 -4
- package/dist/{model-constants-DZUGVDOw.d.cts → model-constants-BbsZSVTA.d.cts} +57 -13
- package/dist/{model-constants-DZUGVDOw.d.ts → model-constants-BbsZSVTA.d.ts} +57 -13
- package/package.json +6 -1
- package/src/__tests__/fixtures/root-exports.baseline.json +2 -0
- package/src/__tests__/gpt-image-2-6.test.ts +277 -0
- package/src/__tests__/gvp-supported-providers.test.ts +2 -0
- package/src/__tests__/image-model-roles.test.ts +28 -9
- package/src/__tests__/runtime-config.test.ts +398 -0
- package/src/__tests__/seedance-25-catalog-modes.test.ts +35 -0
- package/src/__tests__/voice-library-values.test.ts +24 -0
- package/src/credit-identifiers.ts +45 -1
- package/src/entries/model-catalog.ts +17 -0
- package/src/entries/models.ts +13 -0
- package/src/entries/runtime-config.ts +51 -0
- package/src/entries/workflow.ts +1 -1
- package/src/gpt-image-2-6.ts +104 -0
- package/src/image-model-roles.ts +31 -10
- package/src/index.ts +1 -0
- package/src/model-catalog.ts +341 -17
- package/src/model-constants.ts +149 -9
- package/src/node-default-mappings.ts +5 -0
- package/src/node-refs.ts +11 -0
- package/src/pipeline-types.ts +2 -0
- package/src/reference-board-templates.ts +2 -0
- package/src/runtime-config/contract.ts +492 -0
- package/src/runtime-config/worlds.ts +77 -0
- package/src/video-ui-defaults.ts +2 -1
- package/src/voices.ts +175 -2
- package/dist/chunk-2R74OU76.cjs.map +0 -1
- package/dist/chunk-3CHOZ573.js.map +0 -1
- package/dist/chunk-5DVDHL7Y.js.map +0 -1
- package/dist/chunk-ATWLKUAI.cjs +0 -34
- package/dist/chunk-ATWLKUAI.cjs.map +0 -1
- package/dist/chunk-DUL5ZLTJ.js +0 -29
- package/dist/chunk-DUL5ZLTJ.js.map +0 -1
- package/dist/chunk-G5NTNQ7W.cjs.map +0 -1
- package/dist/chunk-HD45Y7QU.cjs +0 -27
- package/dist/chunk-HD45Y7QU.cjs.map +0 -1
- package/dist/chunk-HZL7QMXK.js.map +0 -1
- package/dist/chunk-IPCWYKX5.cjs.map +0 -1
- package/dist/chunk-J4CVGAAV.cjs.map +0 -1
- package/dist/chunk-KM35K2M5.cjs.map +0 -1
- package/dist/chunk-LKCPFD5X.js.map +0 -1
- package/dist/chunk-N3WL6IOJ.js.map +0 -1
- package/dist/chunk-SEEQ3H22.cjs.map +0 -1
- package/dist/chunk-YBZQXZ6A.js.map +0 -1
- package/dist/chunk-ZKHQSG76.js.map +0 -1
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest"
|
|
2
|
+
import { buildCreditModelIdentifier, resolveNormalizedImageGen } from "../credit-identifiers.js"
|
|
3
|
+
import { MODEL_CATALOG, modelIdsByKindMode, normalizeModelInput } from "../model-catalog.js"
|
|
4
|
+
import { GPT_IMAGE_2_6_TIERED_I2I, GPT_IMAGE_2_6_TIERED_T2I, gptImage26EstimatedImages, gptImage26SentImages, isGptImage26AutoRun } from "../gpt-image-2-6.js"
|
|
5
|
+
import { countImageInputEdges } from "../node-refs.js"
|
|
6
|
+
import { DEFAULT_REQUEST_IMAGE_LIMIT, IMAGE_I2I_PROVIDERS, IMAGE_GEN_PROVIDERS, MAX_REQUEST_IMAGE_LIMIT, requestImageLimit, T2I_TO_I2I_VARIANT } from "../model-constants.js"
|
|
7
|
+
|
|
8
|
+
const ALL = [
|
|
9
|
+
"gpt-image-2-6-flare", "gpt-image-2-6-flare-i2i",
|
|
10
|
+
"gpt-image-2-6-sunburst", "gpt-image-2-6-sunburst-i2i",
|
|
11
|
+
"gpt-image-2-6-economy", "gpt-image-2-6-economy-i2i",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
describe("GPT Image 2.6 price ids", () => {
|
|
15
|
+
it("a text-to-image run is priced on quality and size", () => {
|
|
16
|
+
expect(buildCreditModelIdentifier("gpt-image-2-6-flare", "low", "2K")).toBe("gpt-image-2-6-flare:low:2K")
|
|
17
|
+
expect(buildCreditModelIdentifier("gpt-image-2-6-sunburst", "high", "4K", undefined, undefined, 0)).toBe("gpt-image-2-6-sunburst:high:4K")
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
it("no setting is the default, medium at 1K", () => {
|
|
21
|
+
expect(buildCreditModelIdentifier("gpt-image-2-6-flare")).toBe("gpt-image-2-6-flare:medium:1K")
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
it("an edit is priced on its input images too, from one to sixteen", () => {
|
|
25
|
+
const id = "gpt-image-2-6-flare-i2i"
|
|
26
|
+
expect(buildCreditModelIdentifier(id, "medium", "1K", undefined, undefined, 3)).toBe(`${id}:medium:1K:3ref`)
|
|
27
|
+
expect(buildCreditModelIdentifier(id, "medium", "1K", undefined, undefined, 0)).toBe(`${id}:medium:1K:1ref`)
|
|
28
|
+
expect(buildCreditModelIdentifier(id, "medium", "1K", undefined, undefined, 40)).toBe(`${id}:medium:1K:16ref`)
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it("a text-to-image id sent images is priced as the edit it runs as", () => {
|
|
32
|
+
expect(buildCreditModelIdentifier("gpt-image-2-6-sunburst", "low", "1K", undefined, undefined, 2))
|
|
33
|
+
.toBe("gpt-image-2-6-sunburst-i2i:low:1K:2ref")
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
it("a value off the grid lands on the default, never an id no row answers", () => {
|
|
37
|
+
expect(buildCreditModelIdentifier("gpt-image-2-6-flare", "basic", "2 MP")).toBe("gpt-image-2-6-flare:medium:1K")
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
it("Economy is one flat id, whatever is sent", () => {
|
|
41
|
+
expect(buildCreditModelIdentifier("gpt-image-2-6-economy", "high", "4K")).toBe("gpt-image-2-6-economy")
|
|
42
|
+
expect(buildCreditModelIdentifier("gpt-image-2-6-economy-i2i", undefined, undefined, undefined, undefined, 5)).toBe("gpt-image-2-6-economy-i2i")
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
it("the route's resolver swaps to the edit model and prices its images", () => {
|
|
46
|
+
const n = resolveNormalizedImageGen({ provider: "gpt-image-2-6-flare", quality: "high", resolution: "2K", refCount: 4, swapToI2i: true })
|
|
47
|
+
expect(n.modelId).toBe("gpt-image-2-6-flare-i2i")
|
|
48
|
+
expect(n.identifier).toBe("gpt-image-2-6-flare-i2i:high:2K:4ref")
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
describe("GPT Image 2.6 catalog", () => {
|
|
53
|
+
it.each(ALL)("%s is offered and is OpenAI's", (id) => {
|
|
54
|
+
expect(MODEL_CATALOG[id]?.maker).toBe("openai")
|
|
55
|
+
expect(MODEL_CATALOG[id]?.series).toBe("GPT Image")
|
|
56
|
+
expect([...IMAGE_GEN_PROVIDERS, ...IMAGE_I2I_PROVIDERS] as string[]).toContain(id)
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
it("Flare and Sunburst take six qualities at 1K, 2K and 4K, medium by default", () => {
|
|
60
|
+
for (const id of [...GPT_IMAGE_2_6_TIERED_T2I, ...GPT_IMAGE_2_6_TIERED_I2I]) {
|
|
61
|
+
expect(MODEL_CATALOG[id]?.qualities).toEqual(["auto", "low", "medium", "high", "xhigh", "max"])
|
|
62
|
+
expect(MODEL_CATALOG[id]?.defaultQuality).toBe("medium")
|
|
63
|
+
expect(MODEL_CATALOG[id]?.resolutions).toEqual(["1K", "2K", "4K"])
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
it("every quality has its own price id, Auto included", () => {
|
|
68
|
+
expect(buildCreditModelIdentifier("gpt-image-2-6-flare", "auto", "2K")).toBe("gpt-image-2-6-flare:auto:2K")
|
|
69
|
+
expect(buildCreditModelIdentifier("gpt-image-2-6-flare", "xhigh", "1K")).toBe("gpt-image-2-6-flare:xhigh:1K")
|
|
70
|
+
expect(buildCreditModelIdentifier("gpt-image-2-6-sunburst-i2i", "max", "4K", undefined, undefined, 16)).toBe("gpt-image-2-6-sunburst-i2i:max:4K:16ref")
|
|
71
|
+
expect(buildCreditModelIdentifier("gpt-image-2-6-flare-i2i", "auto", "1K", undefined, undefined, 2)).toBe("gpt-image-2-6-flare-i2i:auto:1K:2ref")
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
it("only Flare and Sunburst at Auto settle on KIE's bill", () => {
|
|
75
|
+
expect(isGptImage26AutoRun("gpt-image-2-6-flare", "auto")).toBe(true)
|
|
76
|
+
expect(isGptImage26AutoRun("gpt-image-2-6-sunburst-i2i", "auto")).toBe(true)
|
|
77
|
+
expect(isGptImage26AutoRun("gpt-image-2-6-flare", "max")).toBe(false)
|
|
78
|
+
expect(isGptImage26AutoRun("gpt-image-2-6-economy", "auto")).toBe(false)
|
|
79
|
+
expect(isGptImage26AutoRun("gpt-image-2-5-flare", "auto")).toBe(false)
|
|
80
|
+
expect(isGptImage26AutoRun(undefined, "auto")).toBe(false)
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
it.each(["auto", "xhigh", "max"])("a model without %s drops it", (quality) => {
|
|
84
|
+
expect(normalizeModelInput("gpt-image-2-5-flare", { quality }).quality).toBeUndefined()
|
|
85
|
+
expect(normalizeModelInput("gpt-image-2-6-economy", { quality }).quality).toBeUndefined()
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
it("KIE refused 2.5's extra ratios on 2.6, so none of the six offers them", () => {
|
|
89
|
+
for (const id of ALL) {
|
|
90
|
+
for (const ratio of ["27:16", "16:27", "9:8", "8:9"]) {
|
|
91
|
+
expect(MODEL_CATALOG[id]?.aspectRatios, `${id} ${ratio}`).not.toContain(ratio)
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
it("Economy is left out of the docs and the MCP model lists while it is withheld", () => {
|
|
97
|
+
expect(MODEL_CATALOG["gpt-image-2-6-economy"]?.docsHidden).toBe(true)
|
|
98
|
+
expect(MODEL_CATALOG["gpt-image-2-6-economy-i2i"]?.docsHidden).toBe(true)
|
|
99
|
+
const listed = modelIdsByKindMode("image", ["t2i", "i2i", "edit"], { includeHidden: true })
|
|
100
|
+
expect(listed).not.toContain("gpt-image-2-6-economy")
|
|
101
|
+
expect(listed).not.toContain("gpt-image-2-6-economy-i2i")
|
|
102
|
+
expect(listed).toContain("gpt-image-2-6-flare")
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
it("Economy has no quality or size setting", () => {
|
|
106
|
+
expect(normalizeModelInput("gpt-image-2-6-economy", { quality: "high", resolution: "4K" }))
|
|
107
|
+
.toMatchObject({ quality: undefined, resolution: undefined })
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
it("each text-to-image id has its edit sibling", () => {
|
|
111
|
+
for (const flavour of ["flare", "sunburst", "economy"]) {
|
|
112
|
+
expect(T2I_TO_I2I_VARIANT[`gpt-image-2-6-${flavour}`]).toBe(`gpt-image-2-6-${flavour}-i2i`)
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
describe("the background setting", () => {
|
|
118
|
+
const WITH_BACKGROUND = [...ALL, "gpt-image-2-5-flare", "gpt-image-2-5-flare-i2i", "gpt-image-2-5-sunburst", "gpt-image-2-5-sunburst-i2i"]
|
|
119
|
+
|
|
120
|
+
it.each(WITH_BACKGROUND)("%s offers auto, opaque and transparent", (id) => {
|
|
121
|
+
expect(MODEL_CATALOG[id]?.backgrounds).toEqual(["auto", "opaque", "transparent"])
|
|
122
|
+
})
|
|
123
|
+
|
|
124
|
+
it.each(["gpt-image-2", "gpt-image-2-i2i"])("%s has no background setting: KIE failed it live, so a value sent is dropped", (id) => {
|
|
125
|
+
expect(MODEL_CATALOG[id]?.backgrounds).toBeUndefined()
|
|
126
|
+
const out = normalizeModelInput(id, { background: "transparent", resolution: "2K" })
|
|
127
|
+
expect(out.background).toBeUndefined()
|
|
128
|
+
expect(out.resolution).toBe("2K")
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
it("a model without the setting drops the value and says so", () => {
|
|
132
|
+
const out = normalizeModelInput("nano-banana-pro", { background: "transparent" })
|
|
133
|
+
expect(out.background).toBeUndefined()
|
|
134
|
+
expect(out.adjustments).toEqual([expect.objectContaining({ field: "background", from: "transparent", to: undefined })])
|
|
135
|
+
})
|
|
136
|
+
|
|
137
|
+
it.each(["gpt-image-2-6-flare", "gpt-image-2-5-sunburst"])("%s: transparent moves the size to 1K and says so", (id) => {
|
|
138
|
+
const out = normalizeModelInput(id, { background: "transparent", resolution: "4K" })
|
|
139
|
+
expect(out).toMatchObject({ background: "transparent", resolution: "1K" })
|
|
140
|
+
expect(out.adjustments).toEqual([expect.objectContaining({ field: "resolution", from: "4K", to: "1K" })])
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
it("an opaque background keeps the size", () => {
|
|
144
|
+
expect(normalizeModelInput("gpt-image-2-6-flare", { background: "opaque", resolution: "4K" }))
|
|
145
|
+
.toMatchObject({ background: "opaque", resolution: "4K", adjustments: [] })
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
it("transparent with no size stays with no size (the model's 1K default)", () => {
|
|
149
|
+
expect(normalizeModelInput("gpt-image-2-6-flare", { background: "transparent" }).resolution).toBeUndefined()
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
it("the price follows the size a transparent run renders at", () => {
|
|
153
|
+
const n = resolveNormalizedImageGen({ provider: "gpt-image-2-6-flare", resolution: "4K", quality: "high", background: "transparent", refCount: 0 })
|
|
154
|
+
expect(n.identifier).toBe("gpt-image-2-6-flare:high:1K")
|
|
155
|
+
expect(n.background).toBe("transparent")
|
|
156
|
+
const old = resolveNormalizedImageGen({ provider: "gpt-image-2-5-flare", resolution: "4K", background: "transparent", refCount: 0 })
|
|
157
|
+
expect(old.identifier).toBe("gpt-image-2-5-flare")
|
|
158
|
+
})
|
|
159
|
+
})
|
|
160
|
+
|
|
161
|
+
describe("the most input images one request may carry", () => {
|
|
162
|
+
it.each(["gpt-image-2-6-flare", "gpt-image-2-6-flare-i2i", "gpt-image-2-6-sunburst", "gpt-image-2-6-sunburst-i2i"])("%s takes 16", (id) => {
|
|
163
|
+
expect(requestImageLimit(id)).toBe(16)
|
|
164
|
+
})
|
|
165
|
+
|
|
166
|
+
it.each(["gpt-image-2-6-economy-i2i", "gpt-image-2-5-flare-i2i", "gpt-image-2-i2i", "nano-banana-pro", "seedream-edit", undefined])("%s keeps the default", (id) => {
|
|
167
|
+
expect(requestImageLimit(id)).toBe(DEFAULT_REQUEST_IMAGE_LIMIT)
|
|
168
|
+
expect(DEFAULT_REQUEST_IMAGE_LIMIT).toBe(14)
|
|
169
|
+
})
|
|
170
|
+
|
|
171
|
+
it("the routes' outer bound is the largest limit", () => {
|
|
172
|
+
expect(MAX_REQUEST_IMAGE_LIMIT).toBe(16)
|
|
173
|
+
})
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
describe("GPT Image 2.6: the images a run sends", () => {
|
|
177
|
+
const A = "https://a.png"
|
|
178
|
+
const B = "https://b.png"
|
|
179
|
+
|
|
180
|
+
it("a base image is one more image", () => {
|
|
181
|
+
expect(gptImage26SentImages("gpt-image-2-6-flare", [], A)).toBe(1)
|
|
182
|
+
expect(gptImage26SentImages("gpt-image-2-6-flare", [B], A)).toBe(2)
|
|
183
|
+
})
|
|
184
|
+
|
|
185
|
+
it("a base already among the references is not counted twice", () => {
|
|
186
|
+
expect(gptImage26SentImages("gpt-image-2-6-flare", [A, B], A)).toBe(2)
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
it("no base, and any other model, is the references alone", () => {
|
|
190
|
+
expect(gptImage26SentImages("gpt-image-2-6-flare", [A], undefined)).toBe(1)
|
|
191
|
+
expect(gptImage26SentImages("flux-2-pro", [B], A)).toBe(1)
|
|
192
|
+
expect(gptImage26SentImages(undefined, [B], A)).toBe(1)
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
it("an estimate counts every source of an image", () => {
|
|
196
|
+
const data = { referenceImageUrls: [A], characterDefinitionIds: ["c1", "c2"], baseImageUrl: B }
|
|
197
|
+
expect(gptImage26EstimatedImages("gpt-image-2-6-flare", data, 1)).toBe(5)
|
|
198
|
+
expect(gptImage26EstimatedImages("gpt-image-2-6-flare-i2i", {}, 0)).toBe(1)
|
|
199
|
+
expect(gptImage26EstimatedImages("gpt-image-2-6-flare", { sourceImageUrl: A }, 0)).toBe(1)
|
|
200
|
+
})
|
|
201
|
+
|
|
202
|
+
it("an edit's estimate counts every image it sends", () => {
|
|
203
|
+
const edit = "gpt-image-2-6-flare-i2i"
|
|
204
|
+
const fourWired = Array.from({ length: 4 }, () => ({ target: "n", targetHandle: "image" }))
|
|
205
|
+
expect(gptImage26EstimatedImages(edit, {}, countImageInputEdges(fourWired, "n"))).toBe(4)
|
|
206
|
+
expect(gptImage26EstimatedImages(edit, {}, countImageInputEdges(fourWired.slice(0, 1), "n"))).toBe(1)
|
|
207
|
+
expect(gptImage26EstimatedImages(edit, { extraRefs: [{ url: A }, { url: B }] }, 0)).toBe(3)
|
|
208
|
+
expect(gptImage26EstimatedImages(edit, { referenceImageUrl: A }, 0)).toBe(2)
|
|
209
|
+
})
|
|
210
|
+
|
|
211
|
+
it("wires count reference images, identity nodes and every image wire after the source, for this node only", () => {
|
|
212
|
+
const edges = [
|
|
213
|
+
{ target: "n", targetHandle: "references" },
|
|
214
|
+
{ target: "n", targetHandle: "assets" },
|
|
215
|
+
{ target: "n", targetHandle: "image" },
|
|
216
|
+
{ target: "n", targetHandle: "image" },
|
|
217
|
+
{ target: "n", targetHandle: "prompt" },
|
|
218
|
+
{ target: "other", targetHandle: "assets" },
|
|
219
|
+
]
|
|
220
|
+
expect(countImageInputEdges(edges, "n")).toBe(3)
|
|
221
|
+
})
|
|
222
|
+
})
|
|
223
|
+
|
|
224
|
+
describe("the background setting's size rule", () => {
|
|
225
|
+
it("GPT Image 2.5: transparent above 1K moves to 1K", () => {
|
|
226
|
+
for (const id of ["gpt-image-2-5-flare", "gpt-image-2-5-sunburst-i2i"]) {
|
|
227
|
+
const r = normalizeModelInput(id, { resolution: "2K", background: "transparent" })
|
|
228
|
+
expect(r.resolution, id).toBe("1K")
|
|
229
|
+
expect(r.background, id).toBe("transparent")
|
|
230
|
+
}
|
|
231
|
+
})
|
|
232
|
+
|
|
233
|
+
it("GPT Image 2.5: opaque above 1K is not sent, and says so", () => {
|
|
234
|
+
const r = normalizeModelInput("gpt-image-2-5-flare", { resolution: "4K", background: "opaque" })
|
|
235
|
+
expect(r.resolution).toBe("4K")
|
|
236
|
+
expect(r.background).toBeUndefined()
|
|
237
|
+
expect(r.adjustments.map((a) => a.field)).toContain("background")
|
|
238
|
+
})
|
|
239
|
+
|
|
240
|
+
it("GPT Image 2.5: auto above 1K is not sent, with nothing to say", () => {
|
|
241
|
+
const r = normalizeModelInput("gpt-image-2-5-flare", { resolution: "2K", background: "auto" })
|
|
242
|
+
expect(r.background).toBeUndefined()
|
|
243
|
+
expect(r.adjustments).toEqual([])
|
|
244
|
+
})
|
|
245
|
+
|
|
246
|
+
it("GPT Image 2.5: any value at 1K is sent", () => {
|
|
247
|
+
expect(normalizeModelInput("gpt-image-2-5-flare", { resolution: "1K", background: "opaque" }).background).toBe("opaque")
|
|
248
|
+
})
|
|
249
|
+
|
|
250
|
+
it("GPT Image 2.6: opaque and auto stay at any size, transparent moves to 1K", () => {
|
|
251
|
+
expect(normalizeModelInput("gpt-image-2-6-flare", { resolution: "4K", background: "opaque" }).background).toBe("opaque")
|
|
252
|
+
const r = normalizeModelInput("gpt-image-2-6-flare", { resolution: "4K", background: "transparent" })
|
|
253
|
+
expect(r.resolution).toBe("1K")
|
|
254
|
+
expect(r.background).toBe("transparent")
|
|
255
|
+
})
|
|
256
|
+
})
|
|
257
|
+
|
|
258
|
+
describe("GPT Image 2.6 estimates and a moodboard", () => {
|
|
259
|
+
it("counts the most pictures a moodboard can add, so a quote is never below the run", () => {
|
|
260
|
+
expect(gptImage26EstimatedImages("gpt-image-2-6-flare", { direction: { style: "moodboard:abc" } }, 0)).toBe(12)
|
|
261
|
+
expect(gptImage26EstimatedImages("gpt-image-2-6-flare", { direction: { style: ["moodboard:abc"] } }, 1)).toBe(13)
|
|
262
|
+
})
|
|
263
|
+
|
|
264
|
+
it("a catalog style or a palette adds no image", () => {
|
|
265
|
+
expect(gptImage26EstimatedImages("gpt-image-2-6-flare", { direction: { style: "noir" } }, 0)).toBe(0)
|
|
266
|
+
expect(gptImage26EstimatedImages("gpt-image-2-6-flare", { direction: { colorLook: "palette:abc" } }, 0)).toBe(0)
|
|
267
|
+
expect(gptImage26EstimatedImages("gpt-image-2-6-flare", { direction: "moodboard:abc" }, 0)).toBe(0)
|
|
268
|
+
})
|
|
269
|
+
})
|
|
270
|
+
|
|
271
|
+
describe("GPT Image 2.6 keeps Auto a choice", () => {
|
|
272
|
+
it("a run with no quality renders at the default, and a value it does not take snaps there", () => {
|
|
273
|
+
expect(MODEL_CATALOG["gpt-image-2-6-flare"]?.qualities?.[0]).toBe("auto")
|
|
274
|
+
expect(normalizeModelInput("gpt-image-2-6-flare", { quality: "basic" }).quality).toBe("medium")
|
|
275
|
+
expect(normalizeModelInput("gpt-image-2-6-sunburst", { quality: "turbo" }).quality).toBe("medium")
|
|
276
|
+
})
|
|
277
|
+
})
|
|
@@ -60,6 +60,7 @@ describe("GVP_SUPPORTED_PROVIDERS", () => {
|
|
|
60
60
|
"veo3_lite",
|
|
61
61
|
"gemini-omni-video",
|
|
62
62
|
"gemini-omni-flash",
|
|
63
|
+
"gemini-omni-flash-1-2",
|
|
63
64
|
"kling-4",
|
|
64
65
|
"grok-i2v",
|
|
65
66
|
"wan-3",
|
|
@@ -214,6 +215,7 @@ describe("GVP_END_FRAME_PROVIDERS", () => {
|
|
|
214
215
|
// pro-node SKU any more.
|
|
215
216
|
"veo3.1",
|
|
216
217
|
"veo3_lite",
|
|
218
|
+
"gemini-omni-flash-1-2",
|
|
217
219
|
"wan-3",
|
|
218
220
|
"wan-3-prime",
|
|
219
221
|
])
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
IMAGE_MODEL_ROLE_DEFAULTS,
|
|
5
5
|
IMAGE_MODEL_RATIO_FALLBACKS,
|
|
6
6
|
defaultImageModel,
|
|
7
|
+
defaultImageModelForNode,
|
|
7
8
|
imageModelDrawsRatio,
|
|
8
9
|
} from "../image-model-roles.js"
|
|
9
10
|
|
|
@@ -13,7 +14,7 @@ describe("image model role defaults (decided 2026-10-08)", () => {
|
|
|
13
14
|
character: "gpt-image-2",
|
|
14
15
|
general: "gpt-image-2",
|
|
15
16
|
anchor: "gpt-image-2",
|
|
16
|
-
edit: "gpt-image-2-
|
|
17
|
+
edit: "gpt-image-2-6-flare-i2i",
|
|
17
18
|
})
|
|
18
19
|
})
|
|
19
20
|
|
|
@@ -32,24 +33,42 @@ describe("image model role defaults (decided 2026-10-08)", () => {
|
|
|
32
33
|
for (const r of [undefined, null, "", "auto", "1:1", "16:9", "9:16", "4:3", "3:4"]) {
|
|
33
34
|
expect(defaultImageModel("general", r)).toBe("gpt-image-2")
|
|
34
35
|
}
|
|
35
|
-
expect(defaultImageModel("edit", "16:9")).toBe("gpt-image-2-
|
|
36
|
+
expect(defaultImageModel("edit", "16:9")).toBe("gpt-image-2-6-flare-i2i")
|
|
36
37
|
})
|
|
37
38
|
|
|
38
|
-
it("moves wide and in-between ratios to Sunburst
|
|
39
|
-
for (const r of ["21:9", "3:2", "2:3", "
|
|
40
|
-
expect(defaultImageModel("character", r)).toBe("gpt-image-2-
|
|
41
|
-
expect(defaultImageModel("anchor", r)).toBe("gpt-image-2-
|
|
39
|
+
it("moves wide and in-between ratios to 2.6 Sunburst", () => {
|
|
40
|
+
for (const r of ["21:9", "3:2", "2:3", "4:5", "5:4"]) {
|
|
41
|
+
expect(defaultImageModel("character", r)).toBe("gpt-image-2-6-sunburst")
|
|
42
|
+
expect(defaultImageModel("anchor", r)).toBe("gpt-image-2-6-sunburst")
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
expect(defaultImageModel("general", "4:5")).toBe("gpt-image-2-6-sunburst")
|
|
45
|
+
expect(defaultImageModel("edit", "4:5")).toBe("gpt-image-2-6-flare-i2i")
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it("keeps 2.5 Sunburst behind 2.6 for a ratio only 2.5 draws, and Nano Banana Pro last", () => {
|
|
49
|
+
for (const role of ["character", "general", "anchor"] as const) {
|
|
50
|
+
expect(IMAGE_MODEL_RATIO_FALLBACKS[role]).toEqual(["gpt-image-2-6-sunburst", "gpt-image-2-5-sunburst", "nano-banana-pro"])
|
|
46
51
|
}
|
|
52
|
+
expect(IMAGE_MODEL_RATIO_FALLBACKS.edit).toEqual(["gpt-image-2-6-sunburst-i2i", "gpt-image-2-5-sunburst-i2i", "nano-banana-pro"])
|
|
53
|
+
const only25 = (MODEL_CATALOG["gpt-image-2-5-sunburst"]!.aspectRatios ?? []).filter(
|
|
54
|
+
(r) => !imageModelDrawsRatio("gpt-image-2-6-sunburst", r) && !imageModelDrawsRatio("gpt-image-2", r),
|
|
55
|
+
)
|
|
56
|
+
for (const r of only25) expect(defaultImageModel("general", r)).toBe("gpt-image-2-5-sunburst")
|
|
47
57
|
})
|
|
48
58
|
|
|
49
59
|
it("falls back to the role model when nothing draws the ratio", () => {
|
|
50
60
|
expect(defaultImageModel("general", "7:1")).toBe("gpt-image-2")
|
|
51
61
|
})
|
|
52
62
|
|
|
63
|
+
it("names each image node's default the way its route does", () => {
|
|
64
|
+
expect(defaultImageModelForNode("generate-image", "1:1")).toBe("gpt-image-2")
|
|
65
|
+
expect(defaultImageModelForNode("generate-image", "21:9")).toBe("gpt-image-2-6-sunburst")
|
|
66
|
+
expect(defaultImageModelForNode("image-to-image")).toBe("gpt-image-2-6-flare-i2i")
|
|
67
|
+
expect(defaultImageModelForNode("modify-image")).toBe("gpt-image-2-6-flare-i2i")
|
|
68
|
+
expect(defaultImageModelForNode("reference-board", "2:3")).toBe("gpt-image-2-6-sunburst")
|
|
69
|
+
expect(defaultImageModelForNode("text-to-speech")).toBeUndefined()
|
|
70
|
+
})
|
|
71
|
+
|
|
53
72
|
it("reads ratios from the catalog", () => {
|
|
54
73
|
expect(imageModelDrawsRatio("gpt-image-2", "21:9")).toBe(false)
|
|
55
74
|
expect(imageModelDrawsRatio("gpt-image-2-5-sunburst", "21:9")).toBe(true)
|