@shop-os/modelkit 0.3.1 → 0.3.2
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/CHANGELOG.md +9 -0
- package/dist/catalog.cjs +29 -2
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +9 -1
- package/dist/catalog.d.ts +9 -1
- package/dist/catalog.js +29 -2
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +29 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +29 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -286,13 +286,21 @@ var GEMINI_RATIOS = [
|
|
|
286
286
|
"5:4",
|
|
287
287
|
"adaptive"
|
|
288
288
|
];
|
|
289
|
+
var NANO_BANANA_2_1_RATIOS = [
|
|
290
|
+
...GEMINI_RATIOS.filter((r) => r !== "adaptive"),
|
|
291
|
+
"1:4",
|
|
292
|
+
"4:1",
|
|
293
|
+
"1:8",
|
|
294
|
+
"8:1",
|
|
295
|
+
"adaptive"
|
|
296
|
+
];
|
|
289
297
|
var GEMINI_PROMPT_MAX_CHARS = 5e4;
|
|
290
298
|
var GPT_IMAGE_PROMPT = { referenceSyntax: "numbered", maxChars: 32e3 };
|
|
291
|
-
function geminiImage(id, label, aliases, sizes, display, exposure, references, promptMaxChars) {
|
|
299
|
+
function geminiImage(id, label, aliases, sizes, display, exposure, references, promptMaxChars, aspectRatios = GEMINI_RATIOS) {
|
|
292
300
|
const prompt = { referenceSyntax: "caption" };
|
|
293
301
|
if (promptMaxChars !== void 0) prompt.maxChars = promptMaxChars;
|
|
294
302
|
const constraints = {
|
|
295
|
-
aspectRatios: [...
|
|
303
|
+
aspectRatios: [...aspectRatios],
|
|
296
304
|
sizes,
|
|
297
305
|
supports: ["safetySettings", "temperature"],
|
|
298
306
|
prompt
|
|
@@ -316,6 +324,21 @@ function geminiImage(id, label, aliases, sizes, display, exposure, references, p
|
|
|
316
324
|
return model;
|
|
317
325
|
}
|
|
318
326
|
var IMAGE_MODELS = [
|
|
327
|
+
geminiImage(
|
|
328
|
+
"gemini-nano-banana-2.1",
|
|
329
|
+
"Nano Banana 2.1",
|
|
330
|
+
["nb-2.1"],
|
|
331
|
+
["1K", "2K", "4K"],
|
|
332
|
+
{
|
|
333
|
+
provider: "google",
|
|
334
|
+
description: "Latest high-efficiency Nano Banana. Better realism, prompt adherence, text rendering and character consistency at Flash speed. Great for campaigns, infographics, and iterative edits.",
|
|
335
|
+
logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png"
|
|
336
|
+
},
|
|
337
|
+
["cowork", "space_builder"],
|
|
338
|
+
{ images: 14 },
|
|
339
|
+
GEMINI_PROMPT_MAX_CHARS,
|
|
340
|
+
NANO_BANANA_2_1_RATIOS
|
|
341
|
+
),
|
|
319
342
|
geminiImage(
|
|
320
343
|
"gemini-3-pro-image-preview",
|
|
321
344
|
"Nano Banana Pro",
|
|
@@ -2562,6 +2585,10 @@ var AspectRatioSchema = import_zod3.z.enum([
|
|
|
2562
2585
|
"21:9",
|
|
2563
2586
|
"9:21",
|
|
2564
2587
|
"97:30",
|
|
2588
|
+
"1:4",
|
|
2589
|
+
"4:1",
|
|
2590
|
+
"1:8",
|
|
2591
|
+
"8:1",
|
|
2565
2592
|
"adaptive"
|
|
2566
2593
|
]);
|
|
2567
2594
|
var ImageSizeSchema = import_zod3.z.enum(["512", "1K", "2K", "4K"]);
|