@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 CHANGED
@@ -9,6 +9,29 @@ header in the release PR.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.25.0] - Unreleased
13
+
14
+ ### Added
15
+ - `8K` image size tier (ENG-4137): `ImageSize`, the row schema, the SDK-style `size` option and
16
+ the resolver's size order. Kling Image 4.0 maps `8K` to fal's `8K` resolution. No bundled row
17
+ lists 8K yet: a consumer on an older kit drops a row that does, so `kling-image-4.0` gains 8K
18
+ in a later release, once every consumer runs this one.
19
+
20
+ ### Fixed
21
+ - Coercing a size above every tier a row offers now picks the largest tier below it. Before,
22
+ a size missing from the order (8K) coerced to the row's smallest tier.
23
+
24
+ ## [0.24.1] - Unreleased
25
+
26
+ ### Added
27
+ - `kling-image-4.0` (ENG-4129): Kling Image 4.0 on fal, `kling/v4/text-to-image`; references
28
+ switch to `kling/v4/image-to-image` (up to 10, `@Image1`..`@Image10`). Sizes 2K and 4K only
29
+ (v4 has no 1K; native 8K needs an `8K` ImageSize, ENG-4137). Ratios: the eight Kling ratios plus
30
+ `adaptive` (fal's `auto`), count 1-9. The endpoints have no `output_format` or `seed` field, so
31
+ the row does not list them. Prompt cap 21,000 (Kling's non-English limit). $0.063 per image at
32
+ 2K, $0.094 at 4K; reference images ($0.003 each) are not billed. Live-checked 2026-11-18:
33
+ text-to-image and edit at 2K.
34
+
12
35
  ## [0.24.0] - Unreleased
13
36
 
14
37
  ### Added
package/dist/catalog.cjs CHANGED
@@ -443,6 +443,34 @@ var FAL_IMAGE_MODELS = [
443
443
  logo: `${LOBE}/kling-color.png`
444
444
  }
445
445
  },
446
+ {
447
+ // kling/v4/text-to-image; references switch to kling/v4/image-to-image (up to 10,
448
+ // "@Image1".."@Image10"). Per output image: $0.063 at 2K, $0.094 at 4K (Kling price page,
449
+ // 2026-11-17); each reference adds $0.003, which we absorb. Native 8K is ENG-4137.
450
+ id: "kling-image-4.0",
451
+ aliases: [],
452
+ label: "Kling Image 4.0",
453
+ type: "image",
454
+ adapter: "fal",
455
+ providerModelId: "kling/v4/text-to-image",
456
+ lifecycle: "active",
457
+ exposure: EXPOSURE,
458
+ constraints: {
459
+ aspectRatios: [...KLING_RATIOS, "adaptive"],
460
+ sizes: ["2K", "4K"],
461
+ references: { images: 10 },
462
+ supports: ["count"],
463
+ prompt: { referenceSyntax: "numbered", maxChars: 21e3 }
464
+ },
465
+ defaults: { size: "2K", aspectRatio: "adaptive", count: 1 },
466
+ usage: { ...IMAGE_USAGE },
467
+ pricingKind: "image_size",
468
+ display: {
469
+ provider: "kuaishou",
470
+ 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.",
471
+ logo: `${LOBE}/kling-color.png`
472
+ }
473
+ },
446
474
  {
447
475
  // fal-ai/kling-image/v3/text-to-image; a reference switches to .../v3/image-to-image, which
448
476
  // takes exactly one image_url and no "auto" ratio. $0.028 per image.
@@ -8267,7 +8295,7 @@ var AspectRatioSchema = import_zod3.z.enum([
8267
8295
  "8:1",
8268
8296
  "adaptive"
8269
8297
  ]);
8270
- var ImageSizeSchema = import_zod3.z.enum(["512", "1K", "2K", "4K"]);
8298
+ var ImageSizeSchema = import_zod3.z.enum(["512", "1K", "2K", "4K", "8K"]);
8271
8299
  var VideoResolutionSchema = import_zod3.z.enum(["360p", "480p", "720p", "768p", "1080p", "2k", "4k"]);
8272
8300
  var ImageQualitySchema = import_zod3.z.enum(["auto", "low", "medium", "high", "xhigh", "max"]);
8273
8301
  var OutputFormatSchema = import_zod3.z.enum(["png", "jpeg", "webp", "gif", "svg"]);
@@ -9584,6 +9612,20 @@ var FAL_IMAGE_SPECS = /* @__PURE__ */ new Map([
9584
9612
  aspectRatios: KLING_RATIOS3
9585
9613
  }
9586
9614
  ],
9615
+ [
9616
+ // No output_format or seed field. Kling caps non-English prompts at 21,000 characters
9617
+ // (API update 2026-11-17), under the schema's 50,000.
9618
+ "kling/v4/text-to-image",
9619
+ {
9620
+ label: "Kling Image 4.0",
9621
+ maxReferences: 10,
9622
+ maxCount: 9,
9623
+ outputFormats: [],
9624
+ promptMax: 21e3,
9625
+ promptRequired: true,
9626
+ aspectRatios: [...KLING_RATIOS3, "adaptive"]
9627
+ }
9628
+ ],
9587
9629
  [
9588
9630
  "recraft/v4.1/flash/text-to-image",
9589
9631
  {
@@ -10013,7 +10055,7 @@ function applyFalVideoRules(model, req, callerRatio, warnings) {
10013
10055
  }
10014
10056
 
10015
10057
  // src/resolve-options.ts
10016
- var SIZE_ORDER = ["512", "1K", "2K", "4K"];
10058
+ var SIZE_ORDER = ["512", "1K", "2K", "4K", "8K"];
10017
10059
  var RESOLUTION_ORDER = ["360p", "480p", "720p", "768p", "1080p", "2k", "4k"];
10018
10060
  function ratioValue(r) {
10019
10061
  if (r === "adaptive") return 1;