@shop-os/modelkit 0.1.7 → 0.1.9

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/dist/index.cjs CHANGED
@@ -118,6 +118,23 @@ var Catalog = class _Catalog {
118
118
  for (const model of models) this.add(model);
119
119
  }
120
120
  add(model) {
121
+ if (this.byId.has(model.id)) {
122
+ throw new Error(`Duplicate model id "${model.id}"`);
123
+ }
124
+ if (this.byAlias.has(model.id)) {
125
+ throw new Error(
126
+ `Model id "${model.id}" collides with an alias of "${this.byAlias.get(model.id)}"`
127
+ );
128
+ }
129
+ for (const alias of model.aliases) {
130
+ if (alias === model.id) {
131
+ throw new Error(`Alias "${alias}" collides with its own model id "${model.id}"`);
132
+ }
133
+ const existing = this.byAlias.get(alias);
134
+ if (existing !== void 0) {
135
+ throw new Error(`Duplicate alias "${alias}" (already maps to "${existing}")`);
136
+ }
137
+ }
121
138
  this.byId.set(model.id, model);
122
139
  this.byAlias.set(model.id, model.id);
123
140
  for (const alias of model.aliases) this.byAlias.set(alias, model.id);
@@ -180,7 +197,7 @@ var GEMINI_RATIOS = [
180
197
  "5:4",
181
198
  "adaptive"
182
199
  ];
183
- function geminiImage(id, label, aliases, sizes, display) {
200
+ function geminiImage(id, label, aliases, sizes, display, exposure) {
184
201
  const model = {
185
202
  id,
186
203
  aliases,
@@ -189,13 +206,14 @@ function geminiImage(id, label, aliases, sizes, display) {
189
206
  adapter: "google-image",
190
207
  providerModelId: id,
191
208
  lifecycle: "active",
209
+ exposure,
192
210
  constraints: {
193
211
  aspectRatios: [...GEMINI_RATIOS],
194
212
  sizes,
195
213
  supports: ["safetySettings", "temperature"]
196
214
  },
197
215
  defaults: { size: "1K", aspectRatio: "1:1" },
198
- usage: { ...IMAGE_USAGE },
216
+ usage: { ...IMAGE_USAGE, slug: "gemini" },
199
217
  pricingKind: "image_size",
200
218
  display,
201
219
  capabilities: { ...IMAGE_GENERATE_EDIT }
@@ -203,14 +221,21 @@ function geminiImage(id, label, aliases, sizes, display) {
203
221
  return model;
204
222
  }
205
223
  var IMAGE_MODELS = [
206
- geminiImage("gemini-3-pro-image-preview", "Nano Banana Pro", ["nb-pro"], ["1K", "2K", "4K"], {
207
- provider: "google",
208
- description: "Create stunning, production-quality visuals with exceptional realism, detail, and typography. Best for campaigns, e-commerce, product photography, and hero creatives.",
209
- logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png"
210
- }),
224
+ geminiImage(
225
+ "gemini-3-pro-image-preview",
226
+ "Nano Banana Pro",
227
+ ["nb-pro"],
228
+ ["1K", "2K", "4K"],
229
+ {
230
+ provider: "google",
231
+ description: "Create stunning, production-quality visuals with exceptional realism, detail, and typography. Best for campaigns, e-commerce, product photography, and hero creatives.",
232
+ logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png"
233
+ },
234
+ "catalog"
235
+ ),
211
236
  geminiImage(
212
237
  "gemini-3.1-flash-image-preview",
213
- "Nano Banana Flash",
238
+ "Nano Banana 2",
214
239
  ["nb-2"],
215
240
  // Flash 3.1 is the only Gemini image model with the 512 tier.
216
241
  ["512", "1K", "2K", "4K"],
@@ -218,35 +243,61 @@ var IMAGE_MODELS = [
218
243
  provider: "google",
219
244
  description: "Generate high-quality images at speed. Perfect for brainstorming, moodboards, concept testing, creative exploration, and large batch workflows.",
220
245
  logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png"
221
- }
246
+ },
247
+ "catalog"
248
+ ),
249
+ geminiImage(
250
+ "gemini-3.1-flash-lite-image",
251
+ "Nano Banana Lite",
252
+ ["nb-lite"],
253
+ ["1K"],
254
+ {
255
+ provider: "google",
256
+ description: "The fastest and most affordable image model. Ideal for rapid drafts, bulk exploration, and iterative concept testing at 1K resolution.",
257
+ logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png"
258
+ },
259
+ "catalog"
222
260
  ),
223
- geminiImage("gemini-3.1-flash-lite-image", "Nano Banana Lite", ["nb-lite"], ["1K"], {
224
- provider: "google",
225
- description: "The fastest and most affordable image model. Ideal for rapid drafts, bulk exploration, and iterative concept testing at 1K resolution.",
226
- logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png"
227
- }),
228
261
  // trigger-workflows validates 1K only; pricing seeds 2K/4K rows so allow all three.
229
- geminiImage("gemini-2.5-flash-image", "Gemini 2.5 Flash Image", [], ["1K", "2K", "4K"], {
230
- provider: "google",
231
- description: "Nano Banana (legacy Gemini 2.5 Flash Image) native image generation and editing model for high-volume, low-latency creative workflows."
232
- }),
262
+ geminiImage(
263
+ "gemini-2.5-flash-image",
264
+ "Gemini 2.5 Flash Image",
265
+ [],
266
+ ["1K", "2K", "4K"],
267
+ {
268
+ provider: "google",
269
+ description: "Nano Banana (legacy Gemini 2.5 Flash Image) native image generation and editing model for high-volume, low-latency creative workflows."
270
+ },
271
+ "internal"
272
+ ),
233
273
  {
234
274
  // Cowork "auto" lets OpenAI pick the size; the canonical equivalent is adaptive.
235
275
  id: "gpt-image-2",
236
276
  aliases: [],
237
- label: "GPT Image 2",
277
+ label: "GPT-image-2",
238
278
  type: "image",
239
279
  adapter: "openai-image",
240
280
  providerModelId: "gpt-image-2",
241
281
  lifecycle: "active",
282
+ exposure: "catalog",
242
283
  constraints: {
284
+ exactSizes: {
285
+ "1:1": "1024x1024",
286
+ "3:2": "1536x1024",
287
+ "2:3": "1024x1536",
288
+ "16:9": "2048x1152",
289
+ "9:16": "1152x2048",
290
+ "4:5": "1024x1280",
291
+ "5:4": "1280x1024"
292
+ },
243
293
  aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
244
294
  sizes: ["1K", "2K", "4K"],
295
+ qualityOptions: ["auto", "low", "medium", "high"],
245
296
  references: { images: 16 },
246
297
  supports: ["quality", "count"]
247
298
  },
248
299
  defaults: { size: "1K", aspectRatio: "adaptive", quality: "auto" },
249
- usage: { ...IMAGE_USAGE },
300
+ usage: { ...IMAGE_USAGE, slug: "gpt" },
250
301
  pricingKind: "image_size",
251
302
  display: {
252
303
  provider: "openai",
@@ -264,9 +315,20 @@ var IMAGE_MODELS = [
264
315
  adapter: "openai-image",
265
316
  providerModelId: "gpt-image-2.5-sunburst",
266
317
  lifecycle: "active",
318
+ exposure: "internal",
267
319
  constraints: {
320
+ exactSizes: {
321
+ "1:1": "1024x1024",
322
+ "3:2": "1536x1024",
323
+ "2:3": "1024x1536",
324
+ "16:9": "2048x1152",
325
+ "9:16": "1152x2048",
326
+ "4:5": "1024x1280",
327
+ "5:4": "1280x1024"
328
+ },
268
329
  aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
269
330
  sizes: ["1K", "2K", "4K"],
331
+ qualityOptions: ["auto", "low", "medium", "high"],
270
332
  references: { images: 16 },
271
333
  supports: ["quality", "count"]
272
334
  },
@@ -288,9 +350,20 @@ var IMAGE_MODELS = [
288
350
  adapter: "openai-image",
289
351
  providerModelId: "gpt-image-2.5-flare",
290
352
  lifecycle: "active",
353
+ exposure: "internal",
291
354
  constraints: {
355
+ exactSizes: {
356
+ "1:1": "1024x1024",
357
+ "3:2": "1536x1024",
358
+ "2:3": "1024x1536",
359
+ "16:9": "2048x1152",
360
+ "9:16": "1152x2048",
361
+ "4:5": "1024x1280",
362
+ "5:4": "1280x1024"
363
+ },
292
364
  aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
293
365
  sizes: ["1K", "2K", "4K"],
366
+ qualityOptions: ["auto", "low", "medium", "high"],
294
367
  references: { images: 16 },
295
368
  supports: ["quality", "count"]
296
369
  },
@@ -306,12 +379,13 @@ var IMAGE_MODELS = [
306
379
  {
307
380
  // Cowork allows 7 ratios; trigger-workflows allows 9 (adds 3:2, 9:21, drops 4:5/5:4).
308
381
  id: "muse-image-1.0",
309
- aliases: [],
382
+ aliases: ["meta-muse"],
310
383
  label: "Meta Muse",
311
384
  type: "image",
312
385
  adapter: "fal",
313
386
  providerModelId: "muse-image-1.0",
314
387
  lifecycle: "active",
388
+ exposure: "catalog",
315
389
  constraints: {
316
390
  aspectRatios: [
317
391
  "21:9",
@@ -332,7 +406,7 @@ var IMAGE_MODELS = [
332
406
  supports: ["count", "outputFormat"]
333
407
  },
334
408
  defaults: { size: "1K", aspectRatio: "1:1", outputFormat: "png", count: 1 },
335
- usage: { ...IMAGE_USAGE },
409
+ usage: { ...IMAGE_USAGE, slug: "muse" },
336
410
  pricingKind: "image_size",
337
411
  display: {
338
412
  provider: "meta",
@@ -349,6 +423,7 @@ var IMAGE_MODELS = [
349
423
  adapter: "ark",
350
424
  providerModelId: "dola-seedream-5-0-pro-260628",
351
425
  lifecycle: "active",
426
+ exposure: "catalog",
352
427
  constraints: {
353
428
  aspectRatios: ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3", "21:9", "4:5", "5:4"],
354
429
  sizes: ["1K", "2K"],
@@ -374,6 +449,7 @@ var IMAGE_MODELS = [
374
449
  adapter: "ark",
375
450
  providerModelId: "seedream-4-5-251128",
376
451
  lifecycle: "active",
452
+ exposure: "internal",
377
453
  constraints: {
378
454
  // 97:30 has no Ark size spelling; the A+ flow pads inputs to 97:30 and
379
455
  // omits the ratio instead. Advertise only sizes the adapter can send.
@@ -411,6 +487,7 @@ var IMAGE_MODELS = [
411
487
  adapter: "prodia",
412
488
  providerModelId: "flux-2-pro",
413
489
  lifecycle: "active",
490
+ exposure: "catalog",
414
491
  constraints: {
415
492
  aspectRatios: ["1:1", "2:3", "3:2", "16:9", "9:16", "4:3", "3:4", "4:5", "5:4", "21:9"],
416
493
  sizes: ["1K"],
@@ -437,6 +514,7 @@ var IMAGE_MODELS = [
437
514
  adapter: "prodia",
438
515
  providerModelId: "inference.gemini-3-pro.img2img.v1",
439
516
  lifecycle: "active",
517
+ exposure: "internal",
440
518
  constraints: {
441
519
  aspectRatios: ["1:1", "2:3", "3:2", "4:3", "3:4", "4:5", "5:4", "9:16", "16:9", "21:9"],
442
520
  sizes: ["1K", "2K", "4K"],
@@ -462,6 +540,7 @@ var IMAGE_MODELS = [
462
540
  adapter: "prodia",
463
541
  providerModelId: "inference.nano-banana.img2img.v2",
464
542
  lifecycle: "active",
543
+ exposure: "internal",
465
544
  constraints: {
466
545
  aspectRatios: ["1:1", "2:3", "3:4", "4:3", "9:16", "16:9", "21:9"],
467
546
  sizes: ["1K"],
@@ -488,6 +567,7 @@ var IMAGE_MODELS = [
488
567
  adapter: "replicate",
489
568
  providerModelId: "wan-video/wan-2.7-image-pro",
490
569
  lifecycle: "active",
570
+ exposure: "internal",
491
571
  constraints: {
492
572
  aspectRatios: ["1:1", "16:9", "9:16", "4:3", "3:4"],
493
573
  sizes: ["1K", "2K", "4K"],
@@ -514,6 +594,7 @@ var IMAGE_MODELS = [
514
594
  adapter: "replicate",
515
595
  providerModelId: "qwen/qwen-image-2-pro",
516
596
  lifecycle: "active",
597
+ exposure: "internal",
517
598
  constraints: {
518
599
  aspectRatios: ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"],
519
600
  sizes: [],
@@ -541,6 +622,7 @@ var IMAGE_MODELS = [
541
622
  adapter: "replicate",
542
623
  providerModelId: "qwen-edit-apps/qwen-image-edit-plus-lora-skin",
543
624
  lifecycle: "active",
625
+ exposure: "internal",
544
626
  constraints: {
545
627
  aspectRatios: ["1:1", "16:9", "9:16", "4:3", "3:4"],
546
628
  sizes: [],
@@ -569,6 +651,7 @@ var OTHER_MODELS = [
569
651
  adapter: "google-genai",
570
652
  providerModelId: "lyria-3-clip-preview",
571
653
  lifecycle: "active",
654
+ exposure: "catalog",
572
655
  constraints: {
573
656
  durations: [30],
574
657
  references: { images: 10 },
@@ -580,7 +663,8 @@ var OTHER_MODELS = [
580
663
  display: {
581
664
  provider: "google",
582
665
  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."
583
- }
666
+ },
667
+ capabilities: {}
584
668
  },
585
669
  {
586
670
  id: "lyria-3-pro-preview",
@@ -590,6 +674,7 @@ var OTHER_MODELS = [
590
674
  adapter: "google-genai",
591
675
  providerModelId: "lyria-3-pro-preview",
592
676
  lifecycle: "active",
677
+ exposure: "catalog",
593
678
  constraints: {
594
679
  references: { images: 10 },
595
680
  supports: []
@@ -600,7 +685,8 @@ var OTHER_MODELS = [
600
685
  display: {
601
686
  provider: "google",
602
687
  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."
603
- }
688
+ },
689
+ capabilities: {}
604
690
  },
605
691
  {
606
692
  id: "google/lyria-2",
@@ -610,6 +696,7 @@ var OTHER_MODELS = [
610
696
  adapter: "replicate",
611
697
  providerModelId: "google/lyria-2",
612
698
  lifecycle: "active",
699
+ exposure: "internal",
613
700
  constraints: {
614
701
  durations: [30],
615
702
  supports: ["seed", "negativePrompt"]
@@ -620,7 +707,8 @@ var OTHER_MODELS = [
620
707
  display: {
621
708
  provider: "google",
622
709
  description: "Lyria 2 music generation on Replicate; produces 30 seconds of 48 kHz stereo audio from a text prompt."
623
- }
710
+ },
711
+ capabilities: {}
624
712
  },
625
713
  {
626
714
  id: "mmaudio",
@@ -630,6 +718,7 @@ var OTHER_MODELS = [
630
718
  adapter: "replicate",
631
719
  providerModelId: "zsxkib/mmaudio:62871fb59889b2d7c13777f08deb3b36bdff88f7e1d53a50ad7694548a41b484",
632
720
  lifecycle: "active",
721
+ exposure: "catalog",
633
722
  constraints: {
634
723
  durations: { min: 1, max: 30 },
635
724
  requires: ["sourceVideo"],
@@ -641,7 +730,8 @@ var OTHER_MODELS = [
641
730
  display: {
642
731
  provider: "mmaudio",
643
732
  description: "MMAudio V2 video-to-audio model on Replicate; takes a source video and prompt and synthesizes synchronized environmental, action, and speech-like audio."
644
- }
733
+ },
734
+ capabilities: {}
645
735
  },
646
736
  {
647
737
  id: "elevenlabs-music",
@@ -651,6 +741,7 @@ var OTHER_MODELS = [
651
741
  adapter: "replicate",
652
742
  providerModelId: "elevenlabs/music",
653
743
  lifecycle: "active",
744
+ exposure: "internal",
654
745
  constraints: {
655
746
  durations: { min: 5, max: 300 },
656
747
  supports: ["instrumental"]
@@ -662,7 +753,8 @@ var OTHER_MODELS = [
662
753
  display: {
663
754
  provider: "elevenlabs",
664
755
  description: "ElevenLabs Music text-to-music on Replicate; generates full songs, instrumental or with vocals, up to 5 minutes long at up to 44.1 kHz."
665
- }
756
+ },
757
+ capabilities: {}
666
758
  },
667
759
  {
668
760
  id: "topaz",
@@ -672,6 +764,7 @@ var OTHER_MODELS = [
672
764
  adapter: "replicate",
673
765
  providerModelId: "topazlabs/image-upscale",
674
766
  lifecycle: "active",
767
+ exposure: "catalog",
675
768
  constraints: {
676
769
  references: { images: 1 },
677
770
  requires: ["references"],
@@ -694,6 +787,7 @@ var OTHER_MODELS = [
694
787
  adapter: "prodia",
695
788
  providerModelId: "inference.remove-background.v1",
696
789
  lifecycle: "active",
790
+ exposure: "catalog",
697
791
  constraints: {
698
792
  references: { images: 1 },
699
793
  requires: ["references"],
@@ -721,6 +815,7 @@ function text(id, label, providerModelId, extra) {
721
815
  adapter: "ai-sdk-text",
722
816
  providerModelId,
723
817
  lifecycle: "active",
818
+ exposure: "internal",
724
819
  constraints: { supports: [] },
725
820
  defaults: {},
726
821
  usage: { ...TEXT_USAGE },
@@ -728,39 +823,57 @@ function text(id, label, providerModelId, extra) {
728
823
  ...extra
729
824
  };
730
825
  }
826
+ var ANTHROPIC_THINKING = {
827
+ anthropic: { thinking: { type: "enabled", budgetTokens: 4e3 }, sendReasoning: true }
828
+ };
829
+ var ANTHROPIC_ADAPTIVE = {
830
+ anthropic: { thinking: { type: "adaptive", display: "summarized" }, sendReasoning: true }
831
+ };
832
+ var OPENAI_REASONING = { openai: { reasoningEffort: "medium", reasoningSummary: "auto" } };
833
+ var DEEPSEEK_THINKING = { deepseek: { thinking: { type: "enabled" } } };
731
834
  var TEXT_MODELS = [
732
835
  text("gpt-4o", "GPT-4o", "gpt-4o", {
836
+ exposure: "internal",
733
837
  display: {
734
838
  provider: "openai",
839
+ costTier: 2,
735
840
  description: "OpenAI GPT-4o flagship multimodal model; text and image input, 128K-token context."
736
841
  },
737
842
  capabilities: { vision: true, tools: true, structuredOutput: true, contextWindow: 128e3 }
738
843
  }),
739
844
  text("gpt-4o-mini", "GPT-4o mini", "gpt-4o-mini", {
845
+ exposure: "internal",
740
846
  display: {
741
847
  provider: "openai",
848
+ costTier: 1,
742
849
  description: "OpenAI GPT-4o mini fast, low-cost multimodal model; text and image input, 128K-token context."
743
850
  },
744
851
  capabilities: { vision: true, tools: true, structuredOutput: true, contextWindow: 128e3 }
745
852
  }),
746
853
  text("gpt-5.1", "GPT-5.1", "gpt-5.1", {
854
+ exposure: "catalog",
747
855
  display: {
748
856
  provider: "openai",
857
+ costTier: 3,
749
858
  description: "OpenAI GPT-5.1 reasoning model for coding and agentic tasks; text and image input, 400K-token context."
750
859
  },
751
860
  capabilities: { vision: true, tools: true, structuredOutput: true, contextWindow: 4e5 }
752
861
  }),
753
862
  text("gpt-5.2", "GPT-5.2", "gpt-5.2", {
863
+ exposure: "catalog",
754
864
  display: {
755
865
  provider: "openai",
866
+ costTier: 3,
756
867
  description: "OpenAI GPT-5.2 reasoning model for complex professional work; text and image input, 400K-token context."
757
868
  },
758
869
  capabilities: { vision: true, tools: true, structuredOutput: true, contextWindow: 4e5 }
759
870
  }),
760
871
  // 1.05M-token context: https://platform.openai.com/docs/models/gpt-5.4
761
872
  text("gpt-5.4", "GPT-5.4", "gpt-5.4", {
873
+ exposure: "internal",
762
874
  display: {
763
875
  provider: "openai",
876
+ costTier: 3,
764
877
  description: "OpenAI GPT-5.4 flagship reasoning model; text and image input, 1.05M-token context."
765
878
  },
766
879
  capabilities: {
@@ -772,16 +885,20 @@ var TEXT_MODELS = [
772
885
  }),
773
886
  // OpenAI never shipped gpt-5.1-mini or gpt-5.2-mini; callers that still send them get 5.4 mini.
774
887
  text("gpt-5.4-mini", "GPT-5.4 mini", "gpt-5.4-mini", {
888
+ exposure: "catalog",
775
889
  aliases: ["gpt-5.1-mini", "gpt-5.2-mini"],
776
890
  display: {
777
891
  provider: "openai",
892
+ costTier: 1,
778
893
  description: "OpenAI GPT-5.4 mini efficient reasoning model for high-volume workloads; text and image input, 400K-token context."
779
894
  },
780
895
  capabilities: { vision: true, tools: true, structuredOutput: true, contextWindow: 4e5 }
781
896
  }),
782
897
  text("gpt-5.5", "GPT-5.5", "gpt-5.5", {
898
+ exposure: "catalog",
783
899
  display: {
784
900
  provider: "openai",
901
+ costTier: 3,
785
902
  description: "OpenAI GPT-5.5 flagship reasoning model for the most complex professional and coding work; text and image input, 1.05M-token context."
786
903
  },
787
904
  capabilities: {
@@ -792,11 +909,15 @@ var TEXT_MODELS = [
792
909
  }
793
910
  }),
794
911
  text("gpt-5.6-luna", "GPT-5.6 Luna", "gpt-5.6-luna", {
912
+ providerOptions: OPENAI_REASONING,
913
+ exposure: "catalog",
795
914
  display: {
796
915
  provider: "openai",
916
+ costTier: 1,
797
917
  description: "OpenAI GPT-5.6 Luna cost-optimized tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
798
918
  },
799
919
  capabilities: {
920
+ reasoning: true,
800
921
  vision: true,
801
922
  tools: true,
802
923
  structuredOutput: true,
@@ -804,11 +925,15 @@ var TEXT_MODELS = [
804
925
  }
805
926
  }),
806
927
  text("gpt-5.6-terra", "GPT-5.6 Terra", "gpt-5.6-terra", {
928
+ providerOptions: OPENAI_REASONING,
929
+ exposure: "catalog",
807
930
  display: {
808
931
  provider: "openai",
932
+ costTier: 2,
809
933
  description: "OpenAI GPT-5.6 Terra balanced tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
810
934
  },
811
935
  capabilities: {
936
+ reasoning: true,
812
937
  vision: true,
813
938
  tools: true,
814
939
  structuredOutput: true,
@@ -816,11 +941,15 @@ var TEXT_MODELS = [
816
941
  }
817
942
  }),
818
943
  text("gpt-5.6-sol", "GPT-5.6 Sol", "gpt-5.6-sol", {
944
+ providerOptions: OPENAI_REASONING,
945
+ exposure: "catalog",
819
946
  display: {
820
947
  provider: "openai",
948
+ costTier: 3,
821
949
  description: "OpenAI GPT-5.6 Sol flagship tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
822
950
  },
823
951
  capabilities: {
952
+ reasoning: true,
824
953
  vision: true,
825
954
  tools: true,
826
955
  structuredOutput: true,
@@ -829,15 +958,19 @@ var TEXT_MODELS = [
829
958
  }),
830
959
  // Library key "claude-sonnet-4.5" maps to the SDK id "claude-sonnet-4-5".
831
960
  text("claude-sonnet-4-5", "Claude Sonnet 4.5", "claude-sonnet-4-5", {
961
+ exposure: "internal",
832
962
  aliases: ["claude-sonnet-4.5", "claude-sonnet-4-5-20250929"],
833
963
  display: {
834
964
  provider: "anthropic",
965
+ costTier: 2,
835
966
  description: "Anthropic Claude Sonnet 4.5 (legacy) balanced model; text and image input, 200K-token context."
836
967
  },
837
968
  capabilities: { vision: true, tools: true, structuredOutput: true, contextWindow: 2e5 }
838
969
  }),
839
970
  // Anthropic retired the dated 4.0 ids; callers that still send them get 4.6.
840
971
  text("claude-sonnet-4-6", "Claude Sonnet 4.6", "claude-sonnet-4-6", {
972
+ providerOptions: ANTHROPIC_THINKING,
973
+ exposure: "catalog",
841
974
  aliases: [
842
975
  "claude-sonnet-4.6",
843
976
  "claude-sonnet-4",
@@ -846,9 +979,11 @@ var TEXT_MODELS = [
846
979
  ],
847
980
  display: {
848
981
  provider: "anthropic",
982
+ costTier: 2,
849
983
  description: "Anthropic Claude Sonnet 4.6 (legacy) balanced model; text and image input, 1M-token context."
850
984
  },
851
985
  capabilities: {
986
+ reasoning: true,
852
987
  vision: true,
853
988
  tools: true,
854
989
  structuredOutput: true,
@@ -856,11 +991,15 @@ var TEXT_MODELS = [
856
991
  }
857
992
  }),
858
993
  text("claude-sonnet-5", "Claude Sonnet 5", "claude-sonnet-5", {
994
+ providerOptions: ANTHROPIC_ADAPTIVE,
995
+ exposure: "catalog",
859
996
  display: {
860
997
  provider: "anthropic",
998
+ costTier: 3,
861
999
  description: "Anthropic Claude Sonnet 5 current balanced model; text and image input, 1M-token context."
862
1000
  },
863
1001
  capabilities: {
1002
+ reasoning: true,
864
1003
  vision: true,
865
1004
  tools: true,
866
1005
  structuredOutput: true,
@@ -868,12 +1007,16 @@ var TEXT_MODELS = [
868
1007
  }
869
1008
  }),
870
1009
  text("claude-opus-4-8", "Claude Opus 4.8", "claude-opus-4-8", {
1010
+ providerOptions: ANTHROPIC_ADAPTIVE,
1011
+ exposure: "catalog",
871
1012
  aliases: ["claude-opus-4.8", "claude-opus-4", "claude-opus-4.0", "claude-opus-4-20250514"],
872
1013
  display: {
873
1014
  provider: "anthropic",
1015
+ costTier: 3,
874
1016
  description: "Anthropic Claude Opus 4.8 (legacy) frontier model; text and image input, 1M-token context."
875
1017
  },
876
1018
  capabilities: {
1019
+ reasoning: true,
877
1020
  vision: true,
878
1021
  tools: true,
879
1022
  structuredOutput: true,
@@ -881,17 +1024,28 @@ var TEXT_MODELS = [
881
1024
  }
882
1025
  }),
883
1026
  text("claude-haiku-4-5", "Claude Haiku 4.5", "claude-haiku-4-5", {
1027
+ providerOptions: ANTHROPIC_THINKING,
1028
+ exposure: "catalog",
884
1029
  aliases: ["claude-haiku-4.5", "claude-haiku-4-5-20251001", "claude-haiku-4"],
885
1030
  display: {
886
1031
  provider: "anthropic",
1032
+ costTier: 1,
887
1033
  description: "Anthropic Claude Haiku 4.5 fast model with near-frontier intelligence; text and image input, 200K-token context."
888
1034
  },
889
- capabilities: { vision: true, tools: true, structuredOutput: true, contextWindow: 2e5 }
1035
+ capabilities: {
1036
+ reasoning: true,
1037
+ vision: true,
1038
+ tools: true,
1039
+ structuredOutput: true,
1040
+ contextWindow: 2e5
1041
+ }
890
1042
  }),
891
1043
  text("claude-opus-5", "Claude Opus 5", "claude-opus-5", {
1044
+ exposure: "internal",
892
1045
  aliases: ["claude-opus-5.0"],
893
1046
  display: {
894
1047
  provider: "anthropic",
1048
+ costTier: 3,
895
1049
  description: "Anthropic Claude Opus 5 current frontier model for agentic coding and enterprise work; text and image input, 1M-token context."
896
1050
  },
897
1051
  capabilities: {
@@ -902,8 +1056,10 @@ var TEXT_MODELS = [
902
1056
  }
903
1057
  }),
904
1058
  text("claude-fable-5", "Claude Fable 5", "claude-fable-5", {
1059
+ exposure: "internal",
905
1060
  display: {
906
1061
  provider: "anthropic",
1062
+ costTier: 3,
907
1063
  description: "Anthropic Claude Fable 5 (legacy) model for demanding reasoning and long-horizon agentic work; text and image input, 1M-token context."
908
1064
  },
909
1065
  capabilities: {
@@ -914,8 +1070,10 @@ var TEXT_MODELS = [
914
1070
  }
915
1071
  }),
916
1072
  text("gemini-2.5-flash", "Gemini 2.5 Flash", "gemini-2.5-flash", {
1073
+ exposure: "internal",
917
1074
  display: {
918
1075
  provider: "google",
1076
+ costTier: 1,
919
1077
  description: "Google Gemini 2.5 Flash low-latency multimodal model for high-volume reasoning over text, images, video, and audio; 1M-token context."
920
1078
  },
921
1079
  capabilities: {
@@ -926,8 +1084,10 @@ var TEXT_MODELS = [
926
1084
  }
927
1085
  }),
928
1086
  text("gemini-2.5-pro", "Gemini 2.5 Pro", "gemini-2.5-pro", {
1087
+ exposure: "internal",
929
1088
  display: {
930
1089
  provider: "google",
1090
+ costTier: 2,
931
1091
  description: "Google Gemini 2.5 Pro thinking model for complex reasoning over code, math, and documents; text, image, video, audio, and PDF input, 1M-token context."
932
1092
  },
933
1093
  capabilities: {
@@ -938,8 +1098,10 @@ var TEXT_MODELS = [
938
1098
  }
939
1099
  }),
940
1100
  text("gemini-3.1-pro-preview", "Gemini 3.1 Pro (preview)", "gemini-3.1-pro-preview", {
1101
+ exposure: "catalog",
941
1102
  display: {
942
1103
  provider: "google",
1104
+ costTier: 2,
943
1105
  description: "Google Gemini 3.1 Pro preview reasoning model for software engineering, tool use, and reliable agentic workflows; 1M-token context."
944
1106
  },
945
1107
  capabilities: {
@@ -950,8 +1112,10 @@ var TEXT_MODELS = [
950
1112
  }
951
1113
  }),
952
1114
  text("gemini-3.5-flash", "Gemini 3.5 Flash", "gemini-3.5-flash", {
1115
+ exposure: "catalog",
953
1116
  display: {
954
1117
  provider: "google",
1118
+ costTier: 1,
955
1119
  description: "Google Gemini 3.5 Flash high-throughput model for frontier-level agentic tasks; text, image, video, audio, and PDF input, 1M-token context."
956
1120
  },
957
1121
  capabilities: {
@@ -962,8 +1126,10 @@ var TEXT_MODELS = [
962
1126
  }
963
1127
  }),
964
1128
  text("gemini-3.6-flash", "Gemini 3.6 Flash", "gemini-3.6-flash", {
1129
+ exposure: "catalog",
965
1130
  display: {
966
1131
  provider: "google",
1132
+ costTier: 1,
967
1133
  description: "Google Gemini 3.6 Flash general-purpose multimodal agentic model balancing speed and capability; 1M-token context."
968
1134
  },
969
1135
  capabilities: {
@@ -974,8 +1140,11 @@ var TEXT_MODELS = [
974
1140
  }
975
1141
  }),
976
1142
  text("gemini-3.7-flash", "Gemini 3.7 Flash", "gemini-3.7-flash", {
1143
+ exposure: "catalog",
977
1144
  display: {
978
1145
  provider: "google",
1146
+ costTier: 1,
1147
+ recommended: true,
979
1148
  description: "Google Gemini 3.7 Flash natively multimodal reasoning model for coding, agentic workflows, and multi-step execution; 1M-token context."
980
1149
  },
981
1150
  capabilities: {
@@ -986,8 +1155,10 @@ var TEXT_MODELS = [
986
1155
  }
987
1156
  }),
988
1157
  text("gemini-3.8-flash", "Gemini 3.8 Flash", "gemini-3.8-flash", {
1158
+ exposure: "internal",
989
1159
  display: {
990
1160
  provider: "google",
1161
+ costTier: 1,
991
1162
  description: "Google Gemini 3.8 Flash frontier model for long-horizon software engineering, autonomous agents, and enterprise workflows; 1M-token context."
992
1163
  },
993
1164
  capabilities: {
@@ -999,12 +1170,15 @@ var TEXT_MODELS = [
999
1170
  }),
1000
1171
  // Renamed to gemini-3.6-flash in vibe-shared model-migration.ts.
1001
1172
  text("gemini-3-flash-preview", "Gemini 3 Flash (preview)", "gemini-3-flash-preview", {
1173
+ exposure: "internal",
1002
1174
  lifecycle: "deprecated",
1003
1175
  replacedBy: "gemini-3.6-flash"
1004
1176
  }),
1005
1177
  text("gemini-3.1-flash-lite", "Gemini 3.1 Flash Lite", "gemini-3.1-flash-lite", {
1178
+ exposure: "internal",
1006
1179
  display: {
1007
1180
  provider: "google",
1181
+ costTier: 1,
1008
1182
  description: "Google Gemini 3.1 Flash-Lite low-latency multimodal model for high-volume agentic, translation, and data-extraction tasks; 1M-token context."
1009
1183
  },
1010
1184
  capabilities: {
@@ -1015,8 +1189,10 @@ var TEXT_MODELS = [
1015
1189
  }
1016
1190
  }),
1017
1191
  text("sonar", "Sonar", "sonar", {
1192
+ exposure: "internal",
1018
1193
  display: {
1019
1194
  provider: "perplexity",
1195
+ costTier: 1,
1020
1196
  description: "Perplexity Sonar lightweight web-grounded search model returning cited answers; 128K-token context."
1021
1197
  },
1022
1198
  capabilities: {
@@ -1027,8 +1203,10 @@ var TEXT_MODELS = [
1027
1203
  }
1028
1204
  }),
1029
1205
  text("sonar-pro", "Sonar Pro", "sonar-pro", {
1206
+ exposure: "internal",
1030
1207
  display: {
1031
1208
  provider: "perplexity",
1209
+ costTier: 2,
1032
1210
  description: "Perplexity Sonar Pro advanced web-grounded search model for complex multi-step queries; 200K-token context."
1033
1211
  },
1034
1212
  capabilities: {
@@ -1039,8 +1217,10 @@ var TEXT_MODELS = [
1039
1217
  }
1040
1218
  }),
1041
1219
  text("sonar-reasoning-pro", "Sonar Reasoning Pro", "sonar-reasoning-pro", {
1220
+ exposure: "internal",
1042
1221
  display: {
1043
1222
  provider: "perplexity",
1223
+ costTier: 2,
1044
1224
  description: "Perplexity Sonar Reasoning Pro chain-of-thought web-grounded search model for complex problem-solving; 128K-token context."
1045
1225
  },
1046
1226
  capabilities: {
@@ -1050,12 +1230,21 @@ var TEXT_MODELS = [
1050
1230
  contextWindow: 128e3
1051
1231
  }
1052
1232
  }),
1053
- text("deepseek-v4-flash", "DeepSeek V4 Flash", "deepseek-v4-flash", {
1233
+ // DeepSeek retired V4 Flash upstream and routes the old id to V4.1 Flash at
1234
+ // Flash rates (https://api-docs.deepseek.com/news/news260910/); the old id
1235
+ // stays an alias so stored selections keep resolving.
1236
+ text("deepseek-flash", "DeepSeek V4.1 Flash", "deepseek-flash", {
1237
+ providerOptions: DEEPSEEK_THINKING,
1238
+ aliases: ["deepseek-v4-flash"],
1239
+ exposure: "catalog",
1054
1240
  display: {
1055
1241
  provider: "deepseek",
1056
- description: "DeepSeek V4 Flash thinking/non-thinking model with vision, tool calls, and JSON output; 1M-token context and up to 384K output tokens."
1242
+ costTier: 1,
1243
+ recommended: true,
1244
+ 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."
1057
1245
  },
1058
1246
  capabilities: {
1247
+ reasoning: true,
1059
1248
  vision: true,
1060
1249
  tools: true,
1061
1250
  structuredOutput: true,
@@ -1063,11 +1252,15 @@ var TEXT_MODELS = [
1063
1252
  }
1064
1253
  }),
1065
1254
  text("deepseek-v4-pro", "DeepSeek V4 Pro", "deepseek-v4-pro", {
1255
+ providerOptions: DEEPSEEK_THINKING,
1256
+ exposure: "catalog",
1066
1257
  display: {
1067
1258
  provider: "deepseek",
1259
+ costTier: 2,
1068
1260
  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."
1069
1261
  },
1070
1262
  capabilities: {
1263
+ reasoning: true,
1071
1264
  vision: false,
1072
1265
  tools: true,
1073
1266
  structuredOutput: true,
@@ -1076,8 +1269,10 @@ var TEXT_MODELS = [
1076
1269
  }),
1077
1270
  // 1M-token context: https://docs.x.ai/docs/models/grok-4.3
1078
1271
  text("grok-4.3", "Grok 4.3", "grok-4.3", {
1272
+ exposure: "catalog",
1079
1273
  display: {
1080
1274
  provider: "xai",
1275
+ costTier: 2,
1081
1276
  description: "xAI Grok 4.3 reasoning model with tool calling and structured outputs; text and image input, 1M-token context."
1082
1277
  },
1083
1278
  capabilities: {
@@ -1089,18 +1284,25 @@ var TEXT_MODELS = [
1089
1284
  }),
1090
1285
  // Moonshot retired kimi-k2.5 on 2026-08-31 and no longer publishes its specs.
1091
1286
  text("kimi-k2.5", "Kimi K2.5", "kimi-k2.5", {
1287
+ defaults: { temperature: 1 },
1288
+ exposure: "catalog",
1092
1289
  display: {
1093
1290
  provider: "moonshot",
1291
+ costTier: 2,
1094
1292
  description: "Moonshot Kimi K2.5; the provider retired the model on 2026-08-31 and calls now return a model-not-found error."
1095
1293
  },
1096
1294
  capabilities: {}
1097
1295
  }),
1098
1296
  text("kimi-k3", "Kimi K3", "kimi-k3", {
1297
+ defaults: { temperature: 1 },
1298
+ exposure: "catalog",
1099
1299
  display: {
1100
1300
  provider: "moonshot",
1301
+ costTier: 2,
1101
1302
  description: "Moonshot Kimi K3 flagship model with native visual understanding and always-on thinking; text, image, and video input, 1M-token context."
1102
1303
  },
1103
1304
  capabilities: {
1305
+ reasoning: true,
1104
1306
  vision: true,
1105
1307
  tools: true,
1106
1308
  structuredOutput: true,
@@ -1110,9 +1312,11 @@ var TEXT_MODELS = [
1110
1312
  // Cowork calls the provider "MiniMax-M3"; the pricing key is lowercase.
1111
1313
  // 1M-token context: https://platform.minimax.io/docs/api-reference/text-openai-api
1112
1314
  text("minimax-m3", "MiniMax M3", "MiniMax-M3", {
1315
+ exposure: "catalog",
1113
1316
  aliases: ["MiniMax-M3"],
1114
1317
  display: {
1115
1318
  provider: "minimax",
1319
+ costTier: 2,
1116
1320
  description: "MiniMax M3 frontier multimodal model for agentic reasoning, tool use, and coding; text, image, and video input, 1M-token context."
1117
1321
  },
1118
1322
  capabilities: { vision: true, tools: true, contextWindow: 1e6 }
@@ -1144,6 +1348,7 @@ var VIDEO_MODELS = [
1144
1348
  adapter: "google-genai",
1145
1349
  providerModelId: "veo-3.1-generate-preview",
1146
1350
  lifecycle: "active",
1351
+ exposure: "catalog",
1147
1352
  constraints: {
1148
1353
  aspectRatios: [...OMNI_RATIOS],
1149
1354
  resolutions: ["720p", "1080p", "4k"],
@@ -1152,7 +1357,7 @@ var VIDEO_MODELS = [
1152
1357
  supports: ["lastFrame"]
1153
1358
  },
1154
1359
  defaults: { durationSeconds: 8, resolution: "720p", aspectRatio: "16:9" },
1155
- usage: { ...VIDEO_USAGE },
1360
+ usage: { ...VIDEO_USAGE, slug: "veo" },
1156
1361
  pricingKind: "video_per_second",
1157
1362
  display: {
1158
1363
  provider: "google",
@@ -1173,6 +1378,7 @@ var VIDEO_MODELS = [
1173
1378
  adapter: "google-genai",
1174
1379
  providerModelId: "veo-3.1-fast-generate-preview",
1175
1380
  lifecycle: "active",
1381
+ exposure: "internal",
1176
1382
  constraints: {
1177
1383
  aspectRatios: [...OMNI_RATIOS],
1178
1384
  resolutions: ["720p", "1080p", "4k"],
@@ -1201,9 +1407,10 @@ var VIDEO_MODELS = [
1201
1407
  adapter: "google-genai",
1202
1408
  providerModelId: "veo-3.1-lite-generate-preview",
1203
1409
  lifecycle: "active",
1410
+ exposure: "internal",
1204
1411
  constraints: {
1205
1412
  aspectRatios: [...OMNI_RATIOS],
1206
- resolutions: ["720p", "1080p", "4k"],
1413
+ resolutions: ["720p", "1080p"],
1207
1414
  durations: [4, 8],
1208
1415
  references: { images: 3 },
1209
1416
  supports: ["lastFrame"]
@@ -1231,6 +1438,7 @@ var VIDEO_MODELS = [
1231
1438
  adapter: "google-genai",
1232
1439
  providerModelId: "gemini-omni-flash-preview",
1233
1440
  lifecycle: "active",
1441
+ exposure: "catalog",
1234
1442
  constraints: {
1235
1443
  // 1.0 rejects `resolution`; it renders 720p. No defaults: the adapter
1236
1444
  // sends ratio and duration only when the caller set them, so a
@@ -1241,7 +1449,7 @@ var VIDEO_MODELS = [
1241
1449
  supports: []
1242
1450
  },
1243
1451
  defaults: {},
1244
- usage: { ...VIDEO_USAGE },
1452
+ usage: { ...VIDEO_USAGE, slug: "gemini_omni" },
1245
1453
  pricingKind: "video_per_second",
1246
1454
  display: {
1247
1455
  provider: "google",
@@ -1258,6 +1466,7 @@ var VIDEO_MODELS = [
1258
1466
  adapter: "google-genai",
1259
1467
  providerModelId: "gemini-omni-1.1-flash",
1260
1468
  lifecycle: "active",
1469
+ exposure: "catalog",
1261
1470
  constraints: {
1262
1471
  aspectRatios: [...OMNI_RATIOS],
1263
1472
  resolutions: ["360p", "720p", "1080p", "4k"],
@@ -1283,10 +1492,12 @@ var VIDEO_MODELS = [
1283
1492
  adapter: "ark",
1284
1493
  providerModelId: "dreamina-seedance-2-0-260128",
1285
1494
  lifecycle: "active",
1495
+ exposure: "catalog",
1286
1496
  constraints: {
1287
1497
  aspectRatios: [...SEEDANCE_RATIOS],
1288
1498
  resolutions: ["480p", "720p", "1080p", "4k"],
1289
1499
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1500
+ durationPresets: [4, 6, 8, 10, 12, 15],
1290
1501
  references: { images: 9, videos: 3, audios: 3, audioOnly: false },
1291
1502
  ratioIgnoredWith: ["firstFrame"],
1292
1503
  supports: ["generateAudio", "seed", "lastFrame", "watermark"]
@@ -1297,7 +1508,7 @@ var VIDEO_MODELS = [
1297
1508
  aspectRatio: "16:9",
1298
1509
  generateAudio: true
1299
1510
  },
1300
- usage: { ...VIDEO_USAGE },
1511
+ usage: { ...VIDEO_USAGE, slug: "seedance2", providerLabel: "byteplus" },
1301
1512
  pricingKind: "video_per_second",
1302
1513
  display: {
1303
1514
  provider: "bytedance",
@@ -1314,6 +1525,7 @@ var VIDEO_MODELS = [
1314
1525
  adapter: "ark",
1315
1526
  providerModelId: "dreamina-seedance-2-0-fast-260128",
1316
1527
  lifecycle: "active",
1528
+ exposure: "catalog",
1317
1529
  constraints: {
1318
1530
  aspectRatios: [...SEEDANCE_RATIOS],
1319
1531
  resolutions: ["480p", "720p"],
@@ -1345,6 +1557,7 @@ var VIDEO_MODELS = [
1345
1557
  adapter: "ark",
1346
1558
  providerModelId: "dreamina-seedance-2-5-260628",
1347
1559
  lifecycle: "active",
1560
+ exposure: "catalog",
1348
1561
  constraints: {
1349
1562
  aspectRatios: [...SEEDANCE_RATIOS],
1350
1563
  resolutions: ["480p", "720p", "1080p"],
@@ -1376,10 +1589,12 @@ var VIDEO_MODELS = [
1376
1589
  adapter: "xai-video",
1377
1590
  providerModelId: "grok-imagine-video",
1378
1591
  lifecycle: "active",
1592
+ exposure: "catalog",
1379
1593
  constraints: {
1380
1594
  aspectRatios: [...GROK_RATIOS],
1381
1595
  resolutions: ["480p", "720p"],
1382
1596
  durations: { min: 1, max: 15 },
1597
+ durationPresets: [4, 6, 8, 10],
1383
1598
  references: { images: 7 },
1384
1599
  supports: []
1385
1600
  },
@@ -1402,6 +1617,7 @@ var VIDEO_MODELS = [
1402
1617
  adapter: "higgsfield",
1403
1618
  providerModelId: "kling-video/v2.5-turbo/pro/image-to-video",
1404
1619
  lifecycle: "active",
1620
+ exposure: "catalog",
1405
1621
  constraints: {
1406
1622
  aspectRatios: [...KLING_RATIOS],
1407
1623
  durations: [5, 10],
@@ -1414,7 +1630,7 @@ var VIDEO_MODELS = [
1414
1630
  cfgScale: 0.5,
1415
1631
  negativePrompt: NEGATIVE_PROMPT
1416
1632
  },
1417
- usage: { ...VIDEO_USAGE },
1633
+ usage: { ...VIDEO_USAGE, slug: "grok" },
1418
1634
  pricingKind: "video_per_second",
1419
1635
  display: {
1420
1636
  provider: "kuaishou",
@@ -1431,6 +1647,7 @@ var VIDEO_MODELS = [
1431
1647
  adapter: "higgsfield",
1432
1648
  providerModelId: "kling-video/v3.0/pro/image-to-video",
1433
1649
  lifecycle: "active",
1650
+ exposure: "catalog",
1434
1651
  constraints: {
1435
1652
  aspectRatios: [...KLING_RATIOS],
1436
1653
  durations: { min: 3, max: 15 },
@@ -1460,6 +1677,7 @@ var VIDEO_MODELS = [
1460
1677
  adapter: "replicate",
1461
1678
  providerModelId: "kwaivgi/kling-v3-omni-video",
1462
1679
  lifecycle: "active",
1680
+ exposure: "catalog",
1463
1681
  constraints: {
1464
1682
  aspectRatios: [
1465
1683
  "1:1",
@@ -1495,6 +1713,7 @@ var VIDEO_MODELS = [
1495
1713
  adapter: "fal",
1496
1714
  providerModelId: "minimax/h3",
1497
1715
  lifecycle: "active",
1716
+ exposure: "catalog",
1498
1717
  constraints: {
1499
1718
  aspectRatios: [...H3_RATIOS],
1500
1719
  resolutions: ["480p", "768p", "2k", "4k"],
@@ -1523,6 +1742,7 @@ var VIDEO_MODELS = [
1523
1742
  adapter: "fal",
1524
1743
  providerModelId: "minimax/h3-max",
1525
1744
  lifecycle: "active",
1745
+ exposure: "catalog",
1526
1746
  constraints: {
1527
1747
  aspectRatios: [...H3_RATIOS],
1528
1748
  resolutions: ["480p", "768p"],
@@ -1551,6 +1771,7 @@ var VIDEO_MODELS = [
1551
1771
  adapter: "fal",
1552
1772
  providerModelId: "minimax/h3/reference-to-video",
1553
1773
  lifecycle: "active",
1774
+ exposure: "catalog",
1554
1775
  constraints: {
1555
1776
  aspectRatios: [...H3_REFERENCE_RATIOS],
1556
1777
  resolutions: ["480p", "768p", "2k", "4k"],
@@ -1580,6 +1801,7 @@ var VIDEO_MODELS = [
1580
1801
  adapter: "fal",
1581
1802
  providerModelId: "minimax/h3-max/reference-to-video",
1582
1803
  lifecycle: "active",
1804
+ exposure: "catalog",
1583
1805
  constraints: {
1584
1806
  aspectRatios: [...H3_REFERENCE_RATIOS],
1585
1807
  resolutions: ["480p", "768p"],
@@ -1610,6 +1832,7 @@ var VIDEO_MODELS = [
1610
1832
  adapter: "fal",
1611
1833
  providerModelId: "fal-ai/kling-video/o1/video-to-video/reference",
1612
1834
  lifecycle: "active",
1835
+ exposure: "internal",
1613
1836
  constraints: {
1614
1837
  aspectRatios: [...KLING_RATIOS],
1615
1838
  durations: { min: 3, max: 10 },
@@ -1633,6 +1856,7 @@ var VIDEO_MODELS = [
1633
1856
  adapter: "replicate",
1634
1857
  providerModelId: "minimax/hailuo-02",
1635
1858
  lifecycle: "active",
1859
+ exposure: "internal",
1636
1860
  constraints: {
1637
1861
  resolutions: ["768p"],
1638
1862
  durations: [6, 10],
@@ -1655,6 +1879,7 @@ var VIDEO_MODELS = [
1655
1879
  adapter: "higgsfield",
1656
1880
  providerModelId: "dop-preview",
1657
1881
  lifecycle: "active",
1882
+ exposure: "internal",
1658
1883
  constraints: {
1659
1884
  requires: ["firstFrame"],
1660
1885
  supports: ["seed", "lastFrame"]
@@ -1856,6 +2081,40 @@ function resolveVideoOptions(model, request, onUnsupported = "error") {
1856
2081
  model: model.id
1857
2082
  });
1858
2083
  }
2084
+ if (merged.sourceVideo !== void 0 && !model.capabilities?.acceptsSourceVideo) {
2085
+ if (onUnsupported === "error") {
2086
+ throw new ModelKitError({
2087
+ code: "unsupported_option",
2088
+ message: `${model.id} does not take a source video`,
2089
+ model: model.id
2090
+ });
2091
+ }
2092
+ warnings.push({
2093
+ code: "option_ignored",
2094
+ field: "sourceVideo",
2095
+ message: `${model.id} does not take a source video; dropped`
2096
+ });
2097
+ delete merged.sourceVideo;
2098
+ }
2099
+ const hasFrames = merged.firstFrame !== void 0 || merged.lastFrame !== void 0;
2100
+ const hasRefs = compact(merged.referenceImages).length + compact(merged.referenceVideos).length + compact(merged.referenceAudios).length > 0;
2101
+ if (hasFrames && hasRefs && model.capabilities?.framesExcludeReferences) {
2102
+ if (onUnsupported === "error") {
2103
+ throw new ModelKitError({
2104
+ code: "unsupported_option",
2105
+ message: `${model.id} takes frames or references, not both`,
2106
+ model: model.id
2107
+ });
2108
+ }
2109
+ warnings.push({
2110
+ code: "option_ignored",
2111
+ field: "referenceImages",
2112
+ message: `${model.id} takes frames or references, not both; references dropped`
2113
+ });
2114
+ delete merged.referenceImages;
2115
+ delete merged.referenceVideos;
2116
+ delete merged.referenceAudios;
2117
+ }
1859
2118
  for (const input of c.ratioIgnoredWith ?? []) {
1860
2119
  if (merged[input] !== void 0 && merged.aspectRatio !== void 0) {
1861
2120
  if (request.aspectRatio !== void 0) {
@@ -2252,6 +2511,7 @@ function passthroughTextModel(model) {
2252
2511
  adapter: "ai-sdk-text",
2253
2512
  providerModelId: model.modelId,
2254
2513
  lifecycle: "active",
2514
+ exposure: "internal",
2255
2515
  constraints: {},
2256
2516
  defaults: {},
2257
2517
  usage: { unit: "tokens", modality: "TEXT" },