@shop-os/modelkit 0.2.8 → 0.2.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/catalog.cjs CHANGED
@@ -24,17 +24,23 @@ __export(catalog_entry_exports, {
24
24
  Catalog: () => Catalog,
25
25
  CatalogModelSchema: () => CatalogModelSchema,
26
26
  CatalogSchema: () => CatalogSchema,
27
+ ExposureSchema: () => ExposureSchema,
27
28
  IMAGE_MODELS: () => IMAGE_MODELS,
28
29
  MODELS: () => MODELS,
29
30
  ModelKitError: () => ModelKitError,
30
31
  OTHER_MODELS: () => OTHER_MODELS,
32
+ SURFACES: () => SURFACES2,
33
+ SurfaceSchema: () => SurfaceSchema,
31
34
  TEXT_MODELS: () => TEXT_MODELS,
32
35
  VIDEO_MODELS: () => VIDEO_MODELS,
33
36
  compareCatalogOrder: () => compareCatalogOrder,
37
+ isListed: () => isListed,
38
+ isListedOn: () => isListedOn,
34
39
  isModelKitError: () => isModelKitError,
35
40
  liveCatalog: () => liveCatalog,
36
41
  liveState: () => liveState,
37
42
  nearestAspectRatio: () => nearestAspectRatio,
43
+ normalizeExposure: () => normalizeExposure,
38
44
  primeCatalog: () => primeCatalog,
39
45
  resetLiveCatalog: () => resetLiveCatalog,
40
46
  resolveAudioOptions: () => resolveAudioOptions,
@@ -167,6 +173,27 @@ var Catalog = class _Catalog {
167
173
  }
168
174
  };
169
175
 
176
+ // src/catalog/exposure.ts
177
+ var SURFACES = ["cowork", "space_builder"];
178
+ function normalizeExposure(value) {
179
+ if (value === "catalog") return ["cowork", "space_builder"];
180
+ if (value === "internal") return [];
181
+ if (Array.isArray(value)) {
182
+ if (value.every((entry) => SURFACES.includes(entry))) {
183
+ const present = new Set(value);
184
+ return SURFACES.filter((surface) => present.has(surface));
185
+ }
186
+ return value;
187
+ }
188
+ return value;
189
+ }
190
+ function isListedOn(row, surface) {
191
+ return row.lifecycle === "active" && row.exposure.includes(surface);
192
+ }
193
+ function isListed(row) {
194
+ return row.lifecycle === "active" && row.exposure.length > 0;
195
+ }
196
+
170
197
  // src/catalog/image.ts
171
198
  var IMAGE_USAGE = { unit: "images" };
172
199
  var GEMINI_RATIOS = [
@@ -217,7 +244,7 @@ var IMAGE_MODELS = [
217
244
  description: "Create stunning, production-quality visuals with exceptional realism, detail, and typography. Best for campaigns, e-commerce, product photography, and hero creatives.",
218
245
  logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png"
219
246
  },
220
- "catalog",
247
+ ["cowork", "space_builder"],
221
248
  { images: 14 }
222
249
  ),
223
250
  geminiImage(
@@ -231,7 +258,7 @@ var IMAGE_MODELS = [
231
258
  description: "Generate high-quality images at speed. Perfect for brainstorming, moodboards, concept testing, creative exploration, and large batch workflows.",
232
259
  logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png"
233
260
  },
234
- "catalog",
261
+ ["cowork", "space_builder"],
235
262
  { images: 14 }
236
263
  ),
237
264
  geminiImage(
@@ -244,7 +271,7 @@ var IMAGE_MODELS = [
244
271
  description: "The fastest and most affordable image model. Ideal for rapid drafts, bulk exploration, and iterative concept testing at 1K resolution.",
245
272
  logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png"
246
273
  },
247
- "catalog",
274
+ ["cowork", "space_builder"],
248
275
  { images: 14 }
249
276
  ),
250
277
  // trigger-workflows validates 1K only; pricing seeds 2K/4K rows so allow all three.
@@ -257,7 +284,7 @@ var IMAGE_MODELS = [
257
284
  provider: "google",
258
285
  description: "Nano Banana (legacy Gemini 2.5 Flash Image) native image generation and editing model for high-volume, low-latency creative workflows."
259
286
  },
260
- "internal"
287
+ []
261
288
  ),
