@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/sync.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)) {
|
|
@@ -20720,7 +20723,10 @@ function date4(params) {
|
|
|
20720
20723
|
var LongContextTier = external_exports.object({
|
|
20721
20724
|
thresholdInputTokens: external_exports.number().int().positive(),
|
|
20722
20725
|
input: external_exports.number().nonnegative().nullable(),
|
|
20723
|
-
output: external_exports.number().nonnegative().nullable()
|
|
20726
|
+
output: external_exports.number().nonnegative().nullable(),
|
|
20727
|
+
cacheRead: external_exports.number().nonnegative().nullable().optional(),
|
|
20728
|
+
cacheWrite5m: external_exports.number().nonnegative().nullable().optional(),
|
|
20729
|
+
cacheWrite1h: external_exports.number().nonnegative().nullable().optional()
|
|
20724
20730
|
});
|
|
20725
20731
|
var ModelPrice = external_exports.object({
|
|
20726
20732
|
/** USD per 1M uncached input tokens, at or below any long-context threshold. */
|
|
@@ -20729,7 +20735,8 @@ var ModelPrice = external_exports.object({
|
|
|
20729
20735
|
output: external_exports.number().nonnegative(),
|
|
20730
20736
|
/**
|
|
20731
20737
|
* Rate band above a size threshold, or `null` when the model is flat-rated.
|
|
20732
|
-
*
|
|
20738
|
+
* OpenAI, Google, xAI and some Anthropic models (Haiku 5.5) band; most
|
|
20739
|
+
* Claude models are flat across their window.
|
|
20733
20740
|
*/
|
|
20734
20741
|
longContext: LongContextTier.nullable(),
|
|
20735
20742
|
/** USD per 1M tokens written to a 5-minute ephemeral cache, or null if unpriced. */
|
|
@@ -20742,18 +20749,35 @@ var ModelPrice = external_exports.object({
|
|
|
20742
20749
|
webSearch: external_exports.number().nonnegative().nullable()
|
|
20743
20750
|
});
|
|
20744
20751
|
var WEB_SEARCH_PER_REQUEST = 0.01;
|
|
20745
|
-
function anthropicPrice(input2, output2, cacheRead) {
|
|
20752
|
+
function anthropicPrice(input2, output2, cacheRead, longContext = null) {
|
|
20746
20753
|
return Object.freeze({
|
|
20747
20754
|
input: input2,
|
|
20748
20755
|
output: output2,
|
|
20749
|
-
longContext: null,
|
|
20750
|
-
// flat across the full window on every current Claude
|
|
20756
|
+
longContext: longContext === null ? null : Object.freeze(longContext),
|
|
20751
20757
|
cacheWrite5m: input2 * 1.25,
|
|
20752
20758
|
cacheWrite1h: input2 * 2,
|
|
20753
20759
|
cacheRead,
|
|
20754
20760
|
webSearch: WEB_SEARCH_PER_REQUEST
|
|
20755
20761
|
});
|
|
20756
20762
|
}
|
|
20763
|
+
function anthropicBand(thresholdInputTokens, input2, output2, cacheRead) {
|
|
20764
|
+
return {
|
|
20765
|
+
thresholdInputTokens,
|
|
20766
|
+
input: input2,
|
|
20767
|
+
output: output2,
|
|
20768
|
+
cacheRead,
|
|
20769
|
+
cacheWrite5m: input2 * 1.25,
|
|
20770
|
+
cacheWrite1h: input2 * 2
|
|
20771
|
+
};
|
|
20772
|
+
}
|
|
20773
|
+
function scaledBand(thresholdInputTokens, base, scale) {
|
|
20774
|
+
return {
|
|
20775
|
+
thresholdInputTokens,
|
|
20776
|
+
input: base.input * scale.input,
|
|
20777
|
+
output: base.output * scale.output,
|
|
20778
|
+
...base.cacheRead === void 0 ? {} : { cacheRead: base.cacheRead * scale.cacheRead }
|
|
20779
|
+
};
|
|
20780
|
+
}
|
|
20757
20781
|
function tokenPrice(input2, output2, options = {}) {
|
|
20758
20782
|
return Object.freeze({
|
|
20759
20783
|
input: input2,
|
|
@@ -20786,17 +20810,19 @@ function serviceTierMultiplier(tier) {
|
|
|
20786
20810
|
function promptTokensOf(usage) {
|
|
20787
20811
|
return usage.promptTokens ?? (usage.inputTokens ?? 0) + (usage.cacheReadTokens ?? 0) + (usage.cacheWrite1hTokens ?? 0) + (usage.cacheWrite5mTokens ?? 0);
|
|
20788
20812
|
}
|
|
20813
|
+
function bandRate(column, base) {
|
|
20814
|
+
return column === void 0 ? base : column;
|
|
20815
|
+
}
|
|
20789
20816
|
function costOf(price, usage) {
|
|
20817
|
+
const band = price.longContext !== null && promptTokensOf(usage) > price.longContext.thresholdInputTokens ? price.longContext : null;
|
|
20790
20818
|
const metered = [
|
|
20791
|
-
[usage.
|
|
20792
|
-
[usage.
|
|
20793
|
-
[usage.
|
|
20819
|
+
[usage.inputTokens ?? 0, bandRate(band?.input, price.input)],
|
|
20820
|
+
[usage.outputTokens ?? 0, bandRate(band?.output, price.output)],
|
|
20821
|
+
[usage.cacheWrite1hTokens ?? 0, bandRate(band?.cacheWrite1h, price.cacheWrite1h)],
|
|
20822
|
+
[usage.cacheWrite5mTokens ?? 0, bandRate(band?.cacheWrite5m, price.cacheWrite5m)],
|
|
20823
|
+
[usage.cacheReadTokens ?? 0, bandRate(band?.cacheRead, price.cacheRead)]
|
|
20794
20824
|
];
|
|
20795
|
-
|
|
20796
|
-
if (band !== null && (band.input === null || band.output === null)) return null;
|
|
20797
|
-
const inputRate = band?.input ?? price.input;
|
|
20798
|
-
const outputRate = band?.output ?? price.output;
|
|
20799
|
-
let tokenCost = (usage.inputTokens ?? 0) * inputRate + (usage.outputTokens ?? 0) * outputRate;
|
|
20825
|
+
let tokenCost = 0;
|
|
20800
20826
|
for (const [tokens, rate] of metered) {
|
|
20801
20827
|
if (tokens === 0) continue;
|
|
20802
20828
|
if (rate === null) return null;
|
|
@@ -21086,10 +21112,20 @@ anthropic.model("claude-fable-5-1", {
|
|
|
21086
21112
|
});
|
|
21087
21113
|
anthropic.model("claude-fable-5", {
|
|
21088
21114
|
name: "Claude Fable 5",
|
|
21115
|
+
ctx: 1e6,
|
|
21116
|
+
maxOut: 128e3,
|
|
21089
21117
|
capability: "reasoning",
|
|
21090
21118
|
price: anthropicPrice(10, 50, 1),
|
|
21091
21119
|
on: [...CLAUDE_RESELLERS]
|
|
21092
21120
|
});
|
|
21121
|
+
anthropic.model("claude-opus-5-5", {
|
|
21122
|
+
name: "Claude Opus 5.5",
|
|
21123
|
+
ctx: 1e6,
|
|
21124
|
+
maxOut: 128e3,
|
|
21125
|
+
capability: "reasoning",
|
|
21126
|
+
price: anthropicPrice(4, 20, 0.2),
|
|
21127
|
+
on: [...CLAUDE_RESELLERS]
|
|
21128
|
+
});
|
|
21093
21129
|
anthropic.model("claude-opus-5", {
|
|
21094
21130
|
name: "Claude Opus 5",
|
|
21095
21131
|
ctx: 1e6,
|
|
@@ -21100,24 +21136,32 @@ anthropic.model("claude-opus-5", {
|
|
|
21100
21136
|
});
|
|
21101
21137
|
anthropic.model("claude-opus-4-8", {
|
|
21102
21138
|
name: "Claude Opus 4.8",
|
|
21139
|
+
ctx: 1e6,
|
|
21140
|
+
maxOut: 128e3,
|
|
21103
21141
|
capability: "reasoning",
|
|
21104
21142
|
price: anthropicPrice(5, 25, 0.5),
|
|
21105
21143
|
on: [...CLAUDE_RESELLERS]
|
|
21106
21144
|
});
|
|
21107
21145
|
anthropic.model("claude-opus-4-7", {
|
|
21108
21146
|
name: "Claude Opus 4.7",
|
|
21147
|
+
ctx: 1e6,
|
|
21148
|
+
maxOut: 128e3,
|
|
21109
21149
|
capability: "reasoning",
|
|
21110
21150
|
price: anthropicPrice(5, 25, 0.5),
|
|
21111
21151
|
on: [...CLAUDE_RESELLERS]
|
|
21112
21152
|
});
|
|
21113
21153
|
anthropic.model("claude-opus-4-6", {
|
|
21114
21154
|
name: "Claude Opus 4.6",
|
|
21155
|
+
ctx: 1e6,
|
|
21156
|
+
maxOut: 128e3,
|
|
21115
21157
|
capability: "reasoning",
|
|
21116
21158
|
price: anthropicPrice(5, 25, 0.5),
|
|
21117
21159
|
on: [...CLAUDE_RESELLERS]
|
|
21118
21160
|
});
|
|
21119
21161
|
anthropic.model("claude-opus-4-5", {
|
|
21120
21162
|
name: "Claude Opus 4.5",
|
|
21163
|
+
ctx: 2e5,
|
|
21164
|
+
maxOut: 64e3,
|
|
21121
21165
|
capability: "reasoning",
|
|
21122
21166
|
price: anthropicPrice(5, 25, 0.5),
|
|
21123
21167
|
on: [...CLAUDE_RESELLERS]
|
|
@@ -21128,6 +21172,14 @@ anthropic.model("claude-opus-4-1", {
|
|
|
21128
21172
|
price: anthropicPrice(15, 75, 1.5),
|
|
21129
21173
|
on: [...CLAUDE_RESELLERS]
|
|
21130
21174
|
});
|
|
21175
|
+
anthropic.model("claude-sonnet-5-5", {
|
|
21176
|
+
name: "Claude Sonnet 5.5",
|
|
21177
|
+
ctx: 1e6,
|
|
21178
|
+
maxOut: 128e3,
|
|
21179
|
+
capability: "reasoning",
|
|
21180
|
+
price: anthropicPrice(2, 10, 0.1),
|
|
21181
|
+
on: [...CLAUDE_RESELLERS]
|
|
21182
|
+
});
|
|
21131
21183
|
anthropic.model("claude-sonnet-5", {
|
|
21132
21184
|
name: "Claude Sonnet 5",
|
|
21133
21185
|
ctx: 1e6,
|
|
@@ -21138,16 +21190,30 @@ anthropic.model("claude-sonnet-5", {
|
|
|
21138
21190
|
});
|
|
21139
21191
|
anthropic.model("claude-sonnet-4-6", {
|
|
21140
21192
|
name: "Claude Sonnet 4.6",
|
|
21193
|
+
ctx: 1e6,
|
|
21194
|
+
maxOut: 128e3,
|
|
21141
21195
|
capability: "reasoning",
|
|
21142
21196
|
price: anthropicPrice(3, 15, 0.3),
|
|
21143
21197
|
on: [...CLAUDE_RESELLERS]
|
|
21144
21198
|
});
|
|
21145
21199
|
anthropic.model("claude-sonnet-4-5", {
|
|
21146
21200
|
name: "Claude Sonnet 4.5",
|
|
21201
|
+
ctx: 2e5,
|
|
21202
|
+
maxOut: 64e3,
|
|
21147
21203
|
capability: "reasoning",
|
|
21148
21204
|
price: anthropicPrice(3, 15, 0.3),
|
|
21149
21205
|
on: [...CLAUDE_RESELLERS]
|
|
21150
21206
|
});
|
|
21207
|
+
anthropic.model("claude-haiku-5-5", {
|
|
21208
|
+
name: "Claude Haiku 5.5",
|
|
21209
|
+
ctx: 1e6,
|
|
21210
|
+
maxOut: 128e3,
|
|
21211
|
+
capability: null,
|
|
21212
|
+
// A prompt over 100,000 tokens, cache reads and writes included, bills the
|
|
21213
|
+
// whole request at the higher band.
|
|
21214
|
+
price: anthropicPrice(0.1, 0.5, 0.01, anthropicBand(1e5, 0.5, 2.5, 0.05)),
|
|
21215
|
+
on: [...CLAUDE_RESELLERS]
|
|
21216
|
+
});
|
|
21151
21217
|
anthropic.model("claude-haiku-4-5", {
|
|
21152
21218
|
name: "Claude Haiku 4.5",
|
|
21153
21219
|
ctx: 2e5,
|
|
@@ -21170,7 +21236,13 @@ var OPENAI_TRAINING = {
|
|
|
21170
21236
|
consumerControl: "opt-out",
|
|
21171
21237
|
source: "https://developers.openai.com/api/docs/guides/your-data"
|
|
21172
21238
|
};
|
|
21173
|
-
|
|
21239
|
+
function gptPrice(input2, output2, cacheRead) {
|
|
21240
|
+
const base = { input: input2, output: output2, ...cacheRead === void 0 ? {} : { cacheRead } };
|
|
21241
|
+
return tokenPrice(input2, output2, {
|
|
21242
|
+
...base,
|
|
21243
|
+
longContext: scaledBand(272e3, base, { input: 2, output: 1.5, cacheRead: 2 })
|
|
21244
|
+
});
|
|
21245
|
+
}
|
|
21174
21246
|
var openai = vendor("openai", {
|
|
21175
21247
|
family: { id: "gpt", name: "GPT" },
|
|
21176
21248
|
region: "us",
|
|
@@ -21178,12 +21250,45 @@ var openai = vendor("openai", {
|
|
|
21178
21250
|
training: OPENAI_TRAINING
|
|
21179
21251
|
});
|
|
21180
21252
|
var OPENAI_RESELLERS = ["azure", "foundry"];
|
|
21253
|
+
openai.model("gpt-6-astra", {
|
|
21254
|
+
name: "GPT-6 Astra",
|
|
21255
|
+
ctx: 105e4,
|
|
21256
|
+
maxOut: 128e3,
|
|
21257
|
+
capability: "reasoning",
|
|
21258
|
+
price: gptPrice(10, 50, 1),
|
|
21259
|
+
on: [...OPENAI_RESELLERS]
|
|
21260
|
+
});
|
|
21261
|
+
openai.model("gpt-6.1-sol", {
|
|
21262
|
+
name: "GPT-6.1 Sol",
|
|
21263
|
+
ctx: 105e4,
|
|
21264
|
+
maxOut: 128e3,
|
|
21265
|
+
capability: "reasoning",
|
|
21266
|
+
price: gptPrice(2, 10, 0.1),
|
|
21267
|
+
on: [...OPENAI_RESELLERS]
|
|
21268
|
+
});
|
|
21269
|
+
openai.model("gpt-6-sol", {
|
|
21270
|
+
name: "GPT-6 Sol",
|
|
21271
|
+
ctx: 105e4,
|
|
21272
|
+
maxOut: 128e3,
|
|
21273
|
+
capability: "reasoning",
|
|
21274
|
+
price: gptPrice(2, 10, 0.2),
|
|
21275
|
+
on: [...OPENAI_RESELLERS]
|
|
21276
|
+
});
|
|
21277
|
+
openai.model("gpt-6-luna", {
|
|
21278
|
+
name: "GPT-6 Luna",
|
|
21279
|
+
ctx: 105e4,
|
|
21280
|
+
maxOut: 128e3,
|
|
21281
|
+
capability: null,
|
|
21282
|
+
price: gptPrice(0.1, 0.5, 0.01),
|
|
21283
|
+
on: [...OPENAI_RESELLERS]
|
|
21284
|
+
});
|
|
21181
21285
|
openai.model("gpt-5.6-sol", {
|
|
21182
21286
|
name: "GPT-5.6 Sol",
|
|
21287
|
+
// Promotional rate, published as available at least through 2026-11-21.
|
|
21183
21288
|
ctx: 105e4,
|
|
21184
21289
|
maxOut: 128e3,
|
|
21185
21290
|
capability: "reasoning",
|
|
21186
|
-
price:
|
|
21291
|
+
price: gptPrice(4, 20, 0.4),
|
|
21187
21292
|
on: [...OPENAI_RESELLERS]
|
|
21188
21293
|
});
|
|
21189
21294
|
openai.model("gpt-5.6-terra", {
|
|
@@ -21191,7 +21296,7 @@ openai.model("gpt-5.6-terra", {
|
|
|
21191
21296
|
ctx: 105e4,
|
|
21192
21297
|
maxOut: 128e3,
|
|
21193
21298
|
capability: "reasoning",
|
|
21194
|
-
price:
|
|
21299
|
+
price: gptPrice(2, 12, 0.2),
|
|
21195
21300
|
on: [...OPENAI_RESELLERS]
|
|
21196
21301
|
});
|
|
21197
21302
|
openai.model("gpt-5.6-luna", {
|
|
@@ -21199,7 +21304,7 @@ openai.model("gpt-5.6-luna", {
|
|
|
21199
21304
|
ctx: 105e4,
|
|
21200
21305
|
maxOut: 128e3,
|
|
21201
21306
|
capability: null,
|
|
21202
|
-
price:
|
|
21307
|
+
price: gptPrice(0.2, 1.2, 0.02),
|
|
21203
21308
|
on: [...OPENAI_RESELLERS]
|
|
21204
21309
|
});
|
|
21205
21310
|
openai.model("gpt-5.5", {
|
|
@@ -21207,7 +21312,15 @@ openai.model("gpt-5.5", {
|
|
|
21207
21312
|
ctx: 105e4,
|
|
21208
21313
|
maxOut: 128e3,
|
|
21209
21314
|
capability: "reasoning",
|
|
21210
|
-
price:
|
|
21315
|
+
price: gptPrice(5, 30, 0.5),
|
|
21316
|
+
on: [...OPENAI_RESELLERS]
|
|
21317
|
+
});
|
|
21318
|
+
openai.model("gpt-5.5-pro", {
|
|
21319
|
+
name: "GPT-5.5 Pro",
|
|
21320
|
+
ctx: 105e4,
|
|
21321
|
+
maxOut: 128e3,
|
|
21322
|
+
capability: "reasoning",
|
|
21323
|
+
price: gptPrice(30, 180),
|
|
21211
21324
|
on: [...OPENAI_RESELLERS]
|
|
21212
21325
|
});
|
|
21213
21326
|
openai.model("gpt-5.4", {
|
|
@@ -21215,7 +21328,7 @@ openai.model("gpt-5.4", {
|
|
|
21215
21328
|
ctx: 105e4,
|
|
21216
21329
|
maxOut: 128e3,
|
|
21217
21330
|
capability: "reasoning",
|
|
21218
|
-
price:
|
|
21331
|
+
price: gptPrice(2.5, 15, 0.25),
|
|
21219
21332
|
on: [...OPENAI_RESELLERS]
|
|
21220
21333
|
});
|
|
21221
21334
|
openai.model("gpt-5.4-mini", {
|
|
@@ -21261,6 +21374,7 @@ openai.model("gpt-5", {
|
|
|
21261
21374
|
openai.model("gpt-5-mini", {
|
|
21262
21375
|
name: "GPT-5 mini",
|
|
21263
21376
|
ctx: 4e5,
|
|
21377
|
+
maxOut: 128e3,
|
|
21264
21378
|
capability: null,
|
|
21265
21379
|
price: tokenPrice(0.25, 2, { cacheRead: 0.025 }),
|
|
21266
21380
|
on: [...OPENAI_RESELLERS]
|
|
@@ -21275,11 +21389,15 @@ openai.model("gpt-5-nano", {
|
|
|
21275
21389
|
});
|
|
21276
21390
|
openai.model("gpt-4.1", {
|
|
21277
21391
|
name: "GPT-4.1",
|
|
21392
|
+
ctx: 1047576,
|
|
21393
|
+
maxOut: 32768,
|
|
21278
21394
|
price: tokenPrice(2, 8, { cacheRead: 0.5 }),
|
|
21279
21395
|
on: [...OPENAI_RESELLERS]
|
|
21280
21396
|
});
|
|
21281
21397
|
openai.model("gpt-4o", {
|
|
21282
21398
|
name: "GPT-4o",
|
|
21399
|
+
ctx: 128e3,
|
|
21400
|
+
maxOut: 16384,
|
|
21283
21401
|
price: tokenPrice(2.5, 10, { cacheRead: 1.25 }),
|
|
21284
21402
|
on: [...OPENAI_RESELLERS]
|
|
21285
21403
|
});
|
|
@@ -21303,6 +21421,8 @@ openai.model("gpt-4-turbo", {
|
|
|
21303
21421
|
});
|
|
21304
21422
|
openai.model("o3", {
|
|
21305
21423
|
name: "o3",
|
|
21424
|
+
ctx: 2e5,
|
|
21425
|
+
maxOut: 1e5,
|
|
21306
21426
|
capability: "reasoning",
|
|
21307
21427
|
price: tokenPrice(2, 8, { cacheRead: 0.5 }),
|
|
21308
21428
|
on: [...OPENAI_RESELLERS]
|
|
@@ -21355,57 +21475,100 @@ var google = vendor("google", {
|
|
|
21355
21475
|
retention: "configurable",
|
|
21356
21476
|
training: GOOGLE_TRAINING
|
|
21357
21477
|
});
|
|
21478
|
+
google.model("gemini-3.8-flash", {
|
|
21479
|
+
name: "Gemini 3.8 Flash",
|
|
21480
|
+
ctx: 1048576,
|
|
21481
|
+
maxOut: 65536,
|
|
21482
|
+
capability: null,
|
|
21483
|
+
price: tokenPrice(0.75, 3.75, { cacheRead: 0.075 }),
|
|
21484
|
+
on: ["vertex"]
|
|
21485
|
+
});
|
|
21358
21486
|
google.model("gemini-3.7-flash", {
|
|
21359
21487
|
name: "Gemini 3.7 Flash",
|
|
21360
21488
|
capability: null,
|
|
21361
|
-
// Promotional rate; the published post-promotion rate is 1.50 / 7.50.
|
|
21362
21489
|
price: tokenPrice(0.75, 3.75),
|
|
21363
21490
|
on: ["vertex"]
|
|
21364
21491
|
});
|
|
21365
21492
|
google.model("gemini-3.6-flash", {
|
|
21366
21493
|
name: "Gemini 3.6 Flash",
|
|
21494
|
+
ctx: 1048576,
|
|
21495
|
+
maxOut: 65536,
|
|
21367
21496
|
capability: null,
|
|
21368
|
-
price: tokenPrice(0.75, 3.75),
|
|
21497
|
+
price: tokenPrice(0.75, 3.75, { cacheRead: 0.075 }),
|
|
21369
21498
|
on: ["vertex"]
|
|
21370
21499
|
});
|
|
21371
21500
|
google.model("gemini-3.5-flash", {
|
|
21372
21501
|
name: "Gemini 3.5 Flash",
|
|
21373
21502
|
capability: null,
|
|
21374
|
-
price: tokenPrice(1.5, 9),
|
|
21375
21503
|
on: ["vertex"]
|
|
21376
21504
|
});
|
|
21377
21505
|
google.model("gemini-3.5-flash-lite", {
|
|
21378
21506
|
name: "Gemini 3.5 Flash Lite",
|
|
21507
|
+
ctx: 1048576,
|
|
21508
|
+
maxOut: 65536,
|
|
21509
|
+
capability: null,
|
|
21510
|
+
price: tokenPrice(0.3, 2.5, { cacheRead: 0.03 }),
|
|
21511
|
+
on: ["vertex"]
|
|
21512
|
+
});
|
|
21513
|
+
google.model("gemini-3.1-flash-lite", {
|
|
21514
|
+
name: "Gemini 3.1 Flash Lite",
|
|
21515
|
+
ctx: 1048576,
|
|
21516
|
+
maxOut: 65536,
|
|
21517
|
+
capability: null,
|
|
21518
|
+
price: tokenPrice(0.25, 1.5, { cacheRead: 0.025 }),
|
|
21519
|
+
on: ["vertex"]
|
|
21520
|
+
});
|
|
21521
|
+
google.model("gemini-3-flash-preview", {
|
|
21522
|
+
name: "Gemini 3 Flash Preview",
|
|
21523
|
+
ctx: 1048576,
|
|
21524
|
+
maxOut: 65536,
|
|
21379
21525
|
capability: null,
|
|
21380
|
-
price: tokenPrice(0.3,
|
|
21526
|
+
price: tokenPrice(0.5, 3, { cacheRead: 0.05 }),
|
|
21381
21527
|
on: ["vertex"]
|
|
21382
21528
|
});
|
|
21383
21529
|
google.model("gemini-3.1-pro-preview", {
|
|
21384
21530
|
name: "Gemini 3.1 Pro Preview",
|
|
21531
|
+
ctx: 1048576,
|
|
21532
|
+
maxOut: 65536,
|
|
21385
21533
|
capability: "reasoning",
|
|
21386
21534
|
price: tokenPrice(2, 12, {
|
|
21387
|
-
|
|
21535
|
+
cacheRead: 0.2,
|
|
21536
|
+
longContext: { thresholdInputTokens: 2e5, input: 4, output: 18, cacheRead: 0.4 }
|
|
21388
21537
|
}),
|
|
21538
|
+
aliases: ["gemini-3.1-pro-preview-customtools"],
|
|
21389
21539
|
on: ["vertex"]
|
|
21390
21540
|
});
|
|
21391
21541
|
google.model("gemini-2.5-pro", {
|
|
21392
21542
|
name: "Gemini 2.5 Pro",
|
|
21543
|
+
ctx: 1048576,
|
|
21544
|
+
maxOut: 65536,
|
|
21393
21545
|
capability: "reasoning",
|
|
21394
21546
|
price: tokenPrice(1.25, 10, {
|
|
21395
|
-
|
|
21547
|
+
cacheRead: 0.125,
|
|
21548
|
+
longContext: { thresholdInputTokens: 2e5, input: 2.5, output: 15, cacheRead: 0.25 }
|
|
21396
21549
|
}),
|
|
21397
21550
|
on: ["vertex"]
|
|
21398
21551
|
});
|
|
21399
21552
|
google.model("gemini-2.5-flash", {
|
|
21400
21553
|
name: "Gemini 2.5 Flash",
|
|
21554
|
+
ctx: 1048576,
|
|
21555
|
+
maxOut: 65536,
|
|
21401
21556
|
capability: null,
|
|
21402
|
-
price: tokenPrice(0.3, 2.5),
|
|
21557
|
+
price: tokenPrice(0.3, 2.5, { cacheRead: 0.03 }),
|
|
21403
21558
|
on: ["vertex"]
|
|
21404
21559
|
});
|
|
21405
21560
|
google.model("gemini-2.5-flash-lite", {
|
|
21406
21561
|
name: "Gemini 2.5 Flash Lite",
|
|
21562
|
+
ctx: 1048576,
|
|
21563
|
+
maxOut: 65536,
|
|
21407
21564
|
capability: null,
|
|
21408
|
-
price: tokenPrice(0.1, 0.4),
|
|
21565
|
+
price: tokenPrice(0.1, 0.4, { cacheRead: 0.01 }),
|
|
21566
|
+
on: ["vertex"]
|
|
21567
|
+
});
|
|
21568
|
+
google.model("gemini-embedding-2", {
|
|
21569
|
+
name: "Gemini Embedding 2",
|
|
21570
|
+
capability: "embedding",
|
|
21571
|
+
price: tokenPrice(0.2, 0),
|
|
21409
21572
|
on: ["vertex"]
|
|
21410
21573
|
});
|
|
21411
21574
|
google.model("gemini-1-5-pro", { name: "Gemini 1.5 Pro", on: ["vertex"] });
|
|
@@ -21421,43 +21584,62 @@ var xai = vendor("xai", {
|
|
|
21421
21584
|
source: "https://docs.x.ai/developers/faq/security"
|
|
21422
21585
|
}
|
|
21423
21586
|
});
|
|
21587
|
+
function grokPrice(input2, output2, cacheRead) {
|
|
21588
|
+
const base = { input: input2, output: output2, cacheRead };
|
|
21589
|
+
return tokenPrice(input2, output2, {
|
|
21590
|
+
cacheRead,
|
|
21591
|
+
longContext: scaledBand(2e5, base, { input: 2, output: 2, cacheRead: 2 })
|
|
21592
|
+
});
|
|
21593
|
+
}
|
|
21594
|
+
xai.model("grok-4.7", {
|
|
21595
|
+
name: "Grok 4.7",
|
|
21596
|
+
ctx: 5e5,
|
|
21597
|
+
capability: "reasoning",
|
|
21598
|
+
price: grokPrice(2, 6, 0.5)
|
|
21599
|
+
});
|
|
21424
21600
|
xai.model("grok-4.6", {
|
|
21425
21601
|
name: "Grok 4.6",
|
|
21426
21602
|
ctx: 5e5,
|
|
21427
21603
|
capability: "reasoning",
|
|
21428
|
-
price:
|
|
21429
|
-
cacheRead: 0.5,
|
|
21430
|
-
longContext: { thresholdInputTokens: 2e5, input: 4, output: 12 }
|
|
21431
|
-
}),
|
|
21604
|
+
price: grokPrice(2, 6, 0.5),
|
|
21432
21605
|
on: ["bedrock"]
|
|
21433
21606
|
});
|
|
21434
21607
|
xai.model("grok-4.5", {
|
|
21435
21608
|
name: "Grok 4.5",
|
|
21436
21609
|
ctx: 5e5,
|
|
21437
21610
|
capability: "reasoning",
|
|
21438
|
-
price:
|
|
21439
|
-
cacheRead: 0.3,
|
|
21440
|
-
longContext: { thresholdInputTokens: 2e5, input: 4, output: 12 }
|
|
21441
|
-
})
|
|
21611
|
+
price: grokPrice(2, 6, 0.3)
|
|
21442
21612
|
});
|
|
21443
21613
|
xai.model("grok-4.3", {
|
|
21444
21614
|
name: "Grok 4.3",
|
|
21445
21615
|
ctx: 1e6,
|
|
21446
21616
|
capability: "reasoning",
|
|
21447
|
-
price:
|
|
21448
|
-
cacheRead: 0.2,
|
|
21449
|
-
longContext: { thresholdInputTokens: 2e5, input: 2.5, output: 5 }
|
|
21450
|
-
}),
|
|
21617
|
+
price: grokPrice(1.25, 2.5, 0.2),
|
|
21451
21618
|
on: ["bedrock"]
|
|
21452
21619
|
});
|
|
21620
|
+
xai.model("grok-4.20-0309-reasoning", {
|
|
21621
|
+
name: "Grok 4.20 Reasoning",
|
|
21622
|
+
capability: "reasoning",
|
|
21623
|
+
ctx: 1e6,
|
|
21624
|
+
price: grokPrice(1.25, 2.5, 0.2)
|
|
21625
|
+
});
|
|
21626
|
+
xai.model("grok-4.20-0309-non-reasoning", {
|
|
21627
|
+
name: "Grok 4.20",
|
|
21628
|
+
capability: null,
|
|
21629
|
+
ctx: 1e6,
|
|
21630
|
+
price: grokPrice(1.25, 2.5, 0.2)
|
|
21631
|
+
});
|
|
21632
|
+
xai.model("grok-4.20-multi-agent-0309", {
|
|
21633
|
+
name: "Grok 4.20 Multi-Agent",
|
|
21634
|
+
capability: "reasoning",
|
|
21635
|
+
ctx: 1e6,
|
|
21636
|
+
price: grokPrice(1.25, 2.5, 0.2)
|
|
21637
|
+
});
|
|
21453
21638
|
xai.model("grok-build-0.1", {
|
|
21454
21639
|
name: "Grok Build 0.1",
|
|
21455
21640
|
ctx: 256e3,
|
|
21456
21641
|
capability: "code",
|
|
21457
|
-
price:
|
|
21458
|
-
cacheRead: 0.2,
|
|
21459
|
-
longContext: { thresholdInputTokens: 2e5, input: 2, output: 4 }
|
|
21460
|
-
})
|
|
21642
|
+
price: grokPrice(1, 2, 0.2)
|
|
21461
21643
|
});
|
|
21462
21644
|
var deepseek = vendor("deepseek", {
|
|
21463
21645
|
family: { id: "deepseek", name: "DeepSeek" },
|
|
@@ -21470,16 +21652,25 @@ var deepseek = vendor("deepseek", {
|
|
|
21470
21652
|
source: "https://cdn.deepseek.com/policies/en-US/deepseek-privacy-policy.html"
|
|
21471
21653
|
}
|
|
21472
21654
|
});
|
|
21655
|
+
deepseek.model("deepseek-flash", {
|
|
21656
|
+
name: "DeepSeek V4.1 Flash",
|
|
21657
|
+
ctx: 1e6,
|
|
21658
|
+
maxOut: 384e3,
|
|
21659
|
+
capability: null,
|
|
21660
|
+
price: tokenPrice(0.3, 1.2, { cacheRead: 6e-3 })
|
|
21661
|
+
});
|
|
21473
21662
|
deepseek.model("deepseek-v4-flash", {
|
|
21474
21663
|
name: "DeepSeek V4 Flash",
|
|
21475
21664
|
ctx: 1e6,
|
|
21665
|
+
maxOut: 384e3,
|
|
21476
21666
|
capability: null,
|
|
21477
|
-
price: tokenPrice(0.
|
|
21667
|
+
price: tokenPrice(0.3, 1.2, { cacheRead: 6e-3 }),
|
|
21478
21668
|
on: ["bedrock", "together", "fireworks", "openrouter", "ollama", "local"]
|
|
21479
21669
|
});
|
|
21480
21670
|
deepseek.model("deepseek-v4-pro", {
|
|
21481
21671
|
name: "DeepSeek V4 Pro",
|
|
21482
21672
|
ctx: 1e6,
|
|
21673
|
+
maxOut: 384e3,
|
|
21483
21674
|
capability: "reasoning",
|
|
21484
21675
|
price: tokenPrice(1.32, 3.96, { cacheRead: 0.044 }),
|
|
21485
21676
|
on: ["bedrock", "together", "fireworks", "openrouter"]
|
|
@@ -21526,7 +21717,14 @@ cohere.model("command-r-plus-08-2024", {
|
|
|
21526
21717
|
ctx: 128e3,
|
|
21527
21718
|
maxOut: 4e3,
|
|
21528
21719
|
price: tokenPrice(2.5, 10),
|
|
21529
|
-
|
|
21720
|
+
on: ["bedrock"]
|
|
21721
|
+
});
|
|
21722
|
+
cohere.model("command-r-plus-04-2024", {
|
|
21723
|
+
name: "Command R+ (04-2024)",
|
|
21724
|
+
seen: "discovered",
|
|
21725
|
+
ctx: 128e3,
|
|
21726
|
+
maxOut: 4e3,
|
|
21727
|
+
price: tokenPrice(3, 15),
|
|
21530
21728
|
aliases: ["command-r-plus"],
|
|
21531
21729
|
on: ["bedrock"]
|
|
21532
21730
|
});
|
|
@@ -21594,6 +21792,65 @@ var mistral = vendor("mistral", {
|
|
|
21594
21792
|
retention: "unknown",
|
|
21595
21793
|
defaultHosting: "local"
|
|
21596
21794
|
});
|
|
21795
|
+
var MISTRAL_API = { defaultHosting: "api" };
|
|
21796
|
+
mistral.model("mistral-large-4", {
|
|
21797
|
+
...MISTRAL_API,
|
|
21798
|
+
name: "Mistral Large 4",
|
|
21799
|
+
ctx: 1e6,
|
|
21800
|
+
capability: null,
|
|
21801
|
+
// Public preview at a sale rate; the published original is 1.36 / 4.18 / 0.14.
|
|
21802
|
+
price: tokenPrice(0.68, 2.09, { cacheRead: 0.07 })
|
|
21803
|
+
});
|
|
21804
|
+
mistral.model("mistral-large-2512", {
|
|
21805
|
+
...MISTRAL_API,
|
|
21806
|
+
name: "Mistral Large 3",
|
|
21807
|
+
ctx: 256e3,
|
|
21808
|
+
capability: null,
|
|
21809
|
+
price: tokenPrice(0.5, 1.5, { cacheRead: 0.05 })
|
|
21810
|
+
});
|
|
21811
|
+
mistral.model("mistral-medium-3-5", {
|
|
21812
|
+
...MISTRAL_API,
|
|
21813
|
+
name: "Mistral Medium 3.5",
|
|
21814
|
+
ctx: 256e3,
|
|
21815
|
+
capability: null,
|
|
21816
|
+
price: tokenPrice(1.5, 7.5, { cacheRead: 0.15 })
|
|
21817
|
+
});
|
|
21818
|
+
mistral.model("mistral-small-2603", {
|
|
21819
|
+
...MISTRAL_API,
|
|
21820
|
+
name: "Mistral Small 4",
|
|
21821
|
+
ctx: 256e3,
|
|
21822
|
+
capability: null,
|
|
21823
|
+
price: tokenPrice(0.15, 0.6, { cacheRead: 0.015 })
|
|
21824
|
+
});
|
|
21825
|
+
mistral.model("ministral-14b-2512", {
|
|
21826
|
+
...MISTRAL_API,
|
|
21827
|
+
name: "Ministral 3 14B",
|
|
21828
|
+
ctx: 256e3,
|
|
21829
|
+
capability: null,
|
|
21830
|
+
price: tokenPrice(0.2, 0.2, { cacheRead: 0.02 })
|
|
21831
|
+
});
|
|
21832
|
+
mistral.model("ministral-8b-2512", {
|
|
21833
|
+
...MISTRAL_API,
|
|
21834
|
+
name: "Ministral 3 8B",
|
|
21835
|
+
ctx: 256e3,
|
|
21836
|
+
capability: null,
|
|
21837
|
+
price: tokenPrice(0.15, 0.15, { cacheRead: 0.015 })
|
|
21838
|
+
});
|
|
21839
|
+
mistral.model("ministral-3b-2512", {
|
|
21840
|
+
...MISTRAL_API,
|
|
21841
|
+
name: "Ministral 3 3B",
|
|
21842
|
+
ctx: 256e3,
|
|
21843
|
+
capability: null,
|
|
21844
|
+
price: tokenPrice(0.1, 0.1, { cacheRead: 0.01 })
|
|
21845
|
+
});
|
|
21846
|
+
mistral.model("codestral-2508", {
|
|
21847
|
+
...MISTRAL_API,
|
|
21848
|
+
name: "Codestral",
|
|
21849
|
+
ctx: 128e3,
|
|
21850
|
+
capability: "code",
|
|
21851
|
+
openWeights: false,
|
|
21852
|
+
price: tokenPrice(0.3, 0.9, { cacheRead: 0.03 })
|
|
21853
|
+
});
|
|
21597
21854
|
mistral.model("mixtral-8x7b", {
|
|
21598
21855
|
name: "Mixtral 8x7B",
|
|
21599
21856
|
seen: "discovered",
|
|
@@ -21757,11 +22014,14 @@ var COMPACT = new Intl.NumberFormat("en-US", {
|
|
|
21757
22014
|
// ../../packages/schema/src/token/token-report.ts
|
|
21758
22015
|
var num = (value) => value ?? 0;
|
|
21759
22016
|
function costUsageOf(a, promptTokens) {
|
|
22017
|
+
const write1h = num(a.ephemeral_1h_input_tokens);
|
|
22018
|
+
const write5m = num(a.ephemeral_5m_input_tokens);
|
|
22019
|
+
const unsplit = Math.max(num(a.cache_creation_input_tokens) - write1h - write5m, 0);
|
|
21760
22020
|
const usage = {
|
|
21761
22021
|
inputTokens: num(a.input_tokens),
|
|
21762
22022
|
outputTokens: num(a.output_tokens),
|
|
21763
|
-
cacheWrite1hTokens:
|
|
21764
|
-
cacheWrite5mTokens:
|
|
22023
|
+
cacheWrite1hTokens: write1h,
|
|
22024
|
+
cacheWrite5mTokens: write5m + unsplit,
|
|
21765
22025
|
cacheReadTokens: num(a.cache_read_input_tokens),
|
|
21766
22026
|
webSearchRequests: num(a.web_search_requests)
|
|
21767
22027
|
};
|
|
@@ -28713,7 +28973,8 @@ var TIMELINE_COLUMNS = `
|
|
|
28713
28973
|
json_extract(attributes, '$.internal') AS internal,
|
|
28714
28974
|
json_extract(attributes, '$.flagged') AS flagged`;
|
|
28715
28975
|
var CALL_PROMPT_TOKENS = `(coalesce(input_tokens, 0) + coalesce(cache_read_input_tokens, 0)
|
|
28716
|
-
+ coalesce(
|
|
28976
|
+
+ max(coalesce(cache_creation_input_tokens, 0),
|
|
28977
|
+
coalesce(ephemeral_1h_input_tokens, 0) + coalesce(ephemeral_5m_input_tokens, 0)))`;
|
|
28717
28978
|
var CALL_BAND = LONG_CONTEXT_THRESHOLDS.length === 0 ? "0" : LONG_CONTEXT_THRESHOLDS.map((t) => `(${CALL_PROMPT_TOKENS} > ${String(Math.trunc(t))})`).join(
|
|
28718
28979
|
" + "
|
|
28719
28980
|
);
|
|
@@ -38699,6 +38960,10 @@ var GROWTH_CORPORA = [
|
|
|
38699
38960
|
build: (length) => joinTo(length, "[", "]", (i) => `"${SQL_WORDS[i % SQL_WORDS.length] ?? ""} ${String(i)}"`)
|
|
38700
38961
|
},
|
|
38701
38962
|
{ name: "single-quoted keyword run ('where)", build: (length) => repeatTo("'where", length) },
|
|
38963
|
+
{
|
|
38964
|
+
name: 'double-quoted keyword literal run ("where" )',
|
|
38965
|
+
build: (length) => repeatTo('"where" ', length)
|
|
38966
|
+
},
|
|
38702
38967
|
{ name: "double-quote run", build: (length) => repeatTo('"', length) },
|
|
38703
38968
|
{ name: "space run", build: (length) => repeatTo(" ", length) },
|
|
38704
38969
|
{ name: "newline run", build: (length) => repeatTo("\n", length) },
|
|
@@ -41026,7 +41291,7 @@ var BUNDLED_PACKS = [
|
|
|
41026
41291
|
{
|
|
41027
41292
|
packId: "code-flaws",
|
|
41028
41293
|
name: "Code Security Flaws",
|
|
41029
|
-
version: "0.1.
|
|
41294
|
+
version: "0.1.2",
|
|
41030
41295
|
rawRules: [
|
|
41031
41296
|
sql_inject_concat_default,
|
|
41032
41297
|
sql_inject_concat_dot_default,
|