@shop-os/modelkit 0.2.21 → 0.2.22

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/catalog.js CHANGED
@@ -158,13 +158,16 @@ var GEMINI_RATIOS = [
158
158
  "5:4",
159
159
  "adaptive"
160
160
  ];
161
- function geminiImage(id, label, aliases, sizes, display, exposure, references) {
161
+ var GEMINI_PROMPT_MAX_CHARS = 5e4;
162
+ var GPT_IMAGE_PROMPT = { referenceSyntax: "numbered", maxChars: 32e3 };
163
+ function geminiImage(id, label, aliases, sizes, display, exposure, references, promptMaxChars) {
164
+ const prompt = { referenceSyntax: "caption" };
165
+ if (promptMaxChars !== void 0) prompt.maxChars = promptMaxChars;
162
166
  const constraints = {
163
167
  aspectRatios: [...GEMINI_RATIOS],
164
168
  sizes,
165
169
  supports: ["safetySettings", "temperature"],
166
- // google-image sends MediaRef.label as a text part beside each reference.
167
- prompt: { referenceSyntax: "caption" }
170
+ prompt
168
171
  };
169
172
  if (references !== void 0) constraints.references = references;
170
173
  const model = {
@@ -196,7 +199,8 @@ var IMAGE_MODELS = [
196
199
  logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png"
197
200
  },
198
201
  ["cowork", "space_builder"],
199
- { images: 14 }
202
+ { images: 14 },
203
+ GEMINI_PROMPT_MAX_CHARS
200
204
  ),
201
205
  geminiImage(
202
206
  "gemini-3.1-flash-image-preview",
@@ -210,7 +214,8 @@ var IMAGE_MODELS = [
210
214
  logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png"
211
215
  },
212
216
  ["cowork", "space_builder"],
213
- { images: 14 }
217
+ { images: 14 },
218
+ GEMINI_PROMPT_MAX_CHARS
214
219
  ),
215
220
  geminiImage(
216
221
  "gemini-3.1-flash-lite-image",
@@ -223,7 +228,8 @@ var IMAGE_MODELS = [
223
228
  logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png"
224
229
  },
225
230
  ["cowork", "space_builder"],
226
- { images: 14 }
231
+ { images: 14 },
232
+ GEMINI_PROMPT_MAX_CHARS
227
233
  ),
228
234
  // trigger-workflows validates 1K only; pricing seeds 2K/4K rows so allow all three.
229
235
  geminiImage(
@@ -261,7 +267,8 @@ var IMAGE_MODELS = [
261
267
  sizes: ["1K", "2K", "4K"],
262
268
  qualityOptions: ["auto", "low", "medium", "high"],
263
269
  references: { images: 16 },
264
- supports: ["quality", "count", "outputFormat"]
270
+ supports: ["quality", "count", "outputFormat"],
271
+ prompt: GPT_IMAGE_PROMPT
265
272
  },
266
273
  defaults: { size: "1K", aspectRatio: "adaptive", quality: "auto" },
267
274
  usage: { ...IMAGE_USAGE, slug: "gpt" },
@@ -296,7 +303,8 @@ var IMAGE_MODELS = [
296
303
  sizes: ["1K", "2K", "4K"],
297
304
  qualityOptions: ["auto", "low", "medium", "high", "xhigh", "max"],
298
305
  references: { images: 16 },
299
- supports: ["quality", "count", "outputFormat"]
306
+ supports: ["quality", "count", "outputFormat"],
307
+ prompt: GPT_IMAGE_PROMPT
300
308
  },
301
309
  defaults: { size: "1K", aspectRatio: "adaptive", quality: "auto" },
302
310
  usage: { ...IMAGE_USAGE },
@@ -330,7 +338,8 @@ var IMAGE_MODELS = [
330
338
  sizes: ["1K", "2K", "4K"],
331
339
  qualityOptions: ["auto", "low", "medium", "high", "xhigh", "max"],
332
340
  references: { images: 16 },
333
- supports: ["quality", "count", "outputFormat"]
341
+ supports: ["quality", "count", "outputFormat"],
342
+ prompt: GPT_IMAGE_PROMPT
334
343
  },
335
344
  defaults: { size: "1K", aspectRatio: "adaptive", quality: "auto" },
336
345
  usage: { ...IMAGE_USAGE },
@@ -453,7 +462,9 @@ var IMAGE_MODELS = [
453
462
  sizes: ["1K"],
454
463
  references: { images: 8 },
455
464
  // flux-2-pro's job type always returns image/png; only the seed is forwarded.
456
- supports: ["seed"]
465
+ supports: ["seed"],
466
+ // Prodia's flux-2-pro schema gives the prompt a maxLength of 32,768.
467
+ prompt: { referenceSyntax: "numbered", maxChars: 32768 }
457
468
  },
458
469
  defaults: { size: "1K", aspectRatio: "1:1" },
459
470
  usage: { ...IMAGE_USAGE },
@@ -1255,6 +1266,9 @@ var H3_REFERENCE_RATIOS = ["adaptive", ...H3_RATIOS];
1255
1266
  var NEGATIVE_PROMPT = "blur, distort, and low quality";
1256
1267
  var FRAMES_EXCLUDE_REFERENCES = { framesExcludeReferences: true };
1257
1268
  var KLING_PROMPT = { referenceSyntax: "numbered", maxChars: 2500 };
1269
+ var SEEDANCE_PROMPT = { referenceSyntax: "numbered", maxChars: 3e4 };
1270
+ var H3_PROMPT = { referenceSyntax: "numbered", maxChars: 5e4 };
1271
+ var OMNI_PROMPT = { referenceSyntax: "caption", maxChars: 5e4 };
1258
1272
  var BYTEDANCE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png";
1259
1273
  var GOOGLE_LOGO2 = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png";
1260
1274
  var VIDEO_MODELS = [
@@ -1378,8 +1392,7 @@ var VIDEO_MODELS = [
1378
1392
  references: { images: 6, videos: 1, videoSeconds: { max: 10 } },
1379
1393
  sourceVideoSeconds: { max: 10 },
1380
1394
  supports: [],
1381
- // generateOmniVideo sends MediaRef.label as a text part beside each image.
1382
- prompt: { referenceSyntax: "caption" },
1395
+ prompt: OMNI_PROMPT,
1383
1396
  audio: "always"
1384
1397
  },
1385
1398
  defaults: {},
@@ -1416,8 +1429,7 @@ var VIDEO_MODELS = [
1416
1429
  // First-to-last-frame interpolation: `<LAST_FRAME>` goes with `<FIRST_FRAME>`.
1417
1430
  supports: ["videoExtension", "lastFrame"],
1418
1431
  extension: { segmentSeconds: 10, maxTotalSeconds: 40 },
1419
- // generateOmniVideo sends MediaRef.label as a text part beside each image.
1420
- prompt: { referenceSyntax: "caption" },
1432
+ prompt: OMNI_PROMPT,
1421
1433
  audio: "always"
1422
1434
  },
1423
1435
  defaults: {},
@@ -1456,6 +1468,7 @@ var VIDEO_MODELS = [
1456
1468
  ratioIgnoredWith: ["firstFrame", "sourceVideo"],
1457
1469
  // No seed: 2.x echoes it but does not honour it (two seeded runs differed, 2026-10-01).
1458
1470
  supports: ["generateAudio", "lastFrame", "watermark"],
1471
+ prompt: SEEDANCE_PROMPT,
1459
1472
  audio: "optional"
1460
1473
  },
1461
1474
  defaults: {
@@ -1497,6 +1510,7 @@ var VIDEO_MODELS = [
1497
1510
  ratioIgnoredWith: ["firstFrame", "sourceVideo"],
1498
1511
  // No seed: 2.x echoes it but does not honour it (two seeded runs differed, 2026-10-01).
1499
1512
  supports: ["generateAudio", "lastFrame", "watermark"],
1513
+ prompt: SEEDANCE_PROMPT,
1500
1514
  audio: "optional"
1501
1515
  },
1502
1516
  defaults: {
@@ -1538,6 +1552,7 @@ var VIDEO_MODELS = [
1538
1552
  ratioIgnoredWith: ["firstFrame", "sourceVideo"],
1539
1553
  // No seed: 2.x echoes it but does not honour it (two seeded runs differed, 2026-10-01).
1540
1554
  supports: ["generateAudio", "lastFrame", "watermark", "taskType"],
1555
+ prompt: SEEDANCE_PROMPT,
1541
1556
  audio: "optional"
1542
1557
  },
1543
1558
  defaults: {
@@ -1699,6 +1714,7 @@ var VIDEO_MODELS = [
1699
1714
  // fal's image-to-video endpoint has no aspect_ratio; the frame sets it.
1700
1715
  ratioIgnoredWith: ["firstFrame"],
1701
1716
  supports: ["seed", "promptExpansion", "lastFrame", "safetyChecker"],
1717
+ prompt: H3_PROMPT,
1702
1718
  audio: "always"
1703
1719
  },
1704
1720
  defaults: {
@@ -1732,6 +1748,7 @@ var VIDEO_MODELS = [
1732
1748
  // fal's image-to-video endpoint has no aspect_ratio; the frame sets it.
1733
1749
  ratioIgnoredWith: ["firstFrame"],
1734
1750
  supports: ["seed", "promptExpansion", "lastFrame", "safetyChecker"],
1751
+ prompt: H3_PROMPT,
1735
1752
  audio: "always"
1736
1753
  },
1737
1754
  defaults: {
@@ -1773,6 +1790,7 @@ var VIDEO_MODELS = [
1773
1790
  videoSeconds: { min: 2, max: 15, total: 15 }
1774
1791
  },
1775
1792
  supports: ["seed", "promptExpansion", "safetyChecker"],
1793
+ prompt: H3_PROMPT,
1776
1794
  audio: "always"
1777
1795
  },
1778
1796
  defaults: {
@@ -1816,6 +1834,7 @@ var VIDEO_MODELS = [
1816
1834
  videoSeconds: { min: 2, max: 15, total: 15 }
1817
1835
  },
1818
1836
  supports: ["seed", "promptExpansion", "safetyChecker"],
1837
+ prompt: H3_PROMPT,
1819
1838
  audio: "always"
1820
1839
  },
1821
1840
  defaults: {