@shop-os/modelkit 0.32.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,30 @@ 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
+
25
+ ## [0.33.0] - Unreleased
26
+
27
+ ### Added
28
+ - `claude-sonnet-5-5` (Claude Sonnet 5.5), a hidden text row (`exposure: []`) for server callers
29
+ such as vibe-api's Microdrama writer. Bedrock id derives as `<profile>.anthropic.claude-sonnet-5-5`.
30
+ - `providerOptions.modelkit.structuredOutputMode` on an Anthropic text row: on the Bedrock
31
+ transport, a JSON-schema call that sets no `providerOptions.anthropic.structuredOutputMode`
32
+ gets the row's value. `claude-sonnet-5-5` sets `"outputFormat"`: the Bedrock SDK otherwise
33
+ matches it as Sonnet 5, asks for JSON through a forced tool (`tool_choice: any`), and
34
+ Sonnet 5.5 rejects a forced tool choice with a 400.
35
+
12
36
  ## [0.32.0] - Unreleased
13
37
 
14
38
  ### 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
@@ -5239,6 +5239,22 @@ var TEXT_MODELS = [
5239
5239
  contextWindow: 1e6
5240
5240
  }
5241
5241
  }),
5242
+ text("claude-sonnet-5-5", "Claude Sonnet 5.5", "claude-sonnet-5-5", {
5243
+ exposure: [],
5244
+ // Sonnet 5.5 rejects a forced tool_choice, which is how Bedrock's SDK asks for JSON on Sonnet 5.
5245
+ providerOptions: { modelkit: { structuredOutputMode: "outputFormat" } },
5246
+ display: {
5247
+ chat: { providerOptions: ANTHROPIC_ADAPTIVE },
5248
+ provider: "anthropic",
5249
+ costTier: 3,
5250
+ description: "Anthropic Claude Sonnet 5.5 balanced model; text and image input, 1M-token context."
5251
+ },
5252
+ capabilities: {
5253
+ reasoning: true,
5254
+ vision: true,
5255
+ contextWindow: 1e6
5256
+ }
5257
+ }),
5242
5258
  text("claude-opus-4-8", "Claude Opus 4.8", "claude-opus-4-8", {
5243
5259
  exposure: ["cowork", "space_builder"],
5244
5260
  aliases: ["claude-opus-4.8", "claude-opus-4", "claude-opus-4.0", "claude-opus-4-20250514"],
@@ -6546,6 +6562,7 @@ var GROK_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"];
6546
6562
  var H3_RATIOS2 = ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"];
6547
6563
  var H3_REFERENCE_RATIOS = ["adaptive", ...H3_RATIOS2];
6548
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"];
6549
6566
  var NEGATIVE_PROMPT = "blur, distort, and low quality";
6550
6567
  var FRAMES_EXCLUDE_REFERENCES = { framesExcludeReferences: true };
6551
6568
  var KLING_PROMPT2 = { referenceSyntax: "numbered", maxChars: 2500 };
@@ -7475,6 +7492,48 @@ var VIDEO_MODELS = [
7475
7492
  },
7476
7493
  capabilities: {}
7477
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
+ },
7478
7537
  ...VIDEO_FAMILY_MODELS,
7479
7538
  ...VIDEO_AVATAR_MODELS,
7480
7539
  ...LUMA_VIDEO_MODELS
@@ -8713,7 +8772,8 @@ var ADAPTER_IDS = [
8713
8772
  "luma",
8714
8773
  "alibaba",
8715
8774
  "fish",
8716
- "elevenlabs"
8775
+ "elevenlabs",
8776
+ "wavespeed"
8717
8777
  ];
8718
8778
  var ModelTypeSchema = import_zod3.z.enum([
8719
8779
  "text",