@shop-os/modelkit 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -222,6 +222,15 @@ interface CatalogDisplay {
222
222
  * after the ordered ones. Set it to surface a new model at the top.
223
223
  */
224
224
  sortOrder?: number;
225
+ /**
226
+ * Chat-surface stream tuning for text rows. Display data only: the kit never
227
+ * merges it into a call (row `providerOptions` is merged into every consumer's
228
+ * calls, which is why this lives here instead).
229
+ */
230
+ chat?: {
231
+ providerOptions?: ProviderOptions;
232
+ temperature?: number;
233
+ };
225
234
  }
226
235
  /** Capability flags a UI keys off. Absent means false / unknown. */
227
236
  interface CatalogCapabilities {
@@ -257,10 +266,8 @@ interface CatalogModel {
257
266
  */
258
267
  exposure: "catalog" | "internal";
259
268
  constraints: ModelConstraints;
260
- defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt"> & {
261
- temperature?: number;
262
- }>;
263
- /** Provider options merged under the caller's; text rows carry their reasoning / thinking tuning here. */
269
+ defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt">>;
270
+ /** Provider options merged under the caller's on every call. Chat-only tuning belongs in display.chat. */
264
271
  providerOptions?: ProviderOptions;
265
272
  /**
266
273
  * `slug` and `providerLabel` keep an app's historic usage-event names for a
package/dist/catalog.d.ts CHANGED
@@ -222,6 +222,15 @@ interface CatalogDisplay {
222
222
  * after the ordered ones. Set it to surface a new model at the top.
223
223
  */
224
224
  sortOrder?: number;
225
+ /**
226
+ * Chat-surface stream tuning for text rows. Display data only: the kit never
227
+ * merges it into a call (row `providerOptions` is merged into every consumer's
228
+ * calls, which is why this lives here instead).
229
+ */
230
+ chat?: {
231
+ providerOptions?: ProviderOptions;
232
+ temperature?: number;
233
+ };
225
234
  }
226
235
  /** Capability flags a UI keys off. Absent means false / unknown. */
