@pydantic/genai-prices 0.0.36 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +629 -227
- package/dist/index.cjs +3 -3
- package/dist/index.js +451 -49
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import de from "yargs";
|
|
3
3
|
import { format as he } from "util";
|
|
4
|
-
import { resolve as
|
|
4
|
+
import { resolve as ie, normalize as Ie } from "path";
|
|
5
5
|
import { readFileSync as ke, writeFile as Le, statSync as Pe } from "fs";
|
|
6
6
|
import "assert";
|
|
7
7
|
import { fileURLToPath as Te } from "url";
|
|
8
8
|
function Ae() {
|
|
9
|
-
return
|
|
10
|
-
}
|
|
11
|
-
function Ge() {
|
|
12
|
-
return Se() && !process.defaultApp;
|
|
9
|
+
return Se() ? 0 : 1;
|
|
13
10
|
}
|
|
14
11
|
function Se() {
|
|
12
|
+
return Ge() && !process.defaultApp;
|
|
13
|
+
}
|
|
14
|
+
function Ge() {
|
|
15
15
|
return !!process.versions.electron;
|
|
16
16
|
}
|
|
17
|
-
function Ce(
|
|
18
|
-
return
|
|
17
|
+
function Ce(a) {
|
|
18
|
+
return a.slice(Ae() + 1);
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* @license
|
|
22
22
|
* Copyright (c) 2016, Contributors
|
|
23
23
|
* SPDX-License-Identifier: ISC
|
|
24
24
|
*/
|
|
25
|
-
function W(
|
|
26
|
-
if (
|
|
27
|
-
return
|
|
25
|
+
function W(a) {
|
|
26
|
+
if (a !== a.toLowerCase() && a !== a.toUpperCase() || (a = a.toLowerCase()), a.indexOf("-") === -1 && a.indexOf("_") === -1)
|
|
27
|
+
return a;
|
|
28
28
|
{
|
|
29
29
|
let m = "", s = !1;
|
|
30
|
-
const u =
|
|
31
|
-
for (let _ = u ? u[0].length : 0; _ <
|
|
32
|
-
let k =
|
|
30
|
+
const u = a.match(/^-+/);
|
|
31
|
+
for (let _ = u ? u[0].length : 0; _ < a.length; _++) {
|
|
32
|
+
let k = a.charAt(_);
|
|
33
33
|
s && (s = !1, k = k.toUpperCase()), _ !== 0 && (k === "-" || k === "_") ? s = !0 : k !== "-" && k !== "_" && (m += k);
|
|
34
34
|
}
|
|
35
35
|
return m;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
function Oe(
|
|
39
|
-
const m =
|
|
38
|
+
function Oe(a, n) {
|
|
39
|
+
const m = a.toLowerCase();
|
|
40
40
|
n = n || "-";
|
|
41
41
|
let s = "";
|
|
42
|
-
for (let u = 0; u <
|
|
43
|
-
const _ = m.charAt(u), k =
|
|
42
|
+
for (let u = 0; u < a.length; u++) {
|
|
43
|
+
const _ = m.charAt(u), k = a.charAt(u);
|
|
44
44
|
_ !== k && u > 0 ? s += `${n}${m.charAt(u)}` : s += k;
|
|
45
45
|
}
|
|
46
46
|
return s;
|
|
47
47
|
}
|
|
48
|
-
function Re(
|
|
49
|
-
return
|
|
48
|
+
function Re(a) {
|
|
49
|
+
return a == null ? !1 : typeof a == "number" || /^0x[0-9a-f]+$/i.test(a) ? !0 : /^0[^.]/.test(a) ? !1 : /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(a);
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright (c) 2016, Contributors
|
|
54
54
|
* SPDX-License-Identifier: ISC
|
|
55
55
|
*/
|
|
56
|
-
function
|
|
57
|
-
if (Array.isArray(
|
|
58
|
-
return
|
|
59
|
-
|
|
56
|
+
function Ee(a) {
|
|
57
|
+
if (Array.isArray(a))
|
|
58
|
+
return a.map((k) => typeof k != "string" ? k + "" : k);
|
|
59
|
+
a = a.trim();
|
|
60
60
|
let n = 0, m = null, s = null, u = null;
|
|
61
61
|
const _ = [];
|
|
62
|
-
for (let k = 0; k <
|
|
63
|
-
if (m = s, s =
|
|
62
|
+
for (let k = 0; k < a.length; k++) {
|
|
63
|
+
if (m = s, s = a.charAt(k), s === " " && !u) {
|
|
64
64
|
m !== " " && n++;
|
|
65
65
|
continue;
|
|
66
66
|
}
|
|
@@ -74,8 +74,8 @@ function Ne(i) {
|
|
|
74
74
|
* SPDX-License-Identifier: ISC
|
|
75
75
|
*/
|
|
76
76
|
var I;
|
|
77
|
-
(function(
|
|
78
|
-
|
|
77
|
+
(function(a) {
|
|
78
|
+
a.BOOLEAN = "boolean", a.STRING = "string", a.NUMBER = "number", a.ARRAY = "array";
|
|
79
79
|
})(I || (I = {}));
|
|
80
80
|
/**
|
|
81
81
|
* @license
|
|
@@ -83,7 +83,7 @@ var I;
|
|
|
83
83
|
* SPDX-License-Identifier: ISC
|
|
84
84
|
*/
|
|
85
85
|
let A;
|
|
86
|
-
class
|
|
86
|
+
class Ne {
|
|
87
87
|
constructor(n) {
|
|
88
88
|
A = n;
|
|
89
89
|
}
|
|
@@ -105,7 +105,7 @@ class Ee {
|
|
|
105
105
|
number: void 0,
|
|
106
106
|
__: void 0,
|
|
107
107
|
key: void 0
|
|
108
|
-
}, m), u =
|
|
108
|
+
}, m), u = Ee(n), _ = typeof n == "string", k = ze(Object.assign(/* @__PURE__ */ Object.create(null), s.alias)), h = Object.assign({
|
|
109
109
|
"boolean-negation": !0,
|
|
110
110
|
"camel-case-expansion": !0,
|
|
111
111
|
"combine-arrays": !1,
|
|
@@ -124,7 +124,7 @@ class Ee {
|
|
|
124
124
|
"strip-aliased": !1,
|
|
125
125
|
"strip-dashed": !1,
|
|
126
126
|
"unknown-options-as-args": !1
|
|
127
|
-
}, s.configuration), f = Object.assign(/* @__PURE__ */ Object.create(null), s.default), y = s.configObjects || [], P = s.envPrefix,
|
|
127
|
+
}, s.configuration), f = Object.assign(/* @__PURE__ */ Object.create(null), s.default), y = s.configObjects || [], P = s.envPrefix, S = h["populate--"], G = S ? "--" : "_", Q = /* @__PURE__ */ Object.create(null), oe = /* @__PURE__ */ Object.create(null), C = s.__ || A.format, r = {
|
|
128
128
|
aliases: /* @__PURE__ */ Object.create(null),
|
|
129
129
|
arrays: /* @__PURE__ */ Object.create(null),
|
|
130
130
|
bools: /* @__PURE__ */ Object.create(null),
|
|
@@ -138,14 +138,14 @@ class Ee {
|
|
|
138
138
|
keys: []
|
|
139
139
|
}, L = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/, U = new RegExp("^--" + h["negation-prefix"] + "(.+)");
|
|
140
140
|
[].concat(s.array || []).filter(Boolean).forEach(function(e) {
|
|
141
|
-
const
|
|
141
|
+
const i = typeof e == "object" ? e.key : e, l = Object.keys(e).map(function(o) {
|
|
142
142
|
return {
|
|
143
143
|
boolean: "bools",
|
|
144
144
|
string: "strings",
|
|
145
145
|
number: "numbers"
|
|
146
146
|
}[o];
|
|
147
147
|
}).filter(Boolean).pop();
|
|
148
|
-
l && (r[l][
|
|
148
|
+
l && (r[l][i] = !0), r.arrays[i] = !0, r.keys.push(i);
|
|
149
149
|
}), [].concat(s.boolean || []).filter(Boolean).forEach(function(e) {
|
|
150
150
|
r.bools[e] = !0, r.keys.push(e);
|
|
151
151
|
}), [].concat(s.string || []).filter(Boolean).forEach(function(e) {
|
|
@@ -156,17 +156,17 @@ class Ee {
|
|
|
156
156
|
r.counts[e] = !0, r.keys.push(e);
|
|
157
157
|
}), [].concat(s.normalize || []).filter(Boolean).forEach(function(e) {
|
|
158
158
|
r.normalize[e] = !0, r.keys.push(e);
|
|
159
|
-
}), typeof s.narg == "object" && Object.entries(s.narg).forEach(([e,
|
|
160
|
-
typeof
|
|
161
|
-
}), typeof s.coerce == "object" && Object.entries(s.coerce).forEach(([e,
|
|
162
|
-
typeof
|
|
159
|
+
}), typeof s.narg == "object" && Object.entries(s.narg).forEach(([e, i]) => {
|
|
160
|
+
typeof i == "number" && (r.nargs[e] = i, r.keys.push(e));
|
|
161
|
+
}), typeof s.coerce == "object" && Object.entries(s.coerce).forEach(([e, i]) => {
|
|
162
|
+
typeof i == "function" && (r.coercions[e] = i, r.keys.push(e));
|
|
163
163
|
}), typeof s.config < "u" && (Array.isArray(s.config) || typeof s.config == "string" ? [].concat(s.config).filter(Boolean).forEach(function(e) {
|
|
164
164
|
r.configs[e] = !0;
|
|
165
|
-
}) : typeof s.config == "object" && Object.entries(s.config).forEach(([e,
|
|
166
|
-
(typeof
|
|
165
|
+
}) : typeof s.config == "object" && Object.entries(s.config).forEach(([e, i]) => {
|
|
166
|
+
(typeof i == "boolean" || typeof i == "function") && (r.configs[e] = i);
|
|
167
167
|
})), qe(s.key, k, s.default, r.arrays), Object.keys(f).forEach(function(e) {
|
|
168
|
-
(r.aliases[e] || []).forEach(function(
|
|
169
|
-
f[
|
|
168
|
+
(r.aliases[e] || []).forEach(function(i) {
|
|
169
|
+
f[i] = f[e];
|
|
170
170
|
});
|
|
171
171
|
});
|
|
172
172
|
let B = null;
|
|
@@ -174,28 +174,28 @@ class Ee {
|
|
|
174
174
|
let F = [];
|
|
175
175
|
const w = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] }), ne = {};
|
|
176
176
|
for (let e = 0; e < u.length; e++) {
|
|
177
|
-
const
|
|
177
|
+
const i = u[e], l = i.replace(/^-{3,}/, "---");
|
|
178
178
|
let o, t, p, c, d, v;
|
|
179
|
-
if (
|
|
180
|
-
K(
|
|
179
|
+
if (i !== "--" && /^-/.test(i) && H(i))
|
|
180
|
+
K(i);
|
|
181
181
|
else if (l.match(/^---+(=|$)/)) {
|
|
182
|
-
K(
|
|
182
|
+
K(i);
|
|
183
183
|
continue;
|
|
184
|
-
} else if (
|
|
185
|
-
c =
|
|
186
|
-
else if (
|
|
187
|
-
c =
|
|
188
|
-
else if (
|
|
189
|
-
c =
|
|
190
|
-
else if (
|
|
191
|
-
c =
|
|
192
|
-
else if (
|
|
193
|
-
d = u[e + 1], c =
|
|
194
|
-
else if (
|
|
195
|
-
p =
|
|
184
|
+
} else if (i.match(/^--.+=/) || !h["short-option-groups"] && i.match(/^-.+=/))
|
|
185
|
+
c = i.match(/^--?([^=]+)=([\s\S]*)$/), c !== null && Array.isArray(c) && c.length >= 3 && (g(c[1], r.arrays) ? e = V(e, c[1], u, c[2]) : g(c[1], r.nargs) !== !1 ? e = D(e, c[1], u, c[2]) : q(c[1], c[2], !0));
|
|
186
|
+
else if (i.match(U) && h["boolean-negation"])
|
|
187
|
+
c = i.match(U), c !== null && Array.isArray(c) && c.length >= 2 && (t = c[1], q(t, g(t, r.arrays) ? [!1] : !1));
|
|
188
|
+
else if (i.match(/^--.+/) || !h["short-option-groups"] && i.match(/^-[^-]+/))
|
|
189
|
+
c = i.match(/^--?(.+)/), c !== null && Array.isArray(c) && c.length >= 2 && (t = c[1], g(t, r.arrays) ? e = V(e, t, u) : g(t, r.nargs) !== !1 ? e = D(e, t, u) : (d = u[e + 1], d !== void 0 && (!d.match(/^-/) || d.match(L)) && !g(t, r.bools) && !g(t, r.counts) || /^(true|false)$/.test(d) ? (q(t, d), e++) : q(t, R(t))));
|
|
190
|
+
else if (i.match(/^-.\..+=/))
|
|
191
|
+
c = i.match(/^-([^=]+)=([\s\S]*)$/), c !== null && Array.isArray(c) && c.length >= 3 && q(c[1], c[2]);
|
|
192
|
+
else if (i.match(/^-.\..+/) && !i.match(L))
|
|
193
|
+
d = u[e + 1], c = i.match(/^-(.\..+)/), c !== null && Array.isArray(c) && c.length >= 2 && (t = c[1], d !== void 0 && !d.match(/^-/) && !g(t, r.bools) && !g(t, r.counts) ? (q(t, d), e++) : q(t, R(t)));
|
|
194
|
+
else if (i.match(/^-[^-]+/) && !i.match(L)) {
|
|
195
|
+
p = i.slice(1, -1).split(""), o = !1;
|
|
196
196
|
for (let x = 0; x < p.length; x++) {
|
|
197
|
-
if (d =
|
|
198
|
-
v =
|
|
197
|
+
if (d = i.slice(x + 2), p[x + 1] && p[x + 1] === "=") {
|
|
198
|
+
v = i.slice(x + 3), t = p[x], g(t, r.arrays) ? e = V(e, t, u, v) : g(t, r.nargs) !== !1 ? e = D(e, t, u, v) : q(t, v), o = !0;
|
|
199
199
|
break;
|
|
200
200
|
}
|
|
201
201
|
if (d === "-") {
|
|
@@ -212,109 +212,109 @@ class Ee {
|
|
|
212
212
|
} else
|
|
213
213
|
q(p[x], R(p[x]));
|
|
214
214
|
}
|
|
215
|
-
t =
|
|
216
|
-
} else if (
|
|
217
|
-
t =
|
|
218
|
-
else if (
|
|
215
|
+
t = i.slice(-1)[0], !o && t !== "-" && (g(t, r.arrays) ? e = V(e, t, u) : g(t, r.nargs) !== !1 ? e = D(e, t, u) : (d = u[e + 1], d !== void 0 && (!/^(-|--)[^-]/.test(d) || d.match(L)) && !g(t, r.bools) && !g(t, r.counts) || /^(true|false)$/.test(d) ? (q(t, d), e++) : q(t, R(t))));
|
|
216
|
+
} else if (i.match(/^-[0-9]$/) && i.match(L) && g(i.slice(1), r.bools))
|
|
217
|
+
t = i.slice(1), q(t, R(t));
|
|
218
|
+
else if (i === "--") {
|
|
219
219
|
F = u.slice(e + 1);
|
|
220
220
|
break;
|
|
221
221
|
} else if (h["halt-at-non-option"]) {
|
|
222
222
|
F = u.slice(e);
|
|
223
223
|
break;
|
|
224
224
|
} else
|
|
225
|
-
K(
|
|
225
|
+
K(i);
|
|
226
226
|
}
|
|
227
227
|
re(w, !0), re(w, !1), _e(w), ge(), me(w, r.aliases, f, !0), fe(w), h["set-placeholder-key"] && be(w), Object.keys(r.counts).forEach(function(e) {
|
|
228
|
-
|
|
229
|
-
}),
|
|
230
|
-
w[
|
|
228
|
+
E(w, e.split(".")) || q(e, 0);
|
|
229
|
+
}), S && F.length && (w[G] = []), F.forEach(function(e) {
|
|
230
|
+
w[G].push(e);
|
|
231
231
|
}), h["camel-case-expansion"] && h["strip-dashed"] && Object.keys(w).filter((e) => e !== "--" && e.includes("-")).forEach((e) => {
|
|
232
232
|
delete w[e];
|
|
233
233
|
}), h["strip-aliased"] && [].concat(...Object.keys(k).map((e) => k[e])).forEach((e) => {
|
|
234
|
-
h["camel-case-expansion"] && e.includes("-") && delete w[e.split(".").map((
|
|
234
|
+
h["camel-case-expansion"] && e.includes("-") && delete w[e.split(".").map((i) => W(i)).join(".")], delete w[e];
|
|
235
235
|
});
|
|
236
236
|
function K(e) {
|
|
237
|
-
const
|
|
238
|
-
(typeof
|
|
237
|
+
const i = $("_", e);
|
|
238
|
+
(typeof i == "string" || typeof i == "number") && w._.push(i);
|
|
239
239
|
}
|
|
240
|
-
function D(e,
|
|
241
|
-
let t, p = g(
|
|
240
|
+
function D(e, i, l, o) {
|
|
241
|
+
let t, p = g(i, r.nargs);
|
|
242
242
|
if (p = typeof p != "number" || isNaN(p) ? 1 : p, p === 0)
|
|
243
|
-
return T(o) || (B = Error(C("Argument unexpected for: %s",
|
|
243
|
+
return T(o) || (B = Error(C("Argument unexpected for: %s", i))), q(i, R(i)), e;
|
|
244
244
|
let c = T(o) ? 0 : 1;
|
|
245
245
|
if (h["nargs-eats-options"])
|
|
246
|
-
l.length - (e + 1) + c < p && (B = Error(C("Not enough arguments following: %s",
|
|
246
|
+
l.length - (e + 1) + c < p && (B = Error(C("Not enough arguments following: %s", i))), c = p;
|
|
247
247
|
else {
|
|
248
248
|
for (t = e + 1; t < l.length && (!l[t].match(/^-[^0-9]/) || l[t].match(L) || H(l[t])); t++)
|
|
249
249
|
c++;
|
|
250
|
-
c < p && (B = Error(C("Not enough arguments following: %s",
|
|
250
|
+
c < p && (B = Error(C("Not enough arguments following: %s", i)));
|
|
251
251
|
}
|
|
252
252
|
let d = Math.min(c, p);
|
|
253
|
-
for (!T(o) && d > 0 && (q(
|
|
254
|
-
q(
|
|
253
|
+
for (!T(o) && d > 0 && (q(i, o), d--), t = e + 1; t < d + e + 1; t++)
|
|
254
|
+
q(i, l[t]);
|
|
255
255
|
return e + d;
|
|
256
256
|
}
|
|
257
|
-
function V(e,
|
|
257
|
+
function V(e, i, l, o) {
|
|
258
258
|
let t = [], p = o || l[e + 1];
|
|
259
|
-
const c = g(
|
|
260
|
-
if (g(
|
|
259
|
+
const c = g(i, r.nargs);
|
|
260
|
+
if (g(i, r.bools) && !/^(true|false)$/.test(p))
|
|
261
261
|
t.push(!0);
|
|
262
262
|
else if (T(p) || T(o) && /^-/.test(p) && !L.test(p) && !H(p)) {
|
|
263
|
-
if (f[
|
|
264
|
-
const d = f[
|
|
263
|
+
if (f[i] !== void 0) {
|
|
264
|
+
const d = f[i];
|
|
265
265
|
t = Array.isArray(d) ? d : [d];
|
|
266
266
|
}
|
|
267
267
|
} else {
|
|
268
|
-
T(o) || t.push(Y(
|
|
268
|
+
T(o) || t.push(Y(i, o, !0));
|
|
269
269
|
for (let d = e + 1; d < l.length && !(!h["greedy-arrays"] && t.length > 0 || c && typeof c == "number" && t.length >= c || (p = l[d], /^-/.test(p) && !L.test(p) && !H(p))); d++)
|
|
270
|
-
e = d, t.push(Y(
|
|
270
|
+
e = d, t.push(Y(i, p, _));
|
|
271
271
|
}
|
|
272
|
-
return typeof c == "number" && (c && t.length < c || isNaN(c) && t.length === 0) && (B = Error(C("Not enough arguments following: %s",
|
|
272
|
+
return typeof c == "number" && (c && t.length < c || isNaN(c) && t.length === 0) && (B = Error(C("Not enough arguments following: %s", i))), q(i, t), e;
|
|
273
273
|
}
|
|
274
|
-
function q(e,
|
|
274
|
+
function q(e, i, l = _) {
|
|
275
275
|
if (/-/.test(e) && h["camel-case-expansion"]) {
|
|
276
276
|
const p = e.split(".").map(function(c) {
|
|
277
277
|
return W(c);
|
|
278
278
|
}).join(".");
|
|
279
279
|
se(e, p);
|
|
280
280
|
}
|
|
281
|
-
const o = Y(e,
|
|
282
|
-
|
|
281
|
+
const o = Y(e, i, l), t = e.split(".");
|
|
282
|
+
N(w, t, o), r.aliases[e] && r.aliases[e].forEach(function(p) {
|
|
283
283
|
const c = p.split(".");
|
|
284
|
-
|
|
284
|
+
N(w, c, o);
|
|
285
285
|
}), t.length > 1 && h["dot-notation"] && (r.aliases[t[0]] || []).forEach(function(p) {
|
|
286
286
|
let c = p.split(".");
|
|
287
287
|
const d = [].concat(t);
|
|
288
|
-
d.shift(), c = c.concat(d), (r.aliases[e] || []).includes(c.join(".")) ||
|
|
288
|
+
d.shift(), c = c.concat(d), (r.aliases[e] || []).includes(c.join(".")) || N(w, c, o);
|
|
289
289
|
}), g(e, r.normalize) && !g(e, r.arrays) && [e].concat(r.aliases[e] || []).forEach(function(c) {
|
|
290
290
|
Object.defineProperty(ne, c, {
|
|
291
291
|
enumerable: !0,
|
|
292
292
|
get() {
|
|
293
|
-
return
|
|
293
|
+
return i;
|
|
294
294
|
},
|
|
295
295
|
set(d) {
|
|
296
|
-
|
|
296
|
+
i = typeof d == "string" ? A.normalize(d) : d;
|
|
297
297
|
}
|
|
298
298
|
});
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
-
function se(e,
|
|
302
|
-
r.aliases[e] && r.aliases[e].length || (r.aliases[e] = [
|
|
301
|
+
function se(e, i) {
|
|
302
|
+
r.aliases[e] && r.aliases[e].length || (r.aliases[e] = [i], Q[i] = !0), r.aliases[i] && r.aliases[i].length || se(i, e);
|
|
303
303
|
}
|
|
304
|
-
function Y(e,
|
|
305
|
-
l && (
|
|
306
|
-
let o = Array.isArray(
|
|
304
|
+
function Y(e, i, l) {
|
|
305
|
+
l && (i = je(i)), (g(e, r.bools) || g(e, r.counts)) && typeof i == "string" && (i = i === "true");
|
|
306
|
+
let o = Array.isArray(i) ? i.map(function(t) {
|
|
307
307
|
return $(e, t);
|
|
308
|
-
}) : $(e,
|
|
309
|
-
return g(e, r.counts) && (T(o) || typeof o == "boolean") && (o = Z()), g(e, r.normalize) && g(e, r.arrays) && (Array.isArray(
|
|
308
|
+
}) : $(e, i);
|
|
309
|
+
return g(e, r.counts) && (T(o) || typeof o == "boolean") && (o = Z()), g(e, r.normalize) && g(e, r.arrays) && (Array.isArray(i) ? o = i.map((t) => A.normalize(t)) : o = A.normalize(i)), o;
|
|
310
310
|
}
|
|
311
|
-
function $(e,
|
|
312
|
-
return !h["parse-positional-numbers"] && e === "_" || !g(e, r.strings) && !g(e, r.bools) && !Array.isArray(
|
|
311
|
+
function $(e, i) {
|
|
312
|
+
return !h["parse-positional-numbers"] && e === "_" || !g(e, r.strings) && !g(e, r.bools) && !Array.isArray(i) && (Re(i) && h["parse-numbers"] && Number.isSafeInteger(Math.floor(parseFloat(`${i}`))) || !T(i) && g(e, r.numbers)) && (i = Number(i)), i;
|
|
313
313
|
}
|
|
314
314
|
function _e(e) {
|
|
315
|
-
const
|
|
316
|
-
me(
|
|
317
|
-
const o = e[l] ||
|
|
315
|
+
const i = /* @__PURE__ */ Object.create(null);
|
|
316
|
+
me(i, r.aliases, f), Object.keys(r.configs).forEach(function(l) {
|
|
317
|
+
const o = e[l] || i[l];
|
|
318
318
|
if (o)
|
|
319
319
|
try {
|
|
320
320
|
let t = null;
|
|
@@ -337,10 +337,10 @@ class Ee {
|
|
|
337
337
|
}
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
|
-
function J(e,
|
|
340
|
+
function J(e, i) {
|
|
341
341
|
Object.keys(e).forEach(function(l) {
|
|
342
|
-
const o = e[l], t =
|
|
343
|
-
typeof o == "object" && o !== null && !Array.isArray(o) && h["dot-notation"] ? J(o, t) : (!
|
|
342
|
+
const o = e[l], t = i ? i + "." + l : l;
|
|
343
|
+
typeof o == "object" && o !== null && !Array.isArray(o) && h["dot-notation"] ? J(o, t) : (!E(w, t.split(".")) || g(t, r.arrays) && h["combine-arrays"]) && q(t, o);
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
function ge() {
|
|
@@ -348,7 +348,7 @@ class Ee {
|
|
|
348
348
|
J(e);
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
|
-
function re(e,
|
|
351
|
+
function re(e, i) {
|
|
352
352
|
if (typeof P > "u")
|
|
353
353
|
return;
|
|
354
354
|
const l = typeof P == "string" ? P : "", o = A.env();
|
|
@@ -357,17 +357,17 @@ class Ee {
|
|
|
357
357
|
const p = t.split("__").map(function(c, d) {
|
|
358
358
|
return d === 0 && (c = c.substring(l.length)), W(c);
|
|
359
359
|
});
|
|
360
|
-
(
|
|
360
|
+
(i && r.configs[p.join(".")] || !i) && !E(e, p) && q(p.join("."), o[t]);
|
|
361
361
|
}
|
|
362
362
|
});
|
|
363
363
|
}
|
|
364
364
|
function fe(e) {
|
|
365
|
-
let
|
|
365
|
+
let i;
|
|
366
366
|
const l = /* @__PURE__ */ new Set();
|
|
367
367
|
Object.keys(e).forEach(function(o) {
|
|
368
|
-
if (!l.has(o) && (
|
|
368
|
+
if (!l.has(o) && (i = g(o, r.coercions), typeof i == "function"))
|
|
369
369
|
try {
|
|
370
|
-
const t = $(o,
|
|
370
|
+
const t = $(o, i(e[o]));
|
|
371
371
|
[].concat(r.aliases[o] || [], o).forEach((p) => {
|
|
372
372
|
l.add(p), e[p] = t;
|
|
373
373
|
});
|
|
@@ -377,37 +377,37 @@ class Ee {
|
|
|
377
377
|
});
|
|
378
378
|
}
|
|
379
379
|
function be(e) {
|
|
380
|
-
return r.keys.forEach((
|
|
381
|
-
~
|
|
380
|
+
return r.keys.forEach((i) => {
|
|
381
|
+
~i.indexOf(".") || typeof e[i] > "u" && (e[i] = void 0);
|
|
382
382
|
}), e;
|
|
383
383
|
}
|
|
384
|
-
function me(e,
|
|
384
|
+
function me(e, i, l, o = !1) {
|
|
385
385
|
Object.keys(l).forEach(function(t) {
|
|
386
|
-
|
|
387
|
-
|
|
386
|
+
E(e, t.split(".")) || (N(e, t.split("."), l[t]), o && (oe[t] = !0), (i[t] || []).forEach(function(p) {
|
|
387
|
+
E(e, p.split(".")) || N(e, p.split("."), l[t]);
|
|
388
388
|
}));
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function E(e, i) {
|
|
392
392
|
let l = e;
|
|
393
|
-
h["dot-notation"] || (
|
|
393
|
+
h["dot-notation"] || (i = [i.join(".")]), i.slice(0, -1).forEach(function(t) {
|
|
394
394
|
l = l[t] || {};
|
|
395
395
|
});
|
|
396
|
-
const o =
|
|
396
|
+
const o = i[i.length - 1];
|
|
397
397
|
return typeof l != "object" ? !1 : o in l;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function N(e, i, l) {
|
|
400
400
|
let o = e;
|
|
401
|
-
h["dot-notation"] || (
|
|
401
|
+
h["dot-notation"] || (i = [i.join(".")]), i.slice(0, -1).forEach(function(v) {
|
|
402
402
|
v = le(v), typeof o == "object" && o[v] === void 0 && (o[v] = {}), typeof o[v] != "object" || Array.isArray(o[v]) ? (Array.isArray(o[v]) ? o[v].push({}) : o[v] = [o[v], {}], o = o[v][o[v].length - 1]) : o = o[v];
|
|
403
403
|
});
|
|
404
|
-
const t = le(
|
|
404
|
+
const t = le(i[i.length - 1]), p = g(i.join("."), r.arrays), c = Array.isArray(l);
|
|
405
405
|
let d = h["duplicate-arguments-array"];
|
|
406
406
|
!d && g(t, r.nargs) && (d = !0, (!T(o[t]) && r.nargs[t] === 1 || Array.isArray(o[t]) && o[t].length === r.nargs[t]) && (o[t] = void 0)), l === Z() ? o[t] = Z(o[t]) : Array.isArray(o[t]) ? d && p && c ? o[t] = h["flatten-duplicate-arrays"] ? o[t].concat(l) : (Array.isArray(o[t][0]) ? o[t] : [o[t]]).concat([l]) : !d && !!p == !!c ? o[t] = l : o[t] = o[t].concat([l]) : o[t] === void 0 && p ? o[t] = c ? l : [l] : d && !(o[t] === void 0 || g(t, r.counts) || g(t, r.bools)) ? o[t] = [o[t], l] : o[t] = l;
|
|
407
407
|
}
|
|
408
408
|
function qe(...e) {
|
|
409
|
-
e.forEach(function(
|
|
410
|
-
Object.keys(
|
|
409
|
+
e.forEach(function(i) {
|
|
410
|
+
Object.keys(i || {}).forEach(function(l) {
|
|
411
411
|
r.aliases[l] || (r.aliases[l] = [].concat(k[l] || []), r.aliases[l].concat(l).forEach(function(o) {
|
|
412
412
|
if (/-/.test(o) && h["camel-case-expansion"]) {
|
|
413
413
|
const t = W(o);
|
|
@@ -426,18 +426,18 @@ class Ee {
|
|
|
426
426
|
});
|
|
427
427
|
});
|
|
428
428
|
}
|
|
429
|
-
function g(e,
|
|
430
|
-
const l = [].concat(r.aliases[e] || [], e), o = Object.keys(
|
|
431
|
-
return t ?
|
|
429
|
+
function g(e, i) {
|
|
430
|
+
const l = [].concat(r.aliases[e] || [], e), o = Object.keys(i), t = l.find((p) => o.includes(p));
|
|
431
|
+
return t ? i[t] : !1;
|
|
432
432
|
}
|
|
433
433
|
function ue(e) {
|
|
434
|
-
const
|
|
435
|
-
return [].concat(
|
|
434
|
+
const i = Object.keys(r);
|
|
435
|
+
return [].concat(i.map((o) => r[o])).some(function(o) {
|
|
436
436
|
return Array.isArray(o) ? o.includes(e) : o[e];
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
|
-
function we(e, ...
|
|
440
|
-
return [].concat(...
|
|
439
|
+
function we(e, ...i) {
|
|
440
|
+
return [].concat(...i).some(function(o) {
|
|
441
441
|
const t = e.match(o);
|
|
442
442
|
return t && ue(t[1]);
|
|
443
443
|
});
|
|
@@ -445,17 +445,17 @@ class Ee {
|
|
|
445
445
|
function ve(e) {
|
|
446
446
|
if (e.match(L) || !e.match(/^-[^-]+/))
|
|
447
447
|
return !1;
|
|
448
|
-
let
|
|
448
|
+
let i = !0, l;
|
|
449
449
|
const o = e.slice(1).split("");
|
|
450
450
|
for (let t = 0; t < o.length; t++) {
|
|
451
451
|
if (l = e.slice(t + 2), !ue(o[t])) {
|
|
452
|
-
|
|
452
|
+
i = !1;
|
|
453
453
|
break;
|
|
454
454
|
}
|
|
455
455
|
if (o[t + 1] && o[t + 1] === "=" || l === "-" || /[A-Za-z]/.test(o[t]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(l) || o[t + 1] && o[t + 1].match(/\W/))
|
|
456
456
|
break;
|
|
457
457
|
}
|
|
458
|
-
return
|
|
458
|
+
return i;
|
|
459
459
|
}
|
|
460
460
|
function H(e) {
|
|
461
461
|
return h["unknown-options-as-args"] && xe(e);
|
|
@@ -475,8 +475,8 @@ class Ee {
|
|
|
475
475
|
}[e];
|
|
476
476
|
}
|
|
477
477
|
function Be(e) {
|
|
478
|
-
let
|
|
479
|
-
return g(e, r.strings) ?
|
|
478
|
+
let i = I.BOOLEAN;
|
|
479
|
+
return g(e, r.strings) ? i = I.STRING : g(e, r.numbers) ? i = I.NUMBER : g(e, r.bools) ? i = I.BOOLEAN : g(e, r.arrays) && (i = I.ARRAY), i;
|
|
480
480
|
}
|
|
481
481
|
function T(e) {
|
|
482
482
|
return e === void 0;
|
|
@@ -494,11 +494,11 @@ class Ee {
|
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
function ze(
|
|
497
|
+
function ze(a) {
|
|
498
498
|
const n = [], m = /* @__PURE__ */ Object.create(null);
|
|
499
499
|
let s = !0;
|
|
500
|
-
for (Object.keys(
|
|
501
|
-
n.push([].concat(
|
|
500
|
+
for (Object.keys(a).forEach(function(u) {
|
|
501
|
+
n.push([].concat(a[u], u));
|
|
502
502
|
}); s; ) {
|
|
503
503
|
s = !1;
|
|
504
504
|
for (let u = 0; u < n.length; u++)
|
|
@@ -518,14 +518,14 @@ function ze(i) {
|
|
|
518
518
|
_ !== void 0 && typeof _ == "string" && (m[_] = u);
|
|
519
519
|
}), m;
|
|
520
520
|
}
|
|
521
|
-
function Z(
|
|
522
|
-
return
|
|
521
|
+
function Z(a) {
|
|
522
|
+
return a !== void 0 ? a + 1 : 1;
|
|
523
523
|
}
|
|
524
|
-
function le(
|
|
525
|
-
return
|
|
524
|
+
function le(a) {
|
|
525
|
+
return a === "__proto__" ? "___proto___" : a;
|
|
526
526
|
}
|
|
527
|
-
function je(
|
|
528
|
-
return typeof
|
|
527
|
+
function je(a) {
|
|
528
|
+
return typeof a == "string" && (a[0] === "'" || a[0] === '"') && a[a.length - 1] === a[0] ? a.substring(1, a.length - 1) : a;
|
|
529
529
|
}
|
|
530
530
|
/**
|
|
531
531
|
* @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
|
|
@@ -540,19 +540,19 @@ const ce = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number
|
|
|
540
540
|
if (pe && Number(pe.match(/^([^.]+)/)[1]) < ce)
|
|
541
541
|
throw Error(`yargs parser supports a minimum Node.js version of ${ce}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
|
|
542
542
|
const Qe = process ? process.env : {};
|
|
543
|
-
new
|
|
543
|
+
new Ne({
|
|
544
544
|
cwd: process.cwd,
|
|
545
545
|
env: () => Qe,
|
|
546
546
|
format: he,
|
|
547
547
|
normalize: Ie,
|
|
548
|
-
resolve:
|
|
548
|
+
resolve: ie,
|
|
549
549
|
// TODO: figure out a way to combine ESM and CJS coverage, such that
|
|
550
550
|
// we can exercise all the lines below:
|
|
551
|
-
require: (
|
|
551
|
+
require: (a) => {
|
|
552
552
|
if (typeof require < "u")
|
|
553
|
-
return require(
|
|
554
|
-
if (
|
|
555
|
-
return JSON.parse(ke(
|
|
553
|
+
return require(a);
|
|
554
|
+
if (a.match(/\.json$/))
|
|
555
|
+
return JSON.parse(ke(a, "utf8"));
|
|
556
556
|
throw Error("only .json config files are supported in ESM");
|
|
557
557
|
}
|
|
558
558
|
});
|
|
@@ -562,10 +562,10 @@ const Fe = {
|
|
|
562
562
|
writeFile: Le
|
|
563
563
|
},
|
|
564
564
|
format: he,
|
|
565
|
-
resolve:
|
|
566
|
-
exists: (
|
|
565
|
+
resolve: ie,
|
|
566
|
+
exists: (a) => {
|
|
567
567
|
try {
|
|
568
|
-
return Pe(
|
|
568
|
+
return Pe(a).isFile();
|
|
569
569
|
} catch {
|
|
570
570
|
return !1;
|
|
571
571
|
}
|
|
@@ -658,9 +658,9 @@ class De {
|
|
|
658
658
|
return M.exists(n);
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
|
-
function Ve(
|
|
661
|
+
function Ve(a, n) {
|
|
662
662
|
M = n;
|
|
663
|
-
const m = new De(
|
|
663
|
+
const m = new De(a);
|
|
664
664
|
return {
|
|
665
665
|
__: m.__.bind(m),
|
|
666
666
|
__n: m.__n.bind(m),
|
|
@@ -670,7 +670,7 @@ function Ve(i, n) {
|
|
|
670
670
|
locale: m.locale
|
|
671
671
|
};
|
|
672
672
|
}
|
|
673
|
-
const $e = (
|
|
673
|
+
const $e = (a) => Ve(a, Fe);
|
|
674
674
|
let z;
|
|
675
675
|
try {
|
|
676
676
|
z = Te(import.meta.url);
|
|
@@ -679,10 +679,10 @@ try {
|
|
|
679
679
|
}
|
|
680
680
|
const He = z.substring(0, z.lastIndexOf("node_modules"));
|
|
681
681
|
He || process.cwd(), process.cwd, process.exit, process.nextTick, typeof process.stdout.columns < "u" && process.stdout.columns, $e({
|
|
682
|
-
directory:
|
|
682
|
+
directory: ie(z, "../../../locales"),
|
|
683
683
|
updateFiles: !1
|
|
684
684
|
});
|
|
685
|
-
const
|
|
685
|
+
const ae = [
|
|
686
686
|
{
|
|
687
687
|
id: "anthropic",
|
|
688
688
|
name: "Anthropic",
|
|
@@ -881,6 +881,12 @@ const ie = [
|
|
|
881
881
|
{
|
|
882
882
|
starts_with: "claude-haiku-4-5"
|
|
883
883
|
},
|
|
884
|
+
{
|
|
885
|
+
starts_with: "claude-haiku-4.5"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
starts_with: "claude-4-5-haiku"
|
|
889
|
+
},
|
|
884
890
|
{
|
|
885
891
|
starts_with: "claude-4.5-haiku"
|
|
886
892
|
}
|
|
@@ -894,6 +900,28 @@ const ie = [
|
|
|
894
900
|
output_mtok: 5
|
|
895
901
|
}
|
|
896
902
|
},
|
|
903
|
+
{
|
|
904
|
+
id: "claude-instant-1",
|
|
905
|
+
description: "Retired, here to match price sources",
|
|
906
|
+
match: {
|
|
907
|
+
equals: "claude-instant-1"
|
|
908
|
+
},
|
|
909
|
+
prices: {
|
|
910
|
+
input_mtok: 1.63,
|
|
911
|
+
output_mtok: 55.1
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
id: "claude-instant-1.2",
|
|
916
|
+
description: "Retired, here to match price sources",
|
|
917
|
+
match: {
|
|
918
|
+
equals: "claude-instant-1.2"
|
|
919
|
+
},
|
|
920
|
+
prices: {
|
|
921
|
+
input_mtok: 1.63,
|
|
922
|
+
output_mtok: 5.51
|
|
923
|
+
}
|
|
924
|
+
},
|
|
897
925
|
{
|
|
898
926
|
id: "claude-opus-4-0",
|
|
899
927
|
name: "Claude Opus 4",
|
|
@@ -906,6 +934,9 @@ const ie = [
|
|
|
906
934
|
{
|
|
907
935
|
starts_with: "claude-4-opus"
|
|
908
936
|
},
|
|
937
|
+
{
|
|
938
|
+
equals: "claude-opus-4"
|
|
939
|
+
},
|
|
909
940
|
{
|
|
910
941
|
equals: "claude-opus-4-20250514"
|
|
911
942
|
}
|
|
@@ -924,7 +955,14 @@ const ie = [
|
|
|
924
955
|
name: "Claude Opus 4.1",
|
|
925
956
|
description: "Most intelligent model for complex tasks",
|
|
926
957
|
match: {
|
|
927
|
-
|
|
958
|
+
or: [
|
|
959
|
+
{
|
|
960
|
+
starts_with: "claude-opus-4-1"
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
starts_with: "claude-opus-4.1"
|
|
964
|
+
}
|
|
965
|
+
]
|
|
928
966
|
},
|
|
929
967
|
context_window: 2e5,
|
|
930
968
|
prices: {
|
|
@@ -970,7 +1008,14 @@ const ie = [
|
|
|
970
1008
|
name: "Claude Sonnet 4.5",
|
|
971
1009
|
description: "Most intelligent model for building agents and coding",
|
|
972
1010
|
match: {
|
|
973
|
-
|
|
1011
|
+
or: [
|
|
1012
|
+
{
|
|
1013
|
+
starts_with: "claude-sonnet-4-5"
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
starts_with: "claude-sonnet-4.5"
|
|
1017
|
+
}
|
|
1018
|
+
]
|
|
974
1019
|
},
|
|
975
1020
|
context_window: 1e6,
|
|
976
1021
|
prices: {
|
|
@@ -1011,6 +1056,17 @@ const ie = [
|
|
|
1011
1056
|
]
|
|
1012
1057
|
}
|
|
1013
1058
|
}
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
id: "claude-v1",
|
|
1062
|
+
description: "Retired, here to match price sources",
|
|
1063
|
+
match: {
|
|
1064
|
+
equals: "claude-v1"
|
|
1065
|
+
},
|
|
1066
|
+
prices: {
|
|
1067
|
+
input_mtok: 8,
|
|
1068
|
+
output_mtok: 24
|
|
1069
|
+
}
|
|
1014
1070
|
}
|
|
1015
1071
|
]
|
|
1016
1072
|
},
|
|
@@ -2670,15 +2726,39 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
2670
2726
|
},
|
|
2671
2727
|
{
|
|
2672
2728
|
equals: "gemini-2.5-flash-latest"
|
|
2729
|
+
},
|
|
2730
|
+
{
|
|
2731
|
+
equals: "gemini-2.5-flash-preview-09-2025"
|
|
2673
2732
|
}
|
|
2674
2733
|
]
|
|
2675
2734
|
},
|
|
2676
2735
|
prices: {
|
|
2677
2736
|
input_mtok: 0.3,
|
|
2678
|
-
cache_read_mtok: 0.
|
|
2737
|
+
cache_read_mtok: 0.03,
|
|
2679
2738
|
output_mtok: 2.5,
|
|
2680
2739
|
input_audio_mtok: 1,
|
|
2681
|
-
cache_audio_read_mtok: 0.
|
|
2740
|
+
cache_audio_read_mtok: 0.1
|
|
2741
|
+
}
|
|
2742
|
+
},
|
|
2743
|
+
{
|
|
2744
|
+
id: "gemini-2.5-flash-image",
|
|
2745
|
+
name: "Gemini 2.5 Flash Image",
|
|
2746
|
+
description: "Google's specialized image generation model optimized for fast, high-quality image generation. Outputs images at 1024x1024 resolution, with each image consuming 1290 output tokens.",
|
|
2747
|
+
match: {
|
|
2748
|
+
or: [
|
|
2749
|
+
{
|
|
2750
|
+
equals: "gemini-2.5-flash-image"
|
|
2751
|
+
},
|
|
2752
|
+
{
|
|
2753
|
+
equals: "gemini-2.5-flash-image-preview"
|
|
2754
|
+
}
|
|
2755
|
+
]
|
|
2756
|
+
},
|
|
2757
|
+
context_window: 1e6,
|
|
2758
|
+
price_comments: "See https://ai.google.dev/gemini-api/docs/pricing#gemini-2.5-flash-image. Image output is priced at $30 per 1M tokens, with each 1024x1024 image = 1290 tokens = $0.039/image. Cache pricing is not available for this model.",
|
|
2759
|
+
prices: {
|
|
2760
|
+
input_mtok: 0.3,
|
|
2761
|
+
output_mtok: 30
|
|
2682
2762
|
}
|
|
2683
2763
|
},
|
|
2684
2764
|
{
|
|
@@ -2698,10 +2778,10 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
2698
2778
|
context_window: 1e6,
|
|
2699
2779
|
prices: {
|
|
2700
2780
|
input_mtok: 0.1,
|
|
2701
|
-
cache_read_mtok: 0.
|
|
2781
|
+
cache_read_mtok: 0.01,
|
|
2702
2782
|
output_mtok: 0.4,
|
|
2703
|
-
input_audio_mtok: 0.
|
|
2704
|
-
cache_audio_read_mtok: 0.
|
|
2783
|
+
input_audio_mtok: 0.3,
|
|
2784
|
+
cache_audio_read_mtok: 0.03
|
|
2705
2785
|
}
|
|
2706
2786
|
},
|
|
2707
2787
|
{
|
|
@@ -2711,10 +2791,10 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
2711
2791
|
match: {
|
|
2712
2792
|
or: [
|
|
2713
2793
|
{
|
|
2714
|
-
contains: "gemini-2.5-flash-preview"
|
|
2794
|
+
contains: "gemini-2.5-flash-preview-05-20"
|
|
2715
2795
|
},
|
|
2716
2796
|
{
|
|
2717
|
-
|
|
2797
|
+
contains: "gemini-2.5-flash-preview-04-17"
|
|
2718
2798
|
},
|
|
2719
2799
|
{
|
|
2720
2800
|
equals: "gemini-2.5-flash-preview-05-20:thinking"
|
|
@@ -2752,11 +2832,11 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
2752
2832
|
]
|
|
2753
2833
|
},
|
|
2754
2834
|
cache_read_mtok: {
|
|
2755
|
-
base: 0.
|
|
2835
|
+
base: 0.125,
|
|
2756
2836
|
tiers: [
|
|
2757
2837
|
{
|
|
2758
2838
|
start: 2e5,
|
|
2759
|
-
price: 0.
|
|
2839
|
+
price: 0.25
|
|
2760
2840
|
}
|
|
2761
2841
|
]
|
|
2762
2842
|
},
|
|
@@ -2771,6 +2851,15 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
2771
2851
|
}
|
|
2772
2852
|
}
|
|
2773
2853
|
},
|
|
2854
|
+
{
|
|
2855
|
+
id: "gemini-embedding-001",
|
|
2856
|
+
match: {
|
|
2857
|
+
equals: "gemini-embedding-001"
|
|
2858
|
+
},
|
|
2859
|
+
prices: {
|
|
2860
|
+
input_mtok: 0.15
|
|
2861
|
+
}
|
|
2862
|
+
},
|
|
2774
2863
|
{
|
|
2775
2864
|
id: "gemini-flash-1.5",
|
|
2776
2865
|
name: "Gemini 1.5 Flash",
|
|
@@ -2848,6 +2937,25 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
2848
2937
|
}
|
|
2849
2938
|
}
|
|
2850
2939
|
},
|
|
2940
|
+
{
|
|
2941
|
+
id: "gemini-live-2.5-flash-preview",
|
|
2942
|
+
match: {
|
|
2943
|
+
or: [
|
|
2944
|
+
{
|
|
2945
|
+
starts_with: "gemini-live-2.5-flash-preview"
|
|
2946
|
+
},
|
|
2947
|
+
{
|
|
2948
|
+
starts_with: "gemini-2.5-flash-native-audio-preview"
|
|
2949
|
+
}
|
|
2950
|
+
]
|
|
2951
|
+
},
|
|
2952
|
+
prices: {
|
|
2953
|
+
input_mtok: 0.5,
|
|
2954
|
+
output_mtok: 2,
|
|
2955
|
+
input_audio_mtok: 3,
|
|
2956
|
+
output_audio_mtok: 12
|
|
2957
|
+
}
|
|
2958
|
+
},
|
|
2851
2959
|
{
|
|
2852
2960
|
id: "gemini-pro",
|
|
2853
2961
|
name: "gemini 1.0 pro",
|
|
@@ -3999,7 +4107,14 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
3999
4107
|
name: "Codex Mini",
|
|
4000
4108
|
description: "codex-mini-latest is a fine-tuned version of o4-mini specifically for use in Codex CLI. For direct use in the API, we recommend starting with gpt-4.1.",
|
|
4001
4109
|
match: {
|
|
4002
|
-
|
|
4110
|
+
or: [
|
|
4111
|
+
{
|
|
4112
|
+
equals: "codex-mini"
|
|
4113
|
+
},
|
|
4114
|
+
{
|
|
4115
|
+
equals: "codex-mini-latest"
|
|
4116
|
+
}
|
|
4117
|
+
]
|
|
4003
4118
|
},
|
|
4004
4119
|
prices: {
|
|
4005
4120
|
input_mtok: 1.5,
|
|
@@ -4045,7 +4160,7 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4045
4160
|
id: "ft:gpt-3.5-turbo-",
|
|
4046
4161
|
description: "GPT-3.5 Turbo fine tuned.",
|
|
4047
4162
|
match: {
|
|
4048
|
-
starts_with: "ft:gpt-3.5-turbo
|
|
4163
|
+
starts_with: "ft:gpt-3.5-turbo"
|
|
4049
4164
|
},
|
|
4050
4165
|
prices: {
|
|
4051
4166
|
input_mtok: 3,
|
|
@@ -4053,10 +4168,10 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4053
4168
|
}
|
|
4054
4169
|
},
|
|
4055
4170
|
{
|
|
4056
|
-
id: "ft:gpt-4o
|
|
4171
|
+
id: "ft:gpt-4o",
|
|
4057
4172
|
description: "GPT-4o fine tuned.",
|
|
4058
4173
|
match: {
|
|
4059
|
-
starts_with: "ft:gpt-4o-2024-
|
|
4174
|
+
starts_with: "ft:gpt-4o-2024-"
|
|
4060
4175
|
},
|
|
4061
4176
|
prices: {
|
|
4062
4177
|
input_mtok: 3.75,
|
|
@@ -4064,16 +4179,33 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4064
4179
|
}
|
|
4065
4180
|
},
|
|
4066
4181
|
{
|
|
4067
|
-
id: "ft:gpt-4o-mini
|
|
4182
|
+
id: "ft:gpt-4o-mini",
|
|
4068
4183
|
description: "GPT-4o Mini fine tuned.",
|
|
4069
4184
|
match: {
|
|
4070
|
-
starts_with: "ft:gpt-4o-mini-2024-
|
|
4185
|
+
starts_with: "ft:gpt-4o-mini-2024-"
|
|
4071
4186
|
},
|
|
4072
4187
|
prices: {
|
|
4073
4188
|
input_mtok: 0.3,
|
|
4074
4189
|
output_mtok: 1.2
|
|
4075
4190
|
}
|
|
4076
4191
|
},
|
|
4192
|
+
{
|
|
4193
|
+
id: "gpt-3.5-0301",
|
|
4194
|
+
match: {
|
|
4195
|
+
or: [
|
|
4196
|
+
{
|
|
4197
|
+
equals: "gpt-3.5-turbo-0301"
|
|
4198
|
+
},
|
|
4199
|
+
{
|
|
4200
|
+
equals: "gpt-3.5-0301"
|
|
4201
|
+
}
|
|
4202
|
+
]
|
|
4203
|
+
},
|
|
4204
|
+
prices: {
|
|
4205
|
+
input_mtok: 1.5,
|
|
4206
|
+
output_mtok: 2
|
|
4207
|
+
}
|
|
4208
|
+
},
|
|
4077
4209
|
{
|
|
4078
4210
|
id: "gpt-3.5-turbo",
|
|
4079
4211
|
name: "gpt 3.5 turbo",
|
|
@@ -4088,9 +4220,6 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4088
4220
|
},
|
|
4089
4221
|
{
|
|
4090
4222
|
equals: "gpt-3.5-turbo-0125"
|
|
4091
|
-
},
|
|
4092
|
-
{
|
|
4093
|
-
equals: "gpt-3.5-turbo-1106"
|
|
4094
4223
|
}
|
|
4095
4224
|
]
|
|
4096
4225
|
},
|
|
@@ -4100,6 +4229,28 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4100
4229
|
output_mtok: 1.5
|
|
4101
4230
|
}
|
|
4102
4231
|
},
|
|
4232
|
+
{
|
|
4233
|
+
id: "gpt-3.5-turbo-0613",
|
|
4234
|
+
match: {
|
|
4235
|
+
equals: "gpt-3.5-turbo-0613"
|
|
4236
|
+
},
|
|
4237
|
+
context_window: 16385,
|
|
4238
|
+
prices: {
|
|
4239
|
+
input_mtok: 1.5,
|
|
4240
|
+
output_mtok: 2
|
|
4241
|
+
}
|
|
4242
|
+
},
|
|
4243
|
+
{
|
|
4244
|
+
id: "gpt-3.5-turbo-1106",
|
|
4245
|
+
match: {
|
|
4246
|
+
equals: "gpt-3.5-turbo-1106"
|
|
4247
|
+
},
|
|
4248
|
+
context_window: 16385,
|
|
4249
|
+
prices: {
|
|
4250
|
+
input_mtok: 1,
|
|
4251
|
+
output_mtok: 2
|
|
4252
|
+
}
|
|
4253
|
+
},
|
|
4103
4254
|
{
|
|
4104
4255
|
id: "gpt-3.5-turbo-16k",
|
|
4105
4256
|
name: "GPT-3.5 Turbo 16k",
|
|
@@ -4114,6 +4265,9 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4114
4265
|
},
|
|
4115
4266
|
{
|
|
4116
4267
|
equals: "gpt-35-turbo-16k-0613"
|
|
4268
|
+
},
|
|
4269
|
+
{
|
|
4270
|
+
equals: "gpt-35-turbo-16k"
|
|
4117
4271
|
}
|
|
4118
4272
|
]
|
|
4119
4273
|
},
|
|
@@ -4157,6 +4311,9 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4157
4311
|
},
|
|
4158
4312
|
{
|
|
4159
4313
|
equals: "gpt-4-0613"
|
|
4314
|
+
},
|
|
4315
|
+
{
|
|
4316
|
+
starts_with: "ft:gpt-4-0"
|
|
4160
4317
|
}
|
|
4161
4318
|
]
|
|
4162
4319
|
},
|
|
@@ -4372,6 +4529,9 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4372
4529
|
},
|
|
4373
4530
|
{
|
|
4374
4531
|
equals: "gpt-4o-mini-search-preview"
|
|
4532
|
+
},
|
|
4533
|
+
{
|
|
4534
|
+
equals: "gpt-4o-mini-search-preview-2025-03-11"
|
|
4375
4535
|
}
|
|
4376
4536
|
]
|
|
4377
4537
|
},
|
|
@@ -4413,7 +4573,31 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4413
4573
|
prices: {
|
|
4414
4574
|
input_mtok: 0.6,
|
|
4415
4575
|
cache_read_mtok: 0.3,
|
|
4416
|
-
output_mtok: 2.4
|
|
4576
|
+
output_mtok: 2.4,
|
|
4577
|
+
input_audio_mtok: 10,
|
|
4578
|
+
cache_audio_read_mtok: 0.3,
|
|
4579
|
+
output_audio_mtok: 20
|
|
4580
|
+
}
|
|
4581
|
+
},
|
|
4582
|
+
{
|
|
4583
|
+
id: "gpt-4o-mini-transcribe",
|
|
4584
|
+
match: {
|
|
4585
|
+
equals: "gpt-4o-mini-transcribe"
|
|
4586
|
+
},
|
|
4587
|
+
prices: {
|
|
4588
|
+
input_mtok: 1.25,
|
|
4589
|
+
output_mtok: 5,
|
|
4590
|
+
input_audio_mtok: 3
|
|
4591
|
+
}
|
|
4592
|
+
},
|
|
4593
|
+
{
|
|
4594
|
+
id: "gpt-4o-mini-tts",
|
|
4595
|
+
match: {
|
|
4596
|
+
equals: "gpt-4o-mini-tts"
|
|
4597
|
+
},
|
|
4598
|
+
prices: {
|
|
4599
|
+
input_mtok: 0.6,
|
|
4600
|
+
output_audio_mtok: 12
|
|
4417
4601
|
}
|
|
4418
4602
|
},
|
|
4419
4603
|
{
|
|
@@ -4435,13 +4619,38 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4435
4619
|
name: "GPT-4o Search Preview",
|
|
4436
4620
|
description: "GPT-4o Search Previewis a specialized model for web search in Chat Completions. It is trained to understand and execute web search queries.",
|
|
4437
4621
|
match: {
|
|
4438
|
-
|
|
4622
|
+
or: [
|
|
4623
|
+
{
|
|
4624
|
+
equals: "gpt-4o-search-preview"
|
|
4625
|
+
},
|
|
4626
|
+
{
|
|
4627
|
+
equals: "gpt-4o-search-preview-2025-03-11"
|
|
4628
|
+
}
|
|
4629
|
+
]
|
|
4439
4630
|
},
|
|
4440
4631
|
prices: {
|
|
4441
4632
|
input_mtok: 2.5,
|
|
4442
4633
|
output_mtok: 10
|
|
4443
4634
|
}
|
|
4444
4635
|
},
|
|
4636
|
+
{
|
|
4637
|
+
id: "gpt-4o-transcribe",
|
|
4638
|
+
match: {
|
|
4639
|
+
or: [
|
|
4640
|
+
{
|
|
4641
|
+
equals: "gpt-4o-transcribe"
|
|
4642
|
+
},
|
|
4643
|
+
{
|
|
4644
|
+
equals: "gpt-4o-transcribe-diarize"
|
|
4645
|
+
}
|
|
4646
|
+
]
|
|
4647
|
+
},
|
|
4648
|
+
prices: {
|
|
4649
|
+
input_mtok: 2.5,
|
|
4650
|
+
output_mtok: 10,
|
|
4651
|
+
input_audio_mtok: 6
|
|
4652
|
+
}
|
|
4653
|
+
},
|
|
4445
4654
|
{
|
|
4446
4655
|
id: "gpt-4o:extended",
|
|
4447
4656
|
name: "GPT-4o (extended)",
|
|
@@ -4471,6 +4680,9 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4471
4680
|
},
|
|
4472
4681
|
{
|
|
4473
4682
|
equals: "gpt-5-chat-latest"
|
|
4683
|
+
},
|
|
4684
|
+
{
|
|
4685
|
+
equals: "gpt-5-codex"
|
|
4474
4686
|
}
|
|
4475
4687
|
]
|
|
4476
4688
|
},
|
|
@@ -4481,6 +4693,30 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4481
4693
|
output_mtok: 10
|
|
4482
4694
|
}
|
|
4483
4695
|
},
|
|
4696
|
+
{
|
|
4697
|
+
id: "gpt-5-image",
|
|
4698
|
+
match: {
|
|
4699
|
+
equals: "gpt-5-image"
|
|
4700
|
+
},
|
|
4701
|
+
price_comments: "Seen on OpenRouter before OpenAI",
|
|
4702
|
+
prices: {
|
|
4703
|
+
input_mtok: 10,
|
|
4704
|
+
cache_read_mtok: 1.25,
|
|
4705
|
+
output_mtok: 10
|
|
4706
|
+
}
|
|
4707
|
+
},
|
|
4708
|
+
{
|
|
4709
|
+
id: "gpt-5-image-mini",
|
|
4710
|
+
match: {
|
|
4711
|
+
equals: "gpt-5-image-mini"
|
|
4712
|
+
},
|
|
4713
|
+
price_comments: "Seen on OpenRouter before OpenAI",
|
|
4714
|
+
prices: {
|
|
4715
|
+
input_mtok: 2.5,
|
|
4716
|
+
cache_read_mtok: 0.25,
|
|
4717
|
+
output_mtok: 2
|
|
4718
|
+
}
|
|
4719
|
+
},
|
|
4484
4720
|
{
|
|
4485
4721
|
id: "gpt-5-mini",
|
|
4486
4722
|
name: "GPT-5 mini",
|
|
@@ -4523,6 +4759,68 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4523
4759
|
output_mtok: 0.4
|
|
4524
4760
|
}
|
|
4525
4761
|
},
|
|
4762
|
+
{
|
|
4763
|
+
id: "gpt-5-pro",
|
|
4764
|
+
match: {
|
|
4765
|
+
or: [
|
|
4766
|
+
{
|
|
4767
|
+
equals: "gpt-5-pro"
|
|
4768
|
+
},
|
|
4769
|
+
{
|
|
4770
|
+
equals: "gpt-5-pro-2025-10-06"
|
|
4771
|
+
}
|
|
4772
|
+
]
|
|
4773
|
+
},
|
|
4774
|
+
prices: {
|
|
4775
|
+
input_mtok: 15,
|
|
4776
|
+
output_mtok: 120
|
|
4777
|
+
}
|
|
4778
|
+
},
|
|
4779
|
+
{
|
|
4780
|
+
id: "gpt-realtime",
|
|
4781
|
+
match: {
|
|
4782
|
+
or: [
|
|
4783
|
+
{
|
|
4784
|
+
equals: "gpt-realtime"
|
|
4785
|
+
},
|
|
4786
|
+
{
|
|
4787
|
+
equals: "gpt-realtime-2025-08-28"
|
|
4788
|
+
}
|
|
4789
|
+
]
|
|
4790
|
+
},
|
|
4791
|
+
price_comments: "Missing image token prices which we don't support yet",
|
|
4792
|
+
prices: {
|
|
4793
|
+
input_mtok: 4,
|
|
4794
|
+
cache_read_mtok: 0.4,
|
|
4795
|
+
output_mtok: 16,
|
|
4796
|
+
input_audio_mtok: 32,
|
|
4797
|
+
cache_audio_read_mtok: 0.4,
|
|
4798
|
+
output_audio_mtok: 64
|
|
4799
|
+
}
|
|
4800
|
+
},
|
|
4801
|
+
{
|
|
4802
|
+
id: "gpt-realtime-mini",
|
|
4803
|
+
match: {
|
|
4804
|
+
equals: "gpt-realtime-mini"
|
|
4805
|
+
},
|
|
4806
|
+
price_comments: "Missing image token prices which we don't support yet",
|
|
4807
|
+
prices: {
|
|
4808
|
+
input_mtok: 0.6,
|
|
4809
|
+
cache_read_mtok: 0.06,
|
|
4810
|
+
output_mtok: 2.4,
|
|
4811
|
+
input_audio_mtok: 10,
|
|
4812
|
+
cache_audio_read_mtok: 0.3,
|
|
4813
|
+
output_audio_mtok: 20
|
|
4814
|
+
}
|
|
4815
|
+
},
|
|
4816
|
+
{
|
|
4817
|
+
id: "moderation",
|
|
4818
|
+
description: "All OpenAI moderation models and endpoints are free of charge",
|
|
4819
|
+
match: {
|
|
4820
|
+
contains: "moderation"
|
|
4821
|
+
},
|
|
4822
|
+
prices: {}
|
|
4823
|
+
},
|
|
4526
4824
|
{
|
|
4527
4825
|
id: "o1",
|
|
4528
4826
|
name: "o1",
|
|
@@ -4576,7 +4874,14 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4576
4874
|
name: "o1-pro",
|
|
4577
4875
|
description: "The o1 series of models are trained with reinforcement learning to think before they answer and perform complex reasoning. The o1-pro model uses more compute to think harder and provide consistently better answers.",
|
|
4578
4876
|
match: {
|
|
4579
|
-
|
|
4877
|
+
or: [
|
|
4878
|
+
{
|
|
4879
|
+
equals: "o1-pro"
|
|
4880
|
+
},
|
|
4881
|
+
{
|
|
4882
|
+
equals: "o1-pro-2025-03-19"
|
|
4883
|
+
}
|
|
4884
|
+
]
|
|
4580
4885
|
},
|
|
4581
4886
|
prices: {
|
|
4582
4887
|
input_mtok: 150,
|
|
@@ -4618,6 +4923,24 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4618
4923
|
}
|
|
4619
4924
|
]
|
|
4620
4925
|
},
|
|
4926
|
+
{
|
|
4927
|
+
id: "o3-deep-research",
|
|
4928
|
+
match: {
|
|
4929
|
+
or: [
|
|
4930
|
+
{
|
|
4931
|
+
equals: "o3-deep-research"
|
|
4932
|
+
},
|
|
4933
|
+
{
|
|
4934
|
+
equals: "o3-deep-research-2025-06-26"
|
|
4935
|
+
}
|
|
4936
|
+
]
|
|
4937
|
+
},
|
|
4938
|
+
prices: {
|
|
4939
|
+
input_mtok: 10,
|
|
4940
|
+
cache_read_mtok: 2.5,
|
|
4941
|
+
output_mtok: 40
|
|
4942
|
+
}
|
|
4943
|
+
},
|
|
4621
4944
|
{
|
|
4622
4945
|
id: "o3-mini",
|
|
4623
4946
|
name: "o3 Mini",
|
|
@@ -4646,7 +4969,14 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4646
4969
|
name: "o3 Pro",
|
|
4647
4970
|
description: "The o-series of models are trained with reinforcement learning to think before they answer and perform complex reasoning. The o3-pro model uses more compute to think harder and provide consistently better answers.",
|
|
4648
4971
|
match: {
|
|
4649
|
-
|
|
4972
|
+
or: [
|
|
4973
|
+
{
|
|
4974
|
+
equals: "o3-pro"
|
|
4975
|
+
},
|
|
4976
|
+
{
|
|
4977
|
+
equals: "o3-pro-2025-06-10"
|
|
4978
|
+
}
|
|
4979
|
+
]
|
|
4650
4980
|
},
|
|
4651
4981
|
prices: {
|
|
4652
4982
|
input_mtok: 20,
|
|
@@ -4659,9 +4989,6 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4659
4989
|
description: "OpenAI o4-mini-high is the same model as o4-mini with reasoning_effort set to high.",
|
|
4660
4990
|
match: {
|
|
4661
4991
|
or: [
|
|
4662
|
-
{
|
|
4663
|
-
starts_with: "o4-mini"
|
|
4664
|
-
},
|
|
4665
4992
|
{
|
|
4666
4993
|
equals: "o4-mini-2025-04-16"
|
|
4667
4994
|
},
|
|
@@ -4679,6 +5006,24 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
4679
5006
|
output_mtok: 4.4
|
|
4680
5007
|
}
|
|
4681
5008
|
},
|
|
5009
|
+
{
|
|
5010
|
+
id: "o4-mini-deep-research",
|
|
5011
|
+
match: {
|
|
5012
|
+
or: [
|
|
5013
|
+
{
|
|
5014
|
+
equals: "o4-mini-deep-research"
|
|
5015
|
+
},
|
|
5016
|
+
{
|
|
5017
|
+
equals: "o4-mini-deep-research-2025-06-26"
|
|
5018
|
+
}
|
|
5019
|
+
]
|
|
5020
|
+
},
|
|
5021
|
+
prices: {
|
|
5022
|
+
input_mtok: 2,
|
|
5023
|
+
cache_read_mtok: 0.5,
|
|
5024
|
+
output_mtok: 8
|
|
5025
|
+
}
|
|
5026
|
+
},
|
|
4682
5027
|
{
|
|
4683
5028
|
id: "text-davinci-002",
|
|
4684
5029
|
match: {
|
|
@@ -5867,6 +6212,18 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
5867
6212
|
},
|
|
5868
6213
|
prices: {}
|
|
5869
6214
|
},
|
|
6215
|
+
{
|
|
6216
|
+
id: "deepseek-v3.1-terminus",
|
|
6217
|
+
name: "DeepSeek V3.1 Terminus",
|
|
6218
|
+
match: {
|
|
6219
|
+
equals: "deepseek-v3.1-terminus"
|
|
6220
|
+
},
|
|
6221
|
+
context_window: 163840,
|
|
6222
|
+
prices: {
|
|
6223
|
+
input_mtok: 0.23,
|
|
6224
|
+
output_mtok: 0.9
|
|
6225
|
+
}
|
|
6226
|
+
},
|
|
5870
6227
|
{
|
|
5871
6228
|
id: "deepseek/deepseek-chat",
|
|
5872
6229
|
match: {
|
|
@@ -5894,6 +6251,18 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
5894
6251
|
},
|
|
5895
6252
|
prices: {}
|
|
5896
6253
|
},
|
|
6254
|
+
{
|
|
6255
|
+
id: "deepseek/deepseek-chat-v3.1",
|
|
6256
|
+
name: "DeepSeek Chat V3.1",
|
|
6257
|
+
match: {
|
|
6258
|
+
equals: "deepseek/deepseek-chat-v3.1"
|
|
6259
|
+
},
|
|
6260
|
+
context_window: 163840,
|
|
6261
|
+
prices: {
|
|
6262
|
+
input_mtok: 0.2,
|
|
6263
|
+
output_mtok: 0.8
|
|
6264
|
+
}
|
|
6265
|
+
},
|
|
5897
6266
|
{
|
|
5898
6267
|
id: "deepseek/deepseek-chat:free",
|
|
5899
6268
|
match: {
|
|
@@ -6003,6 +6372,17 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
6003
6372
|
},
|
|
6004
6373
|
prices: {}
|
|
6005
6374
|
},
|
|
6375
|
+
{
|
|
6376
|
+
id: "deepseek/deepseek-v3.2-exp",
|
|
6377
|
+
name: "DeepSeek V3.2 Experimental",
|
|
6378
|
+
match: {
|
|
6379
|
+
equals: "deepseek/deepseek-v3.2-exp"
|
|
6380
|
+
},
|
|
6381
|
+
prices: {
|
|
6382
|
+
input_mtok: 0.27,
|
|
6383
|
+
output_mtok: 0.4
|
|
6384
|
+
}
|
|
6385
|
+
},
|
|
6006
6386
|
{
|
|
6007
6387
|
id: "devstral-small",
|
|
6008
6388
|
name: "Devstral Small",
|
|
@@ -10697,6 +11077,28 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
10697
11077
|
input_mtok: 3,
|
|
10698
11078
|
output_mtok: 3
|
|
10699
11079
|
}
|
|
11080
|
+
},
|
|
11081
|
+
{
|
|
11082
|
+
id: "z-ai/glm-4.5",
|
|
11083
|
+
match: {
|
|
11084
|
+
equals: "z-ai/glm-4.5"
|
|
11085
|
+
},
|
|
11086
|
+
context_window: 131072,
|
|
11087
|
+
prices: {
|
|
11088
|
+
input_mtok: 0.35,
|
|
11089
|
+
output_mtok: 1.55
|
|
11090
|
+
}
|
|
11091
|
+
},
|
|
11092
|
+
{
|
|
11093
|
+
id: "z-ai/glm-4.6",
|
|
11094
|
+
match: {
|
|
11095
|
+
equals: "z-ai/glm-4.6"
|
|
11096
|
+
},
|
|
11097
|
+
context_window: 202752,
|
|
11098
|
+
prices: {
|
|
11099
|
+
input_mtok: 0.4,
|
|
11100
|
+
output_mtok: 1.75
|
|
11101
|
+
}
|
|
10700
11102
|
}
|
|
10701
11103
|
]
|
|
10702
11104
|
},
|
|
@@ -11816,49 +12218,49 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
11816
12218
|
]
|
|
11817
12219
|
}
|
|
11818
12220
|
];
|
|
11819
|
-
function We(
|
|
12221
|
+
function We(a, n) {
|
|
11820
12222
|
if (n <= 0) return 0;
|
|
11821
12223
|
let m = 0;
|
|
11822
|
-
const s = [...
|
|
11823
|
-
m += _ *
|
|
12224
|
+
const s = [...a.tiers].sort((k, h) => k.start - h.start), u = s[0]?.start ?? n, _ = Math.min(n, u);
|
|
12225
|
+
m += _ * a.base / 1e6;
|
|
11824
12226
|
for (let k = 0; k < s.length; k++) {
|
|
11825
12227
|
const h = s[k], f = s[k + 1]?.start ?? 1 / 0, y = Math.max(0, Math.min(n, f) - h.start);
|
|
11826
12228
|
y > 0 && (m += y * h.price / 1e6);
|
|
11827
12229
|
}
|
|
11828
12230
|
return m;
|
|
11829
12231
|
}
|
|
11830
|
-
function O(
|
|
11831
|
-
return
|
|
12232
|
+
function O(a, n, m) {
|
|
12233
|
+
return a === void 0 || n === void 0 ? 0 : typeof a == "number" ? a * n / 1e6 : We(a, n);
|
|
11832
12234
|
}
|
|
11833
|
-
function Ue(
|
|
12235
|
+
function Ue(a, n) {
|
|
11834
12236
|
let m = 0, s = 0;
|
|
11835
|
-
const u =
|
|
11836
|
-
let f =
|
|
12237
|
+
const u = a.cache_read_tokens ?? 0, _ = a.cache_write_tokens ?? 0, k = a.cache_audio_read_tokens ?? 0, h = a.output_audio_tokens ?? 0;
|
|
12238
|
+
let f = a.input_audio_tokens ?? 0;
|
|
11837
12239
|
if (f -= k, f < 0)
|
|
11838
12240
|
throw new Error("cache_audio_read_tokens cannot be greater than input_audio_tokens");
|
|
11839
|
-
let y =
|
|
12241
|
+
let y = a.input_tokens ?? 0;
|
|
11840
12242
|
if (y -= u, y -= _, y -= f, y < 0)
|
|
11841
12243
|
throw new Error("Uncached text input tokens cannot be negative");
|
|
11842
12244
|
let P = u;
|
|
11843
12245
|
if (P -= k, P < 0)
|
|
11844
12246
|
throw new Error("cache_audio_read_tokens cannot be greater than cache_read_tokens");
|
|
11845
12247
|
m += O(n.input_mtok, y), m += O(n.cache_read_mtok, P), m += O(n.cache_write_mtok, _), m += O(n.input_audio_mtok, f), m += O(n.cache_audio_read_mtok, k);
|
|
11846
|
-
let
|
|
11847
|
-
if (
|
|
12248
|
+
let S = a.output_tokens ?? 0;
|
|
12249
|
+
if (S -= h, S < 0)
|
|
11848
12250
|
throw new Error("output_audio_tokens cannot be greater than output_tokens");
|
|
11849
|
-
s += O(n.output_mtok,
|
|
11850
|
-
let
|
|
11851
|
-
return n.requests_kcount !== void 0 && (
|
|
12251
|
+
s += O(n.output_mtok, S), s += O(n.output_audio_mtok, a.output_audio_tokens);
|
|
12252
|
+
let G = m + s;
|
|
12253
|
+
return n.requests_kcount !== void 0 && (G += n.requests_kcount / 1e3), {
|
|
11852
12254
|
input_price: m,
|
|
11853
12255
|
output_price: s,
|
|
11854
|
-
total_price:
|
|
12256
|
+
total_price: G
|
|
11855
12257
|
};
|
|
11856
12258
|
}
|
|
11857
|
-
function Ke(
|
|
11858
|
-
if (!Array.isArray(
|
|
11859
|
-
return
|
|
11860
|
-
for (let m =
|
|
11861
|
-
const s =
|
|
12259
|
+
function Ke(a, n) {
|
|
12260
|
+
if (!Array.isArray(a.prices))
|
|
12261
|
+
return a.prices;
|
|
12262
|
+
for (let m = a.prices.length - 1; m >= 0; m--) {
|
|
12263
|
+
const s = a.prices[m], u = s.constraint;
|
|
11862
12264
|
if (u === void 0)
|
|
11863
12265
|
return s.prices;
|
|
11864
12266
|
if (u.type === "start_date") {
|
|
@@ -11873,34 +12275,34 @@ function Ke(i, n) {
|
|
|
11873
12275
|
return s.prices;
|
|
11874
12276
|
}
|
|
11875
12277
|
}
|
|
11876
|
-
return
|
|
12278
|
+
return a.prices[0].prices;
|
|
11877
12279
|
}
|
|
11878
|
-
function j(
|
|
11879
|
-
return "or" in
|
|
12280
|
+
function j(a, n) {
|
|
12281
|
+
return "or" in a ? a.or.some((m) => j(m, n)) : "and" in a ? a.and.every((m) => j(m, n)) : "equals" in a ? n === a.equals : "starts_with" in a ? n.startsWith(a.starts_with) : "ends_with" in a ? n.endsWith(a.ends_with) : "contains" in a ? n.includes(a.contains) : "regex" in a ? new RegExp(a.regex).test(n) : !1;
|
|
11880
12282
|
}
|
|
11881
|
-
function Ye(
|
|
11882
|
-
const m = n.toLowerCase().trim(), s =
|
|
11883
|
-
return s ||
|
|
12283
|
+
function Ye(a, n) {
|
|
12284
|
+
const m = n.toLowerCase().trim(), s = a.find((u) => u.id === m);
|
|
12285
|
+
return s || a.find((u) => u.provider_match && j(u.provider_match, m));
|
|
11884
12286
|
}
|
|
11885
|
-
function Je(
|
|
12287
|
+
function Je(a, { modelId: n, providerApiUrl: m, providerId: s }) {
|
|
11886
12288
|
if (s)
|
|
11887
|
-
return Ye(
|
|
12289
|
+
return Ye(a, s);
|
|
11888
12290
|
if (m)
|
|
11889
|
-
return
|
|
12291
|
+
return a.find((u) => new RegExp(u.api_pattern).test(m));
|
|
11890
12292
|
if (n)
|
|
11891
|
-
return
|
|
12293
|
+
return a.find((u) => u.model_match && j(u.model_match, n));
|
|
11892
12294
|
}
|
|
11893
|
-
function Ze(
|
|
11894
|
-
return
|
|
12295
|
+
function Ze(a, n) {
|
|
12296
|
+
return a.find((m) => j(m.match, n));
|
|
11895
12297
|
}
|
|
11896
|
-
let Xe =
|
|
11897
|
-
Promise.resolve(
|
|
11898
|
-
function et(
|
|
12298
|
+
let Xe = ae;
|
|
12299
|
+
Promise.resolve(ae);
|
|
12300
|
+
function et(a, n, m) {
|
|
11899
12301
|
const s = n.toLowerCase().trim(), u = m?.provider ?? Je(Xe, { modelId: s, providerApiUrl: m?.providerApiUrl, providerId: m?.providerId });
|
|
11900
12302
|
if (!u) return null;
|
|
11901
12303
|
const _ = Ze(u.models, s);
|
|
11902
12304
|
if (!_) return null;
|
|
11903
|
-
const k = m?.timestamp ?? /* @__PURE__ */ new Date(), h = Ke(_, k), f = Ue(
|
|
12305
|
+
const k = m?.timestamp ?? /* @__PURE__ */ new Date(), h = Ke(_, k), f = Ue(a, h);
|
|
11904
12306
|
return {
|
|
11905
12307
|
auto_update_timestamp: void 0,
|
|
11906
12308
|
model: _,
|
|
@@ -11912,15 +12314,15 @@ function et(i, n, m) {
|
|
|
11912
12314
|
const b = de(Ce(process.argv)).scriptName("genai-prices").command(
|
|
11913
12315
|
"list [provider]",
|
|
11914
12316
|
"List providers and models",
|
|
11915
|
-
(
|
|
12317
|
+
(a) => a.positional("provider", { describe: "Provider ID to filter", type: "string" })
|
|
11916
12318
|
).command(
|
|
11917
12319
|
"calc <model...>",
|
|
11918
12320
|
"Calculate price",
|
|
11919
|
-
(
|
|
12321
|
+
(a) => a.positional("model", { array: !0, describe: "Model(s) (optionally provider:model)", type: "string" }).option("input-tokens", { type: "number" }).option("cache-write-tokens", { type: "number" }).option("cache-read-tokens", { type: "number" }).option("output-tokens", { type: "number" }).option("input-audio-tokens", { type: "number" }).option("cache-audio-read-tokens", { type: "number" }).option("output-audio-tokens", { type: "number" }).option("requests", { type: "number" }).option("provider", { type: "string" }).option("auto-update", { default: !1, type: "boolean" }).option("timestamp", { describe: "RFC3339 timestamp", type: "string" })
|
|
11920
12322
|
).option("auto-update", { describe: "Enable auto-update from GitHub", type: "boolean" }).option("input-tokens", { type: "number" }).option("cache-write-tokens", { type: "number" }).option("cache-read-tokens", { type: "number" }).option("output-tokens", { type: "number" }).option("input-audio-tokens", { type: "number" }).option("cache-audio-read-tokens", { type: "number" }).option("output-audio-tokens", { type: "number" }).option("requests", { type: "number" }).option("provider", { type: "string" }).option("timestamp", { describe: "RFC3339 timestamp", type: "string" }).version("0.1.0").help().parseSync();
|
|
11921
12323
|
function tt() {
|
|
11922
12324
|
if (b._[0] === "list") {
|
|
11923
|
-
const m =
|
|
12325
|
+
const m = ae;
|
|
11924
12326
|
if (b.provider) {
|
|
11925
12327
|
const s = m.find((u) => u.id === b.provider);
|
|
11926
12328
|
s || (console.error(`Provider ${b.provider} not found.`), process.exit(1)), console.log(`${s.name}: (${s.models.length} models)`);
|
|
@@ -11965,8 +12367,8 @@ function tt() {
|
|
|
11965
12367
|
["Input Price", `$${f.input_price}`],
|
|
11966
12368
|
["Output Price", `$${f.output_price}`]
|
|
11967
12369
|
];
|
|
11968
|
-
for (const [
|
|
11969
|
-
|
|
12370
|
+
for (const [S, G] of P)
|
|
12371
|
+
G !== void 0 && console.log(`${S.padStart(14)}: ${G}`);
|
|
11970
12372
|
console.log("");
|
|
11971
12373
|
} catch (f) {
|
|
11972
12374
|
u = !0, f instanceof Error && console.error(`Error for model ${_}:`, f.message);
|