@shop-os/modelkit 0.1.7 → 0.1.8

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,6 +206,7 @@ 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,
@@ -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,30 +243,47 @@ 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: {
243
284
  aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
244
285
  sizes: ["1K", "2K", "4K"],
286
+ qualityOptions: ["auto", "low", "medium", "high"],
245
287
  references: { images: 16 },
246
288
  supports: ["quality", "count"]
247
289
  },
@@ -264,9 +306,11 @@ var IMAGE_MODELS = [
264
306
  adapter: "openai-image",
265
307
  providerModelId: "gpt-image-2.5-sunburst",
266
308
  lifecycle: "active",
309
+ exposure: "internal",
267
310
  constraints: {
268
311
  aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
269
312
  sizes: ["1K", "2K", "4K"],
313
+ qualityOptions: ["auto", "low", "medium", "high"],
270
314
  references: { images: 16 },
271
315
  supports: ["quality", "count"]
272
316
  },
@@ -288,9 +332,11 @@ var IMAGE_MODELS = [
288
332
  adapter: "openai-image",
289
333
  providerModelId: "gpt-image-2.5-flare",
290
334
  lifecycle: "active",
335
+ exposure: "internal",
291
336
  constraints: {
292
337
  aspectRatios: ["1:1", "3:2", "2:3", "16:9", "9:16", "4:5", "5:4", "adaptive"],
293
338
  sizes: ["1K", "2K", "4K"],
339
+ qualityOptions: ["auto", "low", "medium", "high"],
294
340
  references: { images: 16 },
295
341
  supports: ["quality", "count"]
296
342
  },
@@ -306,12 +352,13 @@ var IMAGE_MODELS = [
306
352
  {
307
353
  // Cowork allows 7 ratios; trigger-workflows allows 9 (adds 3:2, 9:21, drops 4:5/5:4).
308
354
  id: "muse-image-1.0",
309
- aliases: [],
355
+ aliases: ["meta-muse"],
310
356
  label: "Meta Muse",
311
357
  type: "image",
312
358
  adapter: "fal",
313
359
  providerModelId: "muse-image-1.0",
314
360
  lifecycle: "active",
361
+ exposure: "catalog",
315
362
  constraints: {
316
363
  aspectRatios: [
317
364
  "21:9",
@@ -349,6 +396,7 @@ var IMAGE_MODELS = [
349
396
  adapter: "ark",
350
397
  providerModelId: "dola-seedream-5-0-pro-260628",
351
398
  lifecycle: "active",
399
+ exposure: "catalog",
352
400
  constraints: {
353
401
  aspectRatios: ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3", "21:9", "4:5", "5:4"],
354
402
  sizes: ["1K", "2K"],
@@ -374,6 +422,7 @@ var IMAGE_MODELS = [
374
422
  adapter: "ark",
375
423
  providerModelId: "seedream-4-5-251128",
376
424
  lifecycle: "active",
425
+ exposure: "internal",
377
426
  constraints: {
378
427
  // 97:30 has no Ark size spelling; the A+ flow pads inputs to 97:30 and
379
428
  // omits the ratio instead. Advertise only sizes the adapter can send.
@@ -411,6 +460,7 @@ var IMAGE_MODELS = [
411
460
  adapter: "prodia",
412
461
  providerModelId: "flux-2-pro",
413
462
  lifecycle: "active",
463
+ exposure: "catalog",
414
464
  constraints: {
415
465
  aspectRatios: ["1:1", "2:3", "3:2", "16:9", "9:16", "4:3", "3:4", "4:5", "5:4", "21:9"],
416
466
  sizes: ["1K"],
@@ -437,6 +487,7 @@ var IMAGE_MODELS = [
437
487
  adapter: "prodia",
438
488
  providerModelId: "inference.gemini-3-pro.img2img.v1",
439
489
  lifecycle: "active",
490
+ exposure: "internal",
440
491
  constraints: {
441
492
  aspectRatios: ["1:1", "2:3", "3:2", "4:3", "3:4", "4:5", "5:4", "9:16", "16:9", "21:9"],
442
493
  sizes: ["1K", "2K", "4K"],
@@ -462,6 +513,7 @@ var IMAGE_MODELS = [
462
513
  adapter: "prodia",
463
514
  providerModelId: "inference.nano-banana.img2img.v2",
464
515
  lifecycle: "active",
516
+ exposure: "internal",
465
517
  constraints: {
466
518
  aspectRatios: ["1:1", "2:3", "3:4", "4:3", "9:16", "16:9", "21:9"],
467
519
  sizes: ["1K"],
@@ -488,6 +540,7 @@ var IMAGE_MODELS = [
488
540
  adapter: "replicate",
489
541
  providerModelId: "wan-video/wan-2.7-image-pro",
490
542
  lifecycle: "active",
543
+ exposure: "internal",
491
544
  constraints: {
492
545
  aspectRatios: ["1:1", "16:9", "9:16", "4:3", "3:4"],
493
546
  sizes: ["1K", "2K", "4K"],
@@ -514,6 +567,7 @@ var IMAGE_MODELS = [
514
567
  adapter: "replicate",
515
568
  providerModelId: "qwen/qwen-image-2-pro",
516
569
  lifecycle: "active",
570
+ exposure: "internal",
517
571
  constraints: {
518
572
  aspectRatios: ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"],
519
573
  sizes: [],
@@ -541,6 +595,7 @@ var IMAGE_MODELS = [
541
595
  adapter: "replicate",
542
596
  providerModelId: "qwen-edit-apps/qwen-image-edit-plus-lora-skin",
543
597
  lifecycle: "active",
598
+ exposure: "internal",
544
599
  constraints: {
545
600
  aspectRatios: ["1:1", "16:9", "9:16", "4:3", "3:4"],
546
601
  sizes: [],
@@ -569,6 +624,7 @@ var OTHER_MODELS = [
569
624
  adapter: "google-genai",
570
625
  providerModelId: "lyria-3-clip-preview",
571
626
  lifecycle: "active",
627
+ exposure: "catalog",
572
628
  constraints: {
573
629
  durations: [30],
574
630
  references: { images: 10 },
@@ -580,7 +636,8 @@ var OTHER_MODELS = [
580
636
  display: {
581
637
  provider: "google",
582
638
  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
- }
639
+ },
640
+ capabilities: {}
584
641
  },
585
642
  {
586
643
  id: "lyria-3-pro-preview",
@@ -590,6 +647,7 @@ var OTHER_MODELS = [
590
647
  adapter: "google-genai",
591
648
  providerModelId: "lyria-3-pro-preview",
592
649
  lifecycle: "active",
650
+ exposure: "catalog",
593
651
  constraints: {
594
652
  references: { images: 10 },
595
653
  supports: []
@@ -600,7 +658,8 @@ var OTHER_MODELS = [
600
658
  display: {
601
659
  provider: "google",
602
660
  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
- }
661
+ },
662
+ capabilities: {}
604
663
  },
605
664
  {
606
665
  id: "google/lyria-2",
@@ -610,6 +669,7 @@ var OTHER_MODELS = [
610
669
  adapter: "replicate",
611
670
  providerModelId: "google/lyria-2",
612
671
  lifecycle: "active",
672
+ exposure: "internal",
613
673
  constraints: {
614
674
  durations: [30],
615
675
  supports: ["seed", "negativePrompt"]
@@ -620,7 +680,8 @@ var OTHER_MODELS = [
620
680
  display: {
621
681
  provider: "google",
622
682
  description: "Lyria 2 music generation on Replicate; produces 30 seconds of 48 kHz stereo audio from a text prompt."
623
- }
683
+ },
684
+ capabilities: {}
624
685
  },
625
686
  {
626
687
  id: "mmaudio",
@@ -630,6 +691,7 @@ var OTHER_MODELS = [
630
691
  adapter: "replicate",
631
692
  providerModelId: "zsxkib/mmaudio:62871fb59889b2d7c13777f08deb3b36bdff88f7e1d53a50ad7694548a41b484",
632
693
  lifecycle: "active",
694
+ exposure: "catalog",
633
695
  constraints: {
634
696
  durations: { min: 1, max: 30 },
635
697
  requires: ["sourceVideo"],
@@ -641,7 +703,8 @@ var OTHER_MODELS = [
641
703
  display: {
642
704
  provider: "mmaudio",
643
705
  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
- }
706
+ },
707
+ capabilities: {}
645
708
  },
646
709
  {
647
710
  id: "elevenlabs-music",
@@ -651,6 +714,7 @@ var OTHER_MODELS = [
651
714
  adapter: "replicate",
652
715
  providerModelId: "elevenlabs/music",
653
716
  lifecycle: "active",
717
+ exposure: "internal",
654
718
  constraints: {
655
719
  durations: { min: 5, max: 300 },
656
720
  supports: ["instrumental"]
@@ -662,7 +726,8 @@ var OTHER_MODELS = [
662
726
  display: {
663
727
  provider: "elevenlabs",
664
728
  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
- }
729
+ },
730
+ capabilities: {}
666
731
  },
667
732
  {
668
733
  id: "topaz",
@@ -672,6 +737,7 @@ var OTHER_MODELS = [
672
737
  adapter: "replicate",
673
738
  providerModelId: "topazlabs/image-upscale",
674
739
  lifecycle: "active",
740
+ exposure: "catalog",
675
741
  constraints: {
676
742
  references: { images: 1 },
677
743
  requires: ["references"],
@@ -694,6 +760,7 @@ var OTHER_MODELS = [
694
760
  adapter: "prodia",
695
761
  providerModelId: "inference.remove-background.v1",
696
762
  lifecycle: "active",
763
+ exposure: "catalog",
697
764
  constraints: {
698
765
  references: { images: 1 },
699
766
  requires: ["references"],
@@ -721,6 +788,7 @@ function text(id, label, providerModelId, extra) {
721
788
  adapter: "ai-sdk-text",
722
789
  providerModelId,
723
790
  lifecycle: "active",
791
+ exposure: "internal",
724
792
  constraints: { supports: [] },
725
793
  defaults: {},
726
794
  usage: { ...TEXT_USAGE },
@@ -730,37 +798,47 @@ function text(id, label, providerModelId, extra) {
730
798
  }
731
799
  var TEXT_MODELS = [
732
800
  text("gpt-4o", "GPT-4o", "gpt-4o", {
801
+ exposure: "internal",
733
802
  display: {
734
803
  provider: "openai",
804
+ costTier: 2,
735
805
  description: "OpenAI GPT-4o flagship multimodal model; text and image input, 128K-token context."
736
806
  },
737
807
  capabilities: { vision: true, tools: true, structuredOutput: true, contextWindow: 128e3 }
738
808
  }),
739
809
  text("gpt-4o-mini", "GPT-4o mini", "gpt-4o-mini", {
810
+ exposure: "internal",
740
811
  display: {
741
812
  provider: "openai",
813
+ costTier: 1,
742
814
  description: "OpenAI GPT-4o mini fast, low-cost multimodal model; text and image input, 128K-token context."
743
815
  },
744
816
  capabilities: { vision: true, tools: true, structuredOutput: true, contextWindow: 128e3 }
745
817
  }),
746
818
  text("gpt-5.1", "GPT-5.1", "gpt-5.1", {
819
+ exposure: "catalog",
747
820
  display: {
748
821
  provider: "openai",
822
+ costTier: 3,
749
823
  description: "OpenAI GPT-5.1 reasoning model for coding and agentic tasks; text and image input, 400K-token context."
750
824
  },
751
825
  capabilities: { vision: true, tools: true, structuredOutput: true, contextWindow: 4e5 }
752
826
  }),
753
827
  text("gpt-5.2", "GPT-5.2", "gpt-5.2", {
828
+ exposure: "catalog",
754
829
  display: {
755
830
  provider: "openai",
831
+ costTier: 3,
756
832
  description: "OpenAI GPT-5.2 reasoning model for complex professional work; text and image input, 400K-token context."
757
833
  },
758
834
  capabilities: { vision: true, tools: true, structuredOutput: true, contextWindow: 4e5 }
759
835
  }),
760
836
  // 1.05M-token context: https://platform.openai.com/docs/models/gpt-5.4
761
837
  text("gpt-5.4", "GPT-5.4", "gpt-5.4", {
838
+ exposure: "internal",
762
839
  display: {
763
840
  provider: "openai",
841
+ costTier: 3,
764
842
  description: "OpenAI GPT-5.4 flagship reasoning model; text and image input, 1.05M-token context."
765
843
  },
766
844
  capabilities: {
@@ -772,16 +850,20 @@ var TEXT_MODELS = [
772
850
  }),
773
851
  // OpenAI never shipped gpt-5.1-mini or gpt-5.2-mini; callers that still send them get 5.4 mini.
774
852
  text("gpt-5.4-mini", "GPT-5.4 mini", "gpt-5.4-mini", {
853
+ exposure: "catalog",
775
854
  aliases: ["gpt-5.1-mini", "gpt-5.2-mini"],
776
855
  display: {
777
856
  provider: "openai",
857
+ costTier: 1,
778
858
  description: "OpenAI GPT-5.4 mini efficient reasoning model for high-volume workloads; text and image input, 400K-token context."
779
859
  },
780
860
  capabilities: { vision: true, tools: true, structuredOutput: true, contextWindow: 4e5 }
781
861
  }),
782
862
  text("gpt-5.5", "GPT-5.5", "gpt-5.5", {
863
+ exposure: "catalog",
783
864
  display: {
784
865
  provider: "openai",
866
+ costTier: 3,
785
867
  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
868
  },
787
869
  capabilities: {
@@ -792,8 +874,10 @@ var TEXT_MODELS = [
792
874
  }
793
875
  }),
794
876
  text("gpt-5.6-luna", "GPT-5.6 Luna", "gpt-5.6-luna", {
877
+ exposure: "catalog",
795
878
  display: {
796
879
  provider: "openai",
880
+ costTier: 1,
797
881
  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
882
  },
799
883
  capabilities: {
@@ -804,8 +888,10 @@ var TEXT_MODELS = [
804
888
  }
805
889
  }),
806
890
  text("gpt-5.6-terra", "GPT-5.6 Terra", "gpt-5.6-terra", {
891
+ exposure: "catalog",
807
892
  display: {
808
893
  provider: "openai",
894
+ costTier: 2,
809
895
  description: "OpenAI GPT-5.6 Terra balanced tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
810
896
  },
811
897
  capabilities: {
@@ -816,8 +902,10 @@ var TEXT_MODELS = [
816
902
  }
817
903
  }),
818
904
  text("gpt-5.6-sol", "GPT-5.6 Sol", "gpt-5.6-sol", {
905
+ exposure: "catalog",
819
906
  display: {
820
907
  provider: "openai",
908
+ costTier: 3,
821
909
  description: "OpenAI GPT-5.6 Sol flagship tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
822
910
  },
823
911
  capabilities: {
@@ -829,15 +917,18 @@ var TEXT_MODELS = [
829
917
  }),
830
918
  // Library key "claude-sonnet-4.5" maps to the SDK id "claude-sonnet-4-5".
831
919
  text("claude-sonnet-4-5", "Claude Sonnet 4.5", "claude-sonnet-4-5", {
920
+ exposure: "internal",
832
921
  aliases: ["claude-sonnet-4.5", "claude-sonnet-4-5-20250929"],
833
922
  display: {
834
923
  provider: "anthropic",
924
+ costTier: 2,
835
925
  description: "Anthropic Claude Sonnet 4.5 (legacy) balanced model; text and image input, 200K-token context."
836
926
  },
837
927
  capabilities: { vision: true, tools: true, structuredOutput: true, contextWindow: 2e5 }
838
928
  }),
839
929
  // Anthropic retired the dated 4.0 ids; callers that still send them get 4.6.
840
930
  text("claude-sonnet-4-6", "Claude Sonnet 4.6", "claude-sonnet-4-6", {
931
+ exposure: "catalog",
841
932
  aliases: [
842
933
  "claude-sonnet-4.6",
843
934
  "claude-sonnet-4",
@@ -846,6 +937,7 @@ var TEXT_MODELS = [
846
937
  ],
847
938
  display: {
848
939
  provider: "anthropic",
940
+ costTier: 2,
849
941
  description: "Anthropic Claude Sonnet 4.6 (legacy) balanced model; text and image input, 1M-token context."
850
942
  },
851
943
  capabilities: {
@@ -856,8 +948,10 @@ var TEXT_MODELS = [
856
948
  }
857
949
  }),
858
950
  text("claude-sonnet-5", "Claude Sonnet 5", "claude-sonnet-5", {
951
+ exposure: "catalog",
859
952
  display: {
860
953
  provider: "anthropic",
954
+ costTier: 3,
861
955
  description: "Anthropic Claude Sonnet 5 current balanced model; text and image input, 1M-token context."
862
956
  },
863
957
  capabilities: {
@@ -868,9 +962,11 @@ var TEXT_MODELS = [
868
962
  }
869
963
  }),
870
964
  text("claude-opus-4-8", "Claude Opus 4.8", "claude-opus-4-8", {
965
+ exposure: "catalog",
871
966
  aliases: ["claude-opus-4.8", "claude-opus-4", "claude-opus-4.0", "claude-opus-4-20250514"],
872
967
  display: {
873
968
  provider: "anthropic",
969
+ costTier: 3,
874
970
  description: "Anthropic Claude Opus 4.8 (legacy) frontier model; text and image input, 1M-token context."
875
971
  },
876
972
  capabilities: {
@@ -881,17 +977,21 @@ var TEXT_MODELS = [
881
977
  }
882
978
  }),
883
979
  text("claude-haiku-4-5", "Claude Haiku 4.5", "claude-haiku-4-5", {
980
+ exposure: "catalog",
884
981
  aliases: ["claude-haiku-4.5", "claude-haiku-4-5-20251001", "claude-haiku-4"],
885
982
  display: {
886
983
  provider: "anthropic",
984
+ costTier: 1,
887
985
  description: "Anthropic Claude Haiku 4.5 fast model with near-frontier intelligence; text and image input, 200K-token context."
888
986
  },
889
987
  capabilities: { vision: true, tools: true, structuredOutput: true, contextWindow: 2e5 }
890
988
  }),
891
989
  text("claude-opus-5", "Claude Opus 5", "claude-opus-5", {
990
+ exposure: "internal",
892
991
  aliases: ["claude-opus-5.0"],
893
992
  display: {
894
993
  provider: "anthropic",
994
+ costTier: 3,
895
995
  description: "Anthropic Claude Opus 5 current frontier model for agentic coding and enterprise work; text and image input, 1M-token context."
896
996
  },
897
997
  capabilities: {
@@ -902,8 +1002,10 @@ var TEXT_MODELS = [
902
1002
  }
903
1003
  }),
904
1004
  text("claude-fable-5", "Claude Fable 5", "claude-fable-5", {
1005
+ exposure: "internal",
905
1006
  display: {
906
1007
  provider: "anthropic",
1008
+ costTier: 3,
907
1009
  description: "Anthropic Claude Fable 5 (legacy) model for demanding reasoning and long-horizon agentic work; text and image input, 1M-token context."
908
1010
  },
909
1011
  capabilities: {
@@ -914,8 +1016,10 @@ var TEXT_MODELS = [
914
1016
  }
915
1017
  }),
916
1018
  text("gemini-2.5-flash", "Gemini 2.5 Flash", "gemini-2.5-flash", {
1019
+ exposure: "internal",
917
1020
  display: {
918
1021
  provider: "google",
1022
+ costTier: 1,
919
1023
  description: "Google Gemini 2.5 Flash low-latency multimodal model for high-volume reasoning over text, images, video, and audio; 1M-token context."
920
1024
  },
921
1025
  capabilities: {
@@ -926,8 +1030,10 @@ var TEXT_MODELS = [
926
1030
  }
927
1031
  }),
928
1032
  text("gemini-2.5-pro", "Gemini 2.5 Pro", "gemini-2.5-pro", {
1033
+ exposure: "internal",
929
1034
  display: {
930
1035
  provider: "google",
1036
+ costTier: 2,
931
1037
  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
1038
  },
933
1039
  capabilities: {
@@ -938,8 +1044,10 @@ var TEXT_MODELS = [
938
1044
  }
939
1045
  }),
940
1046
  text("gemini-3.1-pro-preview", "Gemini 3.1 Pro (preview)", "gemini-3.1-pro-preview", {
1047
+ exposure: "catalog",
941
1048
  display: {
942
1049
  provider: "google",
1050
+ costTier: 2,
943
1051
  description: "Google Gemini 3.1 Pro preview reasoning model for software engineering, tool use, and reliable agentic workflows; 1M-token context."
944
1052
  },
945
1053
  capabilities: {
@@ -950,8 +1058,10 @@ var TEXT_MODELS = [
950
1058
  }
951
1059
  }),
952
1060
  text("gemini-3.5-flash", "Gemini 3.5 Flash", "gemini-3.5-flash", {
1061
+ exposure: "catalog",
953
1062
  display: {
954
1063
  provider: "google",
1064
+ costTier: 1,
955
1065
  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
1066
  },
957
1067
  capabilities: {
@@ -962,8 +1072,10 @@ var TEXT_MODELS = [
962
1072
  }
963
1073
  }),
964
1074
  text("gemini-3.6-flash", "Gemini 3.6 Flash", "gemini-3.6-flash", {
1075
+ exposure: "catalog",
965
1076
  display: {
966
1077
  provider: "google",
1078
+ costTier: 1,
967
1079
  description: "Google Gemini 3.6 Flash general-purpose multimodal agentic model balancing speed and capability; 1M-token context."
968
1080
  },
969
1081
  capabilities: {
@@ -974,8 +1086,11 @@ var TEXT_MODELS = [
974
1086
  }
975
1087
  }),
976
1088
  text("gemini-3.7-flash", "Gemini 3.7 Flash", "gemini-3.7-flash", {
1089
+ exposure: "catalog",
977
1090
  display: {
978
1091
  provider: "google",
1092
+ costTier: 1,
1093
+ recommended: true,
979
1094
  description: "Google Gemini 3.7 Flash natively multimodal reasoning model for coding, agentic workflows, and multi-step execution; 1M-token context."
980
1095
  },
981
1096
  capabilities: {
@@ -986,8 +1101,10 @@ var TEXT_MODELS = [
986
1101
  }
987
1102
  }),
988
1103
  text("gemini-3.8-flash", "Gemini 3.8 Flash", "gemini-3.8-flash", {
1104
+ exposure: "internal",
989
1105
  display: {
990
1106
  provider: "google",
1107
+ costTier: 1,
991
1108
  description: "Google Gemini 3.8 Flash frontier model for long-horizon software engineering, autonomous agents, and enterprise workflows; 1M-token context."
992
1109
  },
993
1110
  capabilities: {
@@ -999,12 +1116,15 @@ var TEXT_MODELS = [
999
1116
  }),
1000
1117
  // Renamed to gemini-3.6-flash in vibe-shared model-migration.ts.
1001
1118
  text("gemini-3-flash-preview", "Gemini 3 Flash (preview)", "gemini-3-flash-preview", {
1119
+ exposure: "internal",
1002
1120
  lifecycle: "deprecated",
1003
1121
  replacedBy: "gemini-3.6-flash"
1004
1122
  }),
1005
1123
  text("gemini-3.1-flash-lite", "Gemini 3.1 Flash Lite", "gemini-3.1-flash-lite", {
1124
+ exposure: "internal",
1006
1125
  display: {
1007
1126
  provider: "google",
1127
+ costTier: 1,
1008
1128
  description: "Google Gemini 3.1 Flash-Lite low-latency multimodal model for high-volume agentic, translation, and data-extraction tasks; 1M-token context."
1009
1129
  },
1010
1130
  capabilities: {
@@ -1015,8 +1135,10 @@ var TEXT_MODELS = [
1015
1135
  }
1016
1136
  }),
1017
1137
  text("sonar", "Sonar", "sonar", {
1138
+ exposure: "internal",
1018
1139
  display: {
1019
1140
  provider: "perplexity",
1141
+ costTier: 1,
1020
1142
  description: "Perplexity Sonar lightweight web-grounded search model returning cited answers; 128K-token context."
1021
1143
  },
1022
1144
  capabilities: {
@@ -1027,8 +1149,10 @@ var TEXT_MODELS = [
1027
1149
  }
1028
1150
  }),
1029
1151
  text("sonar-pro", "Sonar Pro", "sonar-pro", {
1152
+ exposure: "internal",
1030
1153
  display: {
1031
1154
  provider: "perplexity",
1155
+ costTier: 2,
1032
1156
  description: "Perplexity Sonar Pro advanced web-grounded search model for complex multi-step queries; 200K-token context."
1033
1157
  },
1034
1158
  capabilities: {
@@ -1039,8 +1163,10 @@ var TEXT_MODELS = [
1039
1163
  }
1040
1164
  }),
1041
1165
  text("sonar-reasoning-pro", "Sonar Reasoning Pro", "sonar-reasoning-pro", {
1166
+ exposure: "internal",
1042
1167
  display: {
1043
1168
  provider: "perplexity",
1169
+ costTier: 2,
1044
1170
  description: "Perplexity Sonar Reasoning Pro chain-of-thought web-grounded search model for complex problem-solving; 128K-token context."
1045
1171
  },
1046
1172
  capabilities: {
@@ -1051,8 +1177,11 @@ var TEXT_MODELS = [
1051
1177
  }
1052
1178
  }),
1053
1179
  text("deepseek-v4-flash", "DeepSeek V4 Flash", "deepseek-v4-flash", {
1180
+ exposure: "catalog",
1054
1181
  display: {
1055
1182
  provider: "deepseek",
1183
+ costTier: 1,
1184
+ recommended: true,
1056
1185
  description: "DeepSeek V4 Flash thinking/non-thinking model with vision, tool calls, and JSON output; 1M-token context and up to 384K output tokens."
1057
1186
  },
1058
1187
  capabilities: {
@@ -1063,8 +1192,10 @@ var TEXT_MODELS = [
1063
1192
  }
1064
1193
  }),
1065
1194
  text("deepseek-v4-pro", "DeepSeek V4 Pro", "deepseek-v4-pro", {
1195
+ exposure: "catalog",
1066
1196
  display: {
1067
1197
  provider: "deepseek",
1198
+ costTier: 2,
1068
1199
  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
1200
  },
1070
1201
  capabilities: {
@@ -1076,8 +1207,10 @@ var TEXT_MODELS = [
1076
1207
  }),
1077
1208
  // 1M-token context: https://docs.x.ai/docs/models/grok-4.3
1078
1209
  text("grok-4.3", "Grok 4.3", "grok-4.3", {
1210
+ exposure: "catalog",
1079
1211
  display: {
1080
1212
  provider: "xai",
1213
+ costTier: 2,
1081
1214
  description: "xAI Grok 4.3 reasoning model with tool calling and structured outputs; text and image input, 1M-token context."
1082
1215
  },
1083
1216
  capabilities: {
@@ -1089,15 +1222,19 @@ var TEXT_MODELS = [
1089
1222
  }),
1090
1223
  // Moonshot retired kimi-k2.5 on 2026-08-31 and no longer publishes its specs.
1091
1224
  text("kimi-k2.5", "Kimi K2.5", "kimi-k2.5", {
1225
+ exposure: "catalog",
1092
1226
  display: {
1093
1227
  provider: "moonshot",
1228
+ costTier: 2,
1094
1229
  description: "Moonshot Kimi K2.5; the provider retired the model on 2026-08-31 and calls now return a model-not-found error."
1095
1230
  },
1096
1231
  capabilities: {}
1097
1232
  }),
1098
1233
  text("kimi-k3", "Kimi K3", "kimi-k3", {
1234
+ exposure: "catalog",
1099
1235
  display: {
1100
1236
  provider: "moonshot",
1237
+ costTier: 2,
1101
1238
  description: "Moonshot Kimi K3 flagship model with native visual understanding and always-on thinking; text, image, and video input, 1M-token context."
1102
1239
  },
1103
1240
  capabilities: {
@@ -1110,9 +1247,11 @@ var TEXT_MODELS = [
1110
1247
  // Cowork calls the provider "MiniMax-M3"; the pricing key is lowercase.
1111
1248
  // 1M-token context: https://platform.minimax.io/docs/api-reference/text-openai-api
1112
1249
  text("minimax-m3", "MiniMax M3", "MiniMax-M3", {
1250
+ exposure: "catalog",
1113
1251
  aliases: ["MiniMax-M3"],
1114
1252
  display: {
1115
1253
  provider: "minimax",
1254
+ costTier: 2,
1116
1255
  description: "MiniMax M3 frontier multimodal model for agentic reasoning, tool use, and coding; text, image, and video input, 1M-token context."
1117
1256
  },
1118
1257
  capabilities: { vision: true, tools: true, contextWindow: 1e6 }
@@ -1144,6 +1283,7 @@ var VIDEO_MODELS = [
1144
1283
  adapter: "google-genai",
1145
1284
  providerModelId: "veo-3.1-generate-preview",
1146
1285
  lifecycle: "active",
1286
+ exposure: "catalog",
1147
1287
  constraints: {
1148
1288
  aspectRatios: [...OMNI_RATIOS],
1149
1289
  resolutions: ["720p", "1080p", "4k"],
@@ -1173,6 +1313,7 @@ var VIDEO_MODELS = [
1173
1313
  adapter: "google-genai",
1174
1314
  providerModelId: "veo-3.1-fast-generate-preview",
1175
1315
  lifecycle: "active",
1316
+ exposure: "internal",
1176
1317
  constraints: {
1177
1318
  aspectRatios: [...OMNI_RATIOS],
1178
1319
  resolutions: ["720p", "1080p", "4k"],
@@ -1201,9 +1342,10 @@ var VIDEO_MODELS = [
1201
1342
  adapter: "google-genai",
1202
1343
  providerModelId: "veo-3.1-lite-generate-preview",
1203
1344
  lifecycle: "active",
1345
+ exposure: "internal",
1204
1346
  constraints: {
1205
1347
  aspectRatios: [...OMNI_RATIOS],
1206
- resolutions: ["720p", "1080p", "4k"],
1348
+ resolutions: ["720p", "1080p"],
1207
1349
  durations: [4, 8],
1208
1350
  references: { images: 3 },
1209
1351
  supports: ["lastFrame"]
@@ -1231,6 +1373,7 @@ var VIDEO_MODELS = [
1231
1373
  adapter: "google-genai",
1232
1374
  providerModelId: "gemini-omni-flash-preview",
1233
1375
  lifecycle: "active",
1376
+ exposure: "catalog",
1234
1377
  constraints: {
1235
1378
  // 1.0 rejects `resolution`; it renders 720p. No defaults: the adapter
1236
1379
  // sends ratio and duration only when the caller set them, so a
@@ -1258,6 +1401,7 @@ var VIDEO_MODELS = [
1258
1401
  adapter: "google-genai",
1259
1402
  providerModelId: "gemini-omni-1.1-flash",
1260
1403
  lifecycle: "active",
1404
+ exposure: "catalog",
1261
1405
  constraints: {
1262
1406
  aspectRatios: [...OMNI_RATIOS],
1263
1407
  resolutions: ["360p", "720p", "1080p", "4k"],
@@ -1283,10 +1427,12 @@ var VIDEO_MODELS = [
1283
1427
  adapter: "ark",
1284
1428
  providerModelId: "dreamina-seedance-2-0-260128",
1285
1429
  lifecycle: "active",
1430
+ exposure: "catalog",
1286
1431
  constraints: {
1287
1432
  aspectRatios: [...SEEDANCE_RATIOS],
1288
1433
  resolutions: ["480p", "720p", "1080p", "4k"],
1289
1434
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1435
+ durationPresets: [4, 6, 8, 10, 12, 15],
1290
1436
  references: { images: 9, videos: 3, audios: 3, audioOnly: false },
1291
1437
  ratioIgnoredWith: ["firstFrame"],
1292
1438
  supports: ["generateAudio", "seed", "lastFrame", "watermark"]
@@ -1314,6 +1460,7 @@ var VIDEO_MODELS = [
1314
1460
  adapter: "ark",
1315
1461
  providerModelId: "dreamina-seedance-2-0-fast-260128",
1316
1462
  lifecycle: "active",
1463
+ exposure: "catalog",
1317
1464
  constraints: {
1318
1465
  aspectRatios: [...SEEDANCE_RATIOS],
1319
1466
  resolutions: ["480p", "720p"],
@@ -1345,6 +1492,7 @@ var VIDEO_MODELS = [
1345
1492
  adapter: "ark",
1346
1493
  providerModelId: "dreamina-seedance-2-5-260628",
1347
1494
  lifecycle: "active",
1495
+ exposure: "catalog",
1348
1496
  constraints: {
1349
1497
  aspectRatios: [...SEEDANCE_RATIOS],
1350
1498
  resolutions: ["480p", "720p", "1080p"],
@@ -1376,10 +1524,12 @@ var VIDEO_MODELS = [
1376
1524
  adapter: "xai-video",
1377
1525
  providerModelId: "grok-imagine-video",
1378
1526
  lifecycle: "active",
1527
+ exposure: "catalog",
1379
1528
  constraints: {
1380
1529
  aspectRatios: [...GROK_RATIOS],
1381
1530
  resolutions: ["480p", "720p"],
1382
1531
  durations: { min: 1, max: 15 },
1532
+ durationPresets: [4, 6, 8, 10],
1383
1533
  references: { images: 7 },
1384
1534
  supports: []
1385
1535
  },
@@ -1402,6 +1552,7 @@ var VIDEO_MODELS = [
1402
1552
  adapter: "higgsfield",
1403
1553
  providerModelId: "kling-video/v2.5-turbo/pro/image-to-video",
1404
1554
  lifecycle: "active",
1555
+ exposure: "catalog",
1405
1556
  constraints: {
1406
1557
  aspectRatios: [...KLING_RATIOS],
1407
1558
  durations: [5, 10],
@@ -1431,6 +1582,7 @@ var VIDEO_MODELS = [
1431
1582
  adapter: "higgsfield",
1432
1583
  providerModelId: "kling-video/v3.0/pro/image-to-video",
1433
1584
  lifecycle: "active",
1585
+ exposure: "catalog",
1434
1586
  constraints: {
1435
1587
  aspectRatios: [...KLING_RATIOS],
1436
1588
  durations: { min: 3, max: 15 },
@@ -1460,6 +1612,7 @@ var VIDEO_MODELS = [
1460
1612
  adapter: "replicate",
1461
1613
  providerModelId: "kwaivgi/kling-v3-omni-video",
1462
1614
  lifecycle: "active",
1615
+ exposure: "catalog",
1463
1616
  constraints: {
1464
1617
  aspectRatios: [
1465
1618
  "1:1",
@@ -1495,6 +1648,7 @@ var VIDEO_MODELS = [
1495
1648
  adapter: "fal",
1496
1649
  providerModelId: "minimax/h3",
1497
1650
  lifecycle: "active",
1651
+ exposure: "catalog",
1498
1652
  constraints: {
1499
1653
  aspectRatios: [...H3_RATIOS],
1500
1654
  resolutions: ["480p", "768p", "2k", "4k"],
@@ -1523,6 +1677,7 @@ var VIDEO_MODELS = [
1523
1677
  adapter: "fal",
1524
1678
  providerModelId: "minimax/h3-max",
1525
1679
  lifecycle: "active",
1680
+ exposure: "catalog",
1526
1681
  constraints: {
1527
1682
  aspectRatios: [...H3_RATIOS],
1528
1683
  resolutions: ["480p", "768p"],
@@ -1551,6 +1706,7 @@ var VIDEO_MODELS = [
1551
1706
  adapter: "fal",
1552
1707
  providerModelId: "minimax/h3/reference-to-video",
1553
1708
  lifecycle: "active",
1709
+ exposure: "catalog",
1554
1710
  constraints: {
1555
1711
  aspectRatios: [...H3_REFERENCE_RATIOS],
1556
1712
  resolutions: ["480p", "768p", "2k", "4k"],
@@ -1580,6 +1736,7 @@ var VIDEO_MODELS = [
1580
1736
  adapter: "fal",
1581
1737
  providerModelId: "minimax/h3-max/reference-to-video",
1582
1738
  lifecycle: "active",
1739
+ exposure: "catalog",
1583
1740
  constraints: {
1584
1741
  aspectRatios: [...H3_REFERENCE_RATIOS],
1585
1742
  resolutions: ["480p", "768p"],
@@ -1610,6 +1767,7 @@ var VIDEO_MODELS = [
1610
1767
  adapter: "fal",
1611
1768
  providerModelId: "fal-ai/kling-video/o1/video-to-video/reference",
1612
1769
  lifecycle: "active",
1770
+ exposure: "internal",
1613
1771
  constraints: {
1614
1772
  aspectRatios: [...KLING_RATIOS],
1615
1773
  durations: { min: 3, max: 10 },
@@ -1633,6 +1791,7 @@ var VIDEO_MODELS = [
1633
1791
  adapter: "replicate",
1634
1792
  providerModelId: "minimax/hailuo-02",
1635
1793
  lifecycle: "active",
1794
+ exposure: "internal",
1636
1795
  constraints: {
1637
1796
  resolutions: ["768p"],
1638
1797
  durations: [6, 10],
@@ -1655,6 +1814,7 @@ var VIDEO_MODELS = [
1655
1814
  adapter: "higgsfield",
1656
1815
  providerModelId: "dop-preview",
1657
1816
  lifecycle: "active",
1817
+ exposure: "internal",
1658
1818
  constraints: {
1659
1819
  requires: ["firstFrame"],
1660
1820
  supports: ["seed", "lastFrame"]
@@ -2252,6 +2412,7 @@ function passthroughTextModel(model) {
2252
2412
  adapter: "ai-sdk-text",
2253
2413
  providerModelId: model.modelId,
2254
2414
  lifecycle: "active",
2415
+ exposure: "internal",
2255
2416
  constraints: {},
2256
2417
  defaults: {},
2257
2418
  usage: { unit: "tokens", modality: "TEXT" },