262
289
  {
263
290
  // Cowork "auto" lets OpenAI pick the size; the canonical equivalent is adaptive.
@@ -268,7 +295,7 @@ var IMAGE_MODELS = [
268
295
  adapter: "openai-image",
269
296
  providerModelId: "gpt-image-2",
270
297
  lifecycle: "active",
271
- exposure: "catalog",
298
+ exposure: ["cowork", "space_builder"],
272
299
  constraints: {
273
300
  exactSizes: {
274
301
  "1:1": "1024x1024",
@@ -303,7 +330,7 @@ var IMAGE_MODELS = [
303
330
  adapter: "openai-image",
304
331
  providerModelId: "gpt-image-2.5-sunburst",
305
332
  lifecycle: "active",
306
- exposure: "catalog",
333
+ exposure: ["cowork", "space_builder"],
307
334
  constraints: {
308
335
  exactSizes: {
309
336
  "1:1": "1024x1024",
@@ -337,7 +364,7 @@ var IMAGE_MODELS = [
337
364
  adapter: "openai-image",
338
365
  providerModelId: "gpt-image-2.5-flare",
339
366
  lifecycle: "active",
340
- exposure: "catalog",
367
+ exposure: ["cowork", "space_builder"],
341
368
  constraints: {
342
369
  exactSizes: {
343
370
  "1:1": "1024x1024",
@@ -371,7 +398,7 @@ var IMAGE_MODELS = [
371
398
  adapter: "fal",
372
399
  providerModelId: "muse-image-1.0",
373
400
  lifecycle: "active",
374
- exposure: "catalog",
401
+ exposure: ["cowork", "space_builder"],
375
402
  constraints: {
376
403
  aspectRatios: [
377
404
  "21:9",
@@ -406,7 +433,7 @@ var IMAGE_MODELS = [
406
433
  adapter: "ark",
407
434
  providerModelId: "dola-seedream-5-0-pro-260628",
408
435
  lifecycle: "active",
409
- exposure: "catalog",
436
+ exposure: ["cowork", "space_builder"],
410
437
  constraints: {
411
438
  aspectRatios: ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3", "21:9", "4:5", "5:4"],
412
439
  sizes: ["1K", "2K"],
@@ -432,7 +459,7 @@ var IMAGE_MODELS = [
432
459
  adapter: "ark",
433
460
  providerModelId: "seedream-4-5-251128",
434
461
  lifecycle: "active",
435
- exposure: "internal",
462
+ exposure: [],
436
463
  constraints: {
437
464
  // 97:30 has no Ark size spelling; the A+ flow pads inputs to 97:30 and
438
465
  // omits the ratio instead. Advertise only sizes the adapter can send.
@@ -469,7 +496,7 @@ var IMAGE_MODELS = [
469
496
  adapter: "prodia",
470
497
  providerModelId: "flux-2-pro",
471
498
  lifecycle: "active",
472
- exposure: "catalog",
499
+ exposure: ["cowork", "space_builder"],
473
500
  constraints: {
474
501
  aspectRatios: ["1:1", "2:3", "3:2", "16:9", "9:16", "4:3", "3:4", "4:5", "5:4", "21:9"],
475
502
  sizes: ["1K"],
@@ -496,7 +523,7 @@ var IMAGE_MODELS = [
496
523
  adapter: "prodia",
497
524
  providerModelId: "inference.gemini-3-pro.img2img.v1",
498
525
  lifecycle: "active",
499
- exposure: "internal",
526
+ exposure: [],
500
527
  constraints: {
501
528
  aspectRatios: ["1:1", "2:3", "3:2", "4:3", "3:4", "4:5", "5:4", "9:16", "16:9", "21:9"],
502
529
  sizes: ["1K", "2K", "4K"],
@@ -521,7 +548,7 @@ var IMAGE_MODELS = [
521
548
  adapter: "prodia",
522
549
  providerModelId: "inference.nano-banana.img2img.v2",
523
550
  lifecycle: "active",
524
- exposure: "internal",
551
+ exposure: [],
525
552
  constraints: {
526
553
  aspectRatios: ["1:1", "2:3", "3:4", "4:3", "9:16", "16:9", "21:9"],
527
554
  sizes: ["1K"],
@@ -547,7 +574,7 @@ var IMAGE_MODELS = [
547
574
  adapter: "replicate",
548
575
  providerModelId: "wan-video/wan-2.7-image-pro",
549
576
  lifecycle: "active",
550
- exposure: "internal",
577
+ exposure: [],
551
578
  constraints: {
552
579
  aspectRatios: ["1:1", "16:9", "9:16", "4:3", "3:4"],
553
580
  sizes: ["1K", "2K", "4K"],
@@ -573,7 +600,7 @@ var IMAGE_MODELS = [
573
600
  adapter: "replicate",
574
601
  providerModelId: "qwen/qwen-image-2-pro",
575
602
  lifecycle: "active",
576
- exposure: "internal",
603
+ exposure: [],
577
604
  constraints: {
578
605
  aspectRatios: ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"],
579
606
  sizes: [],
@@ -599,7 +626,7 @@ var IMAGE_MODELS = [
599
626
  adapter: "replicate",
600
627
  providerModelId: "qwen-edit-apps/qwen-image-edit-plus-lora-skin",
601
628
  lifecycle: "active",
602
- exposure: "internal",
629
+ exposure: [],
603
630
  constraints: {
604
631
  aspectRatios: ["1:1", "16:9", "9:16", "4:3", "3:4"],
605
632
  sizes: [],
@@ -628,7 +655,7 @@ var OTHER_MODELS = [
628
655
  adapter: "google-genai",
629
656
  providerModelId: "lyria-3-clip-preview",
630
657
  lifecycle: "active",
631
- exposure: "catalog",
658
+ exposure: ["cowork", "space_builder"],
632
659
  constraints: {
633
660
  durations: [30],
634
661
  references: { images: 10 },
@@ -652,7 +679,7 @@ var OTHER_MODELS = [
652
679
  adapter: "google-genai",
653
680
  providerModelId: "lyria-3-pro-preview",
654
681
  lifecycle: "active",
655
- exposure: "catalog",
682
+ exposure: ["cowork", "space_builder"],
656
683
  constraints: {
657
684
  references: { images: 10 },
658
685
  supports: []
@@ -675,7 +702,7 @@ var OTHER_MODELS = [
675
702
  adapter: "replicate",
676
703
  providerModelId: "google/lyria-2",
677
704
  lifecycle: "active",
678
- exposure: "internal",
705
+ exposure: [],
679
706
  constraints: {
680
707
  durations: [30],
681
708
  supports: ["seed", "negativePrompt"]
@@ -697,7 +724,7 @@ var OTHER_MODELS = [
697
724
  adapter: "replicate",
698
725
  providerModelId: "zsxkib/mmaudio:62871fb59889b2d7c13777f08deb3b36bdff88f7e1d53a50ad7694548a41b484",
699
726
  lifecycle: "active",
700
- exposure: "catalog",
727
+ exposure: ["cowork", "space_builder"],
701
728
  constraints: {
702
729
  durations: { min: 1, max: 30 },
703
730
  requires: ["sourceVideo"],
@@ -720,7 +747,7 @@ var OTHER_MODELS = [
720
747
  adapter: "replicate",
721
748
  providerModelId: "elevenlabs/music",
722
749
  lifecycle: "active",
723
- exposure: "internal",
750
+ exposure: [],
724
751
  constraints: {
725
752
  durations: { min: 5, max: 300 },
726
753
  supports: ["instrumental"]
@@ -743,7 +770,7 @@ var OTHER_MODELS = [
743
770
  adapter: "replicate",
744
771
  providerModelId: "topazlabs/image-upscale",
745
772
  lifecycle: "active",
746
- exposure: "catalog",
773
+ exposure: ["cowork", "space_builder"],
747
774
  constraints: {
748
775
  references: { images: 1 },
749
776
  requires: ["references"],
@@ -766,7 +793,7 @@ var OTHER_MODELS = [
766
793
  adapter: "prodia",
767
794
  providerModelId: "inference.remove-background.v1",
768
795
  lifecycle: "active",
769
- exposure: "catalog",
796
+ exposure: ["cowork", "space_builder"],
770
797
  constraints: {
771
798
  references: { images: 1 },
772
799
  requires: ["references"],
@@ -805,7 +832,7 @@ function text(id, label, providerModelId, extra) {
805
832
  adapter: "ai-sdk-text",
806
833
  providerModelId,
807
834
  lifecycle: "active",
808
- exposure: "internal",
835
+ exposure: [],
809
836
  constraints: { supports: [] },
810
837
  defaults: {},
811
838
  usage: { ...TEXT_USAGE },
@@ -824,7 +851,7 @@ var OPENAI_REASONING = { openai: { reasoningEffort: "medium", reasoningSummary:
824
851
  var DEEPSEEK_THINKING = { deepseek: { thinking: { type: "enabled" } } };
825
852
  var TEXT_MODELS = [
826
853
  text("gpt-4o", "GPT-4o", "gpt-4o", {
827
- exposure: "internal",
854
+ exposure: [],
828
855
  display: {
829
856
  provider: "openai",
830
857
  costTier: 2,
@@ -833,7 +860,7 @@ var TEXT_MODELS = [
833
860
  capabilities: { vision: true, contextWindow: 128e3 }
834
861
  }),
835
862
  text("gpt-4o-mini", "GPT-4o mini", "gpt-4o-mini", {
836
- exposure: "internal",
863
+ exposure: [],
837
864
  display: {
838
865
  provider: "openai",
839
866
  costTier: 1,
@@ -842,7 +869,7 @@ var TEXT_MODELS = [
842
869
  capabilities: { vision: true, contextWindow: 128e3 }
843
870
  }),
844
871
  text("gpt-5.1", "GPT-5.1", "gpt-5.1", {
845
- exposure: "catalog",
872
+ exposure: ["cowork", "space_builder"],
846
873
  display: {
847
874
  provider: "openai",
848
875
  costTier: 3,
@@ -851,7 +878,7 @@ var TEXT_MODELS = [
851
878
  capabilities: { vision: true, contextWindow: 4e5 }
852
879
  }),
853
880
  text("gpt-5.2", "GPT-5.2", "gpt-5.2", {
854
- exposure: "catalog",
881
+ exposure: ["cowork", "space_builder"],
855
882
  display: {
856
883
  provider: "openai",
857
884
  costTier: 3,
@@ -861,7 +888,7 @@ var TEXT_MODELS = [
861
888
  }),
862
889
  // 1.05M-token context: https://platform.openai.com/docs/models/gpt-5.4
863
890
  text("gpt-5.4", "GPT-5.4", "gpt-5.4", {
864
- exposure: "internal",
891
+ exposure: [],
865
892
  display: {
866
893
  provider: "openai",
867
894
  costTier: 3,
@@ -874,7 +901,7 @@ var TEXT_MODELS = [
874
901
  }),
875
902
  // OpenAI never shipped gpt-5.1-mini or gpt-5.2-mini; callers that still send them get 5.4 mini.
876
903
  text("gpt-5.4-mini", "GPT-5.4 mini", "gpt-5.4-mini", {
877
- exposure: "catalog",
904
+ exposure: ["cowork", "space_builder"],
878
905
  aliases: ["gpt-5.1-mini", "gpt-5.2-mini"],
879
906
  display: {
880
907
  provider: "openai",
@@ -884,7 +911,7 @@ var TEXT_MODELS = [
884
911
  capabilities: { vision: true, contextWindow: 4e5 }
885
912
  }),
886
913
  text("gpt-5.5", "GPT-5.5", "gpt-5.5", {
887
- exposure: "catalog",
914
+ exposure: ["cowork", "space_builder"],
888
915
  display: {
889
916
  provider: "openai",
890
917
  costTier: 3,
@@ -896,7 +923,7 @@ var TEXT_MODELS = [
896
923
  }
897
924
  }),
898
925
  text("gpt-5.6-luna", "GPT-5.6 Luna", "gpt-5.6-luna", {
899
- exposure: "catalog",
926
+ exposure: ["cowork", "space_builder"],
900
927
  display: {
901
928
  chat: { providerOptions: OPENAI_REASONING },
902
929
  provider: "openai",
@@ -910,7 +937,7 @@ var TEXT_MODELS = [
910
937
  }
911
938
  }),
912
939
  text("gpt-5.6-terra", "GPT-5.6 Terra", "gpt-5.6-terra", {
913
- exposure: "catalog",
940
+ exposure: ["cowork", "space_builder"],
914
941
  display: {
915
942
  chat: { providerOptions: OPENAI_REASONING },
916
943
  provider: "openai",
@@ -924,7 +951,7 @@ var TEXT_MODELS = [
924
951
  }
925
952
  }),
926
953
  text("gpt-5.6-sol", "GPT-5.6 Sol", "gpt-5.6-sol", {
927
- exposure: "catalog",
954
+ exposure: ["cowork", "space_builder"],
928
955
  display: {
929
956
  chat: { providerOptions: OPENAI_REASONING },
930
957
  provider: "openai",
@@ -939,7 +966,7 @@ var TEXT_MODELS = [
939
966
  }),
940
967
  // Library key "claude-sonnet-4.5" maps to the SDK id "claude-sonnet-4-5".
941
968
  text("claude-sonnet-4-5", "Claude Sonnet 4.5", "claude-sonnet-4-5", {
942
- exposure: "internal",
969
+ exposure: [],
943
970
  aliases: ["claude-sonnet-4.5", "claude-sonnet-4-5-20250929"],
944
971
  display: {
945
972
  provider: "anthropic",
@@ -950,7 +977,7 @@ var TEXT_MODELS = [
950
977
  }),
951
978
  // Anthropic retired the dated 4.0 ids; callers that still send them get 4.6.
952
979
  text("claude-sonnet-4-6", "Claude Sonnet 4.6", "claude-sonnet-4-6", {
953
- exposure: "catalog",
980
+ exposure: ["cowork", "space_builder"],
954
981
  aliases: [
955
982
  "claude-sonnet-4.6",
956
983
  "claude-sonnet-4",
@@ -970,7 +997,7 @@ var TEXT_MODELS = [
970
997
  }
971
998
  }),
972
999
  text("claude-sonnet-5", "Claude Sonnet 5", "claude-sonnet-5", {
973
- exposure: "catalog",
1000
+ exposure: ["cowork", "space_builder"],
974
1001
  display: {
975
1002
  chat: { providerOptions: ANTHROPIC_ADAPTIVE },
976
1003
  provider: "anthropic",
@@ -984,7 +1011,7 @@ var TEXT_MODELS = [
984
1011
  }
985
1012
  }),
986
1013
  text("claude-opus-4-8", "Claude Opus 4.8", "claude-opus-4-8", {
987
- exposure: "catalog",
1014
+ exposure: ["cowork", "space_builder"],
988
1015
  aliases: ["claude-opus-4.8", "claude-opus-4", "claude-opus-4.0", "claude-opus-4-20250514"],
989
1016
  display: {
990
1017
  chat: { providerOptions: ANTHROPIC_ADAPTIVE },
@@ -999,7 +1026,7 @@ var TEXT_MODELS = [
999
1026
  }
1000
1027
  }),
1001
1028
  text("claude-haiku-4-5", "Claude Haiku 4.5", "claude-haiku-4-5", {
1002
- exposure: "catalog",
1029
+ exposure: ["cowork", "space_builder"],
1003
1030
  aliases: ["claude-haiku-4.5", "claude-haiku-4-5-20251001", "claude-haiku-4"],
1004
1031
  display: {
1005
1032
  chat: { providerOptions: ANTHROPIC_THINKING },
@@ -1014,7 +1041,7 @@ var TEXT_MODELS = [
1014
1041
  }
1015
1042
  }),
1016
1043
  text("claude-opus-5", "Claude Opus 5", "claude-opus-5", {
1017
- exposure: "internal",
1044
+ exposure: [],
1018
1045
  aliases: ["claude-opus-5.0"],
1019
1046
  display: {
1020
1047
  provider: "anthropic",
@@ -1027,7 +1054,7 @@ var TEXT_MODELS = [
1027
1054
  }
1028
1055
  }),
1029
1056
  text("claude-fable-5", "Claude Fable 5", "claude-fable-5", {
1030
- exposure: "internal",
1057
+ exposure: [],
1031
1058
  display: {
1032
1059
  provider: "anthropic",
1033
1060
  costTier: 3,
@@ -1039,7 +1066,7 @@ var TEXT_MODELS = [
1039
1066
  }
1040
1067
  }),
1041
1068
  text("gemini-2.5-flash", "Gemini 2.5 Flash", "gemini-2.5-flash", {
1042
- exposure: "internal",
1069
+ exposure: [],
1043
1070
  display: {
1044
1071
  provider: "google",
1045
1072
  costTier: 1,
@@ -1051,7 +1078,7 @@ var TEXT_MODELS = [
1051
1078
  }
1052
1079
  }),
1053
1080
  text("gemini-2.5-pro", "Gemini 2.5 Pro", "gemini-2.5-pro", {
1054
- exposure: "internal",
1081
+ exposure: [],
1055
1082
  display: {
1056
1083
  provider: "google",
1057
1084
  costTier: 2,
@@ -1063,7 +1090,7 @@ var TEXT_MODELS = [
1063
1090
  }
1064
1091
  }),
1065
1092
  text("gemini-3.1-pro-preview", "Gemini 3.1 Pro (preview)", "gemini-3.1-pro-preview", {
1066
- exposure: "catalog",
1093
+ exposure: ["cowork", "space_builder"],
1067
1094
  display: {
1068
1095
  provider: "google",
1069
1096
  costTier: 2,
@@ -1075,7 +1102,7 @@ var TEXT_MODELS = [
1075
1102
  }
1076
1103
  }),
1077
1104
  text("gemini-3.5-flash", "Gemini 3.5 Flash", "gemini-3.5-flash", {
1078
- exposure: "catalog",
1105
+ exposure: ["cowork", "space_builder"],
1079
1106
  display: {
1080
1107
  provider: "google",
1081
1108
  costTier: 1,
@@ -1087,7 +1114,7 @@ var TEXT_MODELS = [
1087
1114
  }
1088
1115
  }),
1089
1116
  text("gemini-3.6-flash", "Gemini 3.6 Flash", "gemini-3.6-flash", {
1090
- exposure: "catalog",
1117
+ exposure: ["cowork", "space_builder"],
1091
1118
  display: {
1092
1119
  provider: "google",
1093
1120
  costTier: 1,
@@ -1099,7 +1126,7 @@ var TEXT_MODELS = [
1099
1126
  }
1100
1127
  }),
1101
1128
  text("gemini-3.7-flash", "Gemini 3.7 Flash", "gemini-3.7-flash", {
1102
- exposure: "catalog",
1129
+ exposure: ["cowork", "space_builder"],
1103
1130
  display: {
1104
1131
  provider: "google",
1105
1132
  costTier: 1,
@@ -1112,7 +1139,7 @@ var TEXT_MODELS = [
1112
1139
  }
1113
1140
  }),
1114
1141
  text("gemini-3.8-flash", "Gemini 3.8 Flash", "gemini-3.8-flash", {
1115
- exposure: "internal",
1142
+ exposure: [],
1116
1143
  display: {
1117
1144
  provider: "google",
1118
1145
  costTier: 1,
@@ -1125,12 +1152,12 @@ var TEXT_MODELS = [
1125
1152
  }),
1126
1153
  // Renamed to gemini-3.6-flash in vibe-shared model-migration.ts.
1127
1154
  text("gemini-3-flash-preview", "Gemini 3 Flash (preview)", "gemini-3-flash-preview", {
1128
- exposure: "internal",
1155
+ exposure: [],
1129
1156
  lifecycle: "deprecated",
1130
1157
  replacedBy: "gemini-3.6-flash"
1131
1158
  }),
1132
1159
  text("gemini-3.1-flash-lite", "Gemini 3.1 Flash Lite", "gemini-3.1-flash-lite", {
1133
- exposure: "internal",
1160
+ exposure: [],
1134
1161
  display: {
1135
1162
  provider: "google",
1136
1163
  costTier: 1,
@@ -1142,7 +1169,7 @@ var TEXT_MODELS = [
1142
1169
  }
1143
1170
  }),
1144
1171
  text("sonar", "Sonar", "sonar", {
1145
- exposure: "internal",
1172
+ exposure: [],
1146
1173
  display: {
1147
1174
  provider: "perplexity",
1148
1175
  costTier: 1,
@@ -1154,7 +1181,7 @@ var TEXT_MODELS = [
1154
1181
  }
1155
1182
  }),
1156
1183
  text("sonar-pro", "Sonar Pro", "sonar-pro", {
1157
- exposure: "internal",
1184
+ exposure: [],
1158
1185
  display: {
1159
1186
  provider: "perplexity",
1160
1187
  costTier: 2,
@@ -1166,7 +1193,7 @@ var TEXT_MODELS = [
1166
1193
  }
1167
1194
  }),
1168
1195
  text("sonar-reasoning-pro", "Sonar Reasoning Pro", "sonar-reasoning-pro", {
1169
- exposure: "internal",
1196
+ exposure: [],
1170
1197
  display: {
1171
1198
  provider: "perplexity",
1172
1199
  costTier: 2,
@@ -1182,7 +1209,7 @@ var TEXT_MODELS = [
1182
1209
  // stays an alias so stored selections keep resolving.
1183
1210
  text("deepseek-flash", "DeepSeek V4.1 Flash", "deepseek-flash", {
1184
1211
  aliases: ["deepseek-v4-flash"],
1185
- exposure: "catalog",
1212
+ exposure: ["cowork", "space_builder"],
1186
1213
  display: {
1187
1214
  chat: { providerOptions: DEEPSEEK_THINKING },
1188
1215
  provider: "deepseek",
@@ -1197,7 +1224,7 @@ var TEXT_MODELS = [
1197
1224
  }
1198
1225
  }),
1199
1226
  text("deepseek-v4-pro", "DeepSeek V4 Pro", "deepseek-v4-pro", {
1200
- exposure: "catalog",
1227
+ exposure: ["cowork", "space_builder"],
1201
1228
  display: {
1202
1229
  chat: { providerOptions: DEEPSEEK_THINKING },
1203
1230
  provider: "deepseek",
@@ -1212,7 +1239,7 @@ var TEXT_MODELS = [
1212
1239
  }),
1213
1240
  // 1M-token context: https://docs.x.ai/docs/models/grok-4.3
1214
1241
  text("grok-4.3", "Grok 4.3", "grok-4.3", {
1215
- exposure: "catalog",
1242
+ exposure: ["cowork", "space_builder"],
1216
1243
  display: {
1217
1244
  provider: "xai",
1218
1245
  costTier: 2,
@@ -1227,7 +1254,7 @@ var TEXT_MODELS = [
1227
1254
  text("kimi-k2.5", "Kimi K2.5", "kimi-k2.5", {
1228
1255
  lifecycle: "deprecated",
1229
1256
  replacedBy: "kimi-k3",
1230
- exposure: "internal",
1257
+ exposure: [],
1231
1258
  display: {
1232
1259
  chat: { temperature: 1 },
1233
1260
  provider: "moonshot",
@@ -1237,7 +1264,7 @@ var TEXT_MODELS = [
1237
1264
  capabilities: {}
1238
1265
  }),
1239
1266
  text("kimi-k3", "Kimi K3", "kimi-k3", {
1240
- exposure: "catalog",
1267
+ exposure: ["cowork", "space_builder"],
1241
1268
  display: {
1242
1269
  chat: { temperature: 1 },
1243
1270
  provider: "moonshot",
@@ -1253,7 +1280,7 @@ var TEXT_MODELS = [
1253
1280
  // Cowork calls the provider "MiniMax-M3"; the pricing key is lowercase.
1254
1281
  // 1M-token context: https://platform.minimax.io/docs/api-reference/text-openai-api
1255
1282
  text("minimax-m3", "MiniMax M3", "MiniMax-M3", {
1256
- exposure: "catalog",
1283
+ exposure: ["cowork", "space_builder"],
1257
1284
  aliases: ["MiniMax-M3"],
1258
1285
  display: {
1259
1286
  provider: "minimax",
@@ -1290,7 +1317,7 @@ var VIDEO_MODELS = [
1290
1317
  adapter: "google-genai",
1291
1318
  providerModelId: "veo-3.1-generate-preview",
1292
1319
  lifecycle: "active",
1293
- exposure: "catalog",
1320
+ exposure: ["cowork", "space_builder"],
1294
1321
  constraints: {
1295
1322
  aspectRatios: [...OMNI_RATIOS],
1296
1323
  resolutions: ["720p", "1080p", "4k"],
@@ -1320,7 +1347,7 @@ var VIDEO_MODELS = [
1320
1347
  adapter: "google-genai",
1321
1348
  providerModelId: "veo-3.1-fast-generate-preview",
1322
1349
  lifecycle: "active",
1323
- exposure: "internal",
1350
+ exposure: [],
1324
1351
  constraints: {
1325
1352
  aspectRatios: [...OMNI_RATIOS],
1326
1353
  resolutions: ["720p", "1080p", "4k"],
@@ -1349,7 +1376,7 @@ var VIDEO_MODELS = [
1349
1376
  adapter: "google-genai",
1350
1377
  providerModelId: "veo-3.1-lite-generate-preview",
1351
1378
  lifecycle: "active",
1352
- exposure: "internal",
1379
+ exposure: [],
1353
1380
  constraints: {
1354
1381
  aspectRatios: [...OMNI_RATIOS],
1355
1382
  resolutions: ["720p", "1080p"],
@@ -1379,7 +1406,7 @@ var VIDEO_MODELS = [
1379
1406
  adapter: "google-genai",
1380
1407
  providerModelId: "gemini-omni-flash-preview",
1381
1408
  lifecycle: "active",
1382
- exposure: "catalog",
1409
+ exposure: ["cowork", "space_builder"],
1383
1410
  constraints: {
1384
1411
  // 1.0 rejects `resolution`; it renders 720p. No defaults: the adapter
1385
1412
  // sends ratio and duration only when the caller set them, so a
@@ -1407,7 +1434,7 @@ var VIDEO_MODELS = [
1407
1434
  adapter: "google-genai",
1408
1435
  providerModelId: "gemini-omni-1.1-flash",
1409
1436
  lifecycle: "active",
1410
- exposure: "catalog",
1437
+ exposure: ["cowork", "space_builder"],
1411
1438
  constraints: {
1412
1439
  aspectRatios: [...OMNI_RATIOS],
1413
1440
  resolutions: ["360p", "720p", "1080p", "4k"],
@@ -1434,7 +1461,7 @@ var VIDEO_MODELS = [
1434
1461
  adapter: "ark",
1435
1462
  providerModelId: "dreamina-seedance-2-0-260128",
1436
1463
  lifecycle: "active",
1437
- exposure: "catalog",
1464
+ exposure: ["cowork", "space_builder"],
1438
1465
  constraints: {
1439
1466
  aspectRatios: [...SEEDANCE_RATIOS],
1440
1467
  resolutions: ["480p", "720p", "1080p", "4k"],
@@ -1467,7 +1494,7 @@ var VIDEO_MODELS = [
1467
1494
  adapter: "ark",
1468
1495
  providerModelId: "dreamina-seedance-2-0-fast-260128",
1469
1496
  lifecycle: "active",
1470
- exposure: "catalog",
1497
+ exposure: ["cowork", "space_builder"],
1471
1498
  constraints: {
1472
1499
  aspectRatios: [...SEEDANCE_RATIOS],
1473
1500
  resolutions: ["480p", "720p"],
@@ -1500,7 +1527,7 @@ var VIDEO_MODELS = [
1500
1527
  adapter: "ark",
1501
1528
  providerModelId: "dreamina-seedance-2-5-260628",
1502
1529
  lifecycle: "active",
1503
- exposure: "catalog",
1530
+ exposure: ["cowork", "space_builder"],
1504
1531
  constraints: {
1505
1532
  aspectRatios: [...SEEDANCE_RATIOS],
1506
1533
  resolutions: ["480p", "720p", "1080p"],
@@ -1533,7 +1560,7 @@ var VIDEO_MODELS = [
1533
1560
  adapter: "xai-video",
1534
1561
  providerModelId: "grok-imagine-video",
1535
1562
  lifecycle: "active",
1536
- exposure: "catalog",
1563
+ exposure: ["cowork", "space_builder"],
1537
1564
  constraints: {
1538
1565
  aspectRatios: [...GROK_RATIOS],
1539
1566
  resolutions: ["480p", "720p"],
@@ -1561,7 +1588,7 @@ var VIDEO_MODELS = [
1561
1588
  adapter: "higgsfield",
1562
1589
  providerModelId: "kling-video/v2.5-turbo/pro/image-to-video",
1563
1590
  lifecycle: "active",
1564
- exposure: "catalog",
1591
+ exposure: ["cowork", "space_builder"],
1565
1592
  constraints: {
1566
1593
  aspectRatios: [...KLING_RATIOS],
1567
1594
  durations: [5, 10],
@@ -1592,7 +1619,7 @@ var VIDEO_MODELS = [
1592
1619
  adapter: "higgsfield",
1593
1620
  providerModelId: "kling-video/v3.0/pro/image-to-video",
1594
1621
  lifecycle: "active",
1595
- exposure: "catalog",
1622
+ exposure: ["cowork", "space_builder"],
1596
1623
  constraints: {
1597
1624
  aspectRatios: [...KLING_RATIOS],
1598
1625
  durations: { min: 3, max: 15 },
@@ -1623,7 +1650,7 @@ var VIDEO_MODELS = [
1623
1650
  adapter: "replicate",
1624
1651
  providerModelId: "kwaivgi/kling-v3-omni-video",
1625
1652
  lifecycle: "active",
1626
- exposure: "catalog",
1653
+ exposure: ["cowork", "space_builder"],
1627
1654
  constraints: {
1628
1655
  aspectRatios: [...KLING_RATIOS],
1629
1656
  resolutions: ["720p", "1080p"],
@@ -1649,7 +1676,7 @@ var VIDEO_MODELS = [
1649
1676
  adapter: "fal",
1650
1677
  providerModelId: "minimax/h3",
1651
1678
  lifecycle: "active",
1652
- exposure: "catalog",
1679
+ exposure: ["cowork", "space_builder"],
1653
1680
  constraints: {
1654
1681
  aspectRatios: [...H3_RATIOS],
1655
1682
  resolutions: ["480p", "768p", "2k", "4k"],
@@ -1679,7 +1706,7 @@ var VIDEO_MODELS = [
1679
1706
  adapter: "fal",
1680
1707
  providerModelId: "minimax/h3-max",
1681
1708
  lifecycle: "active",
1682
- exposure: "catalog",
1709
+ exposure: ["cowork", "space_builder"],
1683
1710
  constraints: {
1684
1711
  aspectRatios: [...H3_RATIOS],
1685
1712
  resolutions: ["480p", "768p"],
@@ -1709,7 +1736,7 @@ var VIDEO_MODELS = [
1709
1736
  adapter: "fal",
1710
1737
  providerModelId: "minimax/h3/reference-to-video",
1711
1738
  lifecycle: "active",
1712
- exposure: "catalog",
1739
+ exposure: ["cowork", "space_builder"],
1713
1740
  constraints: {
1714
1741
  aspectRatios: [...H3_REFERENCE_RATIOS],
1715
1742
  resolutions: ["480p", "768p", "2k", "4k"],
@@ -1740,7 +1767,7 @@ var VIDEO_MODELS = [
1740
1767
  adapter: "fal",
1741
1768
  providerModelId: "minimax/h3-max/reference-to-video",
1742
1769
  lifecycle: "active",
1743
- exposure: "catalog",
1770
+ exposure: ["cowork", "space_builder"],
1744
1771
  constraints: {
1745
1772
  aspectRatios: [...H3_REFERENCE_RATIOS],
1746
1773
  resolutions: ["480p", "768p"],
@@ -1772,7 +1799,7 @@ var VIDEO_MODELS = [
1772
1799
  adapter: "fal",
1773
1800
  providerModelId: "fal-ai/kling-video/o1/video-to-video/reference",
1774
1801
  lifecycle: "active",
1775
- exposure: "internal",
1802
+ exposure: [],
1776
1803
  constraints: {
1777
1804
  aspectRatios: [...KLING_RATIOS],
1778
1805
  durations: { min: 3, max: 10 },
@@ -1797,7 +1824,7 @@ var VIDEO_MODELS = [
1797
1824
  adapter: "replicate",
1798
1825
  providerModelId: "minimax/hailuo-02",
1799
1826
  lifecycle: "active",
1800
- exposure: "internal",
1827
+ exposure: [],
1801
1828
  constraints: {
1802
1829
  resolutions: ["768p"],
1803
1830
  durations: [6, 10],
@@ -1821,7 +1848,7 @@ var VIDEO_MODELS = [
1821
1848
  adapter: "higgsfield",
1822
1849
  providerModelId: "dop-preview",
1823
1850
  lifecycle: "active",
1824
- exposure: "internal",
1851
+ exposure: [],
1825
1852
  constraints: {
1826
1853
  requires: ["firstFrame"],
1827
1854
  supports: ["seed", "lastFrame"]
@@ -1861,6 +1888,12 @@ var ADAPTER_IDS = [
1861
1888
  ];
1862
1889
  var ModelTypeSchema = import_zod.z.enum(["text", "image", "video", "audio", "upscale", "bg-remove"]);
1863
1890
  var LifecycleSchema = import_zod.z.enum(["active", "deprecated", "retired"]);
1891
+ var SurfaceSchema = import_zod.z.enum(["cowork", "space_builder"]);
1892
+ var SURFACES2 = SurfaceSchema.options;
1893
+ var ExposureSchema = import_zod.z.preprocess(
1894
+ normalizeExposure,
1895
+ import_zod.z.array(SurfaceSchema)
1896
+ );
1864
1897
  var AdapterSchema = import_zod.z.enum(ADAPTER_IDS);
1865
1898
  var AspectRatioSchema = import_zod.z.enum([
1866
1899
  "1:1",
@@ -2012,7 +2045,7 @@ var CatalogModelSchemaBase = import_zod.z.looseObject({
2012
2045
  providerModelId: import_zod.z.string().min(1),
2013
2046
  lifecycle: LifecycleSchema,
2014
2047
  replacedBy: import_zod.z.string().optional(),
2015
- exposure: import_zod.z.enum(["catalog", "internal"]),
2048
+ exposure: ExposureSchema,
2016
2049
  constraints: ModelConstraintsSchema,
2017
2050
  defaults: DefaultsSchema,
2018
2051
  providerOptions: ProviderOptionsSchema.optional(),