@shop-os/modelkit 0.24.0 → 0.24.1

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/dist/index.cjs CHANGED
@@ -519,6 +519,34 @@ var FAL_IMAGE_MODELS = [
519
519
  logo: `${LOBE}/kling-color.png`
520
520
  }
521
521
  },
522
+ {
523
+ // kling/v4/text-to-image; references switch to kling/v4/image-to-image (up to 10,
524
+ // "@Image1".."@Image10"). Per output image: $0.063 at 2K, $0.094 at 4K (Kling price page,
525
+ // 2026-11-17); each reference adds $0.003, which we absorb. Native 8K is ENG-4137.
526
+ id: "kling-image-4.0",
527
+ aliases: [],
528
+ label: "Kling Image 4.0",
529
+ type: "image",
530
+ adapter: "fal",
531
+ providerModelId: "kling/v4/text-to-image",
532
+ lifecycle: "active",
533
+ exposure: EXPOSURE,
534
+ constraints: {
535
+ aspectRatios: [...KLING_RATIOS, "adaptive"],
536
+ sizes: ["2K", "4K"],
537
+ references: { images: 10 },
538
+ supports: ["count"],
539
+ prompt: { referenceSyntax: "numbered", maxChars: 21e3 }
540
+ },
541
+ defaults: { size: "2K", aspectRatio: "adaptive", count: 1 },
542
+ usage: { ...IMAGE_USAGE },
543
+ pricingKind: "image_size",
544
+ display: {
545
+ provider: "kuaishou",
546
+ 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.",
547
+ logo: `${LOBE}/kling-color.png`
548
+ }
549
+ },
522
550
  {
523
551
  // fal-ai/kling-image/v3/text-to-image; a reference switches to .../v3/image-to-image, which
524
552
  // takes exactly one image_url and no "auto" ratio. $0.028 per image.
@@ -9254,6 +9282,20 @@ var FAL_IMAGE_SPECS = /* @__PURE__ */ new Map([
9254
9282
  aspectRatios: KLING_RATIOS3
9255
9283
  }
9256
9284
  ],
9285
+ [
9286
+ // No output_format or seed field. Kling caps non-English prompts at 21,000 characters
9287
+ // (API update 2026-11-17), under the schema's 50,000.
9288
+ "kling/v4/text-to-image",
9289
+ {
9290
+ label: "Kling Image 4.0",
9291
+ maxReferences: 10,
9292
+ maxCount: 9,
9293
+ outputFormats: [],
9294
+ promptMax: 21e3,
9295
+ promptRequired: true,
9296
+ aspectRatios: [...KLING_RATIOS3, "adaptive"]
9297
+ }
9298
+ ],
9257
9299
  [
9258
9300
  "recraft/v4.1/flash/text-to-image",
9259
9301
  {
@@ -12038,13 +12080,13 @@ function minimaxH3Image(editEndpoint) {
12038
12080
  var H3_IMAGE_AREAS = { ...TIER_AREAS2, "4K": 4096 * 4096 };
12039
12081
  var MINIMAX_H3_IMAGE = minimaxH3Image("minimax/h3-image/edit");
12040
12082
  var MINIMAX_H3_IMAGE_HIGHSPEED = minimaxH3Image("minimax/h3-image/highspeed/edit");
12041
- function klingImage(editEndpoint, sizes, field) {
12083
+ function klingImage(editEndpoint, sizes, field, fallbackSize = "1K") {
12042
12084
  return {
12043
12085
  editEndpoint,
12044
12086
  build({ label, req, refs, edit: edit2 }, model) {
12045
12087
  const input = {
12046
12088
  prompt: req.prompt,
12047
- resolution: pick(model, label, "size", req.size ?? "1K", sizes)
12089
+ resolution: pick(model, label, "size", req.size ?? fallbackSize, sizes)
12048
12090
  };
12049
12091
  if (req.aspectRatio === "adaptive") {
12050
12092
  if (edit2) input["aspect_ratio"] = "auto";
@@ -12066,6 +12108,12 @@ var KLING_V3 = klingImage(
12066
12108
  { "1K": "1K", "2K": "2K" },
12067
12109
  "image_url"
12068
12110
  );
12111
+ var KLING_V42 = klingImage(
12112
+ "kling/v4/image-to-image",
12113
+ { "2K": "2K", "4K": "4K" },
12114
+ "image_urls",
12115
+ "2K"
12116
+ );
12069
12117
  var RECRAFT_SIZES = {
12070
12118
  "1:1": "square_hd",
12071
12119
  "4:3": "landscape_4_3",
@@ -12122,6 +12170,7 @@ var FAMILIES = /* @__PURE__ */ new Map([
12122
12170
  ["minimax/h3-image/highspeed/text-to-image", MINIMAX_H3_IMAGE_HIGHSPEED],
12123
12171
  ["fal-ai/kling-image/o3/text-to-image", KLING_O3],
12124
12172
  ["fal-ai/kling-image/v3/text-to-image", KLING_V3],
12173
+ ["kling/v4/text-to-image", KLING_V42],
12125
12174
  ["recraft/v4.1/flash/text-to-image", RECRAFT_FLASH],
12126
12175
  ["fal-ai/sensenova-u1-infographic", SENSENOVA],
12127
12176
  ["fal-ai/seedvr/upscale/image", SEEDVR]