@shop-os/modelkit 0.24.0 → 0.25.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/CHANGELOG.md +23 -0
- package/dist/catalog.cjs +44 -2
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +3 -1
- package/dist/catalog.d.ts +3 -1
- package/dist/catalog.js +44 -2
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +54 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +54 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/catalog.d.cts
CHANGED
|
@@ -9,7 +9,7 @@ import { z } from 'zod';
|
|
|
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
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
|
-
type ImageSize = "512" | "1K" | "2K" | "4K";
|
|
12
|
+
type ImageSize = "512" | "1K" | "2K" | "4K" | "8K";
|
|
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. */
|
|
15
15
|
type ImageQuality = "auto" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
@@ -1336,6 +1336,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1336
1336
|
"1K": "1K";
|
|
1337
1337
|
"2K": "2K";
|
|
1338
1338
|
"4K": "4K";
|
|
1339
|
+
"8K": "8K";
|
|
1339
1340
|
}>>>;
|
|
1340
1341
|
resolutions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1341
1342
|
"360p": "360p";
|
|
@@ -1647,6 +1648,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1647
1648
|
"1K": "1K";
|
|
1648
1649
|
"2K": "2K";
|
|
1649
1650
|
"4K": "4K";
|
|
1651
|
+
"8K": "8K";
|
|
1650
1652
|
}>>;
|
|
1651
1653
|
exactSize: z.ZodOptional<z.ZodString>;
|
|
1652
1654
|
quality: z.ZodOptional<z.ZodEnum<{
|
package/dist/catalog.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { z } from 'zod';
|
|
|
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
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
|
-
type ImageSize = "512" | "1K" | "2K" | "4K";
|
|
12
|
+
type ImageSize = "512" | "1K" | "2K" | "4K" | "8K";
|
|
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. */
|
|
15
15
|
type ImageQuality = "auto" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
@@ -1336,6 +1336,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1336
1336
|
"1K": "1K";
|
|
1337
1337
|
"2K": "2K";
|
|
1338
1338
|
"4K": "4K";
|
|
1339
|
+
"8K": "8K";
|
|
1339
1340
|
}>>>;
|
|
1340
1341
|
resolutions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1341
1342
|
"360p": "360p";
|
|
@@ -1647,6 +1648,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1647
1648
|
"1K": "1K";
|
|
1648
1649
|
"2K": "2K";
|
|
1649
1650
|
"4K": "4K";
|
|
1651
|
+
"8K": "8K";
|
|
1650
1652
|
}>>;
|
|
1651
1653
|
exactSize: z.ZodOptional<z.ZodString>;
|
|
1652
1654
|
quality: z.ZodOptional<z.ZodEnum<{
|
package/dist/catalog.js
CHANGED
|
@@ -352,6 +352,34 @@ var FAL_IMAGE_MODELS = [
|
|
|
352
352
|
logo: `${LOBE}/kling-color.png`
|
|
353
353
|
}
|
|
354
354
|
},
|
|
355
|
+
{
|
|
356
|
+
// kling/v4/text-to-image; references switch to kling/v4/image-to-image (up to 10,
|
|
357
|
+
// "@Image1".."@Image10"). Per output image: $0.063 at 2K, $0.094 at 4K (Kling price page,
|
|
358
|
+
// 2026-11-17); each reference adds $0.003, which we absorb. Native 8K is ENG-4137.
|
|
359
|
+
id: "kling-image-4.0",
|
|
360
|
+
aliases: [],
|
|
361
|
+
label: "Kling Image 4.0",
|
|
362
|
+
type: "image",
|
|
363
|
+
adapter: "fal",
|
|
364
|
+
providerModelId: "kling/v4/text-to-image",
|
|
365
|
+
lifecycle: "active",
|
|
366
|
+
exposure: EXPOSURE,
|
|
367
|
+
constraints: {
|
|
368
|
+
aspectRatios: [...KLING_RATIOS, "adaptive"],
|
|
369
|
+
sizes: ["2K", "4K"],
|
|
370
|
+
references: { images: 10 },
|
|
371
|
+
supports: ["count"],
|
|
372
|
+
prompt: { referenceSyntax: "numbered", maxChars: 21e3 }
|
|
373
|
+
},
|
|
374
|
+
defaults: { size: "2K", aspectRatio: "adaptive", count: 1 },
|
|
375
|
+
usage: { ...IMAGE_USAGE },
|
|
376
|
+
pricingKind: "image_size",
|
|
377
|
+
display: {
|
|
378
|
+
provider: "kuaishou",
|
|
379
|
+
description: "Kling Image 4.0 for photoreal text-to-image, long in-image text and multi-reference editing; takes a prompt and up to 10 reference images and outputs 2K or 4K.",
|
|
380
|
+
logo: `${LOBE}/kling-color.png`
|
|
381
|
+
}
|
|
382
|
+
},
|
|
355
383
|
{
|
|
356
384
|
// fal-ai/kling-image/v3/text-to-image; a reference switches to .../v3/image-to-image, which
|
|
357
385
|
// takes exactly one image_url and no "auto" ratio. $0.028 per image.
|
|
@@ -8176,7 +8204,7 @@ var AspectRatioSchema = z3.enum([
|
|
|
8176
8204
|
"8:1",
|
|
8177
8205
|
"adaptive"
|
|
8178
8206
|
]);
|
|
8179
|
-
var ImageSizeSchema = z3.enum(["512", "1K", "2K", "4K"]);
|
|
8207
|
+
var ImageSizeSchema = z3.enum(["512", "1K", "2K", "4K", "8K"]);
|
|
8180
8208
|
var VideoResolutionSchema = z3.enum(["360p", "480p", "720p", "768p", "1080p", "2k", "4k"]);
|
|
8181
8209
|
var ImageQualitySchema = z3.enum(["auto", "low", "medium", "high", "xhigh", "max"]);
|
|
8182
8210
|
var OutputFormatSchema = z3.enum(["png", "jpeg", "webp", "gif", "svg"]);
|
|
@@ -9493,6 +9521,20 @@ var FAL_IMAGE_SPECS = /* @__PURE__ */ new Map([
|
|
|
9493
9521
|
aspectRatios: KLING_RATIOS3
|
|
9494
9522
|
}
|
|
9495
9523
|
],
|
|
9524
|
+
[
|
|
9525
|
+
// No output_format or seed field. Kling caps non-English prompts at 21,000 characters
|
|
9526
|
+
// (API update 2026-11-17), under the schema's 50,000.
|
|
9527
|
+
"kling/v4/text-to-image",
|
|
9528
|
+
{
|
|
9529
|
+
label: "Kling Image 4.0",
|
|
9530
|
+
maxReferences: 10,
|
|
9531
|
+
maxCount: 9,
|
|
9532
|
+
outputFormats: [],
|
|
9533
|
+
promptMax: 21e3,
|
|
9534
|
+
promptRequired: true,
|
|
9535
|
+
aspectRatios: [...KLING_RATIOS3, "adaptive"]
|
|
9536
|
+
}
|
|
9537
|
+
],
|
|
9496
9538
|
[
|
|
9497
9539
|
"recraft/v4.1/flash/text-to-image",
|
|
9498
9540
|
{
|
|
@@ -9922,7 +9964,7 @@ function applyFalVideoRules(model, req, callerRatio, warnings) {
|
|
|
9922
9964
|
}
|
|
9923
9965
|
|
|
9924
9966
|
// src/resolve-options.ts
|
|
9925
|
-
var SIZE_ORDER = ["512", "1K", "2K", "4K"];
|
|
9967
|
+
var SIZE_ORDER = ["512", "1K", "2K", "4K", "8K"];
|
|
9926
9968
|
var RESOLUTION_ORDER = ["360p", "480p", "720p", "768p", "1080p", "2k", "4k"];
|
|
9927
9969
|
function ratioValue(r) {
|
|
9928
9970
|
if (r === "adaptive") return 1;
|