@shop-os/modelkit 0.10.0 → 0.10.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/dist/index.js CHANGED
@@ -2002,6 +2002,7 @@ var FISH_VOICES = [
2002
2002
  var FISH_LOGO = "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/fishaudio.png";
2003
2003
  var PER_CALL2 = { unit: "images" };
2004
2004
  var PER_REQUEST2 = { unit: "requests" };
2005
+ var EXPOSURE4 = ["cowork", "space_builder"];
2005
2006
  var TTS_MAX_CHARS = 1e4;
2006
2007
  function fishTts(id, label, providerModelId, description) {
2007
2008
  return {
@@ -2012,7 +2013,7 @@ function fishTts(id, label, providerModelId, description) {
2012
2013
  adapter: "fish",
2013
2014
  providerModelId,
2014
2015
  lifecycle: "active",
2015
- exposure: [],
2016
+ exposure: EXPOSURE4,
2016
2017
  constraints: {
2017
2018
  voices: FISH_VOICES,
2018
2019
  outputFormats: ["mp3", "wav"],
@@ -2053,7 +2054,7 @@ var FISH_MODELS = [
2053
2054
  adapter: "fish",
2054
2055
  providerModelId: "voice-clone",
2055
2056
  lifecycle: "active",
2056
- exposure: [],
2057
+ exposure: EXPOSURE4,
2057
2058
  constraints: {
2058
2059
  // POST /model takes 1-20 voice files; Fish advises 10 s or more of clean speech each.
2059
2060
  references: { audios: 20, audioFormats: ["wav", "mp3", "m4a", "opus"] },
@@ -2077,7 +2078,7 @@ var FISH_MODELS = [
2077
2078
  adapter: "fish",
2078
2079
  providerModelId: "voice-design-1",
2079
2080
  lifecycle: "active",
2080
- exposure: [],
2081
+ exposure: EXPOSURE4,
2081
2082
  constraints: {
2082
2083
  voiceDesign: { maxCandidates: 4, previewMaxChars: 150 },
2083
2084
  supports: [],
@@ -3675,7 +3676,7 @@ var GOOGLE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a
3675
3676
  var MINIMAX_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/f4c2e906-28b7-4a4a-b491-df8fef7808ed.png";
3676
3677
  var SYNC_LOGO = "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/sync.png";
3677
3678
  var PER_CALL3 = { unit: "images" };
3678
- var EXPOSURE4 = ["cowork", "space_builder"];
3679
+ var EXPOSURE5 = ["cowork", "space_builder"];
3679
3680
  var LIPSYNC_AUDIO = { audioSeconds: { max: 30 } };
3680
3681
  function elevenLabsTts(tts) {
3681
3682
  return {
@@ -3686,7 +3687,7 @@ function elevenLabsTts(tts) {
3686
3687
  adapter: "fal",
3687
3688
  providerModelId: tts.providerModelId,
3688
3689
  lifecycle: "active",
3689
- exposure: EXPOSURE4,
3690
+ exposure: EXPOSURE5,
3690
3691
  constraints: {
3691
3692
  voices: ELEVENLABS_VOICES,
3692
3693
  languages: tts.languages,
@@ -3711,7 +3712,7 @@ function geminiTts(id, label, description) {
3711
3712
  adapter: "fal",
3712
3713
  providerModelId,
3713
3714
  lifecycle: "active",
3714
- exposure: EXPOSURE4,
3715
+ exposure: EXPOSURE5,
3715
3716
  constraints: {
3716
3717
  voices: GEMINI_TTS_VOICES,
3717
3718
  supports: ["style"],
@@ -3734,7 +3735,7 @@ function syncLipsync(id, label, providerModelId, syncModel, description) {
3734
3735
  adapter: "fal",
3735
3736
  providerModelId,
3736
3737
  lifecycle: "active",
3737
- exposure: EXPOSURE4,
3738
+ exposure: EXPOSURE5,
3738
3739
  constraints: {
3739
3740
  requires: ["sourceVideo", "sourceAudio"],
3740
3741
  references: LIPSYNC_AUDIO,
@@ -3795,7 +3796,7 @@ var MEDIA_NODE_MODELS = [
3795
3796
  adapter: "fal",
3796
3797
  providerModelId: "fal-ai/minimax/speech-2.8-hd",
3797
3798
  lifecycle: "active",
3798
- exposure: EXPOSURE4,
3799
+ exposure: EXPOSURE5,
3799
3800
  constraints: {
3800
3801
  voices: MINIMAX_VOICES,
3801
3802
  languages: MINIMAX_SPEECH_LANGUAGES,
@@ -3820,7 +3821,7 @@ var MEDIA_NODE_MODELS = [
3820
3821
  adapter: "fal",
3821
3822
  providerModelId: "fal-ai/elevenlabs/voice-changer",
3822
3823
  lifecycle: "active",
3823
- exposure: EXPOSURE4,
3824
+ exposure: EXPOSURE5,
3824
3825
  constraints: {
3825
3826
  requires: ["sourceAudio"],
3826
3827
  // The flat price assumes at most a minute of speech.
@@ -3847,7 +3848,7 @@ var MEDIA_NODE_MODELS = [
3847
3848
  adapter: "fal",
3848
3849
  providerModelId: "fal-ai/elevenlabs/dubbing",
3849
3850
  lifecycle: "active",
3850
- exposure: EXPOSURE4,
3851
+ exposure: EXPOSURE5,
3851
3852
  constraints: {
3852
3853
  requiresOneOf: ["sourceVideo", "sourceAudio"],
3853
3854
  // The flat price covers 60 s of source.
@@ -3895,7 +3896,7 @@ var MEDIA_NODE_MODELS = [
3895
3896
  adapter: "fal",
3896
3897
  providerModelId: "veed/lipsync/v2",
3897
3898
  lifecycle: "active",
3898
- exposure: EXPOSURE4,
3899
+ exposure: EXPOSURE5,
3899
3900
  constraints: {
3900
3901
  requires: ["sourceVideo", "sourceAudio"],
3901
3902
  references: LIPSYNC_AUDIO,
@@ -3921,7 +3922,7 @@ var MEDIA_NODE_MODELS = [
3921
3922
  adapter: "fal",
3922
3923
  providerModelId: "minimax/h3-max/lip-sync/image-to-video",
3923
3924
  lifecycle: "active",
3924
- exposure: EXPOSURE4,
3925
+ exposure: EXPOSURE5,
3925
3926
  constraints: {
3926
3927
  requires: ["firstFrame", "sourceAudio"],
3927
3928
  resolutions: ["480p", "768p", "1080p", "2k"],
@@ -3947,7 +3948,7 @@ var MEDIA_NODE_MODELS = [
3947
3948
  adapter: "fal",
3948
3949
  providerModelId: "fal-ai/elevenlabs/speech-to-text/scribe-v2",
3949
3950
  lifecycle: "active",
3950
- exposure: EXPOSURE4,
3951
+ exposure: EXPOSURE5,
3951
3952
  constraints: {
3952
3953
  requires: ["sourceAudio"],
3953
3954
  // The flat price covers 10 minutes of audio.
@@ -5562,7 +5563,7 @@ var VIDEO_FAMILY_MODELS = [
5562
5563
 
5563
5564
  // src/catalog/video-luma.ts
5564
5565
  var VIDEO_USAGE2 = { unit: "seconds" };
5565
- var EXPOSURE5 = ["cowork", "space_builder"];
5566
+ var EXPOSURE6 = ["cowork", "space_builder"];
5566
5567
  var LUMA_LOGO2 = "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png@1.97.0/light/luma-color.png";
5567
5568
  var RAY_RATIOS = ["9:16", "3:4", "1:1", "4:3", "16:9", "21:9"];
5568
5569
  var RAY_RESOLUTIONS = ["360p", "720p", "1080p"];
@@ -5580,7 +5581,7 @@ var LUMA_VIDEO_MODELS = [
5580
5581
  adapter: "luma",
5581
5582
  providerModelId: "ray-3.2",
5582
5583
  lifecycle: "active",
5583
- exposure: EXPOSURE5,
5584
+ exposure: EXPOSURE6,
5584
5585
  constraints: {
5585
5586
  aspectRatios: ["adaptive", ...RAY_RATIOS],
5586
5587
  resolutions: [...RAY_RESOLUTIONS],
@@ -5612,7 +5613,7 @@ var LUMA_VIDEO_MODELS = [
5612
5613
  adapter: "luma",
5613
5614
  providerModelId: "ray-3.2",
5614
5615
  lifecycle: "active",
5615
- exposure: EXPOSURE5,
5616
+ exposure: EXPOSURE6,
5616
5617
  constraints: {
5617
5618
  resolutions: [...RAY_RESOLUTIONS],
5618
5619
  requires: ["sourceVideo"],
@@ -5645,7 +5646,7 @@ var LUMA_VIDEO_MODELS = [
5645
5646
  adapter: "luma",
5646
5647
  providerModelId: "ray-3.2",
5647
5648
  lifecycle: "active",
5648
- exposure: EXPOSURE5,
5649
+ exposure: EXPOSURE6,
5649
5650
  constraints: {
5650
5651
  aspectRatios: [...RAY_RATIOS],
5651
5652
  resolutions: [...RAY_RESOLUTIONS],
@@ -6335,6 +6336,48 @@ var VIDEO_MODELS = [
6335
6336
  },
6336
6337
  capabilities: { ...FRAMES_EXCLUDE_REFERENCES, lastFrameRequiresFirstFrame: true }
6337
6338
  },
6339
+ {
6340
+ // fal's Wan 3.0 Prime endpoints share Wan 3.0's input schemas field for field but bill
6341
+ // more per second, so Prime is its own row (the id is the pricing key).
6342
+ // https://fal.ai/models/alibaba/wan-3.0-prime/reference-to-video/api
6343
+ id: "wan-3.0-prime",
6344
+ aliases: ["wan-3-prime", "wan3-prime"],
6345
+ label: "Wan 3 Prime",
6346
+ type: "video",
6347
+ adapter: "fal",
6348
+ providerModelId: "alibaba/wan-3.0-prime",
6349
+ lifecycle: "active",
6350
+ exposure: ["cowork", "space_builder"],
6351
+ constraints: {
6352
+ aspectRatios: [...WAN_RATIOS],
6353
+ resolutions: ["480p", "720p", "1080p"],
6354
+ durations: { min: 2, max: 30 },
6355
+ durationPresets: [5, 10, 15, 30],
6356
+ references: {
6357
+ images: 10,
6358
+ videos: 5,
6359
+ audios: 5,
6360
+ videoSeconds: { total: 15 },
6361
+ audioSeconds: { total: 15 }
6362
+ },
6363
+ supports: ["seed", "lastFrame", "generateAudio", "safetyChecker"],
6364
+ prompt: WAN_PROMPT,
6365
+ audio: "optional"
6366
+ },
6367
+ defaults: {
6368
+ durationSeconds: 5,
6369
+ resolution: "1080p",
6370
+ aspectRatio: "adaptive",
6371
+ generateAudio: true
6372
+ },
6373
+ usage: { ...VIDEO_USAGE3 },
6374
+ pricingKind: "video_per_second",
6375
+ display: {
6376
+ provider: "alibaba",
6377
+ description: "Alibaba Wan 3 Prime, the faster-generating tier of Wan 3, for text-to-video, image-to-video (start/end frame), and reference-to-video from up to 10 images, 5 videos and 5 audio clips, with native audio; 2-30 seconds at up to 1080p."
6378
+ },
6379
+ capabilities: { ...FRAMES_EXCLUDE_REFERENCES, lastFrameRequiresFirstFrame: true }
6380
+ },
6338
6381
  {
6339
6382
  // Duration 3-10s per trigger-workflows mapDuration; the endpoint takes no resolution.
6340
6383
  id: "kling-o1-v2v",
@@ -12537,7 +12580,10 @@ function minimaxBase(req, family) {
12537
12580
  if (req.seed !== void 0) input.seed = req.seed;
12538
12581
  return input;
12539
12582
  }
12540
- var WAN_MODEL_IDS = /* @__PURE__ */ new Set(["alibaba/wan-3.0"]);
12583
+ var WAN_MODEL_IDS = /* @__PURE__ */ new Set([
12584
+ "alibaba/wan-3.0",
12585
+ "alibaba/wan-3.0-prime"
12586
+ ]);
12541
12587
  function isWan(providerModelId) {
12542
12588
  return WAN_MODEL_IDS.has(providerModelId.toLowerCase());
12543
12589
  }