@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.
package/dist/index.d.cts CHANGED
@@ -226,6 +226,15 @@ interface CatalogDisplay {
226
226
  * after the ordered ones. Set it to surface a new model at the top.
227
227
  */
228
228
  sortOrder?: number;
229
+ /**
230
+ * Chat-surface stream tuning for text rows. Display data only: the kit never
231
+ * merges it into a call (row `providerOptions` is merged into every consumer's
232
+ * calls, which is why this lives here instead).
233
+ */
234
+ chat?: {
235
+ providerOptions?: ProviderOptions;
236
+ temperature?: number;
237
+ };
229
238
  }
230
239
  /** Capability flags a UI keys off. Absent means false / unknown. */
231
240
  interface CatalogCapabilities {
@@ -261,10 +270,8 @@ interface CatalogModel {
261
270
  */
262
271
  exposure: "catalog" | "internal";
263
272
  constraints: ModelConstraints;
264
- defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt"> & {
265
- temperature?: number;
266
- }>;
267
- /** Provider options merged under the caller's; text rows carry their reasoning / thinking tuning here. */
273
+ defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt">>;
274
+ /** Provider options merged under the caller's on every call. Chat-only tuning belongs in display.chat. */
268
275
  providerOptions?: ProviderOptions;
269
276
  /**
270
277
  * `slug` and `providerLabel` keep an app's historic usage-event names for a
package/dist/index.d.ts CHANGED
@@ -226,6 +226,15 @@ interface CatalogDisplay {
226
226
  * after the ordered ones. Set it to surface a new model at the top.
227
227
  */
228
228
  sortOrder?: number;
229
+ /**
230
+ * Chat-surface stream tuning for text rows. Display data only: the kit never
231
+ * merges it into a call (row `providerOptions` is merged into every consumer's
232
+ * calls, which is why this lives here instead).
233
+ */
234
+ chat?: {
235
+ providerOptions?: ProviderOptions;
236
+ temperature?: number;
237
+ };
229
238
  }
230
239
  /** Capability flags a UI keys off. Absent means false / unknown. */