227
236
  interface CatalogCapabilities {
@@ -257,10 +266,8 @@ interface CatalogModel {
257
266
  */
258
267
  exposure: "catalog" | "internal";
259
268
  constraints: ModelConstraints;
260
- defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt"> & {
261
- temperature?: number;
262
- }>;
263
- /** Provider options merged under the caller's; text rows carry their reasoning / thinking tuning here. */
269
+ defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt">>;
270
+ /** Provider options merged under the caller's on every call. Chat-only tuning belongs in display.chat. */
264
271
  providerOptions?: ProviderOptions;
265
272
  /**
266
273
  * `slug` and `providerLabel` keep an app's historic usage-event names for a
package/dist/catalog.js CHANGED
@@ -351,6 +351,7 @@ var IMAGE_MODELS = [
351
351
  pricingKind: "image_size",
352
352
  display: {
353
353
  provider: "bytedance",
354
+ logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png",
354
355
  description: "ByteDance Seedream 5.0 Pro text-to-image and multi-reference image-to-image (up to 10 inputs) with region editing; outputs 1K, 1.5K, or 2K."
355
356
  },
356
357
  capabilities: { ...IMAGE_GENERATE_EDIT }
@@ -556,6 +557,7 @@ var IMAGE_MODELS = [
556
557
  ];
557
558
 
558
559
  // src/catalog/other.ts
560
+ var GOOGLE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png";
559
561
  var OTHER_MODELS = [
560
562
  {
561
563
  id: "lyria-3-clip-preview",
@@ -576,6 +578,7 @@ var OTHER_MODELS = [
576
578
  pricingKind: "flat",
577
579
  display: {
578
580
  provider: "google",
581
+ logo: GOOGLE_LOGO,
579
582
  description: "Google Lyria 3 Clip short music clips, loops, and previews; takes text and up to 10 image prompts and returns a fixed 30-second MP3 plus lyrics."
580
583
  },
581
584
  capabilities: {}
@@ -598,6 +601,7 @@ var OTHER_MODELS = [
598
601
  pricingKind: "flat",
599
602
  display: {
600
603
  provider: "google",
604
+ logo: GOOGLE_LOGO,
601
605
  description: "Google Lyria 3 Pro flagship music model for full-length songs with verses, choruses, and bridges; takes text and up to 10 image prompts and returns MP3 plus lyrics."
602
606
  },
603
607
  capabilities: {}
@@ -823,9 +827,9 @@ var TEXT_MODELS = [
823
827
  }
824
828
  }),
825
829
  text("gpt-5.6-luna", "GPT-5.6 Luna", "gpt-5.6-luna", {
826
- providerOptions: OPENAI_REASONING,
827
830
  exposure: "catalog",
828
831
  display: {
832
+ chat: { providerOptions: OPENAI_REASONING },
829
833
  provider: "openai",
830
834
  costTier: 1,
831
835
  description: "OpenAI GPT-5.6 Luna cost-optimized tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
@@ -839,9 +843,9 @@ var TEXT_MODELS = [
839
843
  }
840
844
  }),
841
845
  text("gpt-5.6-terra", "GPT-5.6 Terra", "gpt-5.6-terra", {
842
- providerOptions: OPENAI_REASONING,
843
846
  exposure: "catalog",
844
847
  display: {
848
+ chat: { providerOptions: OPENAI_REASONING },
845
849
  provider: "openai",
846
850
  costTier: 2,
847
851
  description: "OpenAI GPT-5.6 Terra balanced tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
@@ -855,9 +859,9 @@ var TEXT_MODELS = [
855
859
  }
856
860
  }),
857
861
  text("gpt-5.6-sol", "GPT-5.6 Sol", "gpt-5.6-sol", {
858
- providerOptions: OPENAI_REASONING,
859
862
  exposure: "catalog",
860
863
  display: {
864
+ chat: { providerOptions: OPENAI_REASONING },
861
865
  provider: "openai",
862
866
  costTier: 3,
863
867
  description: "OpenAI GPT-5.6 Sol flagship tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
@@ -883,7 +887,6 @@ var TEXT_MODELS = [
883
887
  }),
884
888
  // Anthropic retired the dated 4.0 ids; callers that still send them get 4.6.
885
889
  text("claude-sonnet-4-6", "Claude Sonnet 4.6", "claude-sonnet-4-6", {
886
- providerOptions: ANTHROPIC_THINKING,
887
890
  exposure: "catalog",
888
891
  aliases: [
889
892
  "claude-sonnet-4.6",
@@ -892,6 +895,7 @@ var TEXT_MODELS = [
892
895
  "claude-sonnet-4-20250514"
893
896
  ],
894
897
  display: {
898
+ chat: { providerOptions: ANTHROPIC_THINKING },
895
899
  provider: "anthropic",
896
900
  costTier: 2,
897
901
  description: "Anthropic Claude Sonnet 4.6 (legacy) balanced model; text and image input, 1M-token context."
@@ -905,9 +909,9 @@ var TEXT_MODELS = [
905
909
  }
906
910
  }),
907
911
  text("claude-sonnet-5", "Claude Sonnet 5", "claude-sonnet-5", {
908
- providerOptions: ANTHROPIC_ADAPTIVE,
909
912
  exposure: "catalog",
910
913
  display: {
914
+ chat: { providerOptions: ANTHROPIC_ADAPTIVE },
911
915
  provider: "anthropic",
912
916
  costTier: 3,
913
917
  description: "Anthropic Claude Sonnet 5 current balanced model; text and image input, 1M-token context."
@@ -921,10 +925,10 @@ var TEXT_MODELS = [
921
925
  }
922
926
  }),
923
927
  text("claude-opus-4-8", "Claude Opus 4.8", "claude-opus-4-8", {
924
- providerOptions: ANTHROPIC_ADAPTIVE,
925
928
  exposure: "catalog",
926
929
  aliases: ["claude-opus-4.8", "claude-opus-4", "claude-opus-4.0", "claude-opus-4-20250514"],
927
930
  display: {
931
+ chat: { providerOptions: ANTHROPIC_ADAPTIVE },
928
932
  provider: "anthropic",
929
933
  costTier: 3,
930
934
  description: "Anthropic Claude Opus 4.8 (legacy) frontier model; text and image input, 1M-token context."
@@ -938,10 +942,10 @@ var TEXT_MODELS = [
938
942
  }
939
943
  }),
940
944
  text("claude-haiku-4-5", "Claude Haiku 4.5", "claude-haiku-4-5", {
941
- providerOptions: ANTHROPIC_THINKING,
942
945
  exposure: "catalog",
943
946
  aliases: ["claude-haiku-4.5", "claude-haiku-4-5-20251001", "claude-haiku-4"],
944
947
  display: {
948
+ chat: { providerOptions: ANTHROPIC_THINKING },
945
949
  provider: "anthropic",
946
950
  costTier: 1,
947
951
  description: "Anthropic Claude Haiku 4.5 fast model with near-frontier intelligence; text and image input, 200K-token context."
@@ -1148,10 +1152,10 @@ var TEXT_MODELS = [
1148
1152
  // Flash rates (https://api-docs.deepseek.com/news/news260910/); the old id
1149
1153
  // stays an alias so stored selections keep resolving.
1150
1154
  text("deepseek-flash", "DeepSeek V4.1 Flash", "deepseek-flash", {
1151
- providerOptions: DEEPSEEK_THINKING,
1152
1155
  aliases: ["deepseek-v4-flash"],
1153
1156
  exposure: "catalog",
1154
1157
  display: {
1158
+ chat: { providerOptions: DEEPSEEK_THINKING },
1155
1159
  provider: "deepseek",
1156
1160
  costTier: 1,
1157
1161
  recommended: true,
@@ -1166,9 +1170,9 @@ var TEXT_MODELS = [
1166
1170
  }
1167
1171
  }),
1168
1172
  text("deepseek-v4-pro", "DeepSeek V4 Pro", "deepseek-v4-pro", {
1169
- providerOptions: DEEPSEEK_THINKING,
1170
1173
  exposure: "catalog",
1171
1174
  display: {
1175
+ chat: { providerOptions: DEEPSEEK_THINKING },
1172
1176
  provider: "deepseek",
1173
1177
  costTier: 2,
1174
1178
  description: "DeepSeek V4 Pro thinking/non-thinking text model with tool calls and JSON output (no vision); 1M-token context and up to 384K output tokens."
@@ -1198,9 +1202,9 @@ var TEXT_MODELS = [
1198
1202
  }),
1199
1203
  // Moonshot retired kimi-k2.5 on 2026-08-31 and no longer publishes its specs.
1200
1204
  text("kimi-k2.5", "Kimi K2.5", "kimi-k2.5", {
1201
- defaults: { temperature: 1 },
1202
1205
  exposure: "catalog",
1203
1206
  display: {
1207
+ chat: { temperature: 1 },
1204
1208
  provider: "moonshot",
1205
1209
  costTier: 2,
1206
1210
  description: "Moonshot Kimi K2.5; the provider retired the model on 2026-08-31 and calls now return a model-not-found error."
@@ -1208,9 +1212,9 @@ var TEXT_MODELS = [
1208
1212
  capabilities: {}
1209
1213
  }),
1210
1214
  text("kimi-k3", "Kimi K3", "kimi-k3", {
1211
- defaults: { temperature: 1 },
1212
1215
  exposure: "catalog",
1213
1216
  display: {
1217
+ chat: { temperature: 1 },
1214
1218
  provider: "moonshot",
1215
1219
  costTier: 2,
1216
1220
  description: "Moonshot Kimi K3 flagship model with native visual understanding and always-on thinking; text, image, and video input, 1M-token context."
@@ -1247,7 +1251,8 @@ var H3_RATIOS = ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"];
1247
1251
  var H3_REFERENCE_RATIOS = ["adaptive", ...H3_RATIOS];
1248
1252
  var NEGATIVE_PROMPT = "blur, distort, and low quality";
1249
1253
  var FRAMES_EXCLUDE_REFERENCES = { framesExcludeReferences: true };
1250
- var GOOGLE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png";
1254
+ var BYTEDANCE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png";
1255
+ var GOOGLE_LOGO2 = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png";
1251
1256
  var VIDEO_MODELS = [
1252
1257
  {
1253
1258
  id: "veo-3.1",
@@ -1276,7 +1281,7 @@ var VIDEO_MODELS = [
1276
1281
  display: {
1277
1282
  provider: "google",
1278
1283
  description: "Google's highest-quality video generation model. Supports up to 4K resolution and 8-second clips with reference image conditioning.",
1279
- logo: GOOGLE_LOGO
1284
+ logo: GOOGLE_LOGO2
1280
1285
  },
1281
1286
  capabilities: { ...FRAMES_EXCLUDE_REFERENCES }
1282
1287
  },
@@ -1368,7 +1373,7 @@ var VIDEO_MODELS = [
1368
1373
  display: {
1369
1374
  provider: "google",
1370
1375
  description: "Google's conversational video model with native audio, human support, and natural language editing. Aspect ratio only \u2014 resolution and duration are model-determined.",
1371
- logo: GOOGLE_LOGO
1376
+ logo: GOOGLE_LOGO2
1372
1377
  },
1373
1378
  capabilities: { acceptsSourceVideo: true }
1374
1379
  },
@@ -1393,6 +1398,7 @@ var VIDEO_MODELS = [
1393
1398
  pricingKind: "video_per_second",
1394
1399
  display: {
1395
1400
  provider: "google",
1401
+ logo: GOOGLE_LOGO2,
1396
1402
  description: "Google Gemini Omni Flash 1.1 conversational video generation and editing; text, image, and up to 10-second video input, 3-10 second output at up to 4K and 24 FPS."
1397
1403
  },
1398
1404
  capabilities: { acceptsSourceVideo: true }
@@ -1427,7 +1433,7 @@ var VIDEO_MODELS = [
1427
1433
  display: {
1428
1434
  provider: "bytedance",
1429
1435
  description: "High-quality AI video generation with reference image conditioning. Supports 4-15 second clips with human preprocessing.",
1430
- logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png"
1436
+ logo: BYTEDANCE_LOGO
1431
1437
  },
1432
1438
  capabilities: { acceptsSourceVideo: true, ...FRAMES_EXCLUDE_REFERENCES }
1433
1439
  },
@@ -1458,6 +1464,7 @@ var VIDEO_MODELS = [
1458
1464
  pricingKind: "video_per_second",
1459
1465
  display: {
1460
1466
  provider: "bytedance",
1467
+ logo: BYTEDANCE_LOGO,
1461
1468
  description: "Speed- and cost-optimized ByteDance Seedance 2.0 Fast; text plus image, video, and audio references to generate or edit 4-15 second clips."
1462
1469
  },
1463
1470
  capabilities: { acceptsSourceVideo: true, ...FRAMES_EXCLUDE_REFERENCES }
@@ -1490,6 +1497,7 @@ var VIDEO_MODELS = [
1490
1497
  pricingKind: "video_per_second",
1491
1498
  display: {
1492
1499
  provider: "bytedance",
1500
+ logo: BYTEDANCE_LOGO,
1493
1501
  description: "ByteDance Seedance 2.5 for long-form storytelling and omni-reference generation/editing; up to 50 reference assets and 4-30 second clips at up to 1080p."
1494
1502
  },
1495
1503
  capabilities: { acceptsSourceVideo: true, ...FRAMES_EXCLUDE_REFERENCES }
@@ -1514,7 +1522,7 @@ var VIDEO_MODELS = [
1514
1522
  },
1515
1523
  // No resolution default: xAI picks its own unless the caller asks.
1516
1524
  defaults: { durationSeconds: 8, aspectRatio: "16:9" },
1517
- usage: { unit: "reported_cost_usd", modality: "VIDEO" },
1525
+ usage: { unit: "reported_cost_usd", modality: "VIDEO", slug: "grok" },
1518
1526
  pricingKind: "video_per_second",
1519
1527
  display: {
1520
1528
  provider: "xai",
@@ -1544,7 +1552,7 @@ var VIDEO_MODELS = [
1544
1552
  cfgScale: 0.5,
1545
1553
  negativePrompt: NEGATIVE_PROMPT
1546
1554
  },
1547
- usage: { ...VIDEO_USAGE, slug: "grok" },
1555
+ usage: { ...VIDEO_USAGE },
1548
1556
  pricingKind: "video_per_second",
1549
1557
  display: {
1550
1558
  provider: "kuaishou",