@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 CHANGED
@@ -9,6 +9,15 @@ header in the release PR.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.3.2] - Unreleased
13
+
14
+ ### Added
15
+ - Aspect ratios `1:4`, `4:1`, `1:8` and `8:1` in the `AspectRatio` type and the row schema. Gemini Nano Banana 2.1 serves them at 1K, 2K and 4K.
16
+ - Snapshot row `gemini-nano-banana-2.1` (alias `nb-2.1`, 1K/2K/4K, 14 references, the four new ratios plus the usual Gemini set). It runs on the existing `google-image` adapter.
17
+
18
+ ### Live rows to update after publish
19
+ The live `gemini-nano-banana-2.1` rows (dev, stg, prod) keep the old ratio list until the four ratios are added in pro-admin. An app on 0.3.1 or older rejects a row that carries a ratio it does not know, so edit the live rows only after every app that reads the catalog runs 0.3.2.
20
+
12
21
  ## [0.3.1] - Unreleased
13
22
 
14
23
  ### Added
package/dist/catalog.cjs CHANGED
@@ -222,13 +222,21 @@ var GEMINI_RATIOS = [
222
222
  "5:4",
223
223
  "adaptive"
224
224
  ];
225
+ var NANO_BANANA_2_1_RATIOS = [
226
+ ...GEMINI_RATIOS.filter((r) => r !== "adaptive"),
227
+ "1:4",
228
+ "4:1",
229
+ "1:8",
230
+ "8:1",
231
+ "adaptive"
232
+ ];
225
233
  var GEMINI_PROMPT_MAX_CHARS = 5e4;
226
234
  var GPT_IMAGE_PROMPT = { referenceSyntax: "numbered", maxChars: 32e3 };
227
- function geminiImage(id, label, aliases, sizes, display, exposure, references, promptMaxChars) {
235
+ function geminiImage(id, label, aliases, sizes, display, exposure, references, promptMaxChars, aspectRatios = GEMINI_RATIOS) {
228
236
  const prompt = { referenceSyntax: "caption" };
229
237
  if (promptMaxChars !== void 0) prompt.maxChars = promptMaxChars;
230
238
  const constraints = {
231
- aspectRatios: [...GEMINI_RATIOS],
239
+ aspectRatios: [...aspectRatios],
232
240
  sizes,
233
241
  supports: ["safetySettings", "temperature"],
234
242
  prompt
@@ -252,6 +260,21 @@ function geminiImage(id, label, aliases, sizes, display, exposure, references, p
252
260
  return model;
253
261
  }
254
262
  var IMAGE_MODELS = [
263
+ geminiImage(
264
+ "gemini-nano-banana-2.1",
265
+ "Nano Banana 2.1",
266
+ ["nb-2.1"],
267
+ ["1K", "2K", "4K"],
268
+ {
269
+ provider: "google",
270
+ 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.",
271
+ logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png"
272
+ },
273
+ ["cowork", "space_builder"],
274
+ { images: 14 },
275
+ GEMINI_PROMPT_MAX_CHARS,
276
+ NANO_BANANA_2_1_RATIOS
277
+ ),
255
278
  geminiImage(
256
279
  "gemini-3-pro-image-preview",
257
280
  "Nano Banana Pro",
@@ -2507,6 +2530,10 @@ var AspectRatioSchema = import_zod3.z.enum([
2507
2530
  "21:9",
2508
2531
  "9:21",
2509
2532
  "97:30",
2533
+ "1:4",
2534
+ "4:1",
2535
+ "1:8",
2536
+ "8:1",
2510
2537
  "adaptive"
2511
2538
  ]);
2512
2539
  var ImageSizeSchema = import_zod3.z.enum(["512", "1K", "2K", "4K"]);