@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/catalog.d.cts
CHANGED
|
@@ -8,7 +8,7 @@ import { z } from 'zod';
|
|
|
8
8
|
|
|
9
9
|
/** The AI SDK video model spelling: a catalog id or a provider video model instance. */
|
|
10
10
|
type VideoModel = Parameters<typeof experimental_generateVideo>[0]["model"];
|
|
11
|
-
type AspectRatio = "1:1" | "16:9" | "9:16" | "4:3" | "3:4" | "3:2" | "2:3" | "4:5" | "5:4" | "21:9" | "9:21" | "97:30" | "adaptive";
|
|
11
|
+
type AspectRatio = "1:1" | "16:9" | "9:16" | "4:3" | "3:4" | "3:2" | "2:3" | "4:5" | "5:4" | "21:9" | "9:21" | "97:30" | "1:4" | "4:1" | "1:8" | "8:1" | "adaptive";
|
|
12
12
|
type ImageSize = "512" | "1K" | "2K" | "4K";
|
|
13
13
|
type VideoResolution = "360p" | "480p" | "720p" | "768p" | "1080p" | "2k" | "4k";
|
|
14
14
|
/** "xhigh" and "max" exist only on gpt-image-2.5; gpt-image-2 rejects them at the provider. */
|
|
@@ -689,6 +689,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
689
689
|
"21:9": "21:9";
|
|
690
690
|
"9:21": "9:21";
|
|
691
691
|
"97:30": "97:30";
|
|
692
|
+
"1:4": "1:4";
|
|
693
|
+
"4:1": "4:1";
|
|
694
|
+
"1:8": "1:8";
|
|
695
|
+
"8:1": "8:1";
|
|
692
696
|
adaptive: "adaptive";
|
|
693
697
|
}>>>;
|
|
694
698
|
sizes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
@@ -824,6 +828,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
824
828
|
"21:9": "21:9";
|
|
825
829
|
"9:21": "9:21";
|
|
826
830
|
"97:30": "97:30";
|
|
831
|
+
"1:4": "1:4";
|
|
832
|
+
"4:1": "4:1";
|
|
833
|
+
"1:8": "1:8";
|
|
834
|
+
"8:1": "8:1";
|
|
827
835
|
adaptive: "adaptive";
|
|
828
836
|
}>>;
|
|
829
837
|
size: z.ZodOptional<z.ZodEnum<{
|
package/dist/catalog.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { z } from 'zod';
|
|
|
8
8
|
|
|
9
9
|
/** The AI SDK video model spelling: a catalog id or a provider video model instance. */
|
|
10
10
|
type VideoModel = Parameters<typeof experimental_generateVideo>[0]["model"];
|
|
11
|
-
type AspectRatio = "1:1" | "16:9" | "9:16" | "4:3" | "3:4" | "3:2" | "2:3" | "4:5" | "5:4" | "21:9" | "9:21" | "97:30" | "adaptive";
|
|
11
|
+
type AspectRatio = "1:1" | "16:9" | "9:16" | "4:3" | "3:4" | "3:2" | "2:3" | "4:5" | "5:4" | "21:9" | "9:21" | "97:30" | "1:4" | "4:1" | "1:8" | "8:1" | "adaptive";
|
|
12
12
|
type ImageSize = "512" | "1K" | "2K" | "4K";
|
|
13
13
|
type VideoResolution = "360p" | "480p" | "720p" | "768p" | "1080p" | "2k" | "4k";
|
|
14
14
|
/** "xhigh" and "max" exist only on gpt-image-2.5; gpt-image-2 rejects them at the provider. */
|
|
@@ -689,6 +689,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
689
689
|
"21:9": "21:9";
|
|
690
690
|
"9:21": "9:21";
|
|
691
691
|
"97:30": "97:30";
|
|
692
|
+
"1:4": "1:4";
|
|
693
|
+
"4:1": "4:1";
|
|
694
|
+
"1:8": "1:8";
|
|
695
|
+
"8:1": "8:1";
|
|
692
696
|
adaptive: "adaptive";
|
|
693
697
|
}>>>;
|
|
694
698
|
sizes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
@@ -824,6 +828,10 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
824
828
|
"21:9": "21:9";
|
|
825
829
|
"9:21": "9:21";
|
|
826
830
|
"97:30": "97:30";
|
|
831
|
+
"1:4": "1:4";
|
|
832
|
+
"4:1": "4:1";
|
|
833
|
+
"1:8": "1:8";
|
|
834
|
+
"8:1": "8:1";
|
|
827
835
|
adaptive: "adaptive";
|
|
828
836
|
}>>;
|
|
829
837
|
size: z.ZodOptional<z.ZodEnum<{
|
package/dist/catalog.js
CHANGED
|
@@ -158,13 +158,21 @@ var GEMINI_RATIOS = [
|
|
|
158
158
|
"5:4",
|
|
159
159
|
"adaptive"
|
|
160
160
|
];
|
|
161
|
+
var NANO_BANANA_2_1_RATIOS = [
|
|
162
|
+
...GEMINI_RATIOS.filter((r) => r !== "adaptive"),
|
|
163
|
+
"1:4",
|
|
164
|
+
"4:1",
|
|
165
|
+
"1:8",
|
|
166
|
+
"8:1",
|
|
167
|
+
"adaptive"
|
|
168
|
+
];
|
|
161
169
|
var GEMINI_PROMPT_MAX_CHARS = 5e4;
|
|
162
170
|
var GPT_IMAGE_PROMPT = { referenceSyntax: "numbered", maxChars: 32e3 };
|
|
163
|
-
function geminiImage(id, label, aliases, sizes, display, exposure, references, promptMaxChars) {
|
|
171
|
+
function geminiImage(id, label, aliases, sizes, display, exposure, references, promptMaxChars, aspectRatios = GEMINI_RATIOS) {
|
|
164
172
|
const prompt = { referenceSyntax: "caption" };
|
|
165
173
|
if (promptMaxChars !== void 0) prompt.maxChars = promptMaxChars;
|
|
166
174
|
const constraints = {
|
|
167
|
-
aspectRatios: [...
|
|
175
|
+
aspectRatios: [...aspectRatios],
|
|
168
176
|
sizes,
|
|
169
177
|
supports: ["safetySettings", "temperature"],
|
|
170
178
|
prompt
|
|
@@ -188,6 +196,21 @@ function geminiImage(id, label, aliases, sizes, display, exposure, references, p
|
|
|
188
196
|
return model;
|
|
189
197
|
}
|
|
190
198
|
var IMAGE_MODELS = [
|
|
199
|
+
geminiImage(
|
|
200
|
+
"gemini-nano-banana-2.1",
|
|
201
|
+
"Nano Banana 2.1",
|
|
202
|
+
["nb-2.1"],
|
|
203
|
+
["1K", "2K", "4K"],
|
|
204
|
+
{
|
|
205
|
+
provider: "google",
|
|
206
|
+
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.",
|
|
207
|
+
logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png"
|
|
208
|
+
},
|
|
209
|
+
["cowork", "space_builder"],
|
|
210
|
+
{ images: 14 },
|
|
211
|
+
GEMINI_PROMPT_MAX_CHARS,
|
|
212
|
+
NANO_BANANA_2_1_RATIOS
|
|
213
|
+
),
|
|
191
214
|
geminiImage(
|
|
192
215
|
"gemini-3-pro-image-preview",
|
|
193
216
|
"Nano Banana Pro",
|
|
@@ -2443,6 +2466,10 @@ var AspectRatioSchema = z3.enum([
|
|
|
2443
2466
|
"21:9",
|
|
2444
2467
|
"9:21",
|
|
2445
2468
|
"97:30",
|
|
2469
|
+
"1:4",
|
|
2470
|
+
"4:1",
|
|
2471
|
+
"1:8",
|
|
2472
|
+
"8:1",
|
|
2446
2473
|
"adaptive"
|
|
2447
2474
|
]);
|
|
2448
2475
|
var ImageSizeSchema = z3.enum(["512", "1K", "2K", "4K"]);
|