@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
package/scripts/filescan.js
CHANGED
|
@@ -32,9 +32,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
mod
|
|
33
33
|
));
|
|
34
34
|
|
|
35
|
-
// ../../node_modules/.pnpm/ignore@7.0.
|
|
35
|
+
// ../../node_modules/.pnpm/ignore@7.0.12/node_modules/ignore/index.js
|
|
36
36
|
var require_ignore = __commonJS({
|
|
37
|
-
"../../node_modules/.pnpm/ignore@7.0.
|
|
37
|
+
"../../node_modules/.pnpm/ignore@7.0.12/node_modules/ignore/index.js"(exports, module) {
|
|
38
38
|
"use strict";
|
|
39
39
|
function makeArray(subject) {
|
|
40
40
|
return Array.isArray(subject) ? subject : [subject];
|
|
@@ -44,7 +44,7 @@ var require_ignore = __commonJS({
|
|
|
44
44
|
var SPACE = " ";
|
|
45
45
|
var ESCAPE = "\\";
|
|
46
46
|
var REGEX_LITERAL_SPECIAL = /[.*+?()[\]{}^$|\\/]/;
|
|
47
|
-
var
|
|
47
|
+
var BOM = "\uFEFF";
|
|
48
48
|
var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
|
|
49
49
|
var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
|
|
50
50
|
var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
|
|
@@ -180,7 +180,9 @@ var require_ignore = __commonJS({
|
|
|
180
180
|
const char = pattern[index];
|
|
181
181
|
if (char === ESCAPE) {
|
|
182
182
|
const escaped = pattern[index + 1];
|
|
183
|
-
if (escaped ===
|
|
183
|
+
if (escaped === UNDEFINED || escaped === SLASH3 && index + 2 === length) {
|
|
184
|
+
out += hold(NEVER_MATCH);
|
|
185
|
+
} else if (escaped === "*" || escaped === "[" || escaped === SPACE || escaped === ESCAPE) {
|
|
184
186
|
out += pattern.slice(index, index + 2);
|
|
185
187
|
} else {
|
|
186
188
|
out += hold(
|
|
@@ -213,35 +215,6 @@ var require_ignore = __commonJS({
|
|
|
213
215
|
var DIRECT = null;
|
|
214
216
|
var REGEX_INNER_SLASH = /\/(?!$)/;
|
|
215
217
|
var REPLACERS = [
|
|
216
|
-
[
|
|
217
|
-
// Remove BOM
|
|
218
|
-
// TODO:
|
|
219
|
-
// Other similar zero-width characters?
|
|
220
|
-
/^\uFEFF/,
|
|
221
|
-
() => EMPTY,
|
|
222
|
-
"\uFEFF"
|
|
223
|
-
],
|
|
224
|
-
[
|
|
225
|
-
// A trailing line terminator, left on when a whole file's contents are
|
|
226
|
-
// added as one pattern rather than split into lines. git never sees one
|
|
227
|
-
// -- it reads a `.gitignore` line by line -- so it is not part of the
|
|
228
|
-
// pattern and is dropped here, apart from the trailing-space trimming,
|
|
229
|
-
// which follows git in touching spaces and nothing else.
|
|
230
|
-
/[\r\n]+$/,
|
|
231
|
-
() => EMPTY
|
|
232
|
-
],
|
|
233
|
-
// > Trailing spaces are ignored unless they are quoted with backslash ("\")
|
|
234
|
-
[
|
|
235
|
-
// Only spaces, never tabs or other whitespace: git trims a trailing run
|
|
236
|
-
// of `' '` and nothing else (dir.c, `trim_trailing_spaces`, a single
|
|
237
|
-
// `case ' '`), so a pattern ending in a tab keeps it as a literal.
|
|
238
|
-
// (a\ ) -> (a )
|
|
239
|
-
// (a ) -> (a)
|
|
240
|
-
// (a ) -> (a)
|
|
241
|
-
// (a \ ) -> (a )
|
|
242
|
-
/((?:\\\\)*?)(\\? +)$/,
|
|
243
|
-
(_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)
|
|
244
|
-
],
|
|
245
218
|
// Replace (\ ) with ' '
|
|
246
219
|
// Only a space: an escaped tab or other whitespace is already a literal by
|
|
247
220
|
// the time it reaches here, and a bare tab must be left as one, not turned
|
|
@@ -250,11 +223,12 @@ var require_ignore = __commonJS({
|
|
|
250
223
|
// (\\ ) -> '\\ '
|
|
251
224
|
// (\\\ ) -> '\\ '
|
|
252
225
|
[
|
|
253
|
-
|
|
254
|
-
(
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
226
|
+
// A run of backslashes is taken whole, from its first one, so no match
|
|
227
|
+
// ever starts again inside it -- `(\\+?) ` did, which made a long run
|
|
228
|
+
// quadratic.
|
|
229
|
+
/(\\+)( ?)/g,
|
|
230
|
+
(_, run, space) => space ? run.slice(0, run.length - run.length % 2) + SPACE : run,
|
|
231
|
+
ESCAPE + SPACE
|
|
258
232
|
],
|
|
259
233
|
// Escape metacharacters
|
|
260
234
|
// which is written down by users but means special for regular expressions.
|
|
@@ -574,7 +548,7 @@ var require_ignore = __commonJS({
|
|
|
574
548
|
return cut < 0 ? EMPTY : path.slice(0, cut + 1);
|
|
575
549
|
};
|
|
576
550
|
var isString = (subject) => typeof subject === "string";
|
|
577
|
-
var checkPattern = (pattern) => pattern && isString(pattern) && !
|
|
551
|
+
var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern);
|
|
578
552
|
var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean);
|
|
579
553
|
var IgnoreRule = class {
|
|
580
554
|
constructor(pattern, mark, body, ignoreCase, negative, prefix) {
|
|
@@ -615,15 +589,44 @@ var require_ignore = __commonJS({
|
|
|
615
589
|
return define(this, key, regex);
|
|
616
590
|
}
|
|
617
591
|
};
|
|
592
|
+
var isLineEnd = (char) => char === "\r" || char === "\n";
|
|
593
|
+
var trimEnd = (body) => {
|
|
594
|
+
let end = body.length;
|
|
595
|
+
while (end && isLineEnd(body[end - 1])) {
|
|
596
|
+
end--;
|
|
597
|
+
}
|
|
598
|
+
const lineEnd = end;
|
|
599
|
+
while (end && body[end - 1] === SPACE) {
|
|
600
|
+
end--;
|
|
601
|
+
}
|
|
602
|
+
if (end === lineEnd) {
|
|
603
|
+
return body.slice(0, end);
|
|
604
|
+
}
|
|
605
|
+
let backslashes = 0;
|
|
606
|
+
while (backslashes < end && body[end - backslashes - 1] === ESCAPE) {
|
|
607
|
+
backslashes++;
|
|
608
|
+
}
|
|
609
|
+
return backslashes % 2 ? body.slice(0, end - 1) + SPACE : body.slice(0, end);
|
|
610
|
+
};
|
|
618
611
|
var createRule = ({
|
|
619
612
|
pattern,
|
|
620
613
|
mark
|
|
621
614
|
}, ignoreCase) => {
|
|
615
|
+
let body = pattern[0] === BOM ? pattern.slice(1) : pattern;
|
|
616
|
+
if (body[0] === "#") {
|
|
617
|
+
return;
|
|
618
|
+
}
|
|
622
619
|
let negative = false;
|
|
623
|
-
|
|
624
|
-
if (body.indexOf("!") === 0) {
|
|
620
|
+
if (body[0] === "!") {
|
|
625
621
|
negative = true;
|
|
626
|
-
body = body.
|
|
622
|
+
body = body.slice(1);
|
|
623
|
+
}
|
|
624
|
+
const last = body[body.length - 1];
|
|
625
|
+
if (last === SPACE || last === "\r" || last === "\n") {
|
|
626
|
+
body = trimEnd(body);
|
|
627
|
+
}
|
|
628
|
+
if (!body) {
|
|
629
|
+
return;
|
|
627
630
|
}
|
|
628
631
|
body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
|
|
629
632
|
const regexPrefix = makeRegexPrefix(body);
|
|
@@ -654,8 +657,8 @@ var require_ignore = __commonJS({
|
|
|
654
657
|
pattern
|
|
655
658
|
};
|
|
656
659
|
}
|
|
657
|
-
|
|
658
|
-
|
|
660
|
+
const rule = checkPattern(pattern.pattern) && createRule(pattern, this._ignoreCase);
|
|
661
|
+
if (rule) {
|
|
659
662
|
this._added = true;
|
|
660
663
|
this._rules.push(rule);
|
|
661
664
|
if (matchesBasename(rule.body)) {
|
|
@@ -20724,7 +20727,10 @@ function date4(params) {
|
|
|
20724
20727
|
var LongContextTier = external_exports.object({
|
|
20725
20728
|
thresholdInputTokens: external_exports.number().int().positive(),
|
|
20726
20729
|
input: external_exports.number().nonnegative().nullable(),
|
|
20727
|
-
output: external_exports.number().nonnegative().nullable()
|
|
20730
|
+
output: external_exports.number().nonnegative().nullable(),
|
|
20731
|
+
cacheRead: external_exports.number().nonnegative().nullable().optional(),
|
|
20732
|
+
cacheWrite5m: external_exports.number().nonnegative().nullable().optional(),
|
|
20733
|
+
cacheWrite1h: external_exports.number().nonnegative().nullable().optional()
|
|
20728
20734
|
});
|
|
20729
20735
|
var ModelPrice = external_exports.object({
|
|
20730
20736
|
/** USD per 1M uncached input tokens, at or below any long-context threshold. */
|
|
@@ -20733,7 +20739,8 @@ var ModelPrice = external_exports.object({
|
|
|
20733
20739
|
output: external_exports.number().nonnegative(),
|
|
20734
20740
|
/**
|
|
20735
20741
|
* Rate band above a size threshold, or `null` when the model is flat-rated.
|
|
20736
|
-
*
|
|
20742
|
+
* OpenAI, Google, xAI and some Anthropic models (Haiku 5.5) band; most
|
|
20743
|
+
* Claude models are flat across their window.
|
|
20737
20744
|
*/
|
|
20738
20745
|
longContext: LongContextTier.nullable(),
|
|
20739
20746
|
/** USD per 1M tokens written to a 5-minute ephemeral cache, or null if unpriced. */
|
|
@@ -20746,18 +20753,35 @@ var ModelPrice = external_exports.object({
|
|
|
20746
20753
|
webSearch: external_exports.number().nonnegative().nullable()
|
|
20747
20754
|
});
|
|
20748
20755
|
var WEB_SEARCH_PER_REQUEST = 0.01;
|
|
20749
|
-
function anthropicPrice(input2, output2, cacheRead) {
|
|
20756
|
+
function anthropicPrice(input2, output2, cacheRead, longContext = null) {
|
|
20750
20757
|
return Object.freeze({
|
|
20751
20758
|
input: input2,
|
|
20752
20759
|
output: output2,
|
|
20753
|
-
longContext: null,
|
|
20754
|
-
// flat across the full window on every current Claude
|
|
20760
|
+
longContext: longContext === null ? null : Object.freeze(longContext),
|
|
20755
20761
|
cacheWrite5m: input2 * 1.25,
|
|
20756
20762
|
cacheWrite1h: input2 * 2,
|
|
20757
20763
|
cacheRead,
|
|
20758
20764
|
webSearch: WEB_SEARCH_PER_REQUEST
|
|
20759
20765
|
});
|
|
20760
20766
|
}
|
|
20767
|
+
function anthropicBand(thresholdInputTokens, input2, output2, cacheRead) {
|
|
20768
|
+
return {
|
|
20769
|
+
thresholdInputTokens,
|
|
20770
|
+
input: input2,
|
|
20771
|
+
output: output2,
|
|
20772
|
+
cacheRead,
|
|
20773
|
+
cacheWrite5m: input2 * 1.25,
|
|
20774
|
+
cacheWrite1h: input2 * 2
|
|
20775
|
+
};
|
|
20776
|
+
}
|
|
20777
|
+
function scaledBand(thresholdInputTokens, base, scale) {
|
|
20778
|
+
return {
|
|
20779
|
+
thresholdInputTokens,
|
|
20780
|
+
input: base.input * scale.input,
|
|
20781
|
+
output: base.output * scale.output,
|
|
20782
|
+
...base.cacheRead === void 0 ? {} : { cacheRead: base.cacheRead * scale.cacheRead }
|
|
20783
|
+
};
|
|
20784
|
+
}
|
|
20761
20785
|
function tokenPrice(input2, output2, options = {}) {
|
|
20762
20786
|
return Object.freeze({
|
|
20763
20787
|
input: input2,
|
|
@@ -20790,17 +20814,19 @@ function serviceTierMultiplier(tier) {
|
|
|
20790
20814
|
function promptTokensOf(usage) {
|
|
20791
20815
|
return usage.promptTokens ?? (usage.inputTokens ?? 0) + (usage.cacheReadTokens ?? 0) + (usage.cacheWrite1hTokens ?? 0) + (usage.cacheWrite5mTokens ?? 0);
|
|
20792
20816
|
}
|
|
20817
|
+
function bandRate(column, base) {
|
|
20818
|
+
return column === void 0 ? base : column;
|
|
20819
|
+
}
|
|
20793
20820
|
function costOf(price, usage) {
|
|
20821
|
+
const band = price.longContext !== null && promptTokensOf(usage) > price.longContext.thresholdInputTokens ? price.longContext : null;
|
|
20794
20822
|
const metered = [
|
|
20795
|
-
[usage.
|
|
20796
|
-
[usage.
|
|
20797
|
-
[usage.
|
|
20823
|
+
[usage.inputTokens ?? 0, bandRate(band?.input, price.input)],
|
|
20824
|
+
[usage.outputTokens ?? 0, bandRate(band?.output, price.output)],
|
|
20825
|
+
[usage.cacheWrite1hTokens ?? 0, bandRate(band?.cacheWrite1h, price.cacheWrite1h)],
|
|
20826
|
+
[usage.cacheWrite5mTokens ?? 0, bandRate(band?.cacheWrite5m, price.cacheWrite5m)],
|
|
20827
|
+
[usage.cacheReadTokens ?? 0, bandRate(band?.cacheRead, price.cacheRead)]
|
|
20798
20828
|
];
|
|
20799
|
-
|
|
20800
|
-
if (band !== null && (band.input === null || band.output === null)) return null;
|
|
20801
|
-
const inputRate = band?.input ?? price.input;
|
|
20802
|
-
const outputRate = band?.output ?? price.output;
|
|
20803
|
-
let tokenCost = (usage.inputTokens ?? 0) * inputRate + (usage.outputTokens ?? 0) * outputRate;
|
|
20829
|
+
let tokenCost = 0;
|
|
20804
20830
|
for (const [tokens, rate] of metered) {
|
|
20805
20831
|
if (tokens === 0) continue;
|
|
20806
20832
|
if (rate === null) return null;
|
|
@@ -21090,10 +21116,20 @@ anthropic.model("claude-fable-5-1", {
|
|
|
21090
21116
|
});
|
|
21091
21117
|
anthropic.model("claude-fable-5", {
|
|
21092
21118
|
name: "Claude Fable 5",
|
|
21119
|
+
ctx: 1e6,
|
|
21120
|
+
maxOut: 128e3,
|
|
21093
21121
|
capability: "reasoning",
|
|
21094
21122
|
price: anthropicPrice(10, 50, 1),
|
|
21095
21123
|
on: [...CLAUDE_RESELLERS]
|
|
21096
21124
|
});
|
|
21125
|
+
anthropic.model("claude-opus-5-5", {
|
|
21126
|
+
name: "Claude Opus 5.5",
|
|
21127
|
+
ctx: 1e6,
|
|
21128
|
+
maxOut: 128e3,
|
|
21129
|
+
capability: "reasoning",
|
|
21130
|
+
price: anthropicPrice(4, 20, 0.2),
|
|
21131
|
+
on: [...CLAUDE_RESELLERS]
|
|
21132
|
+
});
|
|
21097
21133
|
anthropic.model("claude-opus-5", {
|
|
21098
21134
|
name: "Claude Opus 5",
|
|
21099
21135
|
ctx: 1e6,
|
|
@@ -21104,24 +21140,32 @@ anthropic.model("claude-opus-5", {
|
|
|
21104
21140
|
});
|
|
21105
21141
|
anthropic.model("claude-opus-4-8", {
|
|
21106
21142
|
name: "Claude Opus 4.8",
|
|
21143
|
+
ctx: 1e6,
|
|
21144
|
+
maxOut: 128e3,
|
|
21107
21145
|
capability: "reasoning",
|
|
21108
21146
|
price: anthropicPrice(5, 25, 0.5),
|
|
21109
21147
|
on: [...CLAUDE_RESELLERS]
|
|
21110
21148
|
});
|
|
21111
21149
|
anthropic.model("claude-opus-4-7", {
|
|
21112
21150
|
name: "Claude Opus 4.7",
|
|
21151
|
+
ctx: 1e6,
|
|
21152
|
+
maxOut: 128e3,
|
|
21113
21153
|
capability: "reasoning",
|
|
21114
21154
|
price: anthropicPrice(5, 25, 0.5),
|
|
21115
21155
|
on: [...CLAUDE_RESELLERS]
|
|
21116
21156
|
});
|
|
21117
21157
|
anthropic.model("claude-opus-4-6", {
|
|
21118
21158
|
name: "Claude Opus 4.6",
|
|
21159
|
+
ctx: 1e6,
|
|
21160
|
+
maxOut: 128e3,
|
|
21119
21161
|
capability: "reasoning",
|
|
21120
21162
|
price: anthropicPrice(5, 25, 0.5),
|
|
21121
21163
|
on: [...CLAUDE_RESELLERS]
|
|
21122
21164
|
});
|
|
21123
21165
|
anthropic.model("claude-opus-4-5", {
|
|
21124
21166
|
name: "Claude Opus 4.5",
|
|
21167
|
+
ctx: 2e5,
|
|
21168
|
+
maxOut: 64e3,
|
|
21125
21169
|
capability: "reasoning",
|
|
21126
21170
|
price: anthropicPrice(5, 25, 0.5),
|
|
21127
21171
|
on: [...CLAUDE_RESELLERS]
|
|
@@ -21132,6 +21176,14 @@ anthropic.model("claude-opus-4-1", {
|
|
|
21132
21176
|
price: anthropicPrice(15, 75, 1.5),
|
|
21133
21177
|
on: [...CLAUDE_RESELLERS]
|
|
21134
21178
|
});
|
|
21179
|
+
anthropic.model("claude-sonnet-5-5", {
|
|
21180
|
+
name: "Claude Sonnet 5.5",
|
|
21181
|
+
ctx: 1e6,
|
|
21182
|
+
maxOut: 128e3,
|
|
21183
|
+
capability: "reasoning",
|
|
21184
|
+
price: anthropicPrice(2, 10, 0.1),
|
|
21185
|
+
on: [...CLAUDE_RESELLERS]
|
|
21186
|
+
});
|
|
21135
21187
|
anthropic.model("claude-sonnet-5", {
|
|
21136
21188
|
name: "Claude Sonnet 5",
|
|
21137
21189
|
ctx: 1e6,
|
|
@@ -21142,16 +21194,30 @@ anthropic.model("claude-sonnet-5", {
|
|
|
21142
21194
|
});
|
|
21143
21195
|
anthropic.model("claude-sonnet-4-6", {
|
|
21144
21196
|
name: "Claude Sonnet 4.6",
|
|
21197
|
+
ctx: 1e6,
|
|
21198
|
+
maxOut: 128e3,
|
|
21145
21199
|
capability: "reasoning",
|
|
21146
21200
|
price: anthropicPrice(3, 15, 0.3),
|
|
21147
21201
|
on: [...CLAUDE_RESELLERS]
|
|
21148
21202
|
});
|
|
21149
21203
|
anthropic.model("claude-sonnet-4-5", {
|
|
21150
21204
|
name: "Claude Sonnet 4.5",
|
|
21205
|
+
ctx: 2e5,
|
|
21206
|
+
maxOut: 64e3,
|
|
21151
21207
|
capability: "reasoning",
|
|
21152
21208
|
price: anthropicPrice(3, 15, 0.3),
|
|
21153
21209
|
on: [...CLAUDE_RESELLERS]
|
|
21154
21210
|
});
|
|
21211
|
+
anthropic.model("claude-haiku-5-5", {
|
|
21212
|
+
name: "Claude Haiku 5.5",
|
|
21213
|
+
ctx: 1e6,
|
|
21214
|
+
maxOut: 128e3,
|
|
21215
|
+
capability: null,
|
|
21216
|
+
// A prompt over 100,000 tokens, cache reads and writes included, bills the
|
|
21217
|
+
// whole request at the higher band.
|
|
21218
|
+
price: anthropicPrice(0.1, 0.5, 0.01, anthropicBand(1e5, 0.5, 2.5, 0.05)),
|
|
21219
|
+
on: [...CLAUDE_RESELLERS]
|
|
21220
|
+
});
|
|
21155
21221
|
anthropic.model("claude-haiku-4-5", {
|
|
21156
21222
|
name: "Claude Haiku 4.5",
|
|
21157
21223
|
ctx: 2e5,
|
|
@@ -21174,7 +21240,13 @@ var OPENAI_TRAINING = {
|
|
|
21174
21240
|
consumerControl: "opt-out",
|
|
21175
21241
|
source: "https://developers.openai.com/api/docs/guides/your-data"
|
|
21176
21242
|
};
|
|
21177
|
-
|
|
21243
|
+
function gptPrice(input2, output2, cacheRead) {
|
|
21244
|
+
const base = { input: input2, output: output2, ...cacheRead === void 0 ? {} : { cacheRead } };
|
|
21245
|
+
return tokenPrice(input2, output2, {
|
|
21246
|
+
...base,
|
|
21247
|
+
longContext: scaledBand(272e3, base, { input: 2, output: 1.5, cacheRead: 2 })
|
|
21248
|
+
});
|
|
21249
|
+
}
|
|
21178
21250
|
var openai = vendor("openai", {
|
|
21179
21251
|
family: { id: "gpt", name: "GPT" },
|
|
21180
21252
|
region: "us",
|
|
@@ -21182,12 +21254,45 @@ var openai = vendor("openai", {
|
|
|
21182
21254
|
training: OPENAI_TRAINING
|
|
21183
21255
|
});
|
|
21184
21256
|
var OPENAI_RESELLERS = ["azure", "foundry"];
|
|
21257
|
+
openai.model("gpt-6-astra", {
|
|
21258
|
+
name: "GPT-6 Astra",
|
|
21259
|
+
ctx: 105e4,
|
|
21260
|
+
maxOut: 128e3,
|
|
21261
|
+
capability: "reasoning",
|
|
21262
|
+
price: gptPrice(10, 50, 1),
|
|
21263
|
+
on: [...OPENAI_RESELLERS]
|
|
21264
|
+
});
|
|
21265
|
+
openai.model("gpt-6.1-sol", {
|
|
21266
|
+
name: "GPT-6.1 Sol",
|
|
21267
|
+
ctx: 105e4,
|
|
21268
|
+
maxOut: 128e3,
|
|
21269
|
+
capability: "reasoning",
|
|
21270
|
+
price: gptPrice(2, 10, 0.1),
|
|
21271
|
+
on: [...OPENAI_RESELLERS]
|
|
21272
|
+
});
|
|
21273
|
+
openai.model("gpt-6-sol", {
|
|
21274
|
+
name: "GPT-6 Sol",
|
|
21275
|
+
ctx: 105e4,
|
|
21276
|
+
maxOut: 128e3,
|
|
21277
|
+
capability: "reasoning",
|
|
21278
|
+
price: gptPrice(2, 10, 0.2),
|
|
21279
|
+
on: [...OPENAI_RESELLERS]
|
|
21280
|
+
});
|
|
21281
|
+
openai.model("gpt-6-luna", {
|
|
21282
|
+
name: "GPT-6 Luna",
|
|
21283
|
+
ctx: 105e4,
|
|
21284
|
+
maxOut: 128e3,
|
|
21285
|
+
capability: null,
|
|
21286
|
+
price: gptPrice(0.1, 0.5, 0.01),
|
|
21287
|
+
on: [...OPENAI_RESELLERS]
|
|
21288
|
+
});
|
|
21185
21289
|
openai.model("gpt-5.6-sol", {
|
|
21186
21290
|
name: "GPT-5.6 Sol",
|
|
21291
|
+
// Promotional rate, published as available at least through 2026-11-21.
|
|
21187
21292
|
ctx: 105e4,
|
|
21188
21293
|
maxOut: 128e3,
|
|
21189
21294
|
capability: "reasoning",
|
|
21190
|
-
price:
|
|
21295
|
+
price: gptPrice(4, 20, 0.4),
|
|
21191
21296
|
on: [...OPENAI_RESELLERS]
|
|
21192
21297
|
});
|
|
21193
21298
|
openai.model("gpt-5.6-terra", {
|
|
@@ -21195,7 +21300,7 @@ openai.model("gpt-5.6-terra", {
|
|
|
21195
21300
|
ctx: 105e4,
|
|
21196
21301
|
maxOut: 128e3,
|
|
21197
21302
|
capability: "reasoning",
|
|
21198
|
-
price:
|
|
21303
|
+
price: gptPrice(2, 12, 0.2),
|
|
21199
21304
|
on: [...OPENAI_RESELLERS]
|
|
21200
21305
|
});
|
|
21201
21306
|
openai.model("gpt-5.6-luna", {
|
|
@@ -21203,7 +21308,7 @@ openai.model("gpt-5.6-luna", {
|
|
|
21203
21308
|
ctx: 105e4,
|
|
21204
21309
|
maxOut: 128e3,
|
|
21205
21310
|
capability: null,
|
|
21206
|
-
price:
|
|
21311
|
+
price: gptPrice(0.2, 1.2, 0.02),
|
|
21207
21312
|
on: [...OPENAI_RESELLERS]
|
|
21208
21313
|
});
|
|
21209
21314
|
openai.model("gpt-5.5", {
|
|
@@ -21211,7 +21316,15 @@ openai.model("gpt-5.5", {
|
|
|
21211
21316
|
ctx: 105e4,
|
|
21212
21317
|
maxOut: 128e3,
|
|
21213
21318
|
capability: "reasoning",
|
|
21214
|
-
price:
|
|
21319
|
+
price: gptPrice(5, 30, 0.5),
|
|
21320
|
+
on: [...OPENAI_RESELLERS]
|
|
21321
|
+
});
|
|
21322
|
+
openai.model("gpt-5.5-pro", {
|
|
21323
|
+
name: "GPT-5.5 Pro",
|
|
21324
|
+
ctx: 105e4,
|
|
21325
|
+
maxOut: 128e3,
|
|
21326
|
+
capability: "reasoning",
|
|
21327
|
+
price: gptPrice(30, 180),
|
|
21215
21328
|
on: [...OPENAI_RESELLERS]
|
|
21216
21329
|
});
|
|
21217
21330
|
openai.model("gpt-5.4", {
|
|
@@ -21219,7 +21332,7 @@ openai.model("gpt-5.4", {
|
|
|
21219
21332
|
ctx: 105e4,
|
|
21220
21333
|
maxOut: 128e3,
|
|
21221
21334
|
capability: "reasoning",
|
|
21222
|
-
price:
|
|
21335
|
+
price: gptPrice(2.5, 15, 0.25),
|
|
21223
21336
|
on: [...OPENAI_RESELLERS]
|
|
21224
21337
|
});
|
|
21225
21338
|
openai.model("gpt-5.4-mini", {
|
|
@@ -21265,6 +21378,7 @@ openai.model("gpt-5", {
|
|
|
21265
21378
|
openai.model("gpt-5-mini", {
|
|
21266
21379
|
name: "GPT-5 mini",
|
|
21267
21380
|
ctx: 4e5,
|
|
21381
|
+
maxOut: 128e3,
|
|
21268
21382
|
capability: null,
|
|
21269
21383
|
price: tokenPrice(0.25, 2, { cacheRead: 0.025 }),
|
|
21270
21384
|
on: [...OPENAI_RESELLERS]
|
|
@@ -21279,11 +21393,15 @@ openai.model("gpt-5-nano", {
|
|
|
21279
21393
|
});
|
|
21280
21394
|
openai.model("gpt-4.1", {
|
|
21281
21395
|
name: "GPT-4.1",
|
|
21396
|
+
ctx: 1047576,
|
|
21397
|
+
maxOut: 32768,
|
|
21282
21398
|
price: tokenPrice(2, 8, { cacheRead: 0.5 }),
|
|
21283
21399
|
on: [...OPENAI_RESELLERS]
|
|
21284
21400
|
});
|
|
21285
21401
|
openai.model("gpt-4o", {
|
|
21286
21402
|
name: "GPT-4o",
|
|
21403
|
+
ctx: 128e3,
|
|
21404
|
+
maxOut: 16384,
|
|
21287
21405
|
price: tokenPrice(2.5, 10, { cacheRead: 1.25 }),
|
|
21288
21406
|
on: [...OPENAI_RESELLERS]
|
|
21289
21407
|
});
|
|
@@ -21307,6 +21425,8 @@ openai.model("gpt-4-turbo", {
|
|
|
21307
21425
|
});
|
|
21308
21426
|
openai.model("o3", {
|
|
21309
21427
|
name: "o3",
|
|
21428
|
+
ctx: 2e5,
|
|
21429
|
+
maxOut: 1e5,
|
|
21310
21430
|
capability: "reasoning",
|
|
21311
21431
|
price: tokenPrice(2, 8, { cacheRead: 0.5 }),
|
|
21312
21432
|
on: [...OPENAI_RESELLERS]
|
|
@@ -21359,57 +21479,100 @@ var google = vendor("google", {
|
|
|
21359
21479
|
retention: "configurable",
|
|
21360
21480
|
training: GOOGLE_TRAINING
|
|
21361
21481
|
});
|
|
21482
|
+
google.model("gemini-3.8-flash", {
|
|
21483
|
+
name: "Gemini 3.8 Flash",
|
|
21484
|
+
ctx: 1048576,
|
|
21485
|
+
maxOut: 65536,
|
|
21486
|
+
capability: null,
|
|
21487
|
+
price: tokenPrice(0.75, 3.75, { cacheRead: 0.075 }),
|
|
21488
|
+
on: ["vertex"]
|
|
21489
|
+
});
|
|
21362
21490
|
google.model("gemini-3.7-flash", {
|
|
21363
21491
|
name: "Gemini 3.7 Flash",
|
|
21364
21492
|
capability: null,
|
|
21365
|
-
// Promotional rate; the published post-promotion rate is 1.50 / 7.50.
|
|
21366
21493
|
price: tokenPrice(0.75, 3.75),
|
|
21367
21494
|
on: ["vertex"]
|
|
21368
21495
|
});
|
|
21369
21496
|
google.model("gemini-3.6-flash", {
|
|
21370
21497
|
name: "Gemini 3.6 Flash",
|
|
21498
|
+
ctx: 1048576,
|
|
21499
|
+
maxOut: 65536,
|
|
21371
21500
|
capability: null,
|
|
21372
|
-
price: tokenPrice(0.75, 3.75),
|
|
21501
|
+
price: tokenPrice(0.75, 3.75, { cacheRead: 0.075 }),
|
|
21373
21502
|
on: ["vertex"]
|
|
21374
21503
|
});
|
|
21375
21504
|
google.model("gemini-3.5-flash", {
|
|
21376
21505
|
name: "Gemini 3.5 Flash",
|
|
21377
21506
|
capability: null,
|
|
21378
|
-
price: tokenPrice(1.5, 9),
|
|
21379
21507
|
on: ["vertex"]
|
|
21380
21508
|
});
|
|
21381
21509
|
google.model("gemini-3.5-flash-lite", {
|
|
21382
21510
|
name: "Gemini 3.5 Flash Lite",
|
|
21511
|
+
ctx: 1048576,
|
|
21512
|
+
maxOut: 65536,
|
|
21513
|
+
capability: null,
|
|
21514
|
+
price: tokenPrice(0.3, 2.5, { cacheRead: 0.03 }),
|
|
21515
|
+
on: ["vertex"]
|
|
21516
|
+
});
|
|
21517
|
+
google.model("gemini-3.1-flash-lite", {
|
|
21518
|
+
name: "Gemini 3.1 Flash Lite",
|
|
21519
|
+
ctx: 1048576,
|
|
21520
|
+
maxOut: 65536,
|
|
21521
|
+
capability: null,
|
|
21522
|
+
price: tokenPrice(0.25, 1.5, { cacheRead: 0.025 }),
|
|
21523
|
+
on: ["vertex"]
|
|
21524
|
+
});
|
|
21525
|
+
google.model("gemini-3-flash-preview", {
|
|
21526
|
+
name: "Gemini 3 Flash Preview",
|
|
21527
|
+
ctx: 1048576,
|
|
21528
|
+
maxOut: 65536,
|
|
21383
21529
|
capability: null,
|
|
21384
|
-
price: tokenPrice(0.3,
|
|
21530
|
+
price: tokenPrice(0.5, 3, { cacheRead: 0.05 }),
|
|
21385
21531
|
on: ["vertex"]
|
|
21386
21532
|
});
|
|
21387
21533
|
google.model("gemini-3.1-pro-preview", {
|
|
21388
21534
|
name: "Gemini 3.1 Pro Preview",
|
|
21535
|
+
ctx: 1048576,
|
|
21536
|
+
maxOut: 65536,
|
|
21389
21537
|
capability: "reasoning",
|
|
21390
21538
|
price: tokenPrice(2, 12, {
|
|
21391
|
-
|
|
21539
|
+
cacheRead: 0.2,
|
|
21540
|
+
longContext: { thresholdInputTokens: 2e5, input: 4, output: 18, cacheRead: 0.4 }
|
|
21392
21541
|
}),
|
|
21542
|
+
aliases: ["gemini-3.1-pro-preview-customtools"],
|
|
21393
21543
|
on: ["vertex"]
|
|
21394
21544
|
});
|
|
21395
21545
|
google.model("gemini-2.5-pro", {
|
|
21396
21546
|
name: "Gemini 2.5 Pro",
|
|
21547
|
+
ctx: 1048576,
|
|
21548
|
+
maxOut: 65536,
|
|
21397
21549
|
capability: "reasoning",
|
|
21398
21550
|
price: tokenPrice(1.25, 10, {
|
|
21399
|
-
|
|
21551
|
+
cacheRead: 0.125,
|
|
21552
|
+
longContext: { thresholdInputTokens: 2e5, input: 2.5, output: 15, cacheRead: 0.25 }
|
|
21400
21553
|
}),
|
|
21401
21554
|
on: ["vertex"]
|
|
21402
21555
|
});
|
|
21403
21556
|
google.model("gemini-2.5-flash", {
|
|
21404
21557
|
name: "Gemini 2.5 Flash",
|
|
21558
|
+
ctx: 1048576,
|
|
21559
|
+
maxOut: 65536,
|
|
21405
21560
|
capability: null,
|
|
21406
|
-
price: tokenPrice(0.3, 2.5),
|
|
21561
|
+
price: tokenPrice(0.3, 2.5, { cacheRead: 0.03 }),
|
|
21407
21562
|
on: ["vertex"]
|
|
21408
21563
|
});
|
|
21409
21564
|
google.model("gemini-2.5-flash-lite", {
|
|
21410
21565
|
name: "Gemini 2.5 Flash Lite",
|
|
21566
|
+
ctx: 1048576,
|
|
21567
|
+
maxOut: 65536,
|
|
21411
21568
|
capability: null,
|
|
21412
|
-
price: tokenPrice(0.1, 0.4),
|
|
21569
|
+
price: tokenPrice(0.1, 0.4, { cacheRead: 0.01 }),
|
|
21570
|
+
on: ["vertex"]
|
|
21571
|
+
});
|
|
21572
|
+
google.model("gemini-embedding-2", {
|
|
21573
|
+
name: "Gemini Embedding 2",
|
|
21574
|
+
capability: "embedding",
|
|
21575
|
+
price: tokenPrice(0.2, 0),
|
|
21413
21576
|
on: ["vertex"]
|
|
21414
21577
|
});
|
|
21415
21578
|
google.model("gemini-1-5-pro", { name: "Gemini 1.5 Pro", on: ["vertex"] });
|
|
@@ -21425,43 +21588,62 @@ var xai = vendor("xai", {
|
|
|
21425
21588
|
source: "https://docs.x.ai/developers/faq/security"
|
|
21426
21589
|
}
|
|
21427
21590
|
});
|
|
21591
|
+
function grokPrice(input2, output2, cacheRead) {
|
|
21592
|
+
const base = { input: input2, output: output2, cacheRead };
|
|
21593
|
+
return tokenPrice(input2, output2, {
|
|
21594
|
+
cacheRead,
|
|
21595
|
+
longContext: scaledBand(2e5, base, { input: 2, output: 2, cacheRead: 2 })
|
|
21596
|
+
});
|
|
21597
|
+
}
|
|
21598
|
+
xai.model("grok-4.7", {
|
|
21599
|
+
name: "Grok 4.7",
|
|
21600
|
+
ctx: 5e5,
|
|
21601
|
+
capability: "reasoning",
|
|
21602
|
+
price: grokPrice(2, 6, 0.5)
|
|
21603
|
+
});
|
|
21428
21604
|
xai.model("grok-4.6", {
|
|
21429
21605
|
name: "Grok 4.6",
|
|
21430
21606
|
ctx: 5e5,
|
|
21431
21607
|
capability: "reasoning",
|
|
21432
|
-
price:
|
|
21433
|
-
cacheRead: 0.5,
|
|
21434
|
-
longContext: { thresholdInputTokens: 2e5, input: 4, output: 12 }
|
|
21435
|
-
}),
|
|
21608
|
+
price: grokPrice(2, 6, 0.5),
|
|
21436
21609
|
on: ["bedrock"]
|
|
21437
21610
|
});
|
|
21438
21611
|
xai.model("grok-4.5", {
|
|
21439
21612
|
name: "Grok 4.5",
|
|
21440
21613
|
ctx: 5e5,
|
|
21441
21614
|
capability: "reasoning",
|
|
21442
|
-
price:
|
|
21443
|
-
cacheRead: 0.3,
|
|
21444
|
-
longContext: { thresholdInputTokens: 2e5, input: 4, output: 12 }
|
|
21445
|
-
})
|
|
21615
|
+
price: grokPrice(2, 6, 0.3)
|
|
21446
21616
|
});
|
|
21447
21617
|
xai.model("grok-4.3", {
|
|
21448
21618
|
name: "Grok 4.3",
|
|
21449
21619
|
ctx: 1e6,
|
|
21450
21620
|
capability: "reasoning",
|
|
21451
|
-
price:
|
|
21452
|
-
cacheRead: 0.2,
|
|
21453
|
-
longContext: { thresholdInputTokens: 2e5, input: 2.5, output: 5 }
|
|
21454
|
-
}),
|
|
21621
|
+
price: grokPrice(1.25, 2.5, 0.2),
|
|
21455
21622
|
on: ["bedrock"]
|
|
21456
21623
|
});
|
|
21624
|
+
xai.model("grok-4.20-0309-reasoning", {
|
|
21625
|
+
name: "Grok 4.20 Reasoning",
|
|
21626
|
+
capability: "reasoning",
|
|
21627
|
+
ctx: 1e6,
|
|
21628
|
+
price: grokPrice(1.25, 2.5, 0.2)
|
|
21629
|
+
});
|
|
21630
|
+
xai.model("grok-4.20-0309-non-reasoning", {
|
|
21631
|
+
name: "Grok 4.20",
|
|
21632
|
+
capability: null,
|
|
21633
|
+
ctx: 1e6,
|
|
21634
|
+
price: grokPrice(1.25, 2.5, 0.2)
|
|
21635
|
+
});
|
|
21636
|
+
xai.model("grok-4.20-multi-agent-0309", {
|
|
21637
|
+
name: "Grok 4.20 Multi-Agent",
|
|
21638
|
+
capability: "reasoning",
|
|
21639
|
+
ctx: 1e6,
|
|
21640
|
+
price: grokPrice(1.25, 2.5, 0.2)
|
|
21641
|
+
});
|
|
21457
21642
|
xai.model("grok-build-0.1", {
|
|
21458
21643
|
name: "Grok Build 0.1",
|
|
21459
21644
|
ctx: 256e3,
|
|
21460
21645
|
capability: "code",
|
|
21461
|
-
price:
|
|
21462
|
-
cacheRead: 0.2,
|
|
21463
|
-
longContext: { thresholdInputTokens: 2e5, input: 2, output: 4 }
|
|
21464
|
-
})
|
|
21646
|
+
price: grokPrice(1, 2, 0.2)
|
|
21465
21647
|
});
|
|
21466
21648
|
var deepseek = vendor("deepseek", {
|
|
21467
21649
|
family: { id: "deepseek", name: "DeepSeek" },
|
|
@@ -21474,16 +21656,25 @@ var deepseek = vendor("deepseek", {
|
|
|
21474
21656
|
source: "https://cdn.deepseek.com/policies/en-US/deepseek-privacy-policy.html"
|
|
21475
21657
|
}
|
|
21476
21658
|
});
|
|
21659
|
+
deepseek.model("deepseek-flash", {
|
|
21660
|
+
name: "DeepSeek V4.1 Flash",
|
|
21661
|
+
ctx: 1e6,
|
|
21662
|
+
maxOut: 384e3,
|
|
21663
|
+
capability: null,
|
|
21664
|
+
price: tokenPrice(0.3, 1.2, { cacheRead: 6e-3 })
|
|
21665
|
+
});
|
|
21477
21666
|
deepseek.model("deepseek-v4-flash", {
|
|
21478
21667
|
name: "DeepSeek V4 Flash",
|
|
21479
21668
|
ctx: 1e6,
|
|
21669
|
+
maxOut: 384e3,
|
|
21480
21670
|
capability: null,
|
|
21481
|
-
price: tokenPrice(0.
|
|
21671
|
+
price: tokenPrice(0.3, 1.2, { cacheRead: 6e-3 }),
|
|
21482
21672
|
on: ["bedrock", "together", "fireworks", "openrouter", "ollama", "local"]
|
|
21483
21673
|
});
|
|
21484
21674
|
deepseek.model("deepseek-v4-pro", {
|
|
21485
21675
|
name: "DeepSeek V4 Pro",
|
|
21486
21676
|
ctx: 1e6,
|
|
21677
|
+
maxOut: 384e3,
|
|
21487
21678
|
capability: "reasoning",
|
|
21488
21679
|
price: tokenPrice(1.32, 3.96, { cacheRead: 0.044 }),
|
|
21489
21680
|
on: ["bedrock", "together", "fireworks", "openrouter"]
|
|
@@ -21530,7 +21721,14 @@ cohere.model("command-r-plus-08-2024", {
|
|
|
21530
21721
|
ctx: 128e3,
|
|
21531
21722
|
maxOut: 4e3,
|
|
21532
21723
|
price: tokenPrice(2.5, 10),
|
|
21533
|
-
|
|
21724
|
+
on: ["bedrock"]
|
|
21725
|
+
});
|
|
21726
|
+
cohere.model("command-r-plus-04-2024", {
|
|
21727
|
+
name: "Command R+ (04-2024)",
|
|
21728
|
+
seen: "discovered",
|
|
21729
|
+
ctx: 128e3,
|
|
21730
|
+
maxOut: 4e3,
|
|
21731
|
+
price: tokenPrice(3, 15),
|
|
21534
21732
|
aliases: ["command-r-plus"],
|
|
21535
21733
|
on: ["bedrock"]
|
|
21536
21734
|
});
|
|
@@ -21598,6 +21796,65 @@ var mistral = vendor("mistral", {
|
|
|
21598
21796
|
retention: "unknown",
|
|
21599
21797
|
defaultHosting: "local"
|
|
21600
21798
|
});
|
|
21799
|
+
var MISTRAL_API = { defaultHosting: "api" };
|
|
21800
|
+
mistral.model("mistral-large-4", {
|
|
21801
|
+
...MISTRAL_API,
|
|
21802
|
+
name: "Mistral Large 4",
|
|
21803
|
+
ctx: 1e6,
|
|
21804
|
+
capability: null,
|
|
21805
|
+
// Public preview at a sale rate; the published original is 1.36 / 4.18 / 0.14.
|
|
21806
|
+
price: tokenPrice(0.68, 2.09, { cacheRead: 0.07 })
|
|
21807
|
+
});
|
|
21808
|
+
mistral.model("mistral-large-2512", {
|
|
21809
|
+
...MISTRAL_API,
|
|
21810
|
+
name: "Mistral Large 3",
|
|
21811
|
+
ctx: 256e3,
|
|
21812
|
+
capability: null,
|
|
21813
|
+
price: tokenPrice(0.5, 1.5, { cacheRead: 0.05 })
|
|
21814
|
+
});
|
|
21815
|
+
mistral.model("mistral-medium-3-5", {
|
|
21816
|
+
...MISTRAL_API,
|
|
21817
|
+
name: "Mistral Medium 3.5",
|
|
21818
|
+
ctx: 256e3,
|
|
21819
|
+
capability: null,
|
|
21820
|
+
price: tokenPrice(1.5, 7.5, { cacheRead: 0.15 })
|
|
21821
|
+
});
|
|
21822
|
+
mistral.model("mistral-small-2603", {
|
|
21823
|
+
...MISTRAL_API,
|
|
21824
|
+
name: "Mistral Small 4",
|
|
21825
|
+
ctx: 256e3,
|
|
21826
|
+
capability: null,
|
|
21827
|
+
price: tokenPrice(0.15, 0.6, { cacheRead: 0.015 })
|
|
21828
|
+
});
|
|
21829
|
+
mistral.model("ministral-14b-2512", {
|
|
21830
|
+
...MISTRAL_API,
|
|
21831
|
+
name: "Ministral 3 14B",
|
|
21832
|
+
ctx: 256e3,
|
|
21833
|
+
capability: null,
|
|
21834
|
+
price: tokenPrice(0.2, 0.2, { cacheRead: 0.02 })
|
|
21835
|
+
});
|
|
21836
|
+
mistral.model("ministral-8b-2512", {
|
|
21837
|
+
...MISTRAL_API,
|
|
21838
|
+
name: "Ministral 3 8B",
|
|
21839
|
+
ctx: 256e3,
|
|
21840
|
+
capability: null,
|
|
21841
|
+
price: tokenPrice(0.15, 0.15, { cacheRead: 0.015 })
|
|
21842
|
+
});
|
|
21843
|
+
mistral.model("ministral-3b-2512", {
|
|
21844
|
+
...MISTRAL_API,
|
|
21845
|
+
name: "Ministral 3 3B",
|
|
21846
|
+
ctx: 256e3,
|
|
21847
|
+
capability: null,
|
|
21848
|
+
price: tokenPrice(0.1, 0.1, { cacheRead: 0.01 })
|
|
21849
|
+
});
|
|
21850
|
+
mistral.model("codestral-2508", {
|
|
21851
|
+
...MISTRAL_API,
|
|
21852
|
+
name: "Codestral",
|
|
21853
|
+
ctx: 128e3,
|
|
21854
|
+
capability: "code",
|
|
21855
|
+
openWeights: false,
|
|
21856
|
+
price: tokenPrice(0.3, 0.9, { cacheRead: 0.03 })
|
|
21857
|
+
});
|
|
21601
21858
|
mistral.model("mixtral-8x7b", {
|
|
21602
21859
|
name: "Mixtral 8x7B",
|
|
21603
21860
|
seen: "discovered",
|
|
@@ -21761,11 +22018,14 @@ var COMPACT = new Intl.NumberFormat("en-US", {
|
|
|
21761
22018
|
// ../../packages/schema/src/token/token-report.ts
|
|
21762
22019
|
var num = (value) => value ?? 0;
|
|
21763
22020
|
function costUsageOf(a, promptTokens) {
|
|
22021
|
+
const write1h = num(a.ephemeral_1h_input_tokens);
|
|
22022
|
+
const write5m = num(a.ephemeral_5m_input_tokens);
|
|
22023
|
+
const unsplit = Math.max(num(a.cache_creation_input_tokens) - write1h - write5m, 0);
|
|
21764
22024
|
const usage = {
|
|
21765
22025
|
inputTokens: num(a.input_tokens),
|
|
21766
22026
|
outputTokens: num(a.output_tokens),
|
|
21767
|
-
cacheWrite1hTokens:
|
|
21768
|
-
cacheWrite5mTokens:
|
|
22027
|
+
cacheWrite1hTokens: write1h,
|
|
22028
|
+
cacheWrite5mTokens: write5m + unsplit,
|
|
21769
22029
|
cacheReadTokens: num(a.cache_read_input_tokens),
|
|
21770
22030
|
webSearchRequests: num(a.web_search_requests)
|
|
21771
22031
|
};
|
|
@@ -28716,7 +28976,8 @@ var TIMELINE_COLUMNS = `
|
|
|
28716
28976
|
json_extract(attributes, '$.internal') AS internal,
|
|
28717
28977
|
json_extract(attributes, '$.flagged') AS flagged`;
|
|
28718
28978
|
var CALL_PROMPT_TOKENS = `(coalesce(input_tokens, 0) + coalesce(cache_read_input_tokens, 0)
|
|
28719
|
-
+ coalesce(
|
|
28979
|
+
+ max(coalesce(cache_creation_input_tokens, 0),
|
|
28980
|
+
coalesce(ephemeral_1h_input_tokens, 0) + coalesce(ephemeral_5m_input_tokens, 0)))`;
|
|
28720
28981
|
var CALL_BAND = LONG_CONTEXT_THRESHOLDS.length === 0 ? "0" : LONG_CONTEXT_THRESHOLDS.map((t) => `(${CALL_PROMPT_TOKENS} > ${String(Math.trunc(t))})`).join(
|
|
28721
28982
|
" + "
|
|
28722
28983
|
);
|
|
@@ -38698,6 +38959,10 @@ var GROWTH_CORPORA = [
|
|
|
38698
38959
|
build: (length) => joinTo(length, "[", "]", (i) => `"${SQL_WORDS[i % SQL_WORDS.length] ?? ""} ${String(i)}"`)
|
|
38699
38960
|
},
|
|
38700
38961
|
{ name: "single-quoted keyword run ('where)", build: (length) => repeatTo("'where", length) },
|
|
38962
|
+
{
|
|
38963
|
+
name: 'double-quoted keyword literal run ("where" )',
|
|
38964
|
+
build: (length) => repeatTo('"where" ', length)
|
|
38965
|
+
},
|
|
38701
38966
|
{ name: "double-quote run", build: (length) => repeatTo('"', length) },
|
|
38702
38967
|
{ name: "space run", build: (length) => repeatTo(" ", length) },
|
|
38703
38968
|
{ name: "newline run", build: (length) => repeatTo("\n", length) },
|
|
@@ -41025,7 +41290,7 @@ var BUNDLED_PACKS = [
|
|
|
41025
41290
|
{
|
|
41026
41291
|
packId: "code-flaws",
|
|
41027
41292
|
name: "Code Security Flaws",
|
|
41028
|
-
version: "0.1.
|
|
41293
|
+
version: "0.1.2",
|
|
41029
41294
|
rawRules: [
|
|
41030
41295
|
sql_inject_concat_default,
|
|
41031
41296
|
sql_inject_concat_dot_default,
|