@shop-os/modelkit 0.33.0 → 0.34.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,19 @@ header in the release PR.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.34.0] - Unreleased
13
+
14
+ ### Added
15
+ - `wavespeed` adapter (WaveSpeed v3 task API) and the provider key `wavespeed`, read from
16
+ `WAVESPEED_API_KEY` (`SLOOSH_WAVESPEED_API_KEY`, `ENTERPRISE_WAVESPEED_API_KEY` for the other
17
+ tiers). The submit is sent once and never retried (WaveSpeed: a retried submit can create a
18
+ second billed task); the result poll retries 429 and 5xx. `resumeVideo` reconnects by task id.
19
+ - `magi-2` (Sand AI MAGI-2, ENG-4408) on `wavespeed`, `providerModelId` `sand-ai/magi-2`. One
20
+ row for three endpoints: no media goes to `text-to-video`, a start frame (optional end frame)
21
+ to `image-to-video`, reference images, videos or audio to `reference-to-video`. 1080p only,
22
+ 4-30 s, 21:9 to 9:16, sound optional (on by default). WaveSpeed bills USD 0.08 per requested
23
+ second; references and sound add nothing.
24
+
12
25
  ## [0.33.0] - Unreleased
13
26
 
14
27
  ### Added
package/README.md CHANGED
@@ -379,7 +379,7 @@ app's secrets, not a Cloudflare gateway token.
379
379
 
380
380
  ## Adapters
381
381
 
382
- `ai-sdk-text`, `google-image`, `openai-image`, `google-genai` (Veo, Omni with `delivery: "uri"`, Lyria 3, Files API media parts), `ark` (Seedream, Seedance), `fal`, `replicate` (images, video, Lyria 2, MMAudio), `prodia`, `higgsfield`, `xai-video`, `luma` (Uni images, Ray 3.2 video via the Agents API; `LUMA_API_KEY`, base-url override `endpoints.luma`), `alibaba` (Model Studio direct in US Virginia: Wan 3 and Happy Horse 1.1 video, Qwen Image 3; `DASHSCOPE_API_KEY` + `DASHSCOPE_WORKSPACE_ID`, base-url override `endpoints.alibaba`), `fish` (Fish Audio speech, `createVoice` / `designVoice` / `deleteVoice`; `FISH_AUDIO_API_KEY`, base-url override `endpoints.fish`), `elevenlabs` (direct ElevenLabs speech, `createVoice` / `deleteVoice`; `ELEVENLABS_API_KEY`, base-url override `endpoints.elevenlabs`). See `src/adapters/`.
382
+ `ai-sdk-text`, `google-image`, `openai-image`, `google-genai` (Veo, Omni with `delivery: "uri"`, Lyria 3, Files API media parts), `ark` (Seedream, Seedance), `fal`, `replicate` (images, video, Lyria 2, MMAudio), `prodia`, `higgsfield`, `xai-video`, `luma` (Uni images, Ray 3.2 video via the Agents API; `LUMA_API_KEY`, base-url override `endpoints.luma`), `alibaba` (Model Studio direct in US Virginia: Wan 3 and Happy Horse 1.1 video, Qwen Image 3; `DASHSCOPE_API_KEY` + `DASHSCOPE_WORKSPACE_ID`, base-url override `endpoints.alibaba`), `fish` (Fish Audio speech, `createVoice` / `designVoice` / `deleteVoice`; `FISH_AUDIO_API_KEY`, base-url override `endpoints.fish`), `elevenlabs` (direct ElevenLabs speech, `createVoice` / `deleteVoice`; `ELEVENLABS_API_KEY`, base-url override `endpoints.elevenlabs`), `wavespeed` (WaveSpeed v3 tasks: Sand AI MAGI-2 video; `WAVESPEED_API_KEY`; the submit is never retried). See `src/adapters/`.
383
383
 
384
384
  ## Not in the package
385
385
 
package/dist/catalog.cjs CHANGED
@@ -6562,6 +6562,7 @@ var GROK_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"];
6562
6562
  var H3_RATIOS2 = ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"];
6563
6563
  var H3_REFERENCE_RATIOS = ["adaptive", ...H3_RATIOS2];
6564
6564
  var WAN_RATIOS = ["adaptive", "16:9", "4:3", "1:1", "3:4", "9:16"];
6565
+ var MAGI_RATIOS = ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"];
6565
6566
  var NEGATIVE_PROMPT = "blur, distort, and low quality";
6566
6567
  var FRAMES_EXCLUDE_REFERENCES = { framesExcludeReferences: true };
6567
6568
  var KLING_PROMPT2 = { referenceSyntax: "numbered", maxChars: 2500 };
@@ -7491,6 +7492,48 @@ var VIDEO_MODELS = [
7491
7492
  },
7492
7493
  capabilities: {}
7493
7494
  },
7495
+ {
7496
+ // Sand AI MAGI-2 on WaveSpeed. One row for text-, image- (start/end frame) and
7497
+ // reference-to-video; the adapter picks the endpoint from the inputs. WaveSpeed bills
7498
+ // USD 0.08 per requested second, sound and references included.
7499
+ // https://wavespeed.ai/docs/docs-api/sand-ai/magi-2/reference-to-video
7500
+ id: "magi-2",
7501
+ aliases: ["magi2", "sand-magi-2"],
7502
+ label: "MAGI-2",
7503
+ type: "video",
7504
+ adapter: "wavespeed",
7505
+ providerModelId: "sand-ai/magi-2",
7506
+ lifecycle: "active",
7507
+ exposure: ["cowork", "space_builder"],
7508
+ constraints: {
7509
+ aspectRatios: [...MAGI_RATIOS],
7510
+ resolutions: ["1080p"],
7511
+ durations: { min: 4, max: 30 },
7512
+ preferDefaultDuration: true,
7513
+ references: {
7514
+ images: 10,
7515
+ videos: 5,
7516
+ audios: 5,
7517
+ videoSeconds: { min: 2, max: 30, total: 30 },
7518
+ audioSeconds: { min: 2, max: 30, total: 30 }
7519
+ },
7520
+ supports: ["seed", "lastFrame", "generateAudio"],
7521
+ prompt: { referenceSyntax: "descriptive", maxChars: 15e3 },
7522
+ audio: "optional"
7523
+ },
7524
+ defaults: {
7525
+ durationSeconds: 5,
7526
+ resolution: "1080p",
7527
+ generateAudio: true
7528
+ },
7529
+ usage: { ...VIDEO_USAGE3 },
7530
+ pricingKind: "video_per_second",
7531
+ display: {
7532
+ provider: "sand-ai",
7533
+ description: "Sand AI MAGI-2 video model 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; 4 to 30 seconds at 1080p."
7534
+ },
7535
+ capabilities: { ...FRAMES_EXCLUDE_REFERENCES, lastFrameRequiresFirstFrame: true }
7536
+ },
7494
7537
  ...VIDEO_FAMILY_MODELS,
7495
7538
  ...VIDEO_AVATAR_MODELS,
7496
7539
  ...LUMA_VIDEO_MODELS
@@ -8729,7 +8772,8 @@ var ADAPTER_IDS = [
8729
8772
  "luma",
8730
8773
  "alibaba",
8731
8774
  "fish",
8732
- "elevenlabs"
8775
+ "elevenlabs",
8776
+ "wavespeed"
8733
8777
  ];
8734
8778
  var ModelTypeSchema = import_zod3.z.enum([
8735
8779
  "text",