@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/dist/catalog.d.cts
CHANGED
|
@@ -168,7 +168,7 @@ type Lifecycle = "active" | "deprecated" | "retired";
|
|
|
168
168
|
type Surface = "cowork" | "space_builder";
|
|
169
169
|
/** @deprecated use Surface[] */
|
|
170
170
|
type Exposure = Surface[];
|
|
171
|
-
type AdapterId = "ai-sdk-text" | "google-image" | "openai-image" | "google-genai" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "xai-video" | "luma" | "fish" | "elevenlabs";
|
|
171
|
+
type AdapterId = "ai-sdk-text" | "google-image" | "openai-image" | "google-genai" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "xai-video" | "alibaba" | "luma" | "fish" | "elevenlabs";
|
|
172
172
|
/** Gemini image safety threshold, per category, sent only when the caller opts in. */
|
|
173
173
|
type ImageSafetySetting = {
|
|
174
174
|
category: string;
|
|
@@ -1066,10 +1066,12 @@ interface UsageEvent {
|
|
|
1066
1066
|
keySource?: KeySource;
|
|
1067
1067
|
raw?: unknown;
|
|
1068
1068
|
}
|
|
1069
|
-
type ProviderKeyName = "openai" | "anthropic" | "google" | "xai" | "perplexity" | "deepseek" | "moonshot" | "minimax" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "luma" | "fish" | "elevenlabs" | "cloudflare";
|
|
1069
|
+
type ProviderKeyName = "openai" | "anthropic" | "google" | "xai" | "perplexity" | "deepseek" | "moonshot" | "minimax" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "alibaba" | "luma" | "fish" | "elevenlabs" | "cloudflare";
|
|
1070
1070
|
type ProviderKeys = Partial<Record<ProviderKeyName, string>> & {
|
|
1071
1071
|
/** Higgsfield needs the pair; both switch together. */
|
|
1072
1072
|
higgsfieldSecret?: string;
|
|
1073
|
+
/** Model Studio workspace the `alibaba` key belongs to; its endpoint takes keys of that workspace only. */
|
|
1074
|
+
alibabaWorkspace?: string;
|
|
1073
1075
|
/** Bedrock runtime credentials for Anthropic models when routing.anthropic = "bedrock". */
|
|
1074
1076
|
aws?: {
|
|
1075
1077
|
/** Bedrock region. Must serve the chosen inference profile (us-east-1 for "us"). */
|
|
@@ -1119,6 +1121,8 @@ interface AdapterEndpoints {
|
|
|
1119
1121
|
ark?: string;
|
|
1120
1122
|
/** Luma Agents API. Defaults to https://agents.lumalabs.ai. */
|
|
1121
1123
|
luma?: string;
|
|
1124
|
+
/** Alibaba Model Studio API base (ending in /api/v1). Defaults to the workspace endpoint in US (Virginia). */
|
|
1125
|
+
alibaba?: string;
|
|
1122
1126
|
/** Fish Audio API. Defaults to https://api.fish.audio. */
|
|
1123
1127
|
fish?: string;
|
|
1124
1128
|
/** ElevenLabs API. Defaults to https://api.elevenlabs.io. */
|
|
@@ -1212,7 +1216,7 @@ declare function isListed(row: CatalogModel): boolean;
|
|
|
1212
1216
|
*/
|
|
1213
1217
|
declare const MODELS: CatalogModel[];
|
|
1214
1218
|
|
|
1215
|
-
declare const ADAPTER_IDS: readonly ["ai-sdk-text", "google-image", "openai-image", "google-genai", "ark", "fal", "replicate", "prodia", "higgsfield", "xai-video", "luma", "fish", "elevenlabs"];
|
|
1219
|
+
declare const ADAPTER_IDS: readonly ["ai-sdk-text", "google-image", "openai-image", "google-genai", "ark", "fal", "replicate", "prodia", "higgsfield", "xai-video", "luma", "alibaba", "fish", "elevenlabs"];
|
|
1216
1220
|
declare const SurfaceSchema: z.ZodEnum<{
|
|
1217
1221
|
cowork: "cowork";
|
|
1218
1222
|
space_builder: "space_builder";
|
|
@@ -1262,6 +1266,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1262
1266
|
prodia: "prodia";
|
|
1263
1267
|
higgsfield: "higgsfield";
|
|
1264
1268
|
"xai-video": "xai-video";
|
|
1269
|
+
alibaba: "alibaba";
|
|
1265
1270
|
luma: "luma";
|
|
1266
1271
|
fish: "fish";
|
|
1267
1272
|
elevenlabs: "elevenlabs";
|
package/dist/catalog.d.ts
CHANGED
|
@@ -168,7 +168,7 @@ type Lifecycle = "active" | "deprecated" | "retired";
|
|
|
168
168
|
type Surface = "cowork" | "space_builder";
|
|
169
169
|
/** @deprecated use Surface[] */
|
|
170
170
|
type Exposure = Surface[];
|
|
171
|
-
type AdapterId = "ai-sdk-text" | "google-image" | "openai-image" | "google-genai" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "xai-video" | "luma" | "fish" | "elevenlabs";
|
|
171
|
+
type AdapterId = "ai-sdk-text" | "google-image" | "openai-image" | "google-genai" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "xai-video" | "alibaba" | "luma" | "fish" | "elevenlabs";
|
|
172
172
|
/** Gemini image safety threshold, per category, sent only when the caller opts in. */
|
|
173
173
|
type ImageSafetySetting = {
|
|
174
174
|
category: string;
|
|
@@ -1066,10 +1066,12 @@ interface UsageEvent {
|
|
|
1066
1066
|
keySource?: KeySource;
|
|
1067
1067
|
raw?: unknown;
|
|
1068
1068
|
}
|
|
1069
|
-
type ProviderKeyName = "openai" | "anthropic" | "google" | "xai" | "perplexity" | "deepseek" | "moonshot" | "minimax" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "luma" | "fish" | "elevenlabs" | "cloudflare";
|
|
1069
|
+
type ProviderKeyName = "openai" | "anthropic" | "google" | "xai" | "perplexity" | "deepseek" | "moonshot" | "minimax" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "alibaba" | "luma" | "fish" | "elevenlabs" | "cloudflare";
|
|
1070
1070
|
type ProviderKeys = Partial<Record<ProviderKeyName, string>> & {
|
|
1071
1071
|
/** Higgsfield needs the pair; both switch together. */
|
|
1072
1072
|
higgsfieldSecret?: string;
|
|
1073
|
+
/** Model Studio workspace the `alibaba` key belongs to; its endpoint takes keys of that workspace only. */
|
|
1074
|
+
alibabaWorkspace?: string;
|
|
1073
1075
|
/** Bedrock runtime credentials for Anthropic models when routing.anthropic = "bedrock". */
|
|
1074
1076
|
aws?: {
|
|
1075
1077
|
/** Bedrock region. Must serve the chosen inference profile (us-east-1 for "us"). */
|
|
@@ -1119,6 +1121,8 @@ interface AdapterEndpoints {
|
|
|
1119
1121
|
ark?: string;
|
|
1120
1122
|
/** Luma Agents API. Defaults to https://agents.lumalabs.ai. */
|
|
1121
1123
|
luma?: string;
|
|
1124
|
+
/** Alibaba Model Studio API base (ending in /api/v1). Defaults to the workspace endpoint in US (Virginia). */
|
|
1125
|
+
alibaba?: string;
|
|
1122
1126
|
/** Fish Audio API. Defaults to https://api.fish.audio. */
|
|
1123
1127
|
fish?: string;
|
|
1124
1128
|
/** ElevenLabs API. Defaults to https://api.elevenlabs.io. */
|
|
@@ -1212,7 +1216,7 @@ declare function isListed(row: CatalogModel): boolean;
|
|
|
1212
1216
|
*/
|
|
1213
1217
|
declare const MODELS: CatalogModel[];
|
|
1214
1218
|
|
|
1215
|
-
declare const ADAPTER_IDS: readonly ["ai-sdk-text", "google-image", "openai-image", "google-genai", "ark", "fal", "replicate", "prodia", "higgsfield", "xai-video", "luma", "fish", "elevenlabs"];
|
|
1219
|
+
declare const ADAPTER_IDS: readonly ["ai-sdk-text", "google-image", "openai-image", "google-genai", "ark", "fal", "replicate", "prodia", "higgsfield", "xai-video", "luma", "alibaba", "fish", "elevenlabs"];
|
|
1216
1220
|
declare const SurfaceSchema: z.ZodEnum<{
|
|
1217
1221
|
cowork: "cowork";
|
|
1218
1222
|
space_builder: "space_builder";
|
|
@@ -1262,6 +1266,7 @@ declare const CatalogModelSchemaBase: z.ZodObject<{
|
|
|
1262
1266
|
prodia: "prodia";
|
|
1263
1267
|
higgsfield: "higgsfield";
|
|
1264
1268
|
"xai-video": "xai-video";
|
|
1269
|
+
alibaba: "alibaba";
|
|
1265
1270
|
luma: "luma";
|
|
1266
1271
|
fish: "fish";
|
|
1267
1272
|
elevenlabs: "elevenlabs";
|
package/dist/catalog.js
CHANGED
|
@@ -260,14 +260,15 @@ var FAL_IMAGE_MODELS = [
|
|
|
260
260
|
}
|
|
261
261
|
},
|
|
262
262
|
{
|
|
263
|
-
//
|
|
264
|
-
// as "image 1".."image 3"
|
|
263
|
+
// Alibaba Model Studio direct (qwen-image-3.0-pro; fal's qwen-image-3 bills its prices).
|
|
264
|
+
// 1-3 input images make it an edit, addressed as "image 1".."image 3". png output only.
|
|
265
|
+
// https://www.alibabacloud.com/help/en/model-studio/qwen-image-generation-and-editing-api-reference
|
|
265
266
|
id: "qwen-image-3",
|
|
266
267
|
aliases: [],
|
|
267
268
|
label: "Qwen Image 3",
|
|
268
269
|
type: "image",
|
|
269
|
-
adapter: "
|
|
270
|
-
providerModelId: "
|
|
270
|
+
adapter: "alibaba",
|
|
271
|
+
providerModelId: "qwen-image-3.0-pro",
|
|
271
272
|
lifecycle: "active",
|
|
272
273
|
exposure: EXPOSURE,
|
|
273
274
|
constraints: {
|
|
@@ -878,6 +879,46 @@ var IMAGE_MODELS = [
|
|
|
878
879
|
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."
|
|
879
880
|
}
|
|
880
881
|
},
|
|
882
|
+
// Seedream 5.5 (Early Access, 2026-11-11): 1K / 1.5K / 2K, no 4K; exact sizes must total
|
|
883
|
+
// 921,600 to 4,624,220 px, which every SEEDREAM_SIZES 1K and 2K entry does. Up to 10
|
|
884
|
+
// references; `background: "transparent"` returns an RGBA PNG.
|
|
885
|
+
{
|
|
886
|
+
id: "seedream-5.5",
|
|
887
|
+
aliases: [],
|
|
888
|
+
label: "Seedream 5.5",
|
|
889
|
+
type: "image",
|
|
890
|
+
adapter: "ark",
|
|
891
|
+
providerModelId: "dola-seedream-5-5-261028",
|
|
892
|
+
lifecycle: "active",
|
|
893
|
+
exposure: ["cowork", "space_builder"],
|
|
894
|
+
constraints: {
|
|
895
|
+
aspectRatios: [
|
|
896
|
+
"1:1",
|
|
897
|
+
"4:3",
|
|
898
|
+
"3:4",
|
|
899
|
+
"16:9",
|
|
900
|
+
"9:16",
|
|
901
|
+
"3:2",
|
|
902
|
+
"2:3",
|
|
903
|
+
"21:9",
|
|
904
|
+
"9:21",
|
|
905
|
+
"4:5",
|
|
906
|
+
"5:4"
|
|
907
|
+
],
|
|
908
|
+
sizes: ["1K", "2K"],
|
|
909
|
+
references: { images: 10 },
|
|
910
|
+
supports: ["seed", "outputFormat"],
|
|
911
|
+
backgrounds: ["auto", "opaque", "transparent"]
|
|
912
|
+
},
|
|
913
|
+
defaults: { size: "1K", aspectRatio: "1:1" },
|
|
914
|
+
usage: { ...IMAGE_USAGE3 },
|
|
915
|
+
pricingKind: "image_size",
|
|
916
|
+
display: {
|
|
917
|
+
provider: "bytedance",
|
|
918
|
+
logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png",
|
|
919
|
+
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."
|
|
920
|
+
}
|
|
921
|
+
},
|
|
881
922
|
{
|
|
882
923
|
id: "seedream-4.5",
|
|
883
924
|
aliases: [],
|
|
@@ -5594,14 +5635,15 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5594
5635
|
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5595
5636
|
},
|
|
5596
5637
|
{
|
|
5597
|
-
//
|
|
5598
|
-
//
|
|
5638
|
+
// Alibaba Model Studio direct: one row for happyhorse-1.1-t2v / -i2v / -r2v; references,
|
|
5639
|
+
// else a start frame, else text. 480P exists too, unpriced, so it stays out.
|
|
5640
|
+
// https://www.alibabacloud.com/help/en/model-studio/happyhorse-reference-to-video-api-reference
|
|
5599
5641
|
id: "happy-horse-1.1",
|
|
5600
5642
|
aliases: ["happy-horse"],
|
|
5601
5643
|
label: "Happy Horse 1.1",
|
|
5602
5644
|
type: "video",
|
|
5603
|
-
adapter: "
|
|
5604
|
-
providerModelId: "
|
|
5645
|
+
adapter: "alibaba",
|
|
5646
|
+
providerModelId: "happyhorse-1.1",
|
|
5605
5647
|
lifecycle: "active",
|
|
5606
5648
|
exposure: ["cowork", "space_builder"],
|
|
5607
5649
|
constraints: {
|
|
@@ -5610,7 +5652,7 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5610
5652
|
durations: range(3, 15),
|
|
5611
5653
|
ratioIgnoredWith: ["firstFrame"],
|
|
5612
5654
|
references: { ...NO_REFERENCES, images: 9 },
|
|
5613
|
-
supports: ["seed"
|
|
5655
|
+
supports: ["seed"],
|
|
5614
5656
|
prompt: { referenceSyntax: "numbered", maxChars: 2500 },
|
|
5615
5657
|
audio: "always"
|
|
5616
5658
|
},
|
|
@@ -6559,15 +6601,15 @@ var VIDEO_MODELS = [
|
|
|
6559
6601
|
capabilities: { ...FRAMES_EXCLUDE_REFERENCES }
|
|
6560
6602
|
},
|
|
6561
6603
|
{
|
|
6562
|
-
//
|
|
6563
|
-
// reference-to-video
|
|
6564
|
-
// https://
|
|
6604
|
+
// Alibaba Model Studio direct, one model id for text-, image- (first/last frame) and
|
|
6605
|
+
// reference-to-video. Reference-video seconds bill on top of the output seconds.
|
|
6606
|
+
// https://www.alibabacloud.com/help/en/model-studio/wan3-video-generation-api-reference
|
|
6565
6607
|
id: "wan-3.0",
|
|
6566
6608
|
aliases: ["wan-3", "wan3"],
|
|
6567
6609
|
label: "Wan 3",
|
|
6568
6610
|
type: "video",
|
|
6569
|
-
adapter: "
|
|
6570
|
-
providerModelId: "
|
|
6611
|
+
adapter: "alibaba",
|
|
6612
|
+
providerModelId: "wan3.0-video",
|
|
6571
6613
|
lifecycle: "active",
|
|
6572
6614
|
exposure: ["cowork", "space_builder"],
|
|
6573
6615
|
constraints: {
|
|
@@ -6582,7 +6624,7 @@ var VIDEO_MODELS = [
|
|
|
6582
6624
|
videoSeconds: { total: 15 },
|
|
6583
6625
|
audioSeconds: { total: 15 }
|
|
6584
6626
|
},
|
|
6585
|
-
supports: ["seed", "lastFrame", "generateAudio"
|
|
6627
|
+
supports: ["seed", "lastFrame", "generateAudio"],
|
|
6586
6628
|
prompt: WAN_PROMPT,
|
|
6587
6629
|
audio: "optional"
|
|
6588
6630
|
},
|
|
@@ -6601,15 +6643,14 @@ var VIDEO_MODELS = [
|
|
|
6601
6643
|
capabilities: { ...FRAMES_EXCLUDE_REFERENCES, lastFrameRequiresFirstFrame: true }
|
|
6602
6644
|
},
|
|
6603
6645
|
{
|
|
6604
|
-
//
|
|
6605
|
-
//
|
|
6606
|
-
// https://fal.ai/models/alibaba/wan-3.0-prime/reference-to-video/api
|
|
6646
|
+
// Wan 3.0 Prime takes Wan 3.0's request field for field but bills more per second, so
|
|
6647
|
+
// Prime is its own row (the id is the pricing key).
|
|
6607
6648
|
id: "wan-3.0-prime",
|
|
6608
6649
|
aliases: ["wan-3-prime", "wan3-prime"],
|
|
6609
6650
|
label: "Wan 3 Prime",
|
|
6610
6651
|
type: "video",
|
|
6611
|
-
adapter: "
|
|
6612
|
-
providerModelId: "
|
|
6652
|
+
adapter: "alibaba",
|
|
6653
|
+
providerModelId: "wan3.0-video-prime",
|
|
6613
6654
|
lifecycle: "active",
|
|
6614
6655
|
exposure: ["cowork", "space_builder"],
|
|
6615
6656
|
constraints: {
|
|
@@ -6624,7 +6665,7 @@ var VIDEO_MODELS = [
|
|
|
6624
6665
|
videoSeconds: { total: 15 },
|
|
6625
6666
|
audioSeconds: { total: 15 }
|
|
6626
6667
|
},
|
|
6627
|
-
supports: ["seed", "lastFrame", "generateAudio"
|
|
6668
|
+
supports: ["seed", "lastFrame", "generateAudio"],
|
|
6628
6669
|
prompt: WAN_PROMPT,
|
|
6629
6670
|
audio: "optional"
|
|
6630
6671
|
},
|
|
@@ -7943,6 +7984,7 @@ var ADAPTER_IDS = [
|
|
|
7943
7984
|
"higgsfield",
|
|
7944
7985
|
"xai-video",
|
|
7945
7986
|
"luma",
|
|
7987
|
+
"alibaba",
|
|
7946
7988
|
"fish",
|
|
7947
7989
|
"elevenlabs"
|
|
7948
7990
|
];
|
|
@@ -9201,7 +9243,8 @@ var QWEN_EXACT = {
|
|
|
9201
9243
|
maxSide: 14142,
|
|
9202
9244
|
minArea: 512 * 512,
|
|
9203
9245
|
maxArea: 2048 * 2048,
|
|
9204
|
-
multipleOf: 1
|
|
9246
|
+
multipleOf: 1,
|
|
9247
|
+
maxAspect: 8
|
|
9205
9248
|
};
|
|
9206
9249
|
var MINIMAX_H3_IMAGE_EXACT = {
|
|
9207
9250
|
minSide: 1,
|
|
@@ -9253,7 +9296,8 @@ var FAL_IMAGE_SPECS = /* @__PURE__ */ new Map([
|
|
|
9253
9296
|
}
|
|
9254
9297
|
],
|
|
9255
9298
|
[
|
|
9256
|
-
|
|
9299
|
+
// Alibaba direct (adapters/alibaba-image.ts); png only, which the adapter warns about.
|
|
9300
|
+
"qwen-image-3.0-pro",
|
|
9257
9301
|
{
|
|
9258
9302
|
label: "Qwen Image 3",
|
|
9259
9303
|
maxReferences: 3,
|
|
@@ -9420,7 +9464,7 @@ function falExactSize(spec, req) {
|
|
|
9420
9464
|
return check.ok ? check.size : void 0;
|
|
9421
9465
|
}
|
|
9422
9466
|
function applyFalImageRules(model, req, callerSize, warnings) {
|
|
9423
|
-
if (model.adapter !== "fal") return;
|
|
9467
|
+
if (model.adapter !== "fal" && model.adapter !== "alibaba") return;
|
|
9424
9468
|
const spec = falImageSpec(model.providerModelId);
|
|
9425
9469
|
if (spec === void 0) return;
|
|
9426
9470
|
const problem = falImageProblem(spec, withPromptForResolve(req));
|
|
@@ -9483,7 +9527,7 @@ var KLING_V4_FLASH_EDIT = "kling/v4/flash/video-to-video";
|
|
|
9483
9527
|
var H3_TURBO = "minimax/h3-max-turbo";
|
|
9484
9528
|
var H3_RECAST = "minimax/h3-max/recast";
|
|
9485
9529
|
var H3_RELIGHT = "minimax/h3-max/relight";
|
|
9486
|
-
var HAPPY_HORSE = "
|
|
9530
|
+
var HAPPY_HORSE = "happyhorse-1.1";
|
|
9487
9531
|
var HAPPY_HORSE_EDIT = "alibaba/happy-horse/video-edit";
|
|
9488
9532
|
var VIDU_Q4 = "fal-ai/vidu/q4";
|
|
9489
9533
|
var OMNIHUMAN_V2 = "bytedance/omnihuman/v2";
|
|
@@ -9688,7 +9732,7 @@ function fillKlingModeResolution(model, req) {
|
|
|
9688
9732
|
}
|
|
9689
9733
|
}
|
|
9690
9734
|
function applyFalVideoRules(model, req, callerRatio, warnings) {
|
|
9691
|
-
if (model.adapter !== "fal") return;
|
|
9735
|
+
if (model.adapter !== "fal" && model.adapter !== "alibaba") return;
|
|
9692
9736
|
const problem = falVideoProblem(model.providerModelId, withPromptForResolve(req));
|
|
9693
9737
|
if (problem !== void 0) throw ruleRefusal(model, problem.message, problem.code);
|
|
9694
9738
|
const id = model.providerModelId.toLowerCase();
|