@shop-os/modelkit 0.19.0 → 0.20.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 +39 -1
- package/README.md +2 -2
- package/dist/catalog.cjs +70 -26
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +8 -3
- package/dist/catalog.d.ts +8 -3
- package/dist/catalog.js +70 -26
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +4080 -3625
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -4
- package/dist/index.d.ts +12 -4
- package/dist/index.js +4079 -3625
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,7 +9,45 @@ header in the release PR.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
-
## [0.
|
|
12
|
+
## [0.20.0] - Unreleased
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- New `alibaba` adapter (ENG-3881): Alibaba Cloud Model Studio direct, US (Virginia) with the
|
|
16
|
+
Global deployment scope. Keys: `DASHSCOPE_API_KEY` plus `DASHSCOPE_WORKSPACE_ID` (the key works
|
|
17
|
+
only on its own workspace endpoint, `https://{WorkspaceId}.us-east-1.maas.aliyuncs.com/api/v1`);
|
|
18
|
+
the pair switches together like Higgsfield key + secret, and the `ENTERPRISE_` / `SLOOSH_`
|
|
19
|
+
prefixes apply. Base-url override: `endpoints.alibaba`. Video runs as an async task
|
|
20
|
+
(`X-DashScope-Async`), polled every 15 s for up to 20 minutes; `resumeVideo` reconnects by task
|
|
21
|
+
id. Not a BYOK provider.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
- `wan-3.0` and `wan-3.0-prime` move from fal to `alibaba` (`wan3.0-video`, `wan3.0-video-prime`).
|
|
25
|
+
Same constraints; `safetyChecker` is gone (Model Studio has none). A request with reference
|
|
26
|
+
videos is billed for the input seconds too: the usage event's `quantity` is Alibaba's
|
|
27
|
+
`usage.duration` (input plus output), `durationSeconds` stays the clip length.
|
|
28
|
+
- `happy-horse-1.1` moves from fal to `alibaba` (`happyhorse-1.1-t2v` / `-i2v` / `-r2v`, picked from
|
|
29
|
+
the inputs). Watermark is sent off (Alibaba stamps one by default); `safetyChecker` is gone.
|
|
30
|
+
`happy-horse-video-edit` stays on fal.
|
|
31
|
+
- `qwen-image-3` moves from fal to `alibaba` (`qwen-image-3.0-pro`, whose list price matches fal's
|
|
32
|
+
row). png output only: another `outputFormat` warns `option_ignored`. The usage tier is the one
|
|
33
|
+
Alibaba bills (`output_image_type`). Alibaba also bills each input image; the usage event does
|
|
34
|
+
not carry it yet.
|
|
35
|
+
|
|
36
|
+
### Removed
|
|
37
|
+
- The fal mappings for Wan 3 / Wan 3 Prime, Happy Horse 1.1 generation and Qwen Image 3.
|
|
38
|
+
|
|
39
|
+
## [0.19.1] - 2026-11-11
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
- `seedream-5.5` (ENG-3884): ByteDance Seedream 5.5 on the `ark` adapter
|
|
43
|
+
(`dola-seedream-5-5-261028`, BytePlus Early Access). 1K or 2K (the model has no 4K), 11 aspect
|
|
44
|
+
ratios, up to 10 references, seed and png/jpeg output. `pricingKind: "image_size"`: pro-backend
|
|
45
|
+
needs image pricing rows before it lists.
|
|
46
|
+
- The `ark` adapter sends `background` (`auto` / `opaque` / `transparent`) for rows that list
|
|
47
|
+
`constraints.backgrounds` (only `seedream-5.5`). A transparent request asked for as jpeg is sent
|
|
48
|
+
as png with an `option_ignored` warning, because Ark refuses a transparent jpeg.
|
|
49
|
+
|
|
50
|
+
## [0.19.0] - 2026-11-10
|
|
13
51
|
|
|
14
52
|
### Added
|
|
15
53
|
- `minimax-h3-image` and `minimax-h3-image-highspeed` (ENG-3864): MiniMax H3 Image on fal
|
package/README.md
CHANGED
|
@@ -115,7 +115,7 @@ before submit), and `model3dPricingSku(row, options, inputs)` names the flat pri
|
|
|
115
115
|
bills under; `model3dSkus(row)` lists them all, and pro-backend keeps a `credit_pricing_flat`
|
|
116
116
|
row for each. All three are in the browser-safe catalog entry.
|
|
117
117
|
|
|
118
|
-
Keys come from `process.env` by default: bare names for pro (`OPENAI_API_KEY`, `FAL_KEY`, `BYTEDANCE_API_KEY`, `LUMA_API_KEY` ...), the `ENTERPRISE_` prefix for enterprise and the `SLOOSH_` prefix for sloosh (sloosh reads `SLOOSH_LUMA_API_KEY` for Luma). Pass `keys: { pro, enterprise, sloosh }` to override. `tier: "sloosh"` uses the sloosh keys only: a missing key is a `ModelKitError` with code `auth`, never a fallback to pro.
|
|
118
|
+
Keys come from `process.env` by default: bare names for pro (`OPENAI_API_KEY`, `FAL_KEY`, `BYTEDANCE_API_KEY`, `LUMA_API_KEY` ...), the `ENTERPRISE_` prefix for enterprise and the `SLOOSH_` prefix for sloosh (sloosh reads `SLOOSH_LUMA_API_KEY` for Luma; Alibaba needs `DASHSCOPE_API_KEY` and `DASHSCOPE_WORKSPACE_ID` on each tier). Pass `keys: { pro, enterprise, sloosh }` to override. `tier: "sloosh"` uses the sloosh keys only: a missing key is a `ModelKitError` with code `auth`, never a fallback to pro.
|
|
119
119
|
|
|
120
120
|
## Customer keys (BYOK)
|
|
121
121
|
|
|
@@ -378,7 +378,7 @@ app's secrets, not a Cloudflare gateway token.
|
|
|
378
378
|
|
|
379
379
|
## Adapters
|
|
380
380
|
|
|
381
|
-
`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`), `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/`.
|
|
381
|
+
`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
382
|
|
|
383
383
|
## Not in the package
|
|
384
384
|
|
package/dist/catalog.cjs
CHANGED
|
@@ -349,14 +349,15 @@ var FAL_IMAGE_MODELS = [
|
|
|
349
349
|
}
|
|
350
350
|
},
|
|
351
351
|
{
|
|
352
|
-
//
|
|
353
|
-
// as "image 1".."image 3"
|
|
352
|
+
// Alibaba Model Studio direct (qwen-image-3.0-pro; fal's qwen-image-3 bills its prices).
|
|
353
|
+
// 1-3 input images make it an edit, addressed as "image 1".."image 3". png output only.
|
|
354
|
+
// https://www.alibabacloud.com/help/en/model-studio/qwen-image-generation-and-editing-api-reference
|
|
354
355
|
id: "qwen-image-3",
|
|
355
356
|
aliases: [],
|
|
356
357
|
label: "Qwen Image 3",
|
|
357
358
|
type: "image",
|
|
358
|
-
adapter: "
|
|
359
|
-
providerModelId: "
|
|
359
|
+
adapter: "alibaba",
|
|
360
|
+
providerModelId: "qwen-image-3.0-pro",
|
|
360
361
|
lifecycle: "active",
|
|
361
362
|
exposure: EXPOSURE,
|
|
362
363
|
constraints: {
|
|
@@ -967,6 +968,46 @@ var IMAGE_MODELS = [
|
|
|
967
968
|
description: "ByteDance Seedream 5.0 Pro text-to-image and multi-reference image-to-image (up to 10 inputs) with region editing; outputs 1K or 2K."
|
|
968
969
|
}
|
|
969
970
|
},
|
|
971
|
+
// Seedream 5.5 (Early Access, 2026-11-11): 1K / 1.5K / 2K, no 4K; exact sizes must total
|
|
972
|
+
// 921,600 to 4,624,220 px, which every SEEDREAM_SIZES 1K and 2K entry does. Up to 10
|
|
973
|
+
// references; `background: "transparent"` returns an RGBA PNG.
|
|
974
|
+
{
|
|
975
|
+
id: "seedream-5.5",
|
|
976
|
+
aliases: [],
|
|
977
|
+
label: "Seedream 5.5",
|
|
978
|
+
type: "image",
|
|
979
|
+
adapter: "ark",
|
|
980
|
+
providerModelId: "dola-seedream-5-5-261028",
|
|
981
|
+
lifecycle: "active",
|
|
982
|
+
exposure: ["cowork", "space_builder"],
|
|
983
|
+
constraints: {
|
|
984
|
+
aspectRatios: [
|
|
985
|
+
"1:1",
|
|
986
|
+
"4:3",
|
|
987
|
+
"3:4",
|
|
988
|
+
"16:9",
|
|
989
|
+
"9:16",
|
|
990
|
+
"3:2",
|
|
991
|
+
"2:3",
|
|
992
|
+
"21:9",
|
|
993
|
+
"9:21",
|
|
994
|
+
"4:5",
|
|
995
|
+
"5:4"
|
|
996
|
+
],
|
|
997
|
+
sizes: ["1K", "2K"],
|
|
998
|
+
references: { images: 10 },
|
|
999
|
+
supports: ["seed", "outputFormat"],
|
|
1000
|
+
backgrounds: ["auto", "opaque", "transparent"]
|
|
1001
|
+
},
|
|
1002
|
+
defaults: { size: "1K", aspectRatio: "1:1" },
|
|
1003
|
+
usage: { ...IMAGE_USAGE3 },
|
|
1004
|
+
pricingKind: "image_size",
|
|
1005
|
+
display: {
|
|
1006
|
+
provider: "bytedance",
|
|
1007
|
+
logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png",
|
|
1008
|
+
description: "ByteDance Seedream 5.5 text-to-image and multi-reference editing (up to 10 inputs): edits that keep what you did not ask to change, transparent PNG output and sharper text; outputs 1K or 2K."
|
|
1009
|
+
}
|
|
1010
|
+
},
|
|
970
1011
|
{
|
|
971
1012
|
id: "seedream-4.5",
|
|
972
1013
|
aliases: [],
|
|
@@ -5683,14 +5724,15 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5683
5724
|
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5684
5725
|
},
|
|
5685
5726
|
{
|
|
5686
|
-
//
|
|
5687
|
-
//
|
|
5727
|
+
// Alibaba Model Studio direct: one row for happyhorse-1.1-t2v / -i2v / -r2v; references,
|
|
5728
|
+
// else a start frame, else text. 480P exists too, unpriced, so it stays out.
|
|
5729
|
+
// https://www.alibabacloud.com/help/en/model-studio/happyhorse-reference-to-video-api-reference
|
|
5688
5730
|
id: "happy-horse-1.1",
|
|
5689
5731
|
aliases: ["happy-horse"],
|
|
5690
5732
|
label: "Happy Horse 1.1",
|
|
5691
5733
|
type: "video",
|
|
5692
|
-
adapter: "
|
|
5693
|
-
providerModelId: "
|
|
5734
|
+
adapter: "alibaba",
|
|
5735
|
+
providerModelId: "happyhorse-1.1",
|
|
5694
5736
|
lifecycle: "active",
|
|
5695
5737
|
exposure: ["cowork", "space_builder"],
|
|
5696
5738
|
constraints: {
|
|
@@ -5699,7 +5741,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5699
5741
|
durations: range(3, 15),
|
|
5700
5742
|
ratioIgnoredWith: ["firstFrame"],
|
|
5701
5743
|
references: { ...NO_REFERENCES, images: 9 },
|
|
5702
|
-
supports: ["seed"
|
|
5744
|
+
supports: ["seed"],
|
|
5703
5745
|
prompt: { referenceSyntax: "numbered", maxChars: 2500 },
|
|
5704
5746
|
audio: "always"
|
|
5705
5747
|
},
|
|
@@ -6648,15 +6690,15 @@ var VIDEO_MODELS = [
|
|
|
6648
6690
|
capabilities: { ...FRAMES_EXCLUDE_REFERENCES }
|
|
6649
6691
|
},
|
|
6650
6692
|
{
|
|
6651
|
-
//
|
|
6652
|
-
// reference-to-video
|
|
6653
|
-
// https://
|
|
6693
|
+
// Alibaba Model Studio direct, one model id for text-, image- (first/last frame) and
|
|
6694
|
+
// reference-to-video. Reference-video seconds bill on top of the output seconds.
|
|
6695
|
+
// https://www.alibabacloud.com/help/en/model-studio/wan3-video-generation-api-reference
|
|
6654
6696
|
id: "wan-3.0",
|
|
6655
6697
|
aliases: ["wan-3", "wan3"],
|
|
6656
6698
|
label: "Wan 3",
|
|
6657
6699
|
type: "video",
|
|
6658
|
-
adapter: "
|
|
6659
|
-
providerModelId: "
|
|
6700
|
+
adapter: "alibaba",
|
|
6701
|
+
providerModelId: "wan3.0-video",
|
|
6660
6702
|
lifecycle: "active",
|
|
6661
6703
|
exposure: ["cowork", "space_builder"],
|
|
6662
6704
|
constraints: {
|
|
@@ -6671,7 +6713,7 @@ var VIDEO_MODELS = [
|
|
|
6671
6713
|
videoSeconds: { total: 15 },
|
|
6672
6714
|
audioSeconds: { total: 15 }
|
|
6673
6715
|
},
|
|
6674
|
-
supports: ["seed", "lastFrame", "generateAudio"
|
|
6716
|
+
supports: ["seed", "lastFrame", "generateAudio"],
|
|
6675
6717
|
prompt: WAN_PROMPT,
|
|
6676
6718
|
audio: "optional"
|
|
6677
6719
|
},
|
|
@@ -6690,15 +6732,14 @@ var VIDEO_MODELS = [
|
|
|
6690
6732
|
capabilities: { ...FRAMES_EXCLUDE_REFERENCES, lastFrameRequiresFirstFrame: true }
|
|
6691
6733
|
},
|
|
6692
6734
|
{
|
|
6693
|
-
//
|
|
6694
|
-
//
|
|
6695
|
-
// https://fal.ai/models/alibaba/wan-3.0-prime/reference-to-video/api
|
|
6735
|
+
// Wan 3.0 Prime takes Wan 3.0's request field for field but bills more per second, so
|
|
6736
|
+
// Prime is its own row (the id is the pricing key).
|
|
6696
6737
|
id: "wan-3.0-prime",
|
|
6697
6738
|
aliases: ["wan-3-prime", "wan3-prime"],
|
|
6698
6739
|
label: "Wan 3 Prime",
|
|
6699
6740
|
type: "video",
|
|
6700
|
-
adapter: "
|
|
6701
|
-
providerModelId: "
|
|
6741
|
+
adapter: "alibaba",
|
|
6742
|
+
providerModelId: "wan3.0-video-prime",
|
|
6702
6743
|
lifecycle: "active",
|
|
6703
6744
|
exposure: ["cowork", "space_builder"],
|
|
6704
6745
|
constraints: {
|
|
@@ -6713,7 +6754,7 @@ var VIDEO_MODELS = [
|
|
|
6713
6754
|
videoSeconds: { total: 15 },
|
|
6714
6755
|
audioSeconds: { total: 15 }
|
|
6715
6756
|
},
|
|
6716
|
-
supports: ["seed", "lastFrame", "generateAudio"
|
|
6757
|
+
supports: ["seed", "lastFrame", "generateAudio"],
|
|
6717
6758
|
prompt: WAN_PROMPT,
|
|
6718
6759
|
audio: "optional"
|
|
6719
6760
|
},
|
|
@@ -8032,6 +8073,7 @@ var ADAPTER_IDS = [
|
|
|
8032
8073
|
"higgsfield",
|
|
8033
8074
|
"xai-video",
|
|
8034
8075
|
"luma",
|
|
8076
|
+
"alibaba",
|
|
8035
8077
|
"fish",
|
|
8036
8078
|
"elevenlabs"
|
|
8037
8079
|
];
|
|
@@ -9290,7 +9332,8 @@ var QWEN_EXACT = {
|
|
|
9290
9332
|
maxSide: 14142,
|
|
9291
9333
|
minArea: 512 * 512,
|
|
9292
9334
|
maxArea: 2048 * 2048,
|
|
9293
|
-
multipleOf: 1
|
|
9335
|
+
multipleOf: 1,
|
|
9336
|
+
maxAspect: 8
|
|
9294
9337
|
};
|
|
9295
9338
|
var MINIMAX_H3_IMAGE_EXACT = {
|
|
9296
9339
|
minSide: 1,
|
|
@@ -9342,7 +9385,8 @@ var FAL_IMAGE_SPECS = /* @__PURE__ */ new Map([
|
|
|
9342
9385
|
}
|
|
9343
9386
|
],
|
|
9344
9387
|
[
|
|
9345
|
-
|
|
9388
|
+
// Alibaba direct (adapters/alibaba-image.ts); png only, which the adapter warns about.
|
|
9389
|
+
"qwen-image-3.0-pro",
|
|
9346
9390
|
{
|
|
9347
9391
|
label: "Qwen Image 3",
|
|
9348
9392
|
maxReferences: 3,
|
|
@@ -9509,7 +9553,7 @@ function falExactSize(spec, req) {
|
|
|
9509
9553
|
return check.ok ? check.size : void 0;
|
|
9510
9554
|
}
|
|
9511
9555
|
function applyFalImageRules(model, req, callerSize, warnings) {
|
|
9512
|
-
if (model.adapter !== "fal") return;
|
|
9556
|
+
if (model.adapter !== "fal" && model.adapter !== "alibaba") return;
|
|
9513
9557
|
const spec = falImageSpec(model.providerModelId);
|
|
9514
9558
|
if (spec === void 0) return;
|
|
9515
9559
|
const problem = falImageProblem(spec, withPromptForResolve(req));
|
|
@@ -9572,7 +9616,7 @@ var KLING_V4_FLASH_EDIT = "kling/v4/flash/video-to-video";
|
|
|
9572
9616
|
var H3_TURBO = "minimax/h3-max-turbo";
|
|
9573
9617
|
var H3_RECAST = "minimax/h3-max/recast";
|
|
9574
9618
|
var H3_RELIGHT = "minimax/h3-max/relight";
|
|
9575
|
-
var HAPPY_HORSE = "
|
|
9619
|
+
var HAPPY_HORSE = "happyhorse-1.1";
|
|
9576
9620
|
var HAPPY_HORSE_EDIT = "alibaba/happy-horse/video-edit";
|
|
9577
9621
|
var VIDU_Q4 = "fal-ai/vidu/q4";
|
|
9578
9622
|
var OMNIHUMAN_V2 = "bytedance/omnihuman/v2";
|
|
@@ -9777,7 +9821,7 @@ function fillKlingModeResolution(model, req) {
|
|
|
9777
9821
|
}
|
|
9778
9822
|
}
|
|
9779
9823
|
function applyFalVideoRules(model, req, callerRatio, warnings) {
|
|
9780
|
-
if (model.adapter !== "fal") return;
|
|
9824
|
+
if (model.adapter !== "fal" && model.adapter !== "alibaba") return;
|
|
9781
9825
|
const problem = falVideoProblem(model.providerModelId, withPromptForResolve(req));
|
|
9782
9826
|
if (problem !== void 0) throw ruleRefusal(model, problem.message, problem.code);
|
|
9783
9827
|
const id = model.providerModelId.toLowerCase();
|