@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/index.d.cts
CHANGED
|
@@ -175,6 +175,11 @@ interface ModelConstraints {
|
|
|
175
175
|
durationPresets?: number[];
|
|
176
176
|
/** Curated quality choices for rows whose `supports` includes "quality". */
|
|
177
177
|
qualityOptions?: string[];
|
|
178
|
+
/**
|
|
179
|
+
* Exact pixel size per aspect ratio for rows an app must size verbatim
|
|
180
|
+
* (gpt-image-2 keeps its historic WxH contract); callers pass it as `exactSize`.
|
|
181
|
+
*/
|
|
182
|
+
exactSizes?: Record<string, string>;
|
|
178
183
|
references?: ReferenceLimits;
|
|
179
184
|
requires?: RequiredInput[];
|
|
180
185
|
supports?: SupportedOption[];
|
|
@@ -216,6 +221,20 @@ interface CatalogDisplay {
|
|
|
216
221
|
costTier?: 1 | 2 | 3;
|
|
217
222
|
/** Chat picker highlight flag. */
|
|
218
223
|
recommended?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Picker position: lower comes first; rows without one keep catalog order
|
|
226
|
+
* after the ordered ones. Set it to surface a new model at the top.
|
|
227
|
+
*/
|
|
228
|
+
sortOrder?: number;
|
|
229
|
+
/**
|
|
230
|
+
* Chat-surface stream tuning for text rows. Display data only: the kit never
|
|
231
|
+
* merges it into a call (row `providerOptions` is merged into every consumer's
|
|
232
|
+
* calls, which is why this lives here instead).
|
|
233
|
+
*/
|
|
234
|
+
chat?: {
|
|
235
|
+
providerOptions?: ProviderOptions;
|
|
236
|
+
temperature?: number;
|
|
237
|
+
};
|
|
219
238
|
}
|
|
220
239
|
/** Capability flags a UI keys off. Absent means false / unknown. */
|
|
221
240
|
interface CatalogCapabilities {
|
|
@@ -227,7 +246,8 @@ interface CatalogCapabilities {
|
|
|
227
246
|
acceptsSourceVideo?: boolean;
|
|
228
247
|
/** Video rows: first/last frames and reference images are mutually exclusive inputs. */
|
|
229
248
|
framesExcludeReferences?: boolean;
|
|
230
|
-
/** Text rows. */
|
|
249
|
+
/** Text rows. `reasoning`: the model streams reasoning the UI should surface. */
|
|
250
|
+
reasoning?: boolean;
|
|
231
251
|
vision?: boolean;
|
|
232
252
|
tools?: boolean;
|
|
233
253
|
structuredOutput?: boolean;
|
|
@@ -251,10 +271,18 @@ interface CatalogModel {
|
|
|
251
271
|
exposure: "catalog" | "internal";
|
|
252
272
|
constraints: ModelConstraints;
|
|
253
273
|
defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt">>;
|
|
274
|
+
/** Provider options merged under the caller's on every call. Chat-only tuning belongs in display.chat. */
|
|
254
275
|
providerOptions?: ProviderOptions;
|
|
276
|
+
/**
|
|
277
|
+
* `slug` and `providerLabel` keep an app's historic usage-event names for a
|
|
278
|
+
* row (e.g. cowork emits `image_gen_<slug>` from provider `<providerLabel>`);
|
|
279
|
+
* absent means the app derives them from the id and display.provider.
|
|
280
|
+
*/
|
|
255
281
|
usage: {
|
|
256
282
|
unit: UsageUnit;
|
|
257
283
|
modality: UsageModality;
|
|
284
|
+
slug?: string;
|
|
285
|
+
providerLabel?: string;
|
|
258
286
|
};
|
|
259
287
|
pricingKind: PricingKind;
|
|
260
288
|
/** Required on every `active` row so a picker can render it without a hand-written catalog. */
|
package/dist/index.d.ts
CHANGED
|
@@ -175,6 +175,11 @@ interface ModelConstraints {
|
|
|
175
175
|
durationPresets?: number[];
|
|
176
176
|
/** Curated quality choices for rows whose `supports` includes "quality". */
|
|
177
177
|
qualityOptions?: string[];
|
|
178
|
+
/**
|
|
179
|
+
* Exact pixel size per aspect ratio for rows an app must size verbatim
|
|
180
|
+
* (gpt-image-2 keeps its historic WxH contract); callers pass it as `exactSize`.
|
|
181
|
+
*/
|
|
182
|
+
exactSizes?: Record<string, string>;
|
|
178
183
|
references?: ReferenceLimits;
|
|
179
184
|
requires?: RequiredInput[];
|
|
180
185
|
supports?: SupportedOption[];
|
|
@@ -216,6 +221,20 @@ interface CatalogDisplay {
|
|
|
216
221
|
costTier?: 1 | 2 | 3;
|
|
217
222
|
/** Chat picker highlight flag. */
|
|
218
223
|
recommended?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Picker position: lower comes first; rows without one keep catalog order
|
|
226
|
+
* after the ordered ones. Set it to surface a new model at the top.
|
|
227
|
+
*/
|
|
228
|
+
sortOrder?: number;
|
|
229
|
+
/**
|
|
230
|
+
* Chat-surface stream tuning for text rows. Display data only: the kit never
|
|
231
|
+
* merges it into a call (row `providerOptions` is merged into every consumer's
|
|
232
|
+
* calls, which is why this lives here instead).
|
|
233
|
+
*/
|
|
234
|
+
chat?: {
|
|
235
|
+
providerOptions?: ProviderOptions;
|
|
236
|
+
temperature?: number;
|
|
237
|
+
};
|
|
219
238
|
}
|
|
220
239
|
/** Capability flags a UI keys off. Absent means false / unknown. */
|
|
221
240
|
interface CatalogCapabilities {
|
|
@@ -227,7 +246,8 @@ interface CatalogCapabilities {
|
|
|
227
246
|
acceptsSourceVideo?: boolean;
|
|
228
247
|
/** Video rows: first/last frames and reference images are mutually exclusive inputs. */
|
|
229
248
|
framesExcludeReferences?: boolean;
|
|
230
|
-
/** Text rows. */
|
|
249
|
+
/** Text rows. `reasoning`: the model streams reasoning the UI should surface. */
|
|
250
|
+
reasoning?: boolean;
|
|
231
251
|
vision?: boolean;
|
|
232
252
|
tools?: boolean;
|
|
233
253
|
structuredOutput?: boolean;
|
|
@@ -251,10 +271,18 @@ interface CatalogModel {
|
|
|
251
271
|
exposure: "catalog" | "internal";
|
|
252
272
|
constraints: ModelConstraints;
|
|
253
273
|
defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt">>;
|
|
274
|
+
/** Provider options merged under the caller's on every call. Chat-only tuning belongs in display.chat. */
|
|
254
275
|
providerOptions?: ProviderOptions;
|
|
276
|
+
/**
|
|
277
|
+
* `slug` and `providerLabel` keep an app's historic usage-event names for a
|
|
278
|
+
* row (e.g. cowork emits `image_gen_<slug>` from provider `<providerLabel>`);
|
|
279
|
+
* absent means the app derives them from the id and display.provider.
|
|
280
|
+
*/
|
|
255
281
|
usage: {
|
|
256
282
|
unit: UsageUnit;
|
|
257
283
|
modality: UsageModality;
|
|
284
|
+
slug?: string;
|
|
285
|
+
providerLabel?: string;
|
|
258
286
|
};
|
|
259
287
|
pricingKind: PricingKind;
|
|
260
288
|
/** Required on every `active` row so a picker can render it without a hand-written catalog. */
|
package/dist/index.js
CHANGED
|
@@ -130,7 +130,7 @@ function geminiImage(id, label, aliases, sizes, display, exposure) {
|
|
|
130
130
|
supports: ["safetySettings", "temperature"]
|
|
131
131
|
},
|
|
132
132
|
defaults: { size: "1K", aspectRatio: "1:1" },
|
|
133
|
-
usage: { ...IMAGE_USAGE },
|
|
133
|
+
usage: { ...IMAGE_USAGE, slug: "gemini" },
|
|
134
134
|
pricingKind: "image_size",
|
|
135
135
|
display,
|
|
136
136
|
capabilities: { ...IMAGE_GENERATE_EDIT }
|
|
@@ -198,6 +198,15 @@ var IMAGE_MODELS = [
|
|
|
198
198
|
lifecycle: "active",
|
|
199
199
|
exposure: "catalog",
|
|
200
200
|
constraints: {
|
|
201
|
+
exactSizes: {
|
|
202
|
+
"1:1": "1024x1024",
|
|
203
|
+
"3:2": "1536x1024",
|
|
204
|
+
"2:3": "1024x1536",
|
|
205
|
+
"16:9": "2048x1152",
|
|
206
|
+
"9:16": "1152x2048",
|
|
207
|
+
"4:5": "1024x1280",
|
|
208
|
+
"5:4": "1280x1024"
|
|
209
|
+
},
|
|
201
210
|
aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
|
|
202
211
|
sizes: ["1K", "2K", "4K"],
|
|
203
212
|
qualityOptions: ["auto", "low", "medium", "high"],
|
|
@@ -205,7 +214,7 @@ var IMAGE_MODELS = [
|
|
|
205
214
|
supports: ["quality", "count"]
|
|
206
215
|
},
|
|
207
216
|
defaults: { size: "1K", aspectRatio: "adaptive", quality: "auto" },
|
|
208
|
-
usage: { ...IMAGE_USAGE },
|
|
217
|
+
usage: { ...IMAGE_USAGE, slug: "gpt" },
|
|
209
218
|
pricingKind: "image_size",
|
|
210
219
|
display: {
|
|
211
220
|
provider: "openai",
|
|
@@ -225,6 +234,15 @@ var IMAGE_MODELS = [
|
|
|
225
234
|
lifecycle: "active",
|
|
226
235
|
exposure: "internal",
|
|
227
236
|
constraints: {
|
|
237
|
+
exactSizes: {
|
|
238
|
+
"1:1": "1024x1024",
|
|
239
|
+
"3:2": "1536x1024",
|
|
240
|
+
"2:3": "1024x1536",
|
|
241
|
+
"16:9": "2048x1152",
|
|
242
|
+
"9:16": "1152x2048",
|
|
243
|
+
"4:5": "1024x1280",
|
|
244
|
+
"5:4": "1280x1024"
|
|
245
|
+
},
|
|
228
246
|
aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
|
|
229
247
|
sizes: ["1K", "2K", "4K"],
|
|
230
248
|
qualityOptions: ["auto", "low", "medium", "high"],
|
|
@@ -251,6 +269,15 @@ var IMAGE_MODELS = [
|
|
|
251
269
|
lifecycle: "active",
|
|
252
270
|
exposure: "internal",
|
|
253
271
|
constraints: {
|
|
272
|
+
exactSizes: {
|
|
273
|
+
"1:1": "1024x1024",
|
|
274
|
+
"3:2": "1536x1024",
|
|
275
|
+
"2:3": "1024x1536",
|
|
276
|
+
"16:9": "2048x1152",
|
|
277
|
+
"9:16": "1152x2048",
|
|
278
|
+
"4:5": "1024x1280",
|
|
279
|
+
"5:4": "1280x1024"
|
|
280
|
+
},
|
|
254
281
|
aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
|
|
255
282
|
sizes: ["1K", "2K", "4K"],
|
|
256
283
|
qualityOptions: ["auto", "low", "medium", "high"],
|
|
@@ -296,7 +323,7 @@ var IMAGE_MODELS = [
|
|
|
296
323
|
supports: ["count", "outputFormat"]
|
|
297
324
|
},
|
|
298
325
|
defaults: { size: "1K", aspectRatio: "1:1", outputFormat: "png", count: 1 },
|
|
299
|
-
usage: { ...IMAGE_USAGE },
|
|
326
|
+
usage: { ...IMAGE_USAGE, slug: "muse" },
|
|
300
327
|
pricingKind: "image_size",
|
|
301
328
|
display: {
|
|
302
329
|
provider: "meta",
|
|
@@ -327,6 +354,7 @@ var IMAGE_MODELS = [
|
|
|
327
354
|
pricingKind: "image_size",
|
|
328
355
|
display: {
|
|
329
356
|
provider: "bytedance",
|
|
357
|
+
logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png",
|
|
330
358
|
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."
|
|
331
359
|
},
|
|
332
360
|
capabilities: { ...IMAGE_GENERATE_EDIT }
|
|
@@ -532,6 +560,7 @@ var IMAGE_MODELS = [
|
|
|
532
560
|
];
|
|
533
561
|
|
|
534
562
|
// src/catalog/other.ts
|
|
563
|
+
var GOOGLE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png";
|
|
535
564
|
var OTHER_MODELS = [
|
|
536
565
|
{
|
|
537
566
|
id: "lyria-3-clip-preview",
|
|
@@ -552,6 +581,7 @@ var OTHER_MODELS = [
|
|
|
552
581
|
pricingKind: "flat",
|
|
553
582
|
display: {
|
|
554
583
|
provider: "google",
|
|
584
|
+
logo: GOOGLE_LOGO,
|
|
555
585
|
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."
|
|
556
586
|
},
|
|
557
587
|
capabilities: {}
|
|
@@ -574,6 +604,7 @@ var OTHER_MODELS = [
|
|
|
574
604
|
pricingKind: "flat",
|
|
575
605
|
display: {
|
|
576
606
|
provider: "google",
|
|
607
|
+
logo: GOOGLE_LOGO,
|
|
577
608
|
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."
|
|
578
609
|
},
|
|
579
610
|
capabilities: {}
|
|
@@ -713,6 +744,14 @@ function text(id, label, providerModelId, extra) {
|
|
|
713
744
|
...extra
|
|
714
745
|
};
|
|
715
746
|
}
|
|
747
|
+
var ANTHROPIC_THINKING = {
|
|
748
|
+
anthropic: { thinking: { type: "enabled", budgetTokens: 4e3 }, sendReasoning: true }
|
|
749
|
+
};
|
|
750
|
+
var ANTHROPIC_ADAPTIVE = {
|
|
751
|
+
anthropic: { thinking: { type: "adaptive", display: "summarized" }, sendReasoning: true }
|
|
752
|
+
};
|
|
753
|
+
var OPENAI_REASONING = { openai: { reasoningEffort: "medium", reasoningSummary: "auto" } };
|
|
754
|
+
var DEEPSEEK_THINKING = { deepseek: { thinking: { type: "enabled" } } };
|
|
716
755
|
var TEXT_MODELS = [
|
|
717
756
|
text("gpt-4o", "GPT-4o", "gpt-4o", {
|
|
718
757
|
exposure: "internal",
|
|
@@ -793,11 +832,13 @@ var TEXT_MODELS = [
|
|
|
793
832
|
text("gpt-5.6-luna", "GPT-5.6 Luna", "gpt-5.6-luna", {
|
|
794
833
|
exposure: "catalog",
|
|
795
834
|
display: {
|
|
835
|
+
chat: { providerOptions: OPENAI_REASONING },
|
|
796
836
|
provider: "openai",
|
|
797
837
|
costTier: 1,
|
|
798
838
|
description: "OpenAI GPT-5.6 Luna cost-optimized tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
|
|
799
839
|
},
|
|
800
840
|
capabilities: {
|
|
841
|
+
reasoning: true,
|
|
801
842
|
vision: true,
|
|
802
843
|
tools: true,
|
|
803
844
|
structuredOutput: true,
|
|
@@ -807,11 +848,13 @@ var TEXT_MODELS = [
|
|
|
807
848
|
text("gpt-5.6-terra", "GPT-5.6 Terra", "gpt-5.6-terra", {
|
|
808
849
|
exposure: "catalog",
|
|
809
850
|
display: {
|
|
851
|
+
chat: { providerOptions: OPENAI_REASONING },
|
|
810
852
|
provider: "openai",
|
|
811
853
|
costTier: 2,
|
|
812
854
|
description: "OpenAI GPT-5.6 Terra balanced tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
|
|
813
855
|
},
|
|
814
856
|
capabilities: {
|
|
857
|
+
reasoning: true,
|
|
815
858
|
vision: true,
|
|
816
859
|
tools: true,
|
|
817
860
|
structuredOutput: true,
|
|
@@ -821,11 +864,13 @@ var TEXT_MODELS = [
|
|
|
821
864
|
text("gpt-5.6-sol", "GPT-5.6 Sol", "gpt-5.6-sol", {
|
|
822
865
|
exposure: "catalog",
|
|
823
866
|
display: {
|
|
867
|
+
chat: { providerOptions: OPENAI_REASONING },
|
|
824
868
|
provider: "openai",
|
|
825
869
|
costTier: 3,
|
|
826
870
|
description: "OpenAI GPT-5.6 Sol flagship tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
|
|
827
871
|
},
|
|
828
872
|
capabilities: {
|
|
873
|
+
reasoning: true,
|
|
829
874
|
vision: true,
|
|
830
875
|
tools: true,
|
|
831
876
|
structuredOutput: true,
|
|
@@ -853,11 +898,13 @@ var TEXT_MODELS = [
|
|
|
853
898
|
"claude-sonnet-4-20250514"
|
|
854
899
|
],
|
|
855
900
|
display: {
|
|
901
|
+
chat: { providerOptions: ANTHROPIC_THINKING },
|
|
856
902
|
provider: "anthropic",
|
|
857
903
|
costTier: 2,
|
|
858
904
|
description: "Anthropic Claude Sonnet 4.6 (legacy) balanced model; text and image input, 1M-token context."
|
|
859
905
|
},
|
|
860
906
|
capabilities: {
|
|
907
|
+
reasoning: true,
|
|
861
908
|
vision: true,
|
|
862
909
|
tools: true,
|
|
863
910
|
structuredOutput: true,
|
|
@@ -867,11 +914,13 @@ var TEXT_MODELS = [
|
|
|
867
914
|
text("claude-sonnet-5", "Claude Sonnet 5", "claude-sonnet-5", {
|
|
868
915
|
exposure: "catalog",
|
|
869
916
|
display: {
|
|
917
|
+
chat: { providerOptions: ANTHROPIC_ADAPTIVE },
|
|
870
918
|
provider: "anthropic",
|
|
871
919
|
costTier: 3,
|
|
872
920
|
description: "Anthropic Claude Sonnet 5 current balanced model; text and image input, 1M-token context."
|
|
873
921
|
},
|
|
874
922
|
capabilities: {
|
|
923
|
+
reasoning: true,
|
|
875
924
|
vision: true,
|
|
876
925
|
tools: true,
|
|
877
926
|
structuredOutput: true,
|
|
@@ -882,11 +931,13 @@ var TEXT_MODELS = [
|
|
|
882
931
|
exposure: "catalog",
|
|
883
932
|
aliases: ["claude-opus-4.8", "claude-opus-4", "claude-opus-4.0", "claude-opus-4-20250514"],
|
|
884
933
|
display: {
|
|
934
|
+
chat: { providerOptions: ANTHROPIC_ADAPTIVE },
|
|
885
935
|
provider: "anthropic",
|
|
886
936
|
costTier: 3,
|
|
887
937
|
description: "Anthropic Claude Opus 4.8 (legacy) frontier model; text and image input, 1M-token context."
|
|
888
938
|
},
|
|
889
939
|
capabilities: {
|
|
940
|
+
reasoning: true,
|
|
890
941
|
vision: true,
|
|
891
942
|
tools: true,
|
|
892
943
|
structuredOutput: true,
|
|
@@ -897,11 +948,18 @@ var TEXT_MODELS = [
|
|
|
897
948
|
exposure: "catalog",
|
|
898
949
|
aliases: ["claude-haiku-4.5", "claude-haiku-4-5-20251001", "claude-haiku-4"],
|
|
899
950
|
display: {
|
|
951
|
+
chat: { providerOptions: ANTHROPIC_THINKING },
|
|
900
952
|
provider: "anthropic",
|
|
901
953
|
costTier: 1,
|
|
902
954
|
description: "Anthropic Claude Haiku 4.5 fast model with near-frontier intelligence; text and image input, 200K-token context."
|
|
903
955
|
},
|
|
904
|
-
capabilities: {
|
|
956
|
+
capabilities: {
|
|
957
|
+
reasoning: true,
|
|
958
|
+
vision: true,
|
|
959
|
+
tools: true,
|
|
960
|
+
structuredOutput: true,
|
|
961
|
+
contextWindow: 2e5
|
|
962
|
+
}
|
|
905
963
|
}),
|
|
906
964
|
text("claude-opus-5", "Claude Opus 5", "claude-opus-5", {
|
|
907
965
|
exposure: "internal",
|
|
@@ -1093,15 +1151,21 @@ var TEXT_MODELS = [
|
|
|
1093
1151
|
contextWindow: 128e3
|
|
1094
1152
|
}
|
|
1095
1153
|
}),
|
|
1096
|
-
|
|
1154
|
+
// DeepSeek retired V4 Flash upstream and routes the old id to V4.1 Flash at
|
|
1155
|
+
// Flash rates (https://api-docs.deepseek.com/news/news260910/); the old id
|
|
1156
|
+
// stays an alias so stored selections keep resolving.
|
|
1157
|
+
text("deepseek-flash", "DeepSeek V4.1 Flash", "deepseek-flash", {
|
|
1158
|
+
aliases: ["deepseek-v4-flash"],
|
|
1097
1159
|
exposure: "catalog",
|
|
1098
1160
|
display: {
|
|
1161
|
+
chat: { providerOptions: DEEPSEEK_THINKING },
|
|
1099
1162
|
provider: "deepseek",
|
|
1100
1163
|
costTier: 1,
|
|
1101
1164
|
recommended: true,
|
|
1102
|
-
description: "DeepSeek V4 Flash thinking/non-thinking model with vision, tool calls, and JSON output; 1M-token context and up to 384K output tokens."
|
|
1165
|
+
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."
|
|
1103
1166
|
},
|
|
1104
1167
|
capabilities: {
|
|
1168
|
+
reasoning: true,
|
|
1105
1169
|
vision: true,
|
|
1106
1170
|
tools: true,
|
|
1107
1171
|
structuredOutput: true,
|
|
@@ -1111,11 +1175,13 @@ var TEXT_MODELS = [
|
|
|
1111
1175
|
text("deepseek-v4-pro", "DeepSeek V4 Pro", "deepseek-v4-pro", {
|
|
1112
1176
|
exposure: "catalog",
|
|
1113
1177
|
display: {
|
|
1178
|
+
chat: { providerOptions: DEEPSEEK_THINKING },
|
|
1114
1179
|
provider: "deepseek",
|
|
1115
1180
|
costTier: 2,
|
|
1116
1181
|
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."
|
|
1117
1182
|
},
|
|
1118
1183
|
capabilities: {
|
|
1184
|
+
reasoning: true,
|
|
1119
1185
|
vision: false,
|
|
1120
1186
|
tools: true,
|
|
1121
1187
|
structuredOutput: true,
|
|
@@ -1141,6 +1207,7 @@ var TEXT_MODELS = [
|
|
|
1141
1207
|
text("kimi-k2.5", "Kimi K2.5", "kimi-k2.5", {
|
|
1142
1208
|
exposure: "catalog",
|
|
1143
1209
|
display: {
|
|
1210
|
+
chat: { temperature: 1 },
|
|
1144
1211
|
provider: "moonshot",
|
|
1145
1212
|
costTier: 2,
|
|
1146
1213
|
description: "Moonshot Kimi K2.5; the provider retired the model on 2026-08-31 and calls now return a model-not-found error."
|
|
@@ -1150,11 +1217,13 @@ var TEXT_MODELS = [
|
|
|
1150
1217
|
text("kimi-k3", "Kimi K3", "kimi-k3", {
|
|
1151
1218
|
exposure: "catalog",
|
|
1152
1219
|
display: {
|
|
1220
|
+
chat: { temperature: 1 },
|
|
1153
1221
|
provider: "moonshot",
|
|
1154
1222
|
costTier: 2,
|
|
1155
1223
|
description: "Moonshot Kimi K3 flagship model with native visual understanding and always-on thinking; text, image, and video input, 1M-token context."
|
|
1156
1224
|
},
|
|
1157
1225
|
capabilities: {
|
|
1226
|
+
reasoning: true,
|
|
1158
1227
|
vision: true,
|
|
1159
1228
|
tools: true,
|
|
1160
1229
|
structuredOutput: true,
|
|
@@ -1185,7 +1254,8 @@ var H3_RATIOS = ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"];
|
|
|
1185
1254
|
var H3_REFERENCE_RATIOS = ["adaptive", ...H3_RATIOS];
|
|
1186
1255
|
var NEGATIVE_PROMPT = "blur, distort, and low quality";
|
|
1187
1256
|
var FRAMES_EXCLUDE_REFERENCES = { framesExcludeReferences: true };
|
|
1188
|
-
var
|
|
1257
|
+
var BYTEDANCE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png";
|
|
1258
|
+
var GOOGLE_LOGO2 = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png";
|
|
1189
1259
|
var VIDEO_MODELS = [
|
|
1190
1260
|
{
|
|
1191
1261
|
id: "veo-3.1",
|
|
@@ -1209,12 +1279,12 @@ var VIDEO_MODELS = [
|
|
|
1209
1279
|
supports: ["lastFrame"]
|
|
1210
1280
|
},
|
|
1211
1281
|
defaults: { durationSeconds: 8, resolution: "720p", aspectRatio: "16:9" },
|
|
1212
|
-
usage: { ...VIDEO_USAGE },
|
|
1282
|
+
usage: { ...VIDEO_USAGE, slug: "veo" },
|
|
1213
1283
|
pricingKind: "video_per_second",
|
|
1214
1284
|
display: {
|
|
1215
1285
|
provider: "google",
|
|
1216
1286
|
description: "Google's highest-quality video generation model. Supports up to 4K resolution and 8-second clips with reference image conditioning.",
|
|
1217
|
-
logo:
|
|
1287
|
+
logo: GOOGLE_LOGO2
|
|
1218
1288
|
},
|
|
1219
1289
|
capabilities: { ...FRAMES_EXCLUDE_REFERENCES }
|
|
1220
1290
|
},
|
|
@@ -1301,12 +1371,12 @@ var VIDEO_MODELS = [
|
|
|
1301
1371
|
supports: []
|
|
1302
1372
|
},
|
|
1303
1373
|
defaults: {},
|
|
1304
|
-
usage: { ...VIDEO_USAGE },
|
|
1374
|
+
usage: { ...VIDEO_USAGE, slug: "gemini_omni" },
|
|
1305
1375
|
pricingKind: "video_per_second",
|
|
1306
1376
|
display: {
|
|
1307
1377
|
provider: "google",
|
|
1308
1378
|
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.",
|
|
1309
|
-
logo:
|
|
1379
|
+
logo: GOOGLE_LOGO2
|
|
1310
1380
|
},
|
|
1311
1381
|
capabilities: { acceptsSourceVideo: true }
|
|
1312
1382
|
},
|
|
@@ -1331,6 +1401,7 @@ var VIDEO_MODELS = [
|
|
|
1331
1401
|
pricingKind: "video_per_second",
|
|
1332
1402
|
display: {
|
|
1333
1403
|
provider: "google",
|
|
1404
|
+
logo: GOOGLE_LOGO2,
|
|
1334
1405
|
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."
|
|
1335
1406
|
},
|
|
1336
1407
|
capabilities: { acceptsSourceVideo: true }
|
|
@@ -1360,12 +1431,12 @@ var VIDEO_MODELS = [
|
|
|
1360
1431
|
aspectRatio: "16:9",
|
|
1361
1432
|
generateAudio: true
|
|
1362
1433
|
},
|
|
1363
|
-
usage: { ...VIDEO_USAGE },
|
|
1434
|
+
usage: { ...VIDEO_USAGE, slug: "seedance2", providerLabel: "byteplus" },
|
|
1364
1435
|
pricingKind: "video_per_second",
|
|
1365
1436
|
display: {
|
|
1366
1437
|
provider: "bytedance",
|
|
1367
1438
|
description: "High-quality AI video generation with reference image conditioning. Supports 4-15 second clips with human preprocessing.",
|
|
1368
|
-
logo:
|
|
1439
|
+
logo: BYTEDANCE_LOGO
|
|
1369
1440
|
},
|
|
1370
1441
|
capabilities: { acceptsSourceVideo: true, ...FRAMES_EXCLUDE_REFERENCES }
|
|
1371
1442
|
},
|
|
@@ -1396,6 +1467,7 @@ var VIDEO_MODELS = [
|
|
|
1396
1467
|
pricingKind: "video_per_second",
|
|
1397
1468
|
display: {
|
|
1398
1469
|
provider: "bytedance",
|
|
1470
|
+
logo: BYTEDANCE_LOGO,
|
|
1399
1471
|
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."
|
|
1400
1472
|
},
|
|
1401
1473
|
capabilities: { acceptsSourceVideo: true, ...FRAMES_EXCLUDE_REFERENCES }
|
|
@@ -1428,6 +1500,7 @@ var VIDEO_MODELS = [
|
|
|
1428
1500
|
pricingKind: "video_per_second",
|
|
1429
1501
|
display: {
|
|
1430
1502
|
provider: "bytedance",
|
|
1503
|
+
logo: BYTEDANCE_LOGO,
|
|
1431
1504
|
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."
|
|
1432
1505
|
},
|
|
1433
1506
|
capabilities: { acceptsSourceVideo: true, ...FRAMES_EXCLUDE_REFERENCES }
|
|
@@ -1452,7 +1525,7 @@ var VIDEO_MODELS = [
|
|
|
1452
1525
|
},
|
|
1453
1526
|
// No resolution default: xAI picks its own unless the caller asks.
|
|
1454
1527
|
defaults: { durationSeconds: 8, aspectRatio: "16:9" },
|
|
1455
|
-
usage: { unit: "reported_cost_usd", modality: "VIDEO" },
|
|
1528
|
+
usage: { unit: "reported_cost_usd", modality: "VIDEO", slug: "grok" },
|
|
1456
1529
|
pricingKind: "video_per_second",
|
|
1457
1530
|
display: {
|
|
1458
1531
|
provider: "xai",
|
|
@@ -1933,6 +2006,40 @@ function resolveVideoOptions(model, request, onUnsupported = "error") {
|
|
|
1933
2006
|
model: model.id
|
|
1934
2007
|
});
|
|
1935
2008
|
}
|
|
2009
|
+
if (merged.sourceVideo !== void 0 && !model.capabilities?.acceptsSourceVideo) {
|
|
2010
|
+
if (onUnsupported === "error") {
|
|
2011
|
+
throw new ModelKitError({
|
|
2012
|
+
code: "unsupported_option",
|
|
2013
|
+
message: `${model.id} does not take a source video`,
|
|
2014
|
+
model: model.id
|
|
2015
|
+
});
|
|
2016
|
+
}
|
|
2017
|
+
warnings.push({
|
|
2018
|
+
code: "option_ignored",
|
|
2019
|
+
field: "sourceVideo",
|
|
2020
|
+
message: `${model.id} does not take a source video; dropped`
|
|
2021
|
+
});
|
|
2022
|
+
delete merged.sourceVideo;
|
|
2023
|
+
}
|
|
2024
|
+
const hasFrames = merged.firstFrame !== void 0 || merged.lastFrame !== void 0;
|
|
2025
|
+
const hasRefs = compact(merged.referenceImages).length + compact(merged.referenceVideos).length + compact(merged.referenceAudios).length > 0;
|
|
2026
|
+
if (hasFrames && hasRefs && model.capabilities?.framesExcludeReferences) {
|
|
2027
|
+
if (onUnsupported === "error") {
|
|
2028
|
+
throw new ModelKitError({
|
|
2029
|
+
code: "unsupported_option",
|
|
2030
|
+
message: `${model.id} takes frames or references, not both`,
|
|
2031
|
+
model: model.id
|
|
2032
|
+
});
|
|
2033
|
+
}
|
|
2034
|
+
warnings.push({
|
|
2035
|
+
code: "option_ignored",
|
|
2036
|
+
field: "referenceImages",
|
|
2037
|
+
message: `${model.id} takes frames or references, not both; references dropped`
|
|
2038
|
+
});
|
|
2039
|
+
delete merged.referenceImages;
|
|
2040
|
+
delete merged.referenceVideos;
|
|
2041
|
+
delete merged.referenceAudios;
|
|
2042
|
+
}
|
|
1936
2043
|
for (const input of c.ratioIgnoredWith ?? []) {
|
|
1937
2044
|
if (merged[input] !== void 0 && merged.aspectRatio !== void 0) {
|
|
1938
2045
|
if (request.aspectRatio !== void 0) {
|