@akasecurity/ai-tc-codex 0.9.17 → 0.9.18

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.
@@ -19852,7 +19852,10 @@ function date4(params) {
19852
19852
  var LongContextTier = external_exports.object({
19853
19853
  thresholdInputTokens: external_exports.number().int().positive(),
19854
19854
  input: external_exports.number().nonnegative().nullable(),
19855
- output: external_exports.number().nonnegative().nullable()
19855
+ output: external_exports.number().nonnegative().nullable(),
19856
+ cacheRead: external_exports.number().nonnegative().nullable().optional(),
19857
+ cacheWrite5m: external_exports.number().nonnegative().nullable().optional(),
19858
+ cacheWrite1h: external_exports.number().nonnegative().nullable().optional()
19856
19859
  });
19857
19860
  var ModelPrice = external_exports.object({
19858
19861
  /** USD per 1M uncached input tokens, at or below any long-context threshold. */
@@ -19861,7 +19864,8 @@ var ModelPrice = external_exports.object({
19861
19864
  output: external_exports.number().nonnegative(),
19862
19865
  /**
19863
19866
  * Rate band above a size threshold, or `null` when the model is flat-rated.
19864
- * Anthropic is flat across its 1M window; OpenAI, Google and xAI are not.
19867
+ * OpenAI, Google, xAI and some Anthropic models (Haiku 5.5) band; most
19868
+ * Claude models are flat across their window.
19865
19869
  */
19866
19870
  longContext: LongContextTier.nullable(),
19867
19871
  /** USD per 1M tokens written to a 5-minute ephemeral cache, or null if unpriced. */
@@ -19874,18 +19878,35 @@ var ModelPrice = external_exports.object({
19874
19878
  webSearch: external_exports.number().nonnegative().nullable()
19875
19879
  });
19876
19880
  var WEB_SEARCH_PER_REQUEST = 0.01;
19877
- function anthropicPrice(input2, output2, cacheRead) {
19881
+ function anthropicPrice(input2, output2, cacheRead, longContext = null) {
19878
19882
  return Object.freeze({
19879
19883
  input: input2,
19880
19884
  output: output2,
19881
- longContext: null,
19882
- // flat across the full window on every current Claude
19885
+ longContext: longContext === null ? null : Object.freeze(longContext),
19883
19886
  cacheWrite5m: input2 * 1.25,
19884
19887
  cacheWrite1h: input2 * 2,
19885
19888
  cacheRead,
19886
19889
  webSearch: WEB_SEARCH_PER_REQUEST
19887
19890
  });
19888
19891
  }
19892
+ function anthropicBand(thresholdInputTokens, input2, output2, cacheRead) {
19893
+ return {
19894
+ thresholdInputTokens,
19895
+ input: input2,
19896
+ output: output2,
19897
+ cacheRead,
19898
+ cacheWrite5m: input2 * 1.25,
19899
+ cacheWrite1h: input2 * 2
19900
+ };
19901
+ }
19902
+ function scaledBand(thresholdInputTokens, base, scale) {
19903
+ return {
19904
+ thresholdInputTokens,
19905
+ input: base.input * scale.input,
19906
+ output: base.output * scale.output,
19907
+ ...base.cacheRead === void 0 ? {} : { cacheRead: base.cacheRead * scale.cacheRead }
19908
+ };
19909
+ }
19889
19910
  function tokenPrice(input2, output2, options = {}) {
19890
19911
  return Object.freeze({
19891
19912
  input: input2,
@@ -19918,17 +19939,19 @@ function serviceTierMultiplier(tier) {
19918
19939
  function promptTokensOf(usage) {
19919
19940
  return usage.promptTokens ?? (usage.inputTokens ?? 0) + (usage.cacheReadTokens ?? 0) + (usage.cacheWrite1hTokens ?? 0) + (usage.cacheWrite5mTokens ?? 0);
19920
19941
  }
19942
+ function bandRate(column, base) {
19943
+ return column === void 0 ? base : column;
19944
+ }
19921
19945
  function costOf(price, usage) {
19946
+ const band = price.longContext !== null && promptTokensOf(usage) > price.longContext.thresholdInputTokens ? price.longContext : null;
19922
19947
  const metered = [
19923
- [usage.cacheWrite1hTokens ?? 0, price.cacheWrite1h],
19924
- [usage.cacheWrite5mTokens ?? 0, price.cacheWrite5m],
19925
- [usage.cacheReadTokens ?? 0, price.cacheRead]
19948
+ [usage.inputTokens ?? 0, bandRate(band?.input, price.input)],
19949
+ [usage.outputTokens ?? 0, bandRate(band?.output, price.output)],
19950
+ [usage.cacheWrite1hTokens ?? 0, bandRate(band?.cacheWrite1h, price.cacheWrite1h)],
19951
+ [usage.cacheWrite5mTokens ?? 0, bandRate(band?.cacheWrite5m, price.cacheWrite5m)],
19952
+ [usage.cacheReadTokens ?? 0, bandRate(band?.cacheRead, price.cacheRead)]
19926
19953
  ];
19927
- const band = price.longContext !== null && promptTokensOf(usage) > price.longContext.thresholdInputTokens ? price.longContext : null;
19928
- if (band !== null && (band.input === null || band.output === null)) return null;
19929
- const inputRate = band?.input ?? price.input;
19930
- const outputRate = band?.output ?? price.output;
19931
- let tokenCost = (usage.inputTokens ?? 0) * inputRate + (usage.outputTokens ?? 0) * outputRate;
19954
+ let tokenCost = 0;
19932
19955
  for (const [tokens, rate] of metered) {
19933
19956
  if (tokens === 0) continue;
19934
19957
  if (rate === null) return null;
@@ -20218,10 +20241,20 @@ anthropic.model("claude-fable-5-1", {
20218
20241
  });
20219
20242
  anthropic.model("claude-fable-5", {
20220
20243
  name: "Claude Fable 5",
20244
+ ctx: 1e6,
20245
+ maxOut: 128e3,
20221
20246
  capability: "reasoning",
20222
20247
  price: anthropicPrice(10, 50, 1),
20223
20248
  on: [...CLAUDE_RESELLERS]
20224
20249
  });
20250
+ anthropic.model("claude-opus-5-5", {
20251
+ name: "Claude Opus 5.5",
20252
+ ctx: 1e6,
20253
+ maxOut: 128e3,
20254
+ capability: "reasoning",
20255
+ price: anthropicPrice(4, 20, 0.2),
20256
+ on: [...CLAUDE_RESELLERS]
20257
+ });
20225
20258
  anthropic.model("claude-opus-5", {
20226
20259
  name: "Claude Opus 5",
20227
20260
  ctx: 1e6,
@@ -20232,24 +20265,32 @@ anthropic.model("claude-opus-5", {
20232
20265
  });
20233
20266
  anthropic.model("claude-opus-4-8", {
20234
20267
  name: "Claude Opus 4.8",
20268
+ ctx: 1e6,
20269
+ maxOut: 128e3,
20235
20270
  capability: "reasoning",
20236
20271
  price: anthropicPrice(5, 25, 0.5),
20237
20272
  on: [...CLAUDE_RESELLERS]
20238
20273
  });
20239
20274
  anthropic.model("claude-opus-4-7", {
20240
20275
  name: "Claude Opus 4.7",
20276
+ ctx: 1e6,
20277
+ maxOut: 128e3,
20241
20278
  capability: "reasoning",
20242
20279
  price: anthropicPrice(5, 25, 0.5),
20243
20280
  on: [...CLAUDE_RESELLERS]
20244
20281
  });
20245
20282
  anthropic.model("claude-opus-4-6", {
20246
20283
  name: "Claude Opus 4.6",
20284
+ ctx: 1e6,
20285
+ maxOut: 128e3,
20247
20286
  capability: "reasoning",
20248
20287
  price: anthropicPrice(5, 25, 0.5),
20249
20288
  on: [...CLAUDE_RESELLERS]
20250
20289
  });
20251
20290
  anthropic.model("claude-opus-4-5", {
20252
20291
  name: "Claude Opus 4.5",
20292
+ ctx: 2e5,
20293
+ maxOut: 64e3,
20253
20294
  capability: "reasoning",
20254
20295
  price: anthropicPrice(5, 25, 0.5),
20255
20296
  on: [...CLAUDE_RESELLERS]
@@ -20260,6 +20301,14 @@ anthropic.model("claude-opus-4-1", {
20260
20301
  price: anthropicPrice(15, 75, 1.5),
20261
20302
  on: [...CLAUDE_RESELLERS]
20262
20303
  });
20304
+ anthropic.model("claude-sonnet-5-5", {
20305
+ name: "Claude Sonnet 5.5",
20306
+ ctx: 1e6,
20307
+ maxOut: 128e3,
20308
+ capability: "reasoning",
20309
+ price: anthropicPrice(2, 10, 0.1),
20310
+ on: [...CLAUDE_RESELLERS]
20311
+ });
20263
20312
  anthropic.model("claude-sonnet-5", {
20264
20313
  name: "Claude Sonnet 5",
20265
20314
  ctx: 1e6,
@@ -20270,16 +20319,30 @@ anthropic.model("claude-sonnet-5", {
20270
20319
  });
20271
20320
  anthropic.model("claude-sonnet-4-6", {
20272
20321
  name: "Claude Sonnet 4.6",
20322
+ ctx: 1e6,
20323
+ maxOut: 128e3,
20273
20324
  capability: "reasoning",
20274
20325
  price: anthropicPrice(3, 15, 0.3),
20275
20326
  on: [...CLAUDE_RESELLERS]
20276
20327
  });
20277
20328
  anthropic.model("claude-sonnet-4-5", {
20278
20329
  name: "Claude Sonnet 4.5",
20330
+ ctx: 2e5,
20331
+ maxOut: 64e3,
20279
20332
  capability: "reasoning",
20280
20333
  price: anthropicPrice(3, 15, 0.3),
20281
20334
  on: [...CLAUDE_RESELLERS]
20282
20335
  });
20336
+ anthropic.model("claude-haiku-5-5", {
20337
+ name: "Claude Haiku 5.5",
20338
+ ctx: 1e6,
20339
+ maxOut: 128e3,
20340
+ capability: null,
20341
+ // A prompt over 100,000 tokens, cache reads and writes included, bills the
20342
+ // whole request at the higher band.
20343
+ price: anthropicPrice(0.1, 0.5, 0.01, anthropicBand(1e5, 0.5, 2.5, 0.05)),
20344
+ on: [...CLAUDE_RESELLERS]
20345
+ });
20283
20346
  anthropic.model("claude-haiku-4-5", {
20284
20347
  name: "Claude Haiku 4.5",
20285
20348
  ctx: 2e5,
@@ -20302,7 +20365,13 @@ var OPENAI_TRAINING = {
20302
20365
  consumerControl: "opt-out",
20303
20366
  source: "https://developers.openai.com/api/docs/guides/your-data"
20304
20367
  };
20305
- var LONG_CONTEXT_272K = { thresholdInputTokens: 272e3, input: null, output: null };
20368
+ function gptPrice(input2, output2, cacheRead) {
20369
+ const base = { input: input2, output: output2, ...cacheRead === void 0 ? {} : { cacheRead } };
20370
+ return tokenPrice(input2, output2, {
20371
+ ...base,
20372
+ longContext: scaledBand(272e3, base, { input: 2, output: 1.5, cacheRead: 2 })
20373
+ });
20374
+ }
20306
20375
  var openai = vendor("openai", {
20307
20376
  family: { id: "gpt", name: "GPT" },
20308
20377
  region: "us",
@@ -20310,12 +20379,45 @@ var openai = vendor("openai", {
20310
20379
  training: OPENAI_TRAINING
20311
20380
  });
20312
20381
  var OPENAI_RESELLERS = ["azure", "foundry"];
20382
+ openai.model("gpt-6-astra", {
20383
+ name: "GPT-6 Astra",
20384
+ ctx: 105e4,
20385
+ maxOut: 128e3,
20386
+ capability: "reasoning",
20387
+ price: gptPrice(10, 50, 1),
20388
+ on: [...OPENAI_RESELLERS]
20389
+ });
20390
+ openai.model("gpt-6.1-sol", {
20391
+ name: "GPT-6.1 Sol",
20392
+ ctx: 105e4,
20393
+ maxOut: 128e3,
20394
+ capability: "reasoning",
20395
+ price: gptPrice(2, 10, 0.1),
20396
+ on: [...OPENAI_RESELLERS]
20397
+ });
20398
+ openai.model("gpt-6-sol", {
20399
+ name: "GPT-6 Sol",
20400
+ ctx: 105e4,
20401
+ maxOut: 128e3,
20402
+ capability: "reasoning",
20403
+ price: gptPrice(2, 10, 0.2),
20404
+ on: [...OPENAI_RESELLERS]
20405
+ });
20406
+ openai.model("gpt-6-luna", {
20407
+ name: "GPT-6 Luna",
20408
+ ctx: 105e4,
20409
+ maxOut: 128e3,
20410
+ capability: null,
20411
+ price: gptPrice(0.1, 0.5, 0.01),
20412
+ on: [...OPENAI_RESELLERS]
20413
+ });
20313
20414
  openai.model("gpt-5.6-sol", {
20314
20415
  name: "GPT-5.6 Sol",
20416
+ // Promotional rate, published as available at least through 2026-11-21.
20315
20417
  ctx: 105e4,
20316
20418
  maxOut: 128e3,
20317
20419
  capability: "reasoning",
20318
- price: tokenPrice(4, 20, { cacheRead: 0.4, longContext: LONG_CONTEXT_272K }),
20420
+ price: gptPrice(4, 20, 0.4),
20319
20421
  on: [...OPENAI_RESELLERS]
20320
20422
  });
20321
20423
  openai.model("gpt-5.6-terra", {
@@ -20323,7 +20425,7 @@ openai.model("gpt-5.6-terra", {
20323
20425
  ctx: 105e4,
20324
20426
  maxOut: 128e3,
20325
20427
  capability: "reasoning",
20326
- price: tokenPrice(2, 12, { cacheRead: 0.2, longContext: LONG_CONTEXT_272K }),
20428
+ price: gptPrice(2, 12, 0.2),
20327
20429
  on: [...OPENAI_RESELLERS]
20328
20430
  });
20329
20431
  openai.model("gpt-5.6-luna", {
@@ -20331,7 +20433,7 @@ openai.model("gpt-5.6-luna", {
20331
20433
  ctx: 105e4,
20332
20434
  maxOut: 128e3,
20333
20435
  capability: null,
20334
- price: tokenPrice(0.2, 1.2, { cacheRead: 0.02, longContext: LONG_CONTEXT_272K }),
20436
+ price: gptPrice(0.2, 1.2, 0.02),
20335
20437
  on: [...OPENAI_RESELLERS]
20336
20438
  });
20337
20439
  openai.model("gpt-5.5", {
@@ -20339,7 +20441,15 @@ openai.model("gpt-5.5", {
20339
20441
  ctx: 105e4,
20340
20442
  maxOut: 128e3,
20341
20443
  capability: "reasoning",
20342
- price: tokenPrice(5, 30, { cacheRead: 0.5, longContext: LONG_CONTEXT_272K }),
20444
+ price: gptPrice(5, 30, 0.5),
20445
+ on: [...OPENAI_RESELLERS]
20446
+ });
20447
+ openai.model("gpt-5.5-pro", {
20448
+ name: "GPT-5.5 Pro",
20449
+ ctx: 105e4,
20450
+ maxOut: 128e3,
20451
+ capability: "reasoning",
20452
+ price: gptPrice(30, 180),
20343
20453
  on: [...OPENAI_RESELLERS]
20344
20454
  });
20345
20455
  openai.model("gpt-5.4", {
@@ -20347,7 +20457,7 @@ openai.model("gpt-5.4", {
20347
20457
  ctx: 105e4,
20348
20458
  maxOut: 128e3,
20349
20459
  capability: "reasoning",
20350
- price: tokenPrice(2.5, 15, { cacheRead: 0.25, longContext: LONG_CONTEXT_272K }),
20460
+ price: gptPrice(2.5, 15, 0.25),
20351
20461
  on: [...OPENAI_RESELLERS]
20352
20462
  });
20353
20463
  openai.model("gpt-5.4-mini", {
@@ -20393,6 +20503,7 @@ openai.model("gpt-5", {
20393
20503
  openai.model("gpt-5-mini", {
20394
20504
  name: "GPT-5 mini",
20395
20505
  ctx: 4e5,
20506
+ maxOut: 128e3,
20396
20507
  capability: null,
20397
20508
  price: tokenPrice(0.25, 2, { cacheRead: 0.025 }),
20398
20509
  on: [...OPENAI_RESELLERS]
@@ -20407,11 +20518,15 @@ openai.model("gpt-5-nano", {
20407
20518
  });
20408
20519
  openai.model("gpt-4.1", {
20409
20520
  name: "GPT-4.1",
20521
+ ctx: 1047576,
20522
+ maxOut: 32768,
20410
20523
  price: tokenPrice(2, 8, { cacheRead: 0.5 }),
20411
20524
  on: [...OPENAI_RESELLERS]
20412
20525
  });
20413
20526
  openai.model("gpt-4o", {
20414
20527
  name: "GPT-4o",
20528
+ ctx: 128e3,
20529
+ maxOut: 16384,
20415
20530
  price: tokenPrice(2.5, 10, { cacheRead: 1.25 }),
20416
20531
  on: [...OPENAI_RESELLERS]
20417
20532
  });
@@ -20435,6 +20550,8 @@ openai.model("gpt-4-turbo", {
20435
20550
  });
20436
20551
  openai.model("o3", {
20437
20552
  name: "o3",
20553
+ ctx: 2e5,
20554
+ maxOut: 1e5,
20438
20555
  capability: "reasoning",
20439
20556
  price: tokenPrice(2, 8, { cacheRead: 0.5 }),
20440
20557
  on: [...OPENAI_RESELLERS]
@@ -20487,57 +20604,100 @@ var google = vendor("google", {
20487
20604
  retention: "configurable",
20488
20605
  training: GOOGLE_TRAINING
20489
20606
  });
20607
+ google.model("gemini-3.8-flash", {
20608
+ name: "Gemini 3.8 Flash",
20609
+ ctx: 1048576,
20610
+ maxOut: 65536,
20611
+ capability: null,
20612
+ price: tokenPrice(0.75, 3.75, { cacheRead: 0.075 }),
20613
+ on: ["vertex"]
20614
+ });
20490
20615
  google.model("gemini-3.7-flash", {
20491
20616
  name: "Gemini 3.7 Flash",
20492
20617
  capability: null,
20493
- // Promotional rate; the published post-promotion rate is 1.50 / 7.50.
20494
20618
  price: tokenPrice(0.75, 3.75),
20495
20619
  on: ["vertex"]
20496
20620
  });
20497
20621
  google.model("gemini-3.6-flash", {
20498
20622
  name: "Gemini 3.6 Flash",
20623
+ ctx: 1048576,
20624
+ maxOut: 65536,
20499
20625
  capability: null,
20500
- price: tokenPrice(0.75, 3.75),
20626
+ price: tokenPrice(0.75, 3.75, { cacheRead: 0.075 }),
20501
20627
  on: ["vertex"]
20502
20628
  });
20503
20629
  google.model("gemini-3.5-flash", {
20504
20630
  name: "Gemini 3.5 Flash",
20505
20631
  capability: null,
20506
- price: tokenPrice(1.5, 9),
20507
20632
  on: ["vertex"]
20508
20633
  });
20509
20634
  google.model("gemini-3.5-flash-lite", {
20510
20635
  name: "Gemini 3.5 Flash Lite",
20636
+ ctx: 1048576,
20637
+ maxOut: 65536,
20638
+ capability: null,
20639
+ price: tokenPrice(0.3, 2.5, { cacheRead: 0.03 }),
20640
+ on: ["vertex"]
20641
+ });
20642
+ google.model("gemini-3.1-flash-lite", {
20643
+ name: "Gemini 3.1 Flash Lite",
20644
+ ctx: 1048576,
20645
+ maxOut: 65536,
20646
+ capability: null,
20647
+ price: tokenPrice(0.25, 1.5, { cacheRead: 0.025 }),
20648
+ on: ["vertex"]
20649
+ });
20650
+ google.model("gemini-3-flash-preview", {
20651
+ name: "Gemini 3 Flash Preview",
20652
+ ctx: 1048576,
20653
+ maxOut: 65536,
20511
20654
  capability: null,
20512
- price: tokenPrice(0.3, 2.5),
20655
+ price: tokenPrice(0.5, 3, { cacheRead: 0.05 }),
20513
20656
  on: ["vertex"]
20514
20657
  });
20515
20658
  google.model("gemini-3.1-pro-preview", {
20516
20659
  name: "Gemini 3.1 Pro Preview",
20660
+ ctx: 1048576,
20661
+ maxOut: 65536,
20517
20662
  capability: "reasoning",
20518
20663
  price: tokenPrice(2, 12, {
20519
- longContext: { thresholdInputTokens: 2e5, input: 4, output: 18 }
20664
+ cacheRead: 0.2,
20665
+ longContext: { thresholdInputTokens: 2e5, input: 4, output: 18, cacheRead: 0.4 }
20520
20666
  }),
20667
+ aliases: ["gemini-3.1-pro-preview-customtools"],
20521
20668
  on: ["vertex"]
20522
20669
  });
20523
20670
  google.model("gemini-2.5-pro", {
20524
20671
  name: "Gemini 2.5 Pro",
20672
+ ctx: 1048576,
20673
+ maxOut: 65536,
20525
20674
  capability: "reasoning",
20526
20675
  price: tokenPrice(1.25, 10, {
20527
- longContext: { thresholdInputTokens: 2e5, input: 2.5, output: 15 }
20676
+ cacheRead: 0.125,
20677
+ longContext: { thresholdInputTokens: 2e5, input: 2.5, output: 15, cacheRead: 0.25 }
20528
20678
  }),
20529
20679
  on: ["vertex"]
20530
20680
  });
20531
20681
  google.model("gemini-2.5-flash", {
20532
20682
  name: "Gemini 2.5 Flash",
20683
+ ctx: 1048576,
20684
+ maxOut: 65536,
20533
20685
  capability: null,
20534
- price: tokenPrice(0.3, 2.5),
20686
+ price: tokenPrice(0.3, 2.5, { cacheRead: 0.03 }),
20535
20687
  on: ["vertex"]
20536
20688
  });
20537
20689
  google.model("gemini-2.5-flash-lite", {
20538
20690
  name: "Gemini 2.5 Flash Lite",
20691
+ ctx: 1048576,
20692
+ maxOut: 65536,
20539
20693
  capability: null,
20540
- price: tokenPrice(0.1, 0.4),
20694
+ price: tokenPrice(0.1, 0.4, { cacheRead: 0.01 }),
20695
+ on: ["vertex"]
20696
+ });
20697
+ google.model("gemini-embedding-2", {
20698
+ name: "Gemini Embedding 2",
20699
+ capability: "embedding",
20700
+ price: tokenPrice(0.2, 0),
20541
20701
  on: ["vertex"]
20542
20702
  });
20543
20703
  google.model("gemini-1-5-pro", { name: "Gemini 1.5 Pro", on: ["vertex"] });
@@ -20553,43 +20713,62 @@ var xai = vendor("xai", {
20553
20713
  source: "https://docs.x.ai/developers/faq/security"
20554
20714
  }
20555
20715
  });
20716
+ function grokPrice(input2, output2, cacheRead) {
20717
+ const base = { input: input2, output: output2, cacheRead };
20718
+ return tokenPrice(input2, output2, {
20719
+ cacheRead,
20720
+ longContext: scaledBand(2e5, base, { input: 2, output: 2, cacheRead: 2 })
20721
+ });
20722
+ }
20723
+ xai.model("grok-4.7", {
20724
+ name: "Grok 4.7",
20725
+ ctx: 5e5,
20726
+ capability: "reasoning",
20727
+ price: grokPrice(2, 6, 0.5)
20728
+ });
20556
20729
  xai.model("grok-4.6", {
20557
20730
  name: "Grok 4.6",
20558
20731
  ctx: 5e5,
20559
20732
  capability: "reasoning",
20560
- price: tokenPrice(2, 6, {
20561
- cacheRead: 0.5,
20562
- longContext: { thresholdInputTokens: 2e5, input: 4, output: 12 }
20563
- }),
20733
+ price: grokPrice(2, 6, 0.5),
20564
20734
  on: ["bedrock"]
20565
20735
  });
20566
20736
  xai.model("grok-4.5", {
20567
20737
  name: "Grok 4.5",
20568
20738
  ctx: 5e5,
20569
20739
  capability: "reasoning",
20570
- price: tokenPrice(2, 6, {
20571
- cacheRead: 0.3,
20572
- longContext: { thresholdInputTokens: 2e5, input: 4, output: 12 }
20573
- })
20740
+ price: grokPrice(2, 6, 0.3)
20574
20741
  });
20575
20742
  xai.model("grok-4.3", {
20576
20743
  name: "Grok 4.3",
20577
20744
  ctx: 1e6,
20578
20745
  capability: "reasoning",
20579
- price: tokenPrice(1.25, 2.5, {
20580
- cacheRead: 0.2,
20581
- longContext: { thresholdInputTokens: 2e5, input: 2.5, output: 5 }
20582
- }),
20746
+ price: grokPrice(1.25, 2.5, 0.2),
20583
20747
  on: ["bedrock"]
20584
20748
  });
20749
+ xai.model("grok-4.20-0309-reasoning", {
20750
+ name: "Grok 4.20 Reasoning",
20751
+ capability: "reasoning",
20752
+ ctx: 1e6,
20753
+ price: grokPrice(1.25, 2.5, 0.2)
20754
+ });
20755
+ xai.model("grok-4.20-0309-non-reasoning", {
20756
+ name: "Grok 4.20",
20757
+ capability: null,
20758
+ ctx: 1e6,
20759
+ price: grokPrice(1.25, 2.5, 0.2)
20760
+ });
20761
+ xai.model("grok-4.20-multi-agent-0309", {
20762
+ name: "Grok 4.20 Multi-Agent",
20763
+ capability: "reasoning",
20764
+ ctx: 1e6,
20765
+ price: grokPrice(1.25, 2.5, 0.2)
20766
+ });
20585
20767
  xai.model("grok-build-0.1", {
20586
20768
  name: "Grok Build 0.1",
20587
20769
  ctx: 256e3,
20588
20770
  capability: "code",
20589
- price: tokenPrice(1, 2, {
20590
- cacheRead: 0.2,
20591
- longContext: { thresholdInputTokens: 2e5, input: 2, output: 4 }
20592
- })
20771
+ price: grokPrice(1, 2, 0.2)
20593
20772
  });
20594
20773
  var deepseek = vendor("deepseek", {
20595
20774
  family: { id: "deepseek", name: "DeepSeek" },
@@ -20602,16 +20781,25 @@ var deepseek = vendor("deepseek", {
20602
20781
  source: "https://cdn.deepseek.com/policies/en-US/deepseek-privacy-policy.html"
20603
20782
  }
20604
20783
  });
20784
+ deepseek.model("deepseek-flash", {
20785
+ name: "DeepSeek V4.1 Flash",
20786
+ ctx: 1e6,
20787
+ maxOut: 384e3,
20788
+ capability: null,
20789
+ price: tokenPrice(0.3, 1.2, { cacheRead: 6e-3 })
20790
+ });
20605
20791
  deepseek.model("deepseek-v4-flash", {
20606
20792
  name: "DeepSeek V4 Flash",
20607
20793
  ctx: 1e6,
20794
+ maxOut: 384e3,
20608
20795
  capability: null,
20609
- price: tokenPrice(0.44, 1.32, { cacheRead: 0.014 }),
20796
+ price: tokenPrice(0.3, 1.2, { cacheRead: 6e-3 }),
20610
20797
  on: ["bedrock", "together", "fireworks", "openrouter", "ollama", "local"]
20611
20798
  });
20612
20799
  deepseek.model("deepseek-v4-pro", {
20613
20800
  name: "DeepSeek V4 Pro",
20614
20801
  ctx: 1e6,
20802
+ maxOut: 384e3,
20615
20803
  capability: "reasoning",
20616
20804
  price: tokenPrice(1.32, 3.96, { cacheRead: 0.044 }),
20617
20805
  on: ["bedrock", "together", "fireworks", "openrouter"]
@@ -20658,7 +20846,14 @@ cohere.model("command-r-plus-08-2024", {
20658
20846
  ctx: 128e3,
20659
20847
  maxOut: 4e3,
20660
20848
  price: tokenPrice(2.5, 10),
20661
- // The undated form is what deployments report; the live id carries the date.
20849
+ on: ["bedrock"]
20850
+ });
20851
+ cohere.model("command-r-plus-04-2024", {
20852
+ name: "Command R+ (04-2024)",
20853
+ seen: "discovered",
20854
+ ctx: 128e3,
20855
+ maxOut: 4e3,
20856
+ price: tokenPrice(3, 15),
20662
20857
  aliases: ["command-r-plus"],
20663
20858
  on: ["bedrock"]
20664
20859
  });
@@ -20726,6 +20921,65 @@ var mistral = vendor("mistral", {
20726
20921
  retention: "unknown",
20727
20922
  defaultHosting: "local"
20728
20923
  });
20924
+ var MISTRAL_API = { defaultHosting: "api" };
20925
+ mistral.model("mistral-large-4", {
20926
+ ...MISTRAL_API,
20927
+ name: "Mistral Large 4",
20928
+ ctx: 1e6,
20929
+ capability: null,
20930
+ // Public preview at a sale rate; the published original is 1.36 / 4.18 / 0.14.
20931
+ price: tokenPrice(0.68, 2.09, { cacheRead: 0.07 })
20932
+ });
20933
+ mistral.model("mistral-large-2512", {
20934
+ ...MISTRAL_API,
20935
+ name: "Mistral Large 3",
20936
+ ctx: 256e3,
20937
+ capability: null,
20938
+ price: tokenPrice(0.5, 1.5, { cacheRead: 0.05 })
20939
+ });
20940
+ mistral.model("mistral-medium-3-5", {
20941
+ ...MISTRAL_API,
20942
+ name: "Mistral Medium 3.5",
20943
+ ctx: 256e3,
20944
+ capability: null,
20945
+ price: tokenPrice(1.5, 7.5, { cacheRead: 0.15 })
20946
+ });
20947
+ mistral.model("mistral-small-2603", {
20948
+ ...MISTRAL_API,
20949
+ name: "Mistral Small 4",
20950
+ ctx: 256e3,
20951
+ capability: null,
20952
+ price: tokenPrice(0.15, 0.6, { cacheRead: 0.015 })
20953
+ });
20954
+ mistral.model("ministral-14b-2512", {
20955
+ ...MISTRAL_API,
20956
+ name: "Ministral 3 14B",
20957
+ ctx: 256e3,
20958
+ capability: null,
20959
+ price: tokenPrice(0.2, 0.2, { cacheRead: 0.02 })
20960
+ });
20961
+ mistral.model("ministral-8b-2512", {
20962
+ ...MISTRAL_API,
20963
+ name: "Ministral 3 8B",
20964
+ ctx: 256e3,
20965
+ capability: null,
20966
+ price: tokenPrice(0.15, 0.15, { cacheRead: 0.015 })
20967
+ });
20968
+ mistral.model("ministral-3b-2512", {
20969
+ ...MISTRAL_API,
20970
+ name: "Ministral 3 3B",
20971
+ ctx: 256e3,
20972
+ capability: null,
20973
+ price: tokenPrice(0.1, 0.1, { cacheRead: 0.01 })
20974
+ });
20975
+ mistral.model("codestral-2508", {
20976
+ ...MISTRAL_API,
20977
+ name: "Codestral",
20978
+ ctx: 128e3,
20979
+ capability: "code",
20980
+ openWeights: false,
20981
+ price: tokenPrice(0.3, 0.9, { cacheRead: 0.03 })
20982
+ });
20729
20983
  mistral.model("mixtral-8x7b", {
20730
20984
  name: "Mixtral 8x7B",
20731
20985
  seen: "discovered",
@@ -20889,11 +21143,14 @@ var COMPACT = new Intl.NumberFormat("en-US", {
20889
21143
  // ../../packages/schema/src/token/token-report.ts
20890
21144
  var num = (value) => value ?? 0;
20891
21145
  function costUsageOf(a, promptTokens) {
21146
+ const write1h = num(a.ephemeral_1h_input_tokens);
21147
+ const write5m = num(a.ephemeral_5m_input_tokens);
21148
+ const unsplit = Math.max(num(a.cache_creation_input_tokens) - write1h - write5m, 0);
20892
21149
  const usage = {
20893
21150
  inputTokens: num(a.input_tokens),
20894
21151
  outputTokens: num(a.output_tokens),
20895
- cacheWrite1hTokens: num(a.ephemeral_1h_input_tokens),
20896
- cacheWrite5mTokens: num(a.ephemeral_5m_input_tokens),
21152
+ cacheWrite1hTokens: write1h,
21153
+ cacheWrite5mTokens: write5m + unsplit,
20897
21154
  cacheReadTokens: num(a.cache_read_input_tokens),
20898
21155
  webSearchRequests: num(a.web_search_requests)
20899
21156
  };
@@ -27844,7 +28101,8 @@ var TIMELINE_COLUMNS = `
27844
28101
  json_extract(attributes, '$.internal') AS internal,
27845
28102
  json_extract(attributes, '$.flagged') AS flagged`;
27846
28103
  var CALL_PROMPT_TOKENS = `(coalesce(input_tokens, 0) + coalesce(cache_read_input_tokens, 0)
27847
- + coalesce(ephemeral_1h_input_tokens, 0) + coalesce(ephemeral_5m_input_tokens, 0))`;
28104
+ + max(coalesce(cache_creation_input_tokens, 0),
28105
+ coalesce(ephemeral_1h_input_tokens, 0) + coalesce(ephemeral_5m_input_tokens, 0)))`;
27848
28106
  var CALL_BAND = LONG_CONTEXT_THRESHOLDS.length === 0 ? "0" : LONG_CONTEXT_THRESHOLDS.map((t) => `(${CALL_PROMPT_TOKENS} > ${String(Math.trunc(t))})`).join(
27849
28107
  " + "
27850
28108
  );
@@ -36907,6 +37165,10 @@ var GROWTH_CORPORA = [
36907
37165
  build: (length) => joinTo(length, "[", "]", (i) => `"${SQL_WORDS[i % SQL_WORDS.length] ?? ""} ${String(i)}"`)
36908
37166
  },
36909
37167
  { name: "single-quoted keyword run ('where)", build: (length) => repeatTo("'where", length) },
37168
+ {
37169
+ name: 'double-quoted keyword literal run ("where" )',
37170
+ build: (length) => repeatTo('"where" ', length)
37171
+ },
36910
37172
  { name: "double-quote run", build: (length) => repeatTo('"', length) },
36911
37173
  { name: "space run", build: (length) => repeatTo(" ", length) },
36912
37174
  { name: "newline run", build: (length) => repeatTo("\n", length) },
@@ -39234,7 +39496,7 @@ var BUNDLED_PACKS = [
39234
39496
  {
39235
39497
  packId: "code-flaws",
39236
39498
  name: "Code Security Flaws",
39237
- version: "0.1.1",
39499
+ version: "0.1.2",
39238
39500
  rawRules: [
39239
39501
  sql_inject_concat_default,
39240
39502
  sql_inject_concat_dot_default,