231
240
  interface CatalogCapabilities {
@@ -261,10 +270,8 @@ interface CatalogModel {
261
270
  */
262
271
  exposure: "catalog" | "internal";
263
272
  constraints: ModelConstraints;
264
- defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt"> & {
265
- temperature?: number;
266
- }>;
267
- /** Provider options merged under the caller's; text rows carry their reasoning / thinking tuning here. */
273
+ defaults: Partial<Omit<ImageRequest, "model" | "prompt"> & Omit<VideoRequest, "model" | "prompt"> & Omit<AudioRequest, "model" | "prompt">>;
274
+ /** Provider options merged under the caller's on every call. Chat-only tuning belongs in display.chat. */
268
275
  providerOptions?: ProviderOptions;
269
276
  /**
270
277
  * `slug` and `providerLabel` keep an app's historic usage-event names for a
package/dist/index.js CHANGED
@@ -354,6 +354,7 @@ var IMAGE_MODELS = [
354
354
  pricingKind: "image_size",
355
355
  display: {
356
356
  provider: "bytedance",
357
+ logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png",
357
358
  description: "ByteDance Seedream 5.0 Pro text-to-image and multi-reference image-to-image (up to 10 inputs) with region editing; outputs 1K, 1.5K, or 2K."
358
359
  },
359
360
  capabilities: { ...IMAGE_GENERATE_EDIT }
@@ -559,6 +560,7 @@ var IMAGE_MODELS = [
559
560
  ];
560
561
 
561
562
  // src/catalog/other.ts
563
+ var GOOGLE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png";
562
564
  var OTHER_MODELS = [
563
565
  {
564
566
  id: "lyria-3-clip-preview",
@@ -579,6 +581,7 @@ var OTHER_MODELS = [
579
581
  pricingKind: "flat",
580
582
  display: {
581
583
  provider: "google",
584
+ logo: GOOGLE_LOGO,
582
585
  description: "Google Lyria 3 Clip short music clips, loops, and previews; takes text and up to 10 image prompts and returns a fixed 30-second MP3 plus lyrics."
583
586
  },
584
587
  capabilities: {}
@@ -601,6 +604,7 @@ var OTHER_MODELS = [
601
604
  pricingKind: "flat",
602
605
  display: {
603
606
  provider: "google",
607
+ logo: GOOGLE_LOGO,
604
608
  description: "Google Lyria 3 Pro flagship music model for full-length songs with verses, choruses, and bridges; takes text and up to 10 image prompts and returns MP3 plus lyrics."
605
609
  },
606
610
  capabilities: {}
@@ -826,9 +830,9 @@ var TEXT_MODELS = [
826
830
  }
827
831
  }),
828
832
  text("gpt-5.6-luna", "GPT-5.6 Luna", "gpt-5.6-luna", {
829
- providerOptions: OPENAI_REASONING,
830
833
  exposure: "catalog",
831
834
  display: {
835
+ chat: { providerOptions: OPENAI_REASONING },
832
836
  provider: "openai",
833
837
  costTier: 1,
834
838
  description: "OpenAI GPT-5.6 Luna cost-optimized tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
@@ -842,9 +846,9 @@ var TEXT_MODELS = [
842
846
  }
843
847
  }),
844
848
  text("gpt-5.6-terra", "GPT-5.6 Terra", "gpt-5.6-terra", {
845
- providerOptions: OPENAI_REASONING,
846
849
  exposure: "catalog",
847
850
  display: {
851
+ chat: { providerOptions: OPENAI_REASONING },
848
852
  provider: "openai",
849
853
  costTier: 2,
850
854
  description: "OpenAI GPT-5.6 Terra balanced tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
@@ -858,9 +862,9 @@ var TEXT_MODELS = [
858
862
  }
859
863
  }),
860
864
  text("gpt-5.6-sol", "GPT-5.6 Sol", "gpt-5.6-sol", {
861
- providerOptions: OPENAI_REASONING,
862
865
  exposure: "catalog",
863
866
  display: {
867
+ chat: { providerOptions: OPENAI_REASONING },
864
868
  provider: "openai",
865
869
  costTier: 3,
866
870
  description: "OpenAI GPT-5.6 Sol flagship tier of the GPT-5.6 reasoning family; text and image input, 1.05M-token context."
@@ -886,7 +890,6 @@ var TEXT_MODELS = [
886
890
  }),
887
891
  // Anthropic retired the dated 4.0 ids; callers that still send them get 4.6.
888
892
  text("claude-sonnet-4-6", "Claude Sonnet 4.6", "claude-sonnet-4-6", {
889
- providerOptions: ANTHROPIC_THINKING,
890
893
  exposure: "catalog",
891
894
  aliases: [
892
895
  "claude-sonnet-4.6",
@@ -895,6 +898,7 @@ var TEXT_MODELS = [
895
898
  "claude-sonnet-4-20250514"
896
899
  ],
897
900
  display: {
901
+ chat: { providerOptions: ANTHROPIC_THINKING },
898
902
  provider: "anthropic",
899
903
  costTier: 2,
900
904
  description: "Anthropic Claude Sonnet 4.6 (legacy) balanced model; text and image input, 1M-token context."
@@ -908,9 +912,9 @@ var TEXT_MODELS = [
908
912
  }
909
913
  }),
910
914
  text("claude-sonnet-5", "Claude Sonnet 5", "claude-sonnet-5", {
911
- providerOptions: ANTHROPIC_ADAPTIVE,
912
915
  exposure: "catalog",
913
916
  display: {
917
+ chat: { providerOptions: ANTHROPIC_ADAPTIVE },
914
918
  provider: "anthropic",
915
919
  costTier: 3,
916
920
  description: "Anthropic Claude Sonnet 5 current balanced model; text and image input, 1M-token context."
@@ -924,10 +928,10 @@ var TEXT_MODELS = [
924
928
  }
925
929
  }),
926
930
  text("claude-opus-4-8", "Claude Opus 4.8", "claude-opus-4-8", {
927
- providerOptions: ANTHROPIC_ADAPTIVE,
928
931
  exposure: "catalog",
929
932
  aliases: ["claude-opus-4.8", "claude-opus-4", "claude-opus-4.0", "claude-opus-4-20250514"],
930
933
  display: {
934
+ chat: { providerOptions: ANTHROPIC_ADAPTIVE },
931
935
  provider: "anthropic",
932
936
  costTier: 3,
933
937
  description: "Anthropic Claude Opus 4.8 (legacy) frontier model; text and image input, 1M-token context."
@@ -941,10 +945,10 @@ var TEXT_MODELS = [
941
945
  }
942
946
  }),
943
947
  text("claude-haiku-4-5", "Claude Haiku 4.5", "claude-haiku-4-5", {
944
- providerOptions: ANTHROPIC_THINKING,
945
948
  exposure: "catalog",
946
949
  aliases: ["claude-haiku-4.5", "claude-haiku-4-5-20251001", "claude-haiku-4"],
947
950
  display: {
951
+ chat: { providerOptions: ANTHROPIC_THINKING },
948
952
  provider: "anthropic",
949
953
  costTier: 1,
950
954
  description: "Anthropic Claude Haiku 4.5 fast model with near-frontier intelligence; text and image input, 200K-token context."
@@ -1151,10 +1155,10 @@ var TEXT_MODELS = [
1151
1155
  // Flash rates (https://api-docs.deepseek.com/news/news260910/); the old id
1152
1156
  // stays an alias so stored selections keep resolving.
1153
1157
  text("deepseek-flash", "DeepSeek V4.1 Flash", "deepseek-flash", {
1154
- providerOptions: DEEPSEEK_THINKING,
1155
1158
  aliases: ["deepseek-v4-flash"],
1156
1159
  exposure: "catalog",
1157
1160
  display: {
1161
+ chat: { providerOptions: DEEPSEEK_THINKING },
1158
1162
  provider: "deepseek",
1159
1163
  costTier: 1,
1160
1164
  recommended: true,
@@ -1169,9 +1173,9 @@ var TEXT_MODELS = [
1169
1173
  }
1170
1174
  }),
1171
1175
  text("deepseek-v4-pro", "DeepSeek V4 Pro", "deepseek-v4-pro", {
1172
- providerOptions: DEEPSEEK_THINKING,
1173
1176
  exposure: "catalog",
1174
1177
  display: {
1178
+ chat: { providerOptions: DEEPSEEK_THINKING },
1175
1179
  provider: "deepseek",
1176
1180
  costTier: 2,
1177
1181
  description: "DeepSeek V4 Pro thinking/non-thinking text model with tool calls and JSON output (no vision); 1M-token context and up to 384K output tokens."
@@ -1201,9 +1205,9 @@ var TEXT_MODELS = [
1201
1205
  }),
1202
1206
  // Moonshot retired kimi-k2.5 on 2026-08-31 and no longer publishes its specs.
1203
1207
  text("kimi-k2.5", "Kimi K2.5", "kimi-k2.5", {
1204
- defaults: { temperature: 1 },
1205
1208
  exposure: "catalog",
1206
1209
  display: {
1210
+ chat: { temperature: 1 },
1207
1211
  provider: "moonshot",
1208
1212
  costTier: 2,
1209
1213
  description: "Moonshot Kimi K2.5; the provider retired the model on 2026-08-31 and calls now return a model-not-found error."
@@ -1211,9 +1215,9 @@ var TEXT_MODELS = [
1211
1215
  capabilities: {}
1212
1216
  }),
1213
1217
  text("kimi-k3", "Kimi K3", "kimi-k3", {
1214
- defaults: { temperature: 1 },
1215
1218
  exposure: "catalog",
1216
1219
  display: {
1220
+ chat: { temperature: 1 },
1217
1221
  provider: "moonshot",
1218
1222
  costTier: 2,
1219
1223
  description: "Moonshot Kimi K3 flagship model with native visual understanding and always-on thinking; text, image, and video input, 1M-token context."
@@ -1250,7 +1254,8 @@ var H3_RATIOS = ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"];
1250
1254
  var H3_REFERENCE_RATIOS = ["adaptive", ...H3_RATIOS];
1251
1255
  var NEGATIVE_PROMPT = "blur, distort, and low quality";
1252
1256
  var FRAMES_EXCLUDE_REFERENCES = { framesExcludeReferences: true };
1253
- var GOOGLE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png";
1257
+ var BYTEDANCE_LOGO = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png";
1258
+ var GOOGLE_LOGO2 = "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/192485d2-a76a-4657-9c06-930b2c70badd_compressed.png";
1254
1259
  var VIDEO_MODELS = [
1255
1260
  {
1256
1261
  id: "veo-3.1",
@@ -1279,7 +1284,7 @@ var VIDEO_MODELS = [
1279
1284
  display: {
1280
1285
  provider: "google",
1281
1286
  description: "Google's highest-quality video generation model. Supports up to 4K resolution and 8-second clips with reference image conditioning.",
1282
- logo: GOOGLE_LOGO
1287
+ logo: GOOGLE_LOGO2
1283
1288
  },
1284
1289
  capabilities: { ...FRAMES_EXCLUDE_REFERENCES }
1285
1290
  },
@@ -1371,7 +1376,7 @@ var VIDEO_MODELS = [
1371
1376
  display: {
1372
1377
  provider: "google",
1373
1378
  description: "Google's conversational video model with native audio, human support, and natural language editing. Aspect ratio only \u2014 resolution and duration are model-determined.",
1374
- logo: GOOGLE_LOGO
1379
+ logo: GOOGLE_LOGO2
1375
1380
  },
1376
1381
  capabilities: { acceptsSourceVideo: true }
1377
1382
  },
@@ -1396,6 +1401,7 @@ var VIDEO_MODELS = [
1396
1401
  pricingKind: "video_per_second",
1397
1402
  display: {
1398
1403
  provider: "google",
1404
+ logo: GOOGLE_LOGO2,
1399
1405
  description: "Google Gemini Omni Flash 1.1 conversational video generation and editing; text, image, and up to 10-second video input, 3-10 second output at up to 4K and 24 FPS."
1400
1406
  },
1401
1407
  capabilities: { acceptsSourceVideo: true }
@@ -1430,7 +1436,7 @@ var VIDEO_MODELS = [
1430
1436
  display: {
1431
1437
  provider: "bytedance",
1432
1438
  description: "High-quality AI video generation with reference image conditioning. Supports 4-15 second clips with human preprocessing.",
1433
- logo: "https://d31vvfpk2ppdyq.cloudfront.net/assets/image/3bba5d81-4e57-4e71-911b-cdfa05acca2c_compressed.png"
1439
+ logo: BYTEDANCE_LOGO
1434
1440
  },
1435
1441
  capabilities: { acceptsSourceVideo: true, ...FRAMES_EXCLUDE_REFERENCES }
1436
1442
  },
@@ -1461,6 +1467,7 @@ var VIDEO_MODELS = [
1461
1467
  pricingKind: "video_per_second",
1462
1468
  display: {
1463
1469
  provider: "bytedance",
1470
+ logo: BYTEDANCE_LOGO,
1464
1471
  description: "Speed- and cost-optimized ByteDance Seedance 2.0 Fast; text plus image, video, and audio references to generate or edit 4-15 second clips."
1465
1472
  },
1466
1473
  capabilities: { acceptsSourceVideo: true, ...FRAMES_EXCLUDE_REFERENCES }
@@ -1493,6 +1500,7 @@ var VIDEO_MODELS = [
1493
1500
  pricingKind: "video_per_second",
1494
1501
  display: {
1495
1502
  provider: "bytedance",
1503
+ logo: BYTEDANCE_LOGO,
1496
1504
  description: "ByteDance Seedance 2.5 for long-form storytelling and omni-reference generation/editing; up to 50 reference assets and 4-30 second clips at up to 1080p."
1497
1505
  },
1498
1506
  capabilities: { acceptsSourceVideo: true, ...FRAMES_EXCLUDE_REFERENCES }
@@ -1517,7 +1525,7 @@ var VIDEO_MODELS = [
1517
1525
  },
1518
1526
  // No resolution default: xAI picks its own unless the caller asks.
1519
1527
  defaults: { durationSeconds: 8, aspectRatio: "16:9" },
1520
- usage: { unit: "reported_cost_usd", modality: "VIDEO" },
1528
+ usage: { unit: "reported_cost_usd", modality: "VIDEO", slug: "grok" },
1521
1529
  pricingKind: "video_per_second",
1522
1530
  display: {
1523
1531
  provider: "xai",
@@ -1547,7 +1555,7 @@ var VIDEO_MODELS = [
1547
1555
  cfgScale: 0.5,
1548
1556
  negativePrompt: NEGATIVE_PROMPT
1549
1557
  },
1550
- usage: { ...VIDEO_USAGE, slug: "grok" },
1558
+ usage: { ...VIDEO_USAGE },
1551
1559
  pricingKind: "video_per_second",
1552
1560
  display: {
1553
1561
  provider: "kuaishou",