@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.
- package/.codex-plugin/plugin.json +1 -1
- package/package.json +6 -6
- package/scripts/apply-suppressions.js +311 -49
- package/scripts/backfill.js +311 -49
- package/scripts/content-retention.js +306 -48
- package/scripts/filescan.js +358 -93
- package/scripts/firstrun.js +311 -49
- package/scripts/history-sync.js +306 -48
- package/scripts/intro.js +289 -37
- package/scripts/onboard.js +311 -49
- package/scripts/post-tool-use.js +311 -49
- package/scripts/pre-tool-use.js +311 -49
- package/scripts/query.js +311 -49
- package/scripts/reconcile.js +311 -49
- package/scripts/remediate.js +311 -49
- package/scripts/scan-worker.js +293 -37
- package/scripts/session-start.js +358 -93
- package/scripts/start-light.js +293 -37
- package/scripts/stop.js +295 -38
- package/scripts/sync.js +358 -93
- package/scripts/user-prompt-submit.js +311 -49
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aka-codex",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.18",
|
|
4
4
|
"description": "AI Traffic Control \u2014 inspect and govern AI prompts in Codex CLI. Detection runs locally; events are recorded to a local SQLite store on your machine.",
|
|
5
5
|
"hooks": "./hooks/hooks.json",
|
|
6
6
|
"skills": "./skills",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akasecurity/ai-tc-codex",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.18",
|
|
4
4
|
"description": "AI Traffic Control — inspect and govern AI prompts in Codex CLI",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"typescript": "^5.8.0",
|
|
29
29
|
"vitest": "^4.1.11",
|
|
30
30
|
"@akasecurity/eslint-config": "0.8.0",
|
|
31
|
-
"@akasecurity/plugin-runtime": "0.8.0",
|
|
32
|
-
"@akasecurity/scanner": "0.8.0",
|
|
33
|
-
"@akasecurity/persistence": "0.8.0",
|
|
34
31
|
"@akasecurity/plugin-sdk": "0.8.0",
|
|
35
|
-
"@akasecurity/
|
|
36
|
-
"@akasecurity/schema": "0.8.0"
|
|
32
|
+
"@akasecurity/persistence": "0.8.0",
|
|
33
|
+
"@akasecurity/schema": "0.8.0",
|
|
34
|
+
"@akasecurity/scanner": "0.8.0",
|
|
35
|
+
"@akasecurity/plugin-runtime": "0.8.0",
|
|
36
|
+
"@akasecurity/setup-wizard": "0.8.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "tsup",
|
|
@@ -19858,7 +19858,10 @@ function date4(params) {
|
|
|
19858
19858
|
var LongContextTier = external_exports.object({
|
|
19859
19859
|
thresholdInputTokens: external_exports.number().int().positive(),
|
|
19860
19860
|
input: external_exports.number().nonnegative().nullable(),
|
|
19861
|
-
output: external_exports.number().nonnegative().nullable()
|
|
19861
|
+
output: external_exports.number().nonnegative().nullable(),
|
|
19862
|
+
cacheRead: external_exports.number().nonnegative().nullable().optional(),
|
|
19863
|
+
cacheWrite5m: external_exports.number().nonnegative().nullable().optional(),
|
|
19864
|
+
cacheWrite1h: external_exports.number().nonnegative().nullable().optional()
|
|
19862
19865
|
});
|
|
19863
19866
|
var ModelPrice = external_exports.object({
|
|
19864
19867
|
/** USD per 1M uncached input tokens, at or below any long-context threshold. */
|
|
@@ -19867,7 +19870,8 @@ var ModelPrice = external_exports.object({
|
|
|
19867
19870
|
output: external_exports.number().nonnegative(),
|
|
19868
19871
|
/**
|
|
19869
19872
|
* Rate band above a size threshold, or `null` when the model is flat-rated.
|
|
19870
|
-
*
|
|
19873
|
+
* OpenAI, Google, xAI and some Anthropic models (Haiku 5.5) band; most
|
|
19874
|
+
* Claude models are flat across their window.
|
|
19871
19875
|
*/
|
|
19872
19876
|
longContext: LongContextTier.nullable(),
|
|
19873
19877
|
/** USD per 1M tokens written to a 5-minute ephemeral cache, or null if unpriced. */
|
|
@@ -19880,18 +19884,35 @@ var ModelPrice = external_exports.object({
|
|
|
19880
19884
|
webSearch: external_exports.number().nonnegative().nullable()
|
|
19881
19885
|
});
|
|
19882
19886
|
var WEB_SEARCH_PER_REQUEST = 0.01;
|
|
19883
|
-
function anthropicPrice(input2, output2, cacheRead) {
|
|
19887
|
+
function anthropicPrice(input2, output2, cacheRead, longContext = null) {
|
|
19884
19888
|
return Object.freeze({
|
|
19885
19889
|
input: input2,
|
|
19886
19890
|
output: output2,
|
|
19887
|
-
longContext: null,
|
|
19888
|
-
// flat across the full window on every current Claude
|
|
19891
|
+
longContext: longContext === null ? null : Object.freeze(longContext),
|
|
19889
19892
|
cacheWrite5m: input2 * 1.25,
|
|
19890
19893
|
cacheWrite1h: input2 * 2,
|
|
19891
19894
|
cacheRead,
|
|
19892
19895
|
webSearch: WEB_SEARCH_PER_REQUEST
|
|
19893
19896
|
});
|
|
19894
19897
|
}
|
|
19898
|
+
function anthropicBand(thresholdInputTokens, input2, output2, cacheRead) {
|
|
19899
|
+
return {
|
|
19900
|
+
thresholdInputTokens,
|
|
19901
|
+
input: input2,
|
|
19902
|
+
output: output2,
|
|
19903
|
+
cacheRead,
|
|
19904
|
+
cacheWrite5m: input2 * 1.25,
|
|
19905
|
+
cacheWrite1h: input2 * 2
|
|
19906
|
+
};
|
|
19907
|
+
}
|
|
19908
|
+
function scaledBand(thresholdInputTokens, base, scale) {
|
|
19909
|
+
return {
|
|
19910
|
+
thresholdInputTokens,
|
|
19911
|
+
input: base.input * scale.input,
|
|
19912
|
+
output: base.output * scale.output,
|
|
19913
|
+
...base.cacheRead === void 0 ? {} : { cacheRead: base.cacheRead * scale.cacheRead }
|
|
19914
|
+
};
|
|
19915
|
+
}
|
|
19895
19916
|
function tokenPrice(input2, output2, options = {}) {
|
|
19896
19917
|
return Object.freeze({
|
|
19897
19918
|
input: input2,
|
|
@@ -19924,17 +19945,19 @@ function serviceTierMultiplier(tier) {
|
|
|
19924
19945
|
function promptTokensOf(usage) {
|
|
19925
19946
|
return usage.promptTokens ?? (usage.inputTokens ?? 0) + (usage.cacheReadTokens ?? 0) + (usage.cacheWrite1hTokens ?? 0) + (usage.cacheWrite5mTokens ?? 0);
|
|
19926
19947
|
}
|
|
19948
|
+
function bandRate(column, base) {
|
|
19949
|
+
return column === void 0 ? base : column;
|
|
19950
|
+
}
|
|
19927
19951
|
function costOf(price, usage) {
|
|
19952
|
+
const band = price.longContext !== null && promptTokensOf(usage) > price.longContext.thresholdInputTokens ? price.longContext : null;
|
|
19928
19953
|
const metered = [
|
|
19929
|
-
[usage.
|
|
19930
|
-
[usage.
|
|
19931
|
-
[usage.
|
|
19954
|
+
[usage.inputTokens ?? 0, bandRate(band?.input, price.input)],
|
|
19955
|
+
[usage.outputTokens ?? 0, bandRate(band?.output, price.output)],
|
|
19956
|
+
[usage.cacheWrite1hTokens ?? 0, bandRate(band?.cacheWrite1h, price.cacheWrite1h)],
|
|
19957
|
+
[usage.cacheWrite5mTokens ?? 0, bandRate(band?.cacheWrite5m, price.cacheWrite5m)],
|
|
19958
|
+
[usage.cacheReadTokens ?? 0, bandRate(band?.cacheRead, price.cacheRead)]
|
|
19932
19959
|
];
|
|
19933
|
-
|
|
19934
|
-
if (band !== null && (band.input === null || band.output === null)) return null;
|
|
19935
|
-
const inputRate = band?.input ?? price.input;
|
|
19936
|
-
const outputRate = band?.output ?? price.output;
|
|
19937
|
-
let tokenCost = (usage.inputTokens ?? 0) * inputRate + (usage.outputTokens ?? 0) * outputRate;
|
|
19960
|
+
let tokenCost = 0;
|
|
19938
19961
|
for (const [tokens, rate] of metered) {
|
|
19939
19962
|
if (tokens === 0) continue;
|
|
19940
19963
|
if (rate === null) return null;
|
|
@@ -20224,10 +20247,20 @@ anthropic.model("claude-fable-5-1", {
|
|
|
20224
20247
|
});
|
|
20225
20248
|
anthropic.model("claude-fable-5", {
|
|
20226
20249
|
name: "Claude Fable 5",
|
|
20250
|
+
ctx: 1e6,
|
|
20251
|
+
maxOut: 128e3,
|
|
20227
20252
|
capability: "reasoning",
|
|
20228
20253
|
price: anthropicPrice(10, 50, 1),
|
|
20229
20254
|
on: [...CLAUDE_RESELLERS]
|
|
20230
20255
|
});
|
|
20256
|
+
anthropic.model("claude-opus-5-5", {
|
|
20257
|
+
name: "Claude Opus 5.5",
|
|
20258
|
+
ctx: 1e6,
|
|
20259
|
+
maxOut: 128e3,
|
|
20260
|
+
capability: "reasoning",
|
|
20261
|
+
price: anthropicPrice(4, 20, 0.2),
|
|
20262
|
+
on: [...CLAUDE_RESELLERS]
|
|
20263
|
+
});
|
|
20231
20264
|
anthropic.model("claude-opus-5", {
|
|
20232
20265
|
name: "Claude Opus 5",
|
|
20233
20266
|
ctx: 1e6,
|
|
@@ -20238,24 +20271,32 @@ anthropic.model("claude-opus-5", {
|
|
|
20238
20271
|
});
|
|
20239
20272
|
anthropic.model("claude-opus-4-8", {
|
|
20240
20273
|
name: "Claude Opus 4.8",
|
|
20274
|
+
ctx: 1e6,
|
|
20275
|
+
maxOut: 128e3,
|
|
20241
20276
|
capability: "reasoning",
|
|
20242
20277
|
price: anthropicPrice(5, 25, 0.5),
|
|
20243
20278
|
on: [...CLAUDE_RESELLERS]
|
|
20244
20279
|
});
|
|
20245
20280
|
anthropic.model("claude-opus-4-7", {
|
|
20246
20281
|
name: "Claude Opus 4.7",
|
|
20282
|
+
ctx: 1e6,
|
|
20283
|
+
maxOut: 128e3,
|
|
20247
20284
|
capability: "reasoning",
|
|
20248
20285
|
price: anthropicPrice(5, 25, 0.5),
|
|
20249
20286
|
on: [...CLAUDE_RESELLERS]
|
|
20250
20287
|
});
|
|
20251
20288
|
anthropic.model("claude-opus-4-6", {
|
|
20252
20289
|
name: "Claude Opus 4.6",
|
|
20290
|
+
ctx: 1e6,
|
|
20291
|
+
maxOut: 128e3,
|
|
20253
20292
|
capability: "reasoning",
|
|
20254
20293
|
price: anthropicPrice(5, 25, 0.5),
|
|
20255
20294
|
on: [...CLAUDE_RESELLERS]
|
|
20256
20295
|
});
|
|
20257
20296
|
anthropic.model("claude-opus-4-5", {
|
|
20258
20297
|
name: "Claude Opus 4.5",
|
|
20298
|
+
ctx: 2e5,
|
|
20299
|
+
maxOut: 64e3,
|
|
20259
20300
|
capability: "reasoning",
|
|
20260
20301
|
price: anthropicPrice(5, 25, 0.5),
|
|
20261
20302
|
on: [...CLAUDE_RESELLERS]
|
|
@@ -20266,6 +20307,14 @@ anthropic.model("claude-opus-4-1", {
|
|
|
20266
20307
|
price: anthropicPrice(15, 75, 1.5),
|
|
20267
20308
|
on: [...CLAUDE_RESELLERS]
|
|
20268
20309
|
});
|
|
20310
|
+
anthropic.model("claude-sonnet-5-5", {
|
|
20311
|
+
name: "Claude Sonnet 5.5",
|
|
20312
|
+
ctx: 1e6,
|
|
20313
|
+
maxOut: 128e3,
|
|
20314
|
+
capability: "reasoning",
|
|
20315
|
+
price: anthropicPrice(2, 10, 0.1),
|
|
20316
|
+
on: [...CLAUDE_RESELLERS]
|
|
20317
|
+
});
|
|
20269
20318
|
anthropic.model("claude-sonnet-5", {
|
|
20270
20319
|
name: "Claude Sonnet 5",
|
|
20271
20320
|
ctx: 1e6,
|
|
@@ -20276,16 +20325,30 @@ anthropic.model("claude-sonnet-5", {
|
|
|
20276
20325
|
});
|
|
20277
20326
|
anthropic.model("claude-sonnet-4-6", {
|
|
20278
20327
|
name: "Claude Sonnet 4.6",
|
|
20328
|
+
ctx: 1e6,
|
|
20329
|
+
maxOut: 128e3,
|
|
20279
20330
|
capability: "reasoning",
|
|
20280
20331
|
price: anthropicPrice(3, 15, 0.3),
|
|
20281
20332
|
on: [...CLAUDE_RESELLERS]
|
|
20282
20333
|
});
|
|
20283
20334
|
anthropic.model("claude-sonnet-4-5", {
|
|
20284
20335
|
name: "Claude Sonnet 4.5",
|
|
20336
|
+
ctx: 2e5,
|
|
20337
|
+
maxOut: 64e3,
|
|
20285
20338
|
capability: "reasoning",
|
|
20286
20339
|
price: anthropicPrice(3, 15, 0.3),
|
|
20287
20340
|
on: [...CLAUDE_RESELLERS]
|
|
20288
20341
|
});
|
|
20342
|
+
anthropic.model("claude-haiku-5-5", {
|
|
20343
|
+
name: "Claude Haiku 5.5",
|
|
20344
|
+
ctx: 1e6,
|
|
20345
|
+
maxOut: 128e3,
|
|
20346
|
+
capability: null,
|
|
20347
|
+
// A prompt over 100,000 tokens, cache reads and writes included, bills the
|
|
20348
|
+
// whole request at the higher band.
|
|
20349
|
+
price: anthropicPrice(0.1, 0.5, 0.01, anthropicBand(1e5, 0.5, 2.5, 0.05)),
|
|
20350
|
+
on: [...CLAUDE_RESELLERS]
|
|
20351
|
+
});
|
|
20289
20352
|
anthropic.model("claude-haiku-4-5", {
|
|
20290
20353
|
name: "Claude Haiku 4.5",
|
|
20291
20354
|
ctx: 2e5,
|
|
@@ -20308,7 +20371,13 @@ var OPENAI_TRAINING = {
|
|
|
20308
20371
|
consumerControl: "opt-out",
|
|
20309
20372
|
source: "https://developers.openai.com/api/docs/guides/your-data"
|
|
20310
20373
|
};
|
|
20311
|
-
|
|
20374
|
+
function gptPrice(input2, output2, cacheRead) {
|
|
20375
|
+
const base = { input: input2, output: output2, ...cacheRead === void 0 ? {} : { cacheRead } };
|
|
20376
|
+
return tokenPrice(input2, output2, {
|
|
20377
|
+
...base,
|
|
20378
|
+
longContext: scaledBand(272e3, base, { input: 2, output: 1.5, cacheRead: 2 })
|
|
20379
|
+
});
|
|
20380
|
+
}
|
|
20312
20381
|
var openai = vendor("openai", {
|
|
20313
20382
|
family: { id: "gpt", name: "GPT" },
|
|
20314
20383
|
region: "us",
|
|
@@ -20316,12 +20385,45 @@ var openai = vendor("openai", {
|
|
|
20316
20385
|
training: OPENAI_TRAINING
|
|
20317
20386
|
});
|
|
20318
20387
|
var OPENAI_RESELLERS = ["azure", "foundry"];
|
|
20388
|
+
openai.model("gpt-6-astra", {
|
|
20389
|
+
name: "GPT-6 Astra",
|
|
20390
|
+
ctx: 105e4,
|
|
20391
|
+
maxOut: 128e3,
|
|
20392
|
+
capability: "reasoning",
|
|
20393
|
+
price: gptPrice(10, 50, 1),
|
|
20394
|
+
on: [...OPENAI_RESELLERS]
|
|
20395
|
+
});
|
|
20396
|
+
openai.model("gpt-6.1-sol", {
|
|
20397
|
+
name: "GPT-6.1 Sol",
|
|
20398
|
+
ctx: 105e4,
|
|
20399
|
+
maxOut: 128e3,
|
|
20400
|
+
capability: "reasoning",
|
|
20401
|
+
price: gptPrice(2, 10, 0.1),
|
|
20402
|
+
on: [...OPENAI_RESELLERS]
|
|
20403
|
+
});
|
|
20404
|
+
openai.model("gpt-6-sol", {
|
|
20405
|
+
name: "GPT-6 Sol",
|
|
20406
|
+
ctx: 105e4,
|
|
20407
|
+
maxOut: 128e3,
|
|
20408
|
+
capability: "reasoning",
|
|
20409
|
+
price: gptPrice(2, 10, 0.2),
|
|
20410
|
+
on: [...OPENAI_RESELLERS]
|
|
20411
|
+
});
|
|
20412
|
+
openai.model("gpt-6-luna", {
|
|
20413
|
+
name: "GPT-6 Luna",
|
|
20414
|
+
ctx: 105e4,
|
|
20415
|
+
maxOut: 128e3,
|
|
20416
|
+
capability: null,
|
|
20417
|
+
price: gptPrice(0.1, 0.5, 0.01),
|
|
20418
|
+
on: [...OPENAI_RESELLERS]
|
|
20419
|
+
});
|
|
20319
20420
|
openai.model("gpt-5.6-sol", {
|
|
20320
20421
|
name: "GPT-5.6 Sol",
|
|
20422
|
+
// Promotional rate, published as available at least through 2026-11-21.
|
|
20321
20423
|
ctx: 105e4,
|
|
20322
20424
|
maxOut: 128e3,
|
|
20323
20425
|
capability: "reasoning",
|
|
20324
|
-
price:
|
|
20426
|
+
price: gptPrice(4, 20, 0.4),
|
|
20325
20427
|
on: [...OPENAI_RESELLERS]
|
|
20326
20428
|
});
|
|
20327
20429
|
openai.model("gpt-5.6-terra", {
|
|
@@ -20329,7 +20431,7 @@ openai.model("gpt-5.6-terra", {
|
|
|
20329
20431
|
ctx: 105e4,
|
|
20330
20432
|
maxOut: 128e3,
|
|
20331
20433
|
capability: "reasoning",
|
|
20332
|
-
price:
|
|
20434
|
+
price: gptPrice(2, 12, 0.2),
|
|
20333
20435
|
on: [...OPENAI_RESELLERS]
|
|
20334
20436
|
});
|
|
20335
20437
|
openai.model("gpt-5.6-luna", {
|
|
@@ -20337,7 +20439,7 @@ openai.model("gpt-5.6-luna", {
|
|
|
20337
20439
|
ctx: 105e4,
|
|
20338
20440
|
maxOut: 128e3,
|
|
20339
20441
|
capability: null,
|
|
20340
|
-
price:
|
|
20442
|
+
price: gptPrice(0.2, 1.2, 0.02),
|
|
20341
20443
|
on: [...OPENAI_RESELLERS]
|
|
20342
20444
|
});
|
|
20343
20445
|
openai.model("gpt-5.5", {
|
|
@@ -20345,7 +20447,15 @@ openai.model("gpt-5.5", {
|
|
|
20345
20447
|
ctx: 105e4,
|
|
20346
20448
|
maxOut: 128e3,
|
|
20347
20449
|
capability: "reasoning",
|
|
20348
|
-
price:
|
|
20450
|
+
price: gptPrice(5, 30, 0.5),
|
|
20451
|
+
on: [...OPENAI_RESELLERS]
|
|
20452
|
+
});
|
|
20453
|
+
openai.model("gpt-5.5-pro", {
|
|
20454
|
+
name: "GPT-5.5 Pro",
|
|
20455
|
+
ctx: 105e4,
|
|
20456
|
+
maxOut: 128e3,
|
|
20457
|
+
capability: "reasoning",
|
|
20458
|
+
price: gptPrice(30, 180),
|
|
20349
20459
|
on: [...OPENAI_RESELLERS]
|
|
20350
20460
|
});
|
|
20351
20461
|
openai.model("gpt-5.4", {
|
|
@@ -20353,7 +20463,7 @@ openai.model("gpt-5.4", {
|
|
|
20353
20463
|
ctx: 105e4,
|
|
20354
20464
|
maxOut: 128e3,
|
|
20355
20465
|
capability: "reasoning",
|
|
20356
|
-
price:
|
|
20466
|
+
price: gptPrice(2.5, 15, 0.25),
|
|
20357
20467
|
on: [...OPENAI_RESELLERS]
|
|
20358
20468
|
});
|
|
20359
20469
|
openai.model("gpt-5.4-mini", {
|
|
@@ -20399,6 +20509,7 @@ openai.model("gpt-5", {
|
|
|
20399
20509
|
openai.model("gpt-5-mini", {
|
|
20400
20510
|
name: "GPT-5 mini",
|
|
20401
20511
|
ctx: 4e5,
|
|
20512
|
+
maxOut: 128e3,
|
|
20402
20513
|
capability: null,
|
|
20403
20514
|
price: tokenPrice(0.25, 2, { cacheRead: 0.025 }),
|
|
20404
20515
|
on: [...OPENAI_RESELLERS]
|
|
@@ -20413,11 +20524,15 @@ openai.model("gpt-5-nano", {
|
|
|
20413
20524
|
});
|
|
20414
20525
|
openai.model("gpt-4.1", {
|
|
20415
20526
|
name: "GPT-4.1",
|
|
20527
|
+
ctx: 1047576,
|
|
20528
|
+
maxOut: 32768,
|
|
20416
20529
|
price: tokenPrice(2, 8, { cacheRead: 0.5 }),
|
|
20417
20530
|
on: [...OPENAI_RESELLERS]
|
|
20418
20531
|
});
|
|
20419
20532
|
openai.model("gpt-4o", {
|
|
20420
20533
|
name: "GPT-4o",
|
|
20534
|
+
ctx: 128e3,
|
|
20535
|
+
maxOut: 16384,
|
|
20421
20536
|
price: tokenPrice(2.5, 10, { cacheRead: 1.25 }),
|
|
20422
20537
|
on: [...OPENAI_RESELLERS]
|
|
20423
20538
|
});
|
|
@@ -20441,6 +20556,8 @@ openai.model("gpt-4-turbo", {
|
|
|
20441
20556
|
});
|
|
20442
20557
|
openai.model("o3", {
|
|
20443
20558
|
name: "o3",
|
|
20559
|
+
ctx: 2e5,
|
|
20560
|
+
maxOut: 1e5,
|
|
20444
20561
|
capability: "reasoning",
|
|
20445
20562
|
price: tokenPrice(2, 8, { cacheRead: 0.5 }),
|
|
20446
20563
|
on: [...OPENAI_RESELLERS]
|
|
@@ -20493,57 +20610,100 @@ var google = vendor("google", {
|
|
|
20493
20610
|
retention: "configurable",
|
|
20494
20611
|
training: GOOGLE_TRAINING
|
|
20495
20612
|
});
|
|
20613
|
+
google.model("gemini-3.8-flash", {
|
|
20614
|
+
name: "Gemini 3.8 Flash",
|
|
20615
|
+
ctx: 1048576,
|
|
20616
|
+
maxOut: 65536,
|
|
20617
|
+
capability: null,
|
|
20618
|
+
price: tokenPrice(0.75, 3.75, { cacheRead: 0.075 }),
|
|
20619
|
+
on: ["vertex"]
|
|
20620
|
+
});
|
|
20496
20621
|
google.model("gemini-3.7-flash", {
|
|
20497
20622
|
name: "Gemini 3.7 Flash",
|
|
20498
20623
|
capability: null,
|
|
20499
|
-
// Promotional rate; the published post-promotion rate is 1.50 / 7.50.
|
|
20500
20624
|
price: tokenPrice(0.75, 3.75),
|
|
20501
20625
|
on: ["vertex"]
|
|
20502
20626
|
});
|
|
20503
20627
|
google.model("gemini-3.6-flash", {
|
|
20504
20628
|
name: "Gemini 3.6 Flash",
|
|
20629
|
+
ctx: 1048576,
|
|
20630
|
+
maxOut: 65536,
|
|
20505
20631
|
capability: null,
|
|
20506
|
-
price: tokenPrice(0.75, 3.75),
|
|
20632
|
+
price: tokenPrice(0.75, 3.75, { cacheRead: 0.075 }),
|
|
20507
20633
|
on: ["vertex"]
|
|
20508
20634
|
});
|
|
20509
20635
|
google.model("gemini-3.5-flash", {
|
|
20510
20636
|
name: "Gemini 3.5 Flash",
|
|
20511
20637
|
capability: null,
|
|
20512
|
-
price: tokenPrice(1.5, 9),
|
|
20513
20638
|
on: ["vertex"]
|
|
20514
20639
|
});
|
|
20515
20640
|
google.model("gemini-3.5-flash-lite", {
|
|
20516
20641
|
name: "Gemini 3.5 Flash Lite",
|
|
20642
|
+
ctx: 1048576,
|
|
20643
|
+
maxOut: 65536,
|
|
20644
|
+
capability: null,
|
|
20645
|
+
price: tokenPrice(0.3, 2.5, { cacheRead: 0.03 }),
|
|
20646
|
+
on: ["vertex"]
|
|
20647
|
+
});
|
|
20648
|
+
google.model("gemini-3.1-flash-lite", {
|
|
20649
|
+
name: "Gemini 3.1 Flash Lite",
|
|
20650
|
+
ctx: 1048576,
|
|
20651
|
+
maxOut: 65536,
|
|
20652
|
+
capability: null,
|
|
20653
|
+
price: tokenPrice(0.25, 1.5, { cacheRead: 0.025 }),
|
|
20654
|
+
on: ["vertex"]
|
|
20655
|
+
});
|
|
20656
|
+
google.model("gemini-3-flash-preview", {
|
|
20657
|
+
name: "Gemini 3 Flash Preview",
|
|
20658
|
+
ctx: 1048576,
|
|
20659
|
+
maxOut: 65536,
|
|
20517
20660
|
capability: null,
|
|
20518
|
-
price: tokenPrice(0.3,
|
|
20661
|
+
price: tokenPrice(0.5, 3, { cacheRead: 0.05 }),
|
|
20519
20662
|
on: ["vertex"]
|
|
20520
20663
|
});
|
|
20521
20664
|
google.model("gemini-3.1-pro-preview", {
|
|
20522
20665
|
name: "Gemini 3.1 Pro Preview",
|
|
20666
|
+
ctx: 1048576,
|
|
20667
|
+
maxOut: 65536,
|
|
20523
20668
|
capability: "reasoning",
|
|
20524
20669
|
price: tokenPrice(2, 12, {
|
|
20525
|
-
|
|
20670
|
+
cacheRead: 0.2,
|
|
20671
|
+
longContext: { thresholdInputTokens: 2e5, input: 4, output: 18, cacheRead: 0.4 }
|
|
20526
20672
|
}),
|
|
20673
|
+
aliases: ["gemini-3.1-pro-preview-customtools"],
|
|
20527
20674
|
on: ["vertex"]
|
|
20528
20675
|
});
|
|
20529
20676
|
google.model("gemini-2.5-pro", {
|
|
20530
20677
|
name: "Gemini 2.5 Pro",
|
|
20678
|
+
ctx: 1048576,
|
|
20679
|
+
maxOut: 65536,
|
|
20531
20680
|
capability: "reasoning",
|
|
20532
20681
|
price: tokenPrice(1.25, 10, {
|
|
20533
|
-
|
|
20682
|
+
cacheRead: 0.125,
|
|
20683
|
+
longContext: { thresholdInputTokens: 2e5, input: 2.5, output: 15, cacheRead: 0.25 }
|
|
20534
20684
|
}),
|
|
20535
20685
|
on: ["vertex"]
|
|
20536
20686
|
});
|
|
20537
20687
|
google.model("gemini-2.5-flash", {
|
|
20538
20688
|
name: "Gemini 2.5 Flash",
|
|
20689
|
+
ctx: 1048576,
|
|
20690
|
+
maxOut: 65536,
|
|
20539
20691
|
capability: null,
|
|
20540
|
-
price: tokenPrice(0.3, 2.5),
|
|
20692
|
+
price: tokenPrice(0.3, 2.5, { cacheRead: 0.03 }),
|
|
20541
20693
|
on: ["vertex"]
|
|
20542
20694
|
});
|
|
20543
20695
|
google.model("gemini-2.5-flash-lite", {
|
|
20544
20696
|
name: "Gemini 2.5 Flash Lite",
|
|
20697
|
+
ctx: 1048576,
|
|
20698
|
+
maxOut: 65536,
|
|
20545
20699
|
capability: null,
|
|
20546
|
-
price: tokenPrice(0.1, 0.4),
|
|
20700
|
+
price: tokenPrice(0.1, 0.4, { cacheRead: 0.01 }),
|
|
20701
|
+
on: ["vertex"]
|
|
20702
|
+
});
|
|
20703
|
+
google.model("gemini-embedding-2", {
|
|
20704
|
+
name: "Gemini Embedding 2",
|
|
20705
|
+
capability: "embedding",
|
|
20706
|
+
price: tokenPrice(0.2, 0),
|
|
20547
20707
|
on: ["vertex"]
|
|
20548
20708
|
});
|
|
20549
20709
|
google.model("gemini-1-5-pro", { name: "Gemini 1.5 Pro", on: ["vertex"] });
|
|
@@ -20559,43 +20719,62 @@ var xai = vendor("xai", {
|
|
|
20559
20719
|
source: "https://docs.x.ai/developers/faq/security"
|
|
20560
20720
|
}
|
|
20561
20721
|
});
|
|
20722
|
+
function grokPrice(input2, output2, cacheRead) {
|
|
20723
|
+
const base = { input: input2, output: output2, cacheRead };
|
|
20724
|
+
return tokenPrice(input2, output2, {
|
|
20725
|
+
cacheRead,
|
|
20726
|
+
longContext: scaledBand(2e5, base, { input: 2, output: 2, cacheRead: 2 })
|
|
20727
|
+
});
|
|
20728
|
+
}
|
|
20729
|
+
xai.model("grok-4.7", {
|
|
20730
|
+
name: "Grok 4.7",
|
|
20731
|
+
ctx: 5e5,
|
|
20732
|
+
capability: "reasoning",
|
|
20733
|
+
price: grokPrice(2, 6, 0.5)
|
|
20734
|
+
});
|
|
20562
20735
|
xai.model("grok-4.6", {
|
|
20563
20736
|
name: "Grok 4.6",
|
|
20564
20737
|
ctx: 5e5,
|
|
20565
20738
|
capability: "reasoning",
|
|
20566
|
-
price:
|
|
20567
|
-
cacheRead: 0.5,
|
|
20568
|
-
longContext: { thresholdInputTokens: 2e5, input: 4, output: 12 }
|
|
20569
|
-
}),
|
|
20739
|
+
price: grokPrice(2, 6, 0.5),
|
|
20570
20740
|
on: ["bedrock"]
|
|
20571
20741
|
});
|
|
20572
20742
|
xai.model("grok-4.5", {
|
|
20573
20743
|
name: "Grok 4.5",
|
|
20574
20744
|
ctx: 5e5,
|
|
20575
20745
|
capability: "reasoning",
|
|
20576
|
-
price:
|
|
20577
|
-
cacheRead: 0.3,
|
|
20578
|
-
longContext: { thresholdInputTokens: 2e5, input: 4, output: 12 }
|
|
20579
|
-
})
|
|
20746
|
+
price: grokPrice(2, 6, 0.3)
|
|
20580
20747
|
});
|
|
20581
20748
|
xai.model("grok-4.3", {
|
|
20582
20749
|
name: "Grok 4.3",
|
|
20583
20750
|
ctx: 1e6,
|
|
20584
20751
|
capability: "reasoning",
|
|
20585
|
-
price:
|
|
20586
|
-
cacheRead: 0.2,
|
|
20587
|
-
longContext: { thresholdInputTokens: 2e5, input: 2.5, output: 5 }
|
|
20588
|
-
}),
|
|
20752
|
+
price: grokPrice(1.25, 2.5, 0.2),
|
|
20589
20753
|
on: ["bedrock"]
|
|
20590
20754
|
});
|
|
20755
|
+
xai.model("grok-4.20-0309-reasoning", {
|
|
20756
|
+
name: "Grok 4.20 Reasoning",
|
|
20757
|
+
capability: "reasoning",
|
|
20758
|
+
ctx: 1e6,
|
|
20759
|
+
price: grokPrice(1.25, 2.5, 0.2)
|
|
20760
|
+
});
|
|
20761
|
+
xai.model("grok-4.20-0309-non-reasoning", {
|
|
20762
|
+
name: "Grok 4.20",
|
|
20763
|
+
capability: null,
|
|
20764
|
+
ctx: 1e6,
|
|
20765
|
+
price: grokPrice(1.25, 2.5, 0.2)
|
|
20766
|
+
});
|
|
20767
|
+
xai.model("grok-4.20-multi-agent-0309", {
|
|
20768
|
+
name: "Grok 4.20 Multi-Agent",
|
|
20769
|
+
capability: "reasoning",
|
|
20770
|
+
ctx: 1e6,
|
|
20771
|
+
price: grokPrice(1.25, 2.5, 0.2)
|
|
20772
|
+
});
|
|
20591
20773
|
xai.model("grok-build-0.1", {
|
|
20592
20774
|
name: "Grok Build 0.1",
|
|
20593
20775
|
ctx: 256e3,
|
|
20594
20776
|
capability: "code",
|
|
20595
|
-
price:
|
|
20596
|
-
cacheRead: 0.2,
|
|
20597
|
-
longContext: { thresholdInputTokens: 2e5, input: 2, output: 4 }
|
|
20598
|
-
})
|
|
20777
|
+
price: grokPrice(1, 2, 0.2)
|
|
20599
20778
|
});
|
|
20600
20779
|
var deepseek = vendor("deepseek", {
|
|
20601
20780
|
family: { id: "deepseek", name: "DeepSeek" },
|
|
@@ -20608,16 +20787,25 @@ var deepseek = vendor("deepseek", {
|
|
|
20608
20787
|
source: "https://cdn.deepseek.com/policies/en-US/deepseek-privacy-policy.html"
|
|
20609
20788
|
}
|
|
20610
20789
|
});
|
|
20790
|
+
deepseek.model("deepseek-flash", {
|
|
20791
|
+
name: "DeepSeek V4.1 Flash",
|
|
20792
|
+
ctx: 1e6,
|
|
20793
|
+
maxOut: 384e3,
|
|
20794
|
+
capability: null,
|
|
20795
|
+
price: tokenPrice(0.3, 1.2, { cacheRead: 6e-3 })
|
|
20796
|
+
});
|
|
20611
20797
|
deepseek.model("deepseek-v4-flash", {
|
|
20612
20798
|
name: "DeepSeek V4 Flash",
|
|
20613
20799
|
ctx: 1e6,
|
|
20800
|
+
maxOut: 384e3,
|
|
20614
20801
|
capability: null,
|
|
20615
|
-
price: tokenPrice(0.
|
|
20802
|
+
price: tokenPrice(0.3, 1.2, { cacheRead: 6e-3 }),
|
|
20616
20803
|
on: ["bedrock", "together", "fireworks", "openrouter", "ollama", "local"]
|
|
20617
20804
|
});
|
|
20618
20805
|
deepseek.model("deepseek-v4-pro", {
|
|
20619
20806
|
name: "DeepSeek V4 Pro",
|
|
20620
20807
|
ctx: 1e6,
|
|
20808
|
+
maxOut: 384e3,
|
|
20621
20809
|
capability: "reasoning",
|
|
20622
20810
|
price: tokenPrice(1.32, 3.96, { cacheRead: 0.044 }),
|
|
20623
20811
|
on: ["bedrock", "together", "fireworks", "openrouter"]
|
|
@@ -20664,7 +20852,14 @@ cohere.model("command-r-plus-08-2024", {
|
|
|
20664
20852
|
ctx: 128e3,
|
|
20665
20853
|
maxOut: 4e3,
|
|
20666
20854
|
price: tokenPrice(2.5, 10),
|
|
20667
|
-
|
|
20855
|
+
on: ["bedrock"]
|
|
20856
|
+
});
|
|
20857
|
+
cohere.model("command-r-plus-04-2024", {
|
|
20858
|
+
name: "Command R+ (04-2024)",
|
|
20859
|
+
seen: "discovered",
|
|
20860
|
+
ctx: 128e3,
|
|
20861
|
+
maxOut: 4e3,
|
|
20862
|
+
price: tokenPrice(3, 15),
|
|
20668
20863
|
aliases: ["command-r-plus"],
|
|
20669
20864
|
on: ["bedrock"]
|
|
20670
20865
|
});
|
|
@@ -20732,6 +20927,65 @@ var mistral = vendor("mistral", {
|
|
|
20732
20927
|
retention: "unknown",
|
|
20733
20928
|
defaultHosting: "local"
|
|
20734
20929
|
});
|
|
20930
|
+
var MISTRAL_API = { defaultHosting: "api" };
|
|
20931
|
+
mistral.model("mistral-large-4", {
|
|
20932
|
+
...MISTRAL_API,
|
|
20933
|
+
name: "Mistral Large 4",
|
|
20934
|
+
ctx: 1e6,
|
|
20935
|
+
capability: null,
|
|
20936
|
+
// Public preview at a sale rate; the published original is 1.36 / 4.18 / 0.14.
|
|
20937
|
+
price: tokenPrice(0.68, 2.09, { cacheRead: 0.07 })
|
|
20938
|
+
});
|
|
20939
|
+
mistral.model("mistral-large-2512", {
|
|
20940
|
+
...MISTRAL_API,
|
|
20941
|
+
name: "Mistral Large 3",
|
|
20942
|
+
ctx: 256e3,
|
|
20943
|
+
capability: null,
|
|
20944
|
+
price: tokenPrice(0.5, 1.5, { cacheRead: 0.05 })
|
|
20945
|
+
});
|
|
20946
|
+
mistral.model("mistral-medium-3-5", {
|
|
20947
|
+
...MISTRAL_API,
|
|
20948
|
+
name: "Mistral Medium 3.5",
|
|
20949
|
+
ctx: 256e3,
|
|
20950
|
+
capability: null,
|
|
20951
|
+
price: tokenPrice(1.5, 7.5, { cacheRead: 0.15 })
|
|
20952
|
+
});
|
|
20953
|
+
mistral.model("mistral-small-2603", {
|
|
20954
|
+
...MISTRAL_API,
|
|
20955
|
+
name: "Mistral Small 4",
|
|
20956
|
+
ctx: 256e3,
|
|
20957
|
+
capability: null,
|
|
20958
|
+
price: tokenPrice(0.15, 0.6, { cacheRead: 0.015 })
|
|
20959
|
+
});
|
|
20960
|
+
mistral.model("ministral-14b-2512", {
|
|
20961
|
+
...MISTRAL_API,
|
|
20962
|
+
name: "Ministral 3 14B",
|
|
20963
|
+
ctx: 256e3,
|
|
20964
|
+
capability: null,
|
|
20965
|
+
price: tokenPrice(0.2, 0.2, { cacheRead: 0.02 })
|
|
20966
|
+
});
|
|
20967
|
+
mistral.model("ministral-8b-2512", {
|
|
20968
|
+
...MISTRAL_API,
|
|
20969
|
+
name: "Ministral 3 8B",
|
|
20970
|
+
ctx: 256e3,
|
|
20971
|
+
capability: null,
|
|
20972
|
+
price: tokenPrice(0.15, 0.15, { cacheRead: 0.015 })
|
|
20973
|
+
});
|
|
20974
|
+
mistral.model("ministral-3b-2512", {
|
|
20975
|
+
...MISTRAL_API,
|
|
20976
|
+
name: "Ministral 3 3B",
|
|
20977
|
+
ctx: 256e3,
|
|
20978
|
+
capability: null,
|
|
20979
|
+
price: tokenPrice(0.1, 0.1, { cacheRead: 0.01 })
|
|
20980
|
+
});
|
|
20981
|
+
mistral.model("codestral-2508", {
|
|
20982
|
+
...MISTRAL_API,
|
|
20983
|
+
name: "Codestral",
|
|
20984
|
+
ctx: 128e3,
|
|
20985
|
+
capability: "code",
|
|
20986
|
+
openWeights: false,
|
|
20987
|
+
price: tokenPrice(0.3, 0.9, { cacheRead: 0.03 })
|
|
20988
|
+
});
|
|
20735
20989
|
mistral.model("mixtral-8x7b", {
|
|
20736
20990
|
name: "Mixtral 8x7B",
|
|
20737
20991
|
seen: "discovered",
|
|
@@ -20895,11 +21149,14 @@ var COMPACT = new Intl.NumberFormat("en-US", {
|
|
|
20895
21149
|
// ../../packages/schema/src/token/token-report.ts
|
|
20896
21150
|
var num = (value) => value ?? 0;
|
|
20897
21151
|
function costUsageOf(a, promptTokens) {
|
|
21152
|
+
const write1h = num(a.ephemeral_1h_input_tokens);
|
|
21153
|
+
const write5m = num(a.ephemeral_5m_input_tokens);
|
|
21154
|
+
const unsplit = Math.max(num(a.cache_creation_input_tokens) - write1h - write5m, 0);
|
|
20898
21155
|
const usage = {
|
|
20899
21156
|
inputTokens: num(a.input_tokens),
|
|
20900
21157
|
outputTokens: num(a.output_tokens),
|
|
20901
|
-
cacheWrite1hTokens:
|
|
20902
|
-
cacheWrite5mTokens:
|
|
21158
|
+
cacheWrite1hTokens: write1h,
|
|
21159
|
+
cacheWrite5mTokens: write5m + unsplit,
|
|
20903
21160
|
cacheReadTokens: num(a.cache_read_input_tokens),
|
|
20904
21161
|
webSearchRequests: num(a.web_search_requests)
|
|
20905
21162
|
};
|
|
@@ -27547,7 +27804,8 @@ var TIMELINE_COLUMNS = `
|
|
|
27547
27804
|
json_extract(attributes, '$.internal') AS internal,
|
|
27548
27805
|
json_extract(attributes, '$.flagged') AS flagged`;
|
|
27549
27806
|
var CALL_PROMPT_TOKENS = `(coalesce(input_tokens, 0) + coalesce(cache_read_input_tokens, 0)
|
|
27550
|
-
+ coalesce(
|
|
27807
|
+
+ max(coalesce(cache_creation_input_tokens, 0),
|
|
27808
|
+
coalesce(ephemeral_1h_input_tokens, 0) + coalesce(ephemeral_5m_input_tokens, 0)))`;
|
|
27551
27809
|
var CALL_BAND = LONG_CONTEXT_THRESHOLDS.length === 0 ? "0" : LONG_CONTEXT_THRESHOLDS.map((t) => `(${CALL_PROMPT_TOKENS} > ${String(Math.trunc(t))})`).join(
|
|
27552
27810
|
" + "
|
|
27553
27811
|
);
|
|
@@ -36220,6 +36478,10 @@ var GROWTH_CORPORA = [
|
|
|
36220
36478
|
build: (length) => joinTo(length, "[", "]", (i) => `"${SQL_WORDS[i % SQL_WORDS.length] ?? ""} ${String(i)}"`)
|
|
36221
36479
|
},
|
|
36222
36480
|
{ name: "single-quoted keyword run ('where)", build: (length) => repeatTo("'where", length) },
|
|
36481
|
+
{
|
|
36482
|
+
name: 'double-quoted keyword literal run ("where" )',
|
|
36483
|
+
build: (length) => repeatTo('"where" ', length)
|
|
36484
|
+
},
|
|
36223
36485
|
{ name: "double-quote run", build: (length) => repeatTo('"', length) },
|
|
36224
36486
|
{ name: "space run", build: (length) => repeatTo(" ", length) },
|
|
36225
36487
|
{ name: "newline run", build: (length) => repeatTo("\n", length) },
|
|
@@ -38591,7 +38853,7 @@ var BUNDLED_PACKS = [
|
|
|
38591
38853
|
{
|
|
38592
38854
|
packId: "code-flaws",
|
|
38593
38855
|
name: "Code Security Flaws",
|
|
38594
|
-
version: "0.1.
|
|
38856
|
+
version: "0.1.2",
|
|
38595
38857
|
rawRules: [
|
|
38596
38858
|
sql_inject_concat_default,
|
|
38597
38859
|
sql_inject_concat_dot_default,
|