@shop-os/modelkit 0.1.8 → 0.1.10
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 +182 -0
- package/README.md +4 -0
- package/dist/catalog.cjs +121 -14
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +29 -1
- package/dist/catalog.d.ts +29 -1
- package/dist/catalog.js +121 -14
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +121 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +121 -14
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/catalog.d.cts
CHANGED
|
@@ -171,6 +171,11 @@ interface ModelConstraints {
|
|
|
171
171
|
durationPresets?: number[];
|
|
172
172
|
/** Curated quality choices for rows whose `supports` includes "quality". */
|
|
173
173
|
qualityOptions?: string[];
|
|
174
|
+
/**
|
|
175
|
+
* Exact pixel size per aspect ratio for rows an app must size verbatim
|
|
176
|
+
* (gpt-image-2 keeps its historic WxH contract); callers pass it as `exactSize`.
|
|
177
|
+
*/
|
|
178
|
+
exactSizes?: Record<string, string>;
|
|
174
179
|
references?: ReferenceLimits;
|
|
175
180
|
requires?: RequiredInput[];
|
|
176
181
|
supports?: SupportedOption[];
|
|
@@ -212,6 +217,20 @@ interface CatalogDisplay {
|
|
|
212
217
|
costTier?: 1 | 2 | 3;
|
|
213
218
|
/** Chat picker highlight flag. */
|
|
214
219
|
recommended?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Picker position: lower comes first; rows without one keep catalog order
|
|
222
|
+
* after the ordered ones. Set it to surface a new model at the top.
|
|
223
|
+
*/
|
|
224
|
+
sortOrder?: number;
|
|
225
|
+
/**
|
|
226
|
+
* Chat-surface stream tuning for text rows. Display data only: the kit never
|
|
227
|
+
* merges it into a call (row `providerOptions` is merged into every consumer's
|
|
228
|
+
* calls, which is why this lives here instead).
|
|
229
|
+
*/
|
|
230
|
+
chat?: {
|
|
231
|
+
providerOptions?: ProviderOptions;
|
|
232
|
+
temperature?: number;
|
|
233
|
+
};
|
|
215
234
|
}
|
|
216
235
|
/** Capability flags a UI keys off. Absent means false / unknown. */
|
|
217
236
|
interface CatalogCapabilities {
|
|
@@ -223,7 +242,8 @@ interface CatalogCapabilities {
|
|
|
223
242
|
acceptsSourceVideo?: boolean;
|
|
224
243
|
/** Video rows: first/last frames and reference images are mutually exclusive inputs. */
|
|
225
244
|
framesExcludeReferences?: boolean;
|
|
226
|
-
/** Text rows. */
|
|
245
|
+
/** Text rows. `reasoning`: the model streams reasoning the UI should surface. */
|
|
246
|
+
reasoning?: boolean;
|
|
227
247
|
vision?: boolean;
|
|
228
248
|
tools?: boolean;
|
|
229
249
|
structuredOutput?: boolean;
|
|
@@ -247,10 +267,18 @@ interface CatalogModel {
|
|
|
247
267
|
exposure: "catalog" | "internal";
|
|
248
268
|
constraints: ModelConstraints;
|
|
249
269
|
defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt">>;
|
|
270
|
+
/** Provider options merged under the caller's on every call. Chat-only tuning belongs in display.chat. */
|
|
250
271
|
providerOptions?: ProviderOptions;
|
|
272
|
+
/**
|
|
273
|
+
* `slug` and `providerLabel` keep an app's historic usage-event names for a
|
|
274
|
+
* row (e.g. cowork emits `image_gen_<slug>` from provider `<providerLabel>`);
|
|
275
|
+
* absent means the app derives them from the id and display.provider.
|
|
276
|
+
*/
|
|
251
277
|
usage: {
|
|
252
278
|
unit: UsageUnit;
|
|
253
279
|
modality: UsageModality;
|
|
280
|
+
slug?: string;
|
|
281
|
+
providerLabel?: string;
|
|
254
282
|
};
|
|
255
283
|
pricingKind: PricingKind;
|
|
256
284
|
/** Required on every `active` row so a picker can render it without a hand-written catalog. */
|
package/dist/catalog.d.ts
CHANGED
|
@@ -171,6 +171,11 @@ interface ModelConstraints {
|
|
|
171
171
|
durationPresets?: number[];
|
|
172
172
|
/** Curated quality choices for rows whose `supports` includes "quality". */
|
|
173
173
|
qualityOptions?: string[];
|
|
174
|
+
/**
|
|
175
|
+
* Exact pixel size per aspect ratio for rows an app must size verbatim
|
|
176
|
+
* (gpt-image-2 keeps its historic WxH contract); callers pass it as `exactSize`.
|
|
177
|
+
*/
|
|
178
|
+
exactSizes?: Record<string, string>;
|
|
174
179
|
references?: ReferenceLimits;
|
|
175
180
|
requires?: RequiredInput[];
|
|
176
181
|
supports?: SupportedOption[];
|
|
@@ -212,6 +217,20 @@ interface CatalogDisplay {
|
|
|
212
217
|
costTier?: 1 | 2 | 3;
|
|
213
218
|
/** Chat picker highlight flag. */
|
|
214
219
|
recommended?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Picker position: lower comes first; rows without one keep catalog order
|
|
222
|
+
* after the ordered ones. Set it to surface a new model at the top.
|
|
223
|
+
*/
|
|
224
|
+
sortOrder?: number;
|
|
225
|
+
/**
|
|
226
|
+
* Chat-surface stream tuning for text rows. Display data only: the kit never
|
|
227
|
+
* merges it into a call (row `providerOptions` is merged into every consumer's
|
|
228
|
+
* calls, which is why this lives here instead).
|
|
229
|
+
*/
|
|
230
|
+
chat?: {
|
|
231
|
+
providerOptions?: ProviderOptions;
|
|
232
|
+
temperature?: number;
|
|
233
|
+
};
|
|
215
234
|
}
|
|
216
235
|
/** Capability flags a UI keys off. Absent means false / unknown. */
|
|
217
236
|
interface CatalogCapabilities {
|
|
@@ -223,7 +242,8 @@ interface CatalogCapabilities {
|
|
|
223
242
|
acceptsSourceVideo?: boolean;
|
|
224
243
|
/** Video rows: first/last frames and reference images are mutually exclusive inputs. */
|
|
225
244
|
framesExcludeReferences?: boolean;
|
|
226
|
-
/** Text rows. */
|
|
245
|
+
/** Text rows. `reasoning`: the model streams reasoning the UI should surface. */
|
|
246
|
+
reasoning?: boolean;
|
|
227
247
|
vision?: boolean;
|
|
228
248
|
tools?: boolean;
|
|
229
249
|
structuredOutput?: boolean;
|
|
@@ -247,10 +267,18 @@ interface CatalogModel {
|
|
|
247
267
|
exposure: "catalog" | "internal";
|
|
248
268
|
constraints: ModelConstraints;
|
|
249
269
|
defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt">>;
|
|
270
|
+
/** Provider options merged under the caller's on every call. Chat-only tuning belongs in display.chat. */
|
|
250
271
|
providerOptions?: ProviderOptions;
|
|
272
|
+
/**
|
|
273
|
+
* `slug` and `providerLabel` keep an app's historic usage-event names for a
|
|
274
|
+
* row (e.g. cowork emits `image_gen_<slug>` from provider `<providerLabel>`);
|
|
275
|
+
* absent means the app derives them from the id and display.provider.
|
|
276
|
+
*/
|
|
251
277
|
usage: {
|
|
252
278
|
unit: UsageUnit;
|
|
253
279
|
modality: UsageModality;
|
|
280
|
+
slug?: string;
|
|
281
|
+
providerLabel?: string;
|
|
254
282
|
};
|
|
255
283
|
pricingKind: PricingKind;
|
|
256
284
|
/** Required on every `active` row so a picker can render it without a hand-written catalog. */
|
package/dist/catalog.js
CHANGED
|
@@ -127,7 +127,7 @@ function geminiImage(id, label, aliases, sizes, display, exposure) {
|
|
|
127
127
|
supports: ["safetySettings", "temperature"]
|
|
128
128
|
},
|
|
129
129
|
defaults: { size: "1K", aspectRatio: "1:1" },
|
|
130
|
-
usage: { ...IMAGE_USAGE },
|
|
130
|
+
usage: { ...IMAGE_USAGE, slug: "gemini" },
|
|
131
131
|
pricingKind: "image_size",
|
|
132
132
|
display,
|
|
133
133
|
capabilities: { ...IMAGE_GENERATE_EDIT }
|
|
@@ -195,6 +195,15 @@ var IMAGE_MODELS = [
|
|
|
195
195
|
lifecycle: "active",
|
|
196
196
|
exposure: "catalog",
|
|
197
197
|
constraints: {
|
|
198
|
+
exactSizes: {
|
|
199
|
+
"1:1": "1024x1024",
|
|
200
|
+
"3:2": "1536x1024",
|
|
201
|
+
"2:3": "1024x1536",
|
|
202
|
+
"16:9": "2048x1152",
|
|
203
|
+
"9:16": "1152x2048",
|
|
204
|
+
"4:5": "1024x1280",
|
|
205
|
+
"5:4": "1280x1024"
|
|
206
|
+
},
|
|
198
207
|
aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
|
|
199
208
|
sizes: ["1K", "2K", "4K"],
|
|
200
209
|
qualityOptions: ["auto", "low", "medium", "high"],
|
|
@@ -202,7 +211,7 @@ var IMAGE_MODELS = [
|
|
|
202
211
|
supports: ["quality", "count"]
|
|
203
212
|
},
|
|
204
213
|
defaults: { size: "1K", aspectRatio: "adaptive", quality: "auto" },
|
|
205
|
-
usage: { ...IMAGE_USAGE },
|
|
214
|
+
usage: { ...IMAGE_USAGE, slug: "gpt" },
|
|
206
215
|
pricingKind: "image_size",
|
|
207
216
|
display: {
|
|
208
217
|
provider: "openai",
|
|
@@ -222,6 +231,15 @@ var IMAGE_MODELS = [
|
|
|
222
231
|
lifecycle: "active",
|
|
223
232
|
exposure: "internal",
|
|
224
233
|
constraints: {
|
|
234
|
+
exactSizes: {
|
|
235
|
+
"1:1": "1024x1024",
|
|
236
|
+
"3:2": "1536x1024",
|
|
237
|
+
"2:3": "1024x1536",
|
|
238
|
+
"16:9": "2048x1152",
|
|
239
|
+
"9:16": "1152x2048",
|
|
240
|
+
"4:5": "1024x1280",
|
|
241
|
+
"5:4": "1280x1024"
|
|
242
|
+
},
|
|
225
243
|
aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
|
|
226
244
|
sizes: ["1K", "2K", "4K"],
|
|
227
245
|
qualityOptions: ["auto", "low", "medium", "high"],
|
|
@@ -248,6 +266,15 @@ var IMAGE_MODELS = [
|
|
|
248
266
|
lifecycle: "active",
|
|
249
267
|
exposure: "internal",
|
|
250
268
|
constraints: {
|
|
269
|
+
exactSizes: {
|
|
270
|
+
"1:1": "1024x1024",
|
|
271
|
+
"3:2": "1536x1024",
|
|
272
|
+
"2:3": "1024x1536",
|
|
273
|
+
"16:9": "2048x1152",
|
|
274
|
+
"9:16": "1152x2048",
|
|
275
|
+
"4:5": "1024x1280",
|
|
276
|
+
"5:4": "1280x1024"
|
|
277
|
+
},
|
|
251
278
|
aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
|
|
252
279
|
sizes: ["1K", "2K", "4K"],
|
|
253
280
|
qualityOptions: ["auto", "low", "medium", "high"],
|
|
@@ -293,7 +320,7 @@ var IMAGE_MODELS = [
|
|
|
293
320
|
supports: ["count", "outputFormat"]
|
|
294
321
|
},
|
|
295
322
|
defaults: { size: "1K", aspectRatio: "1:1", outputFormat: "png", count: 1 },
|
|
296
|
-
usage: { ...IMAGE_USAGE },
|
|
323
|
+
usage: { ...IMAGE_USAGE, slug: "muse" },
|
|
297
324
|
pricingKind: "image_size",
|
|
298
325
|
display: {
|
|
299
326
|
provider: "meta",
|
|
@@ -324,6 +351,7 @@ var IMAGE_MODELS = [
|
|
|
324
351
|
pricingKind: "image_size",
|
|
325
352
|
display: {
|
|
326
353
|
provider: "bytedance",
|
|
354
|
+
logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png",
|
|
327
355
|
description: "ByteDance Seedream 5.0 Pro text-to-image and multi-reference image-to-image (up to 10 inputs) with region editing; outputs 1K, 1.5K, or 2K."
|
|
328
356
|
},
|
|
329
357
|
capabilities: { ...IMAGE_GENERATE_EDIT }
|
|
@@ -529,6 +557,7 @@ var IMAGE_MODELS = [
|
|
|
529
557
|
];
|
|
530
558
|
|
|
531
559
|
// src/catalog/other.ts
|
|
560
|
+
var GOOGLE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png";
|
|
532
561
|
var OTHER_MODELS = [
|
|
533
562
|
{
|
|
534
563
|
id: "lyria-3-clip-preview",
|
|
@@ -549,6 +578,7 @@ var OTHER_MODELS = [
|
|
|
549
578
|
pricingKind: "flat",
|
|
550
579
|
display: {
|
|
551
580
|
provider: "google",
|
|
581
|
+
logo: GOOGLE_LOGO,
|
|
552
582
|
description: "Google Lyria 3 Clip short music clips, loops, and previews; takes text and up to 10 image prompts and returns a fixed 30-second MP3 plus lyrics."
|
|
553
583
|
},
|
|
554
584
|
capabilities: {}
|
|
@@ -571,6 +601,7 @@ var OTHER_MODELS = [
|
|
|
571
601
|
pricingKind: "flat",
|
|
572
602
|
display: {
|
|
573
603
|
provider: "google",
|
|
604
|
+
logo: GOOGLE_LOGO,
|
|
574
605
|
description: "Google Lyria 3 Pro flagship music model for full-length songs with verses, choruses, and bridges; takes text and up to 10 image prompts and returns MP3 plus lyrics."
|
|
575
606
|
},
|
|
576
607
|
capabilities: {}
|
|
@@ -710,6 +741,14 @@ function text(id, label, providerModelId, extra) {
|
|
|
710
741
|
...extra
|
|
711
742
|
};
|
|
712
743
|
}
|
|
744
|
+
var ANTHROPIC_THINKING = {
|
|
745
|
+
anthropic: { thinking: { type: "enabled", budgetTokens: 4e3 }, sendReasoning: true }
|
|
746
|
+
};
|
|
747
|
+
var ANTHROPIC_ADAPTIVE = {
|
|
748
|
+
anthropic: { thinking: { type: "adaptive", display: "summarized" }, sendReasoning: true }
|
|
749
|
+
};
|
|
750
|
+
var OPENAI_REASONING = { openai: { reasoningEffort: "medium", reasoningSummary: "auto" } };
|
|
751
|
+
var DEEPSEEK_THINKING = { deepseek: { thinking: { type: "enabled" } } };
|
|
713
752
|
var TEXT_MODELS = [
|
|
714
753
|
text("gpt-4o", "GPT-4o", "gpt-4o", {
|
|
715
754
|
exposure: "internal",
|
|
@@ -790,11 +829,13 @@ var TEXT_MODELS = [
|
|
|
790
829
|
text("gpt-5.6-luna", "GPT-5.6 Luna", "gpt-5.6-luna", {
|
|
791
830
|
exposure: "catalog",
|
|
792
831
|
display: {
|
|
832
|
+
chat: { providerOptions: OPENAI_REASONING },
|
|
793
833
|
provider: "openai",
|
|
794
834
|
costTier: 1,
|
|
795
835
|
description: "OpenAI GPT-5.6 Luna cost-optimized tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
|
|
796
836
|
},
|
|
797
837
|
capabilities: {
|
|
838
|
+
reasoning: true,
|
|
798
839
|
vision: true,
|
|
799
840
|
tools: true,
|
|
800
841
|
structuredOutput: true,
|
|
@@ -804,11 +845,13 @@ var TEXT_MODELS = [
|
|
|
804
845
|
text("gpt-5.6-terra", "GPT-5.6 Terra", "gpt-5.6-terra", {
|
|
805
846
|
exposure: "catalog",
|
|
806
847
|
display: {
|
|
848
|
+
chat: { providerOptions: OPENAI_REASONING },
|
|
807
849
|
provider: "openai",
|
|
808
850
|
costTier: 2,
|
|
809
851
|
description: "OpenAI GPT-5.6 Terra balanced tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
|
|
810
852
|
},
|
|
811
853
|
capabilities: {
|
|
854
|
+
reasoning: true,
|
|
812
855
|
vision: true,
|
|
813
856
|
tools: true,
|
|
814
857
|
structuredOutput: true,
|
|
@@ -818,11 +861,13 @@ var TEXT_MODELS = [
|
|
|
818
861
|
text("gpt-5.6-sol", "GPT-5.6 Sol", "gpt-5.6-sol", {
|
|
819
862
|
exposure: "catalog",
|
|
820
863
|
display: {
|
|
864
|
+
chat: { providerOptions: OPENAI_REASONING },
|
|
821
865
|
provider: "openai",
|
|
822
866
|
costTier: 3,
|
|
823
867
|
description: "OpenAI GPT-5.6 Sol flagship tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
|
|
824
868
|
},
|
|
825
869
|
capabilities: {
|
|
870
|
+
reasoning: true,
|
|
826
871
|
vision: true,
|
|
827
872
|
tools: true,
|
|
828
873
|
structuredOutput: true,
|
|
@@ -850,11 +895,13 @@ var TEXT_MODELS = [
|
|
|
850
895
|
"claude-sonnet-4-20250514"
|
|
851
896
|
],
|
|
852
897
|
display: {
|
|
898
|
+
chat: { providerOptions: ANTHROPIC_THINKING },
|
|
853
899
|
provider: "anthropic",
|
|
854
900
|
costTier: 2,
|
|
855
901
|
description: "Anthropic Claude Sonnet 4.6 (legacy) balanced model; text and image input, 1M-token context."
|
|
856
902
|
},
|
|
857
903
|
capabilities: {
|
|
904
|
+
reasoning: true,
|
|
858
905
|
vision: true,
|
|
859
906
|
tools: true,
|
|
860
907
|
structuredOutput: true,
|
|
@@ -864,11 +911,13 @@ var TEXT_MODELS = [
|
|
|
864
911
|
text("claude-sonnet-5", "Claude Sonnet 5", "claude-sonnet-5", {
|
|
865
912
|
exposure: "catalog",
|
|
866
913
|
display: {
|
|
914
|
+
chat: { providerOptions: ANTHROPIC_ADAPTIVE },
|
|
867
915
|
provider: "anthropic",
|
|
868
916
|
costTier: 3,
|
|
869
917
|
description: "Anthropic Claude Sonnet 5 current balanced model; text and image input, 1M-token context."
|
|
870
918
|
},
|
|
871
919
|
capabilities: {
|
|
920
|
+
reasoning: true,
|
|
872
921
|
vision: true,
|
|
873
922
|
tools: true,
|
|
874
923
|
structuredOutput: true,
|
|
@@ -879,11 +928,13 @@ var TEXT_MODELS = [
|
|
|
879
928
|
exposure: "catalog",
|
|
880
929
|
aliases: ["claude-opus-4.8", "claude-opus-4", "claude-opus-4.0", "claude-opus-4-20250514"],
|
|
881
930
|
display: {
|
|
931
|
+
chat: { providerOptions: ANTHROPIC_ADAPTIVE },
|
|
882
932
|
provider: "anthropic",
|
|
883
933
|
costTier: 3,
|
|
884
934
|
description: "Anthropic Claude Opus 4.8 (legacy) frontier model; text and image input, 1M-token context."
|
|
885
935
|
},
|
|
886
936
|
capabilities: {
|
|
937
|
+
reasoning: true,
|
|
887
938
|
vision: true,
|
|
888
939
|
tools: true,
|
|
889
940
|
structuredOutput: true,
|
|
@@ -894,11 +945,18 @@ var TEXT_MODELS = [
|
|
|
894
945
|
exposure: "catalog",
|
|
895
946
|
aliases: ["claude-haiku-4.5", "claude-haiku-4-5-20251001", "claude-haiku-4"],
|
|
896
947
|
display: {
|
|
948
|
+
chat: { providerOptions: ANTHROPIC_THINKING },
|
|
897
949
|
provider: "anthropic",
|
|
898
950
|
costTier: 1,
|
|
899
951
|
description: "Anthropic Claude Haiku 4.5 fast model with near-frontier intelligence; text and image input, 200K-token context."
|
|
900
952
|
},
|
|
901
|
-
capabilities: {
|
|
953
|
+
capabilities: {
|
|
954
|
+
reasoning: true,
|
|
955
|
+
vision: true,
|
|
956
|
+
tools: true,
|
|
957
|
+
structuredOutput: true,
|
|
958
|
+
contextWindow: 2e5
|
|
959
|
+
}
|
|
902
960
|
}),
|
|
903
961
|
text("claude-opus-5", "Claude Opus 5", "claude-opus-5", {
|
|
904
962
|
exposure: "internal",
|
|
@@ -1090,15 +1148,21 @@ var TEXT_MODELS = [
|
|
|
1090
1148
|
contextWindow: 128e3
|
|
1091
1149
|
}
|
|
1092
1150
|
}),
|
|
1093
|
-
|
|
1151
|
+
// DeepSeek retired V4 Flash upstream and routes the old id to V4.1 Flash at
|
|
1152
|
+
// Flash rates (https://api-docs.deepseek.com/news/news260910/); the old id
|
|
1153
|
+
// stays an alias so stored selections keep resolving.
|
|
1154
|
+
text("deepseek-flash", "DeepSeek V4.1 Flash", "deepseek-flash", {
|
|
1155
|
+
aliases: ["deepseek-v4-flash"],
|
|
1094
1156
|
exposure: "catalog",
|
|
1095
1157
|
display: {
|
|
1158
|
+
chat: { providerOptions: DEEPSEEK_THINKING },
|
|
1096
1159
|
provider: "deepseek",
|
|
1097
1160
|
costTier: 1,
|
|
1098
1161
|
recommended: true,
|
|
1099
|
-
description: "DeepSeek V4 Flash thinking/non-thinking model with vision, tool calls, and JSON output; 1M-token context and up to 384K output tokens."
|
|
1162
|
+
description: "DeepSeek V4.1 Flash thinking/non-thinking model with vision, tool calls, and JSON output; 1M-token context and up to 384K output tokens."
|
|
1100
1163
|
},
|
|
1101
1164
|
capabilities: {
|
|
1165
|
+
reasoning: true,
|
|
1102
1166
|
vision: true,
|
|
1103
1167
|
tools: true,
|
|
1104
1168
|
structuredOutput: true,
|
|
@@ -1108,11 +1172,13 @@ var TEXT_MODELS = [
|
|
|
1108
1172
|
text("deepseek-v4-pro", "DeepSeek V4 Pro", "deepseek-v4-pro", {
|
|
1109
1173
|
exposure: "catalog",
|
|
1110
1174
|
display: {
|
|
1175
|
+
chat: { providerOptions: DEEPSEEK_THINKING },
|
|
1111
1176
|
provider: "deepseek",
|
|
1112
1177
|
costTier: 2,
|
|
1113
1178
|
description: "DeepSeek V4 Pro thinking/non-thinking text model with tool calls and JSON output (no vision); 1M-token context and up to 384K output tokens."
|
|
1114
1179
|
},
|
|
1115
1180
|
capabilities: {
|
|
1181
|
+
reasoning: true,
|
|
1116
1182
|
vision: false,
|
|
1117
1183
|
tools: true,
|
|
1118
1184
|
structuredOutput: true,
|
|
@@ -1138,6 +1204,7 @@ var TEXT_MODELS = [
|
|
|
1138
1204
|
text("kimi-k2.5", "Kimi K2.5", "kimi-k2.5", {
|
|
1139
1205
|
exposure: "catalog",
|
|
1140
1206
|
display: {
|
|
1207
|
+
chat: { temperature: 1 },
|
|
1141
1208
|
provider: "moonshot",
|
|
1142
1209
|
costTier: 2,
|
|
1143
1210
|
description: "Moonshot Kimi K2.5; the provider retired the model on 2026-08-31 and calls now return a model-not-found error."
|
|
@@ -1147,11 +1214,13 @@ var TEXT_MODELS = [
|
|
|
1147
1214
|
text("kimi-k3", "Kimi K3", "kimi-k3", {
|
|
1148
1215
|
exposure: "catalog",
|
|
1149
1216
|
display: {
|
|
1217
|
+
chat: { temperature: 1 },
|
|
1150
1218
|
provider: "moonshot",
|
|
1151
1219
|
costTier: 2,
|
|
1152
1220
|
description: "Moonshot Kimi K3 flagship model with native visual understanding and always-on thinking; text, image, and video input, 1M-token context."
|
|
1153
1221
|
},
|
|
1154
1222
|
capabilities: {
|
|
1223
|
+
reasoning: true,
|
|
1155
1224
|
vision: true,
|
|
1156
1225
|
tools: true,
|
|
1157
1226
|
structuredOutput: true,
|
|
@@ -1182,7 +1251,8 @@ var H3_RATIOS = ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"];
|
|
|
1182
1251
|
var H3_REFERENCE_RATIOS = ["adaptive", ...H3_RATIOS];
|
|
1183
1252
|
var NEGATIVE_PROMPT = "blur, distort, and low quality";
|
|
1184
1253
|
var FRAMES_EXCLUDE_REFERENCES = { framesExcludeReferences: true };
|
|
1185
|
-
var
|
|
1254
|
+
var BYTEDANCE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png";
|
|
1255
|
+
var GOOGLE_LOGO2 = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png";
|
|
1186
1256
|
var VIDEO_MODELS = [
|
|
1187
1257
|
{
|
|
1188
1258
|
id: "veo-3.1",
|
|
@@ -1206,12 +1276,12 @@ var VIDEO_MODELS = [
|
|
|
1206
1276
|
supports: ["lastFrame"]
|
|
1207
1277
|
},
|
|
1208
1278
|
defaults: { durationSeconds: 8, resolution: "720p", aspectRatio: "16:9" },
|
|
1209
|
-
usage: { ...VIDEO_USAGE },
|
|
1279
|
+
usage: { ...VIDEO_USAGE, slug: "veo" },
|
|
1210
1280
|
pricingKind: "video_per_second",
|
|
1211
1281
|
display: {
|
|
1212
1282
|
provider: "google",
|
|
1213
1283
|
description: "Google's highest-quality video generation model. Supports up to 4K resolution and 8-second clips with reference image conditioning.",
|
|
1214
|
-
logo:
|
|
1284
|
+
logo: GOOGLE_LOGO2
|
|
1215
1285
|
},
|
|
1216
1286
|
capabilities: { ...FRAMES_EXCLUDE_REFERENCES }
|
|
1217
1287
|
},
|
|
@@ -1298,12 +1368,12 @@ var VIDEO_MODELS = [
|
|
|
1298
1368
|
supports: []
|
|
1299
1369
|
},
|
|
1300
1370
|
defaults: {},
|
|
1301
|
-
usage: { ...VIDEO_USAGE },
|
|
1371
|
+
usage: { ...VIDEO_USAGE, slug: "gemini_omni" },
|
|
1302
1372
|
pricingKind: "video_per_second",
|
|
1303
1373
|
display: {
|
|
1304
1374
|
provider: "google",
|
|
1305
1375
|
description: "Google's conversational video model with native audio, human support, and natural language editing. Aspect ratio only \u2014 resolution and duration are model-determined.",
|
|
1306
|
-
logo:
|
|
1376
|
+
logo: GOOGLE_LOGO2
|
|
1307
1377
|
},
|
|
1308
1378
|
capabilities: { acceptsSourceVideo: true }
|
|
1309
1379
|
},
|
|
@@ -1328,6 +1398,7 @@ var VIDEO_MODELS = [
|
|
|
1328
1398
|
pricingKind: "video_per_second",
|
|
1329
1399
|
display: {
|
|
1330
1400
|
provider: "google",
|
|
1401
|
+
logo: GOOGLE_LOGO2,
|
|
1331
1402
|
description: "Google Gemini Omni Flash 1.1 conversational video generation and editing; text, image, and up to 10-second video input, 3-10 second output at up to 4K and 24 FPS."
|
|
1332
1403
|
},
|
|
1333
1404
|
capabilities: { acceptsSourceVideo: true }
|
|
@@ -1357,12 +1428,12 @@ var VIDEO_MODELS = [
|
|
|
1357
1428
|
aspectRatio: "16:9",
|
|
1358
1429
|
generateAudio: true
|
|
1359
1430
|
},
|
|
1360
|
-
usage: { ...VIDEO_USAGE },
|
|
1431
|
+
usage: { ...VIDEO_USAGE, slug: "seedance2", providerLabel: "byteplus" },
|
|
1361
1432
|
pricingKind: "video_per_second",
|
|
1362
1433
|
display: {
|
|
1363
1434
|
provider: "bytedance",
|
|
1364
1435
|
description: "High-quality AI video generation with reference image conditioning. Supports 4-15 second clips with human preprocessing.",
|
|
1365
|
-
logo:
|
|
1436
|
+
logo: BYTEDANCE_LOGO
|
|
1366
1437
|
},
|
|
1367
1438
|
capabilities: { acceptsSourceVideo: true, ...FRAMES_EXCLUDE_REFERENCES }
|
|
1368
1439
|
},
|
|
@@ -1393,6 +1464,7 @@ var VIDEO_MODELS = [
|
|
|
1393
1464
|
pricingKind: "video_per_second",
|
|
1394
1465
|
display: {
|
|
1395
1466
|
provider: "bytedance",
|
|
1467
|
+
logo: BYTEDANCE_LOGO,
|
|
1396
1468
|
description: "Speed- and cost-optimized ByteDance Seedance 2.0 Fast; text plus image, video, and audio references to generate or edit 4-15 second clips."
|
|
1397
1469
|
},
|
|
1398
1470
|
capabilities: { acceptsSourceVideo: true, ...FRAMES_EXCLUDE_REFERENCES }
|
|
@@ -1425,6 +1497,7 @@ var VIDEO_MODELS = [
|
|
|
1425
1497
|
pricingKind: "video_per_second",
|
|
1426
1498
|
display: {
|
|
1427
1499
|
provider: "bytedance",
|
|
1500
|
+
logo: BYTEDANCE_LOGO,
|
|
1428
1501
|
description: "ByteDance Seedance 2.5 for long-form storytelling and omni-reference generation/editing; up to 50 reference assets and 4-30 second clips at up to 1080p."
|
|
1429
1502
|
},
|
|
1430
1503
|
capabilities: { acceptsSourceVideo: true, ...FRAMES_EXCLUDE_REFERENCES }
|
|
@@ -1449,7 +1522,7 @@ var VIDEO_MODELS = [
|
|
|
1449
1522
|
},
|
|
1450
1523
|
// No resolution default: xAI picks its own unless the caller asks.
|
|
1451
1524
|
defaults: { durationSeconds: 8, aspectRatio: "16:9" },
|
|
1452
|
-
usage: { unit: "reported_cost_usd", modality: "VIDEO" },
|
|
1525
|
+
usage: { unit: "reported_cost_usd", modality: "VIDEO", slug: "grok" },
|
|
1453
1526
|
pricingKind: "video_per_second",
|
|
1454
1527
|
display: {
|
|
1455
1528
|
provider: "xai",
|
|
@@ -1930,6 +2003,40 @@ function resolveVideoOptions(model, request, onUnsupported = "error") {
|
|
|
1930
2003
|
model: model.id
|
|
1931
2004
|
});
|
|
1932
2005
|
}
|
|
2006
|
+
if (merged.sourceVideo !== void 0 && !model.capabilities?.acceptsSourceVideo) {
|
|
2007
|
+
if (onUnsupported === "error") {
|
|
2008
|
+
throw new ModelKitError({
|
|
2009
|
+
code: "unsupported_option",
|
|
2010
|
+
message: `${model.id} does not take a source video`,
|
|
2011
|
+
model: model.id
|
|
2012
|
+
});
|
|
2013
|
+
}
|
|
2014
|
+
warnings.push({
|
|
2015
|
+
code: "option_ignored",
|
|
2016
|
+
field: "sourceVideo",
|
|
2017
|
+
message: `${model.id} does not take a source video; dropped`
|
|
2018
|
+
});
|
|
2019
|
+
delete merged.sourceVideo;
|
|
2020
|
+
}
|
|
2021
|
+
const hasFrames = merged.firstFrame !== void 0 || merged.lastFrame !== void 0;
|
|
2022
|
+
const hasRefs = compact(merged.referenceImages).length + compact(merged.referenceVideos).length + compact(merged.referenceAudios).length > 0;
|
|
2023
|
+
if (hasFrames && hasRefs && model.capabilities?.framesExcludeReferences) {
|
|
2024
|
+
if (onUnsupported === "error") {
|
|
2025
|
+
throw new ModelKitError({
|
|
2026
|
+
code: "unsupported_option",
|
|
2027
|
+
message: `${model.id} takes frames or references, not both`,
|
|
2028
|
+
model: model.id
|
|
2029
|
+
});
|
|
2030
|
+
}
|
|
2031
|
+
warnings.push({
|
|
2032
|
+
code: "option_ignored",
|
|
2033
|
+
field: "referenceImages",
|
|
2034
|
+
message: `${model.id} takes frames or references, not both; references dropped`
|
|
2035
|
+
});
|
|
2036
|
+
delete merged.referenceImages;
|
|
2037
|
+
delete merged.referenceVideos;
|
|
2038
|
+
delete merged.referenceAudios;
|
|
2039
|
+
}
|
|
1933
2040
|
for (const input of c.ratioIgnoredWith ?? []) {
|
|
1934
2041
|
if (merged[input] !== void 0 && merged.aspectRatio !== void 0) {
|
|
1935
2042
|
if (request.aspectRatio !== void 0) {
|