@pydantic/genai-prices 0.0.40 → 0.0.41
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 +260 -223
- package/dist/index.cjs +1 -1
- package/dist/index.js +37 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 _e, writeFile as Le, statSync as Pe } from "fs";
|
|
6
6
|
import "assert";
|
|
7
7
|
import { fileURLToPath as Te } from "url";
|
|
@@ -14,53 +14,53 @@ function Se() {
|
|
|
14
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 k = u ? u[0].length : 0; k <
|
|
32
|
-
let _ =
|
|
30
|
+
const u = a.match(/^-+/);
|
|
31
|
+
for (let k = u ? u[0].length : 0; k < a.length; k++) {
|
|
32
|
+
let _ = a.charAt(k);
|
|
33
33
|
s && (s = !1, _ = _.toUpperCase()), k !== 0 && (_ === "-" || _ === "_") ? s = !0 : _ !== "-" && _ !== "_" && (m += _);
|
|
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 k = m.charAt(u), _ =
|
|
42
|
+
for (let u = 0; u < a.length; u++) {
|
|
43
|
+
const k = m.charAt(u), _ = a.charAt(u);
|
|
44
44
|
k !== _ && u > 0 ? s += `${n}${m.charAt(u)}` : s += _;
|
|
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 Ee(
|
|
57
|
-
if (Array.isArray(
|
|
58
|
-
return
|
|
59
|
-
|
|
56
|
+
function Ee(a) {
|
|
57
|
+
if (Array.isArray(a))
|
|
58
|
+
return a.map((_) => typeof _ != "string" ? _ + "" : _);
|
|
59
|
+
a = a.trim();
|
|
60
60
|
let n = 0, m = null, s = null, u = null;
|
|
61
61
|
const k = [];
|
|
62
|
-
for (let _ = 0; _ <
|
|
63
|
-
if (m = s, s =
|
|
62
|
+
for (let _ = 0; _ < a.length; _++) {
|
|
63
|
+
if (m = s, s = a.charAt(_), s === " " && !u) {
|
|
64
64
|
m !== " " && n++;
|
|
65
65
|
continue;
|
|
66
66
|
}
|
|
@@ -74,8 +74,8 @@ function Ee(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
|
|
@@ -138,14 +138,14 @@ class Ne {
|
|
|
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, c = 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
|
-
|
|
148
|
+
c && (r[c][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 Ne {
|
|
|
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, _, 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 Ne {
|
|
|
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
|
|
178
|
-
let o, t, p,
|
|
179
|
-
if (
|
|
180
|
-
K(
|
|
181
|
-
else if (
|
|
182
|
-
K(
|
|
177
|
+
const i = u[e], c = i.replace(/^-{3,}/, "---");
|
|
178
|
+
let o, t, p, l, d, v;
|
|
179
|
+
if (i !== "--" && /^-/.test(i) && H(i))
|
|
180
|
+
K(i);
|
|
181
|
+
else if (c.match(/^---+(=|$)/)) {
|
|
182
|
+
K(i);
|
|
183
183
|
continue;
|
|
184
|
-
} else if (
|
|
185
|
-
|
|
186
|
-
else if (
|
|
187
|
-
|
|
188
|
-
else if (
|
|
189
|
-
|
|
190
|
-
else if (
|
|
191
|
-
|
|
192
|
-
else if (
|
|
193
|
-
d = u[e + 1],
|
|
194
|
-
else if (
|
|
195
|
-
p =
|
|
184
|
+
} else if (i.match(/^--.+=/) || !h["short-option-groups"] && i.match(/^-.+=/))
|
|
185
|
+
l = i.match(/^--?([^=]+)=([\s\S]*)$/), l !== null && Array.isArray(l) && l.length >= 3 && (g(l[1], r.arrays) ? e = V(e, l[1], u, l[2]) : g(l[1], r.nargs) !== !1 ? e = D(e, l[1], u, l[2]) : q(l[1], l[2], !0));
|
|
186
|
+
else if (i.match(U) && h["boolean-negation"])
|
|
187
|
+
l = i.match(U), l !== null && Array.isArray(l) && l.length >= 2 && (t = l[1], q(t, g(t, r.arrays) ? [!1] : !1));
|
|
188
|
+
else if (i.match(/^--.+/) || !h["short-option-groups"] && i.match(/^-[^-]+/))
|
|
189
|
+
l = i.match(/^--?(.+)/), l !== null && Array.isArray(l) && l.length >= 2 && (t = l[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
|
+
l = i.match(/^-([^=]+)=([\s\S]*)$/), l !== null && Array.isArray(l) && l.length >= 3 && q(l[1], l[2]);
|
|
192
|
+
else if (i.match(/^-.\..+/) && !i.match(L))
|
|
193
|
+
d = u[e + 1], l = i.match(/^-(.\..+)/), l !== null && Array.isArray(l) && l.length >= 2 && (t = l[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,17 +212,17 @@ class Ne {
|
|
|
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), ke(w), ge(), me(w, r.aliases, f, !0), fe(w), h["set-placeholder-key"] && be(w), Object.keys(r.counts).forEach(function(e) {
|
|
228
228
|
E(w, e.split(".")) || q(e, 0);
|
|
@@ -231,97 +231,97 @@ class Ne {
|
|
|
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(_).map((e) => _[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, c, 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",
|
|
244
|
-
let
|
|
243
|
+
return T(o) || (B = Error(C("Argument unexpected for: %s", i))), q(i, R(i)), e;
|
|
244
|
+
let l = T(o) ? 0 : 1;
|
|
245
245
|
if (h["nargs-eats-options"])
|
|
246
|
-
|
|
246
|
+
c.length - (e + 1) + l < p && (B = Error(C("Not enough arguments following: %s", i))), l = p;
|
|
247
247
|
else {
|
|
248
|
-
for (t = e + 1; t <
|
|
249
|
-
|
|
250
|
-
|
|
248
|
+
for (t = e + 1; t < c.length && (!c[t].match(/^-[^0-9]/) || c[t].match(L) || H(c[t])); t++)
|
|
249
|
+
l++;
|
|
250
|
+
l < p && (B = Error(C("Not enough arguments following: %s", i)));
|
|
251
251
|
}
|
|
252
|
-
let d = Math.min(
|
|
253
|
-
for (!T(o) && d > 0 && (q(
|
|
254
|
-
q(
|
|
252
|
+
let d = Math.min(l, p);
|
|
253
|
+
for (!T(o) && d > 0 && (q(i, o), d--), t = e + 1; t < d + e + 1; t++)
|
|
254
|
+
q(i, c[t]);
|
|
255
255
|
return e + d;
|
|
256
256
|
}
|
|
257
|
-
function V(e,
|
|
258
|
-
let t = [], p = o ||
|
|
259
|
-
const
|
|
260
|
-
if (g(
|
|
257
|
+
function V(e, i, c, o) {
|
|
258
|
+
let t = [], p = o || c[e + 1];
|
|
259
|
+
const l = 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(
|
|
269
|
-
for (let d = e + 1; d <
|
|
270
|
-
e = d, t.push(Y(
|
|
268
|
+
T(o) || t.push(Y(i, o, !0));
|
|
269
|
+
for (let d = e + 1; d < c.length && !(!h["greedy-arrays"] && t.length > 0 || l && typeof l == "number" && t.length >= l || (p = c[d], /^-/.test(p) && !L.test(p) && !H(p))); d++)
|
|
270
|
+
e = d, t.push(Y(i, p, k));
|
|
271
271
|
}
|
|
272
|
-
return typeof
|
|
272
|
+
return typeof l == "number" && (l && t.length < l || isNaN(l) && 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, c = k) {
|
|
275
275
|
if (/-/.test(e) && h["camel-case-expansion"]) {
|
|
276
|
-
const p = e.split(".").map(function(
|
|
277
|
-
return W(
|
|
276
|
+
const p = e.split(".").map(function(l) {
|
|
277
|
+
return W(l);
|
|
278
278
|
}).join(".");
|
|
279
279
|
se(e, p);
|
|
280
280
|
}
|
|
281
|
-
const o = Y(e,
|
|
281
|
+
const o = Y(e, i, c), t = e.split(".");
|
|
282
282
|
N(w, t, o), r.aliases[e] && r.aliases[e].forEach(function(p) {
|
|
283
|
-
const
|
|
284
|
-
N(w,
|
|
283
|
+
const l = p.split(".");
|
|
284
|
+
N(w, l, o);
|
|
285
285
|
}), t.length > 1 && h["dot-notation"] && (r.aliases[t[0]] || []).forEach(function(p) {
|
|
286
|
-
let
|
|
286
|
+
let l = p.split(".");
|
|
287
287
|
const d = [].concat(t);
|
|
288
|
-
d.shift(),
|
|
289
|
-
}), g(e, r.normalize) && !g(e, r.arrays) && [e].concat(r.aliases[e] || []).forEach(function(
|
|
290
|
-
Object.defineProperty(ne,
|
|
288
|
+
d.shift(), l = l.concat(d), (r.aliases[e] || []).includes(l.join(".")) || N(w, l, o);
|
|
289
|
+
}), g(e, r.normalize) && !g(e, r.arrays) && [e].concat(r.aliases[e] || []).forEach(function(l) {
|
|
290
|
+
Object.defineProperty(ne, l, {
|
|
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
|
-
|
|
306
|
-
let o = Array.isArray(
|
|
304
|
+
function Y(e, i, c) {
|
|
305
|
+
c && (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 ke(e) {
|
|
315
|
-
const
|
|
316
|
-
me(
|
|
317
|
-
const o = e[
|
|
315
|
+
const i = /* @__PURE__ */ Object.create(null);
|
|
316
|
+
me(i, r.aliases, f), Object.keys(r.configs).forEach(function(c) {
|
|
317
|
+
const o = e[c] || i[c];
|
|
318
318
|
if (o)
|
|
319
319
|
try {
|
|
320
320
|
let t = null;
|
|
321
|
-
const p = A.resolve(A.cwd(), o),
|
|
322
|
-
if (typeof
|
|
321
|
+
const p = A.resolve(A.cwd(), o), l = r.configs[c];
|
|
322
|
+
if (typeof l == "function") {
|
|
323
323
|
try {
|
|
324
|
-
t =
|
|
324
|
+
t = l(p);
|
|
325
325
|
} catch (d) {
|
|
326
326
|
t = d;
|
|
327
327
|
}
|
|
@@ -333,13 +333,13 @@ class Ne {
|
|
|
333
333
|
t = A.require(p);
|
|
334
334
|
J(t);
|
|
335
335
|
} catch (t) {
|
|
336
|
-
t.name === "PermissionDenied" ? B = t : e[
|
|
336
|
+
t.name === "PermissionDenied" ? B = t : e[c] && (B = Error(C("Invalid JSON config file: %s", o)));
|
|
337
337
|
}
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
|
-
function J(e,
|
|
341
|
-
Object.keys(e).forEach(function(
|
|
342
|
-
const o = e[
|
|
340
|
+
function J(e, i) {
|
|
341
|
+
Object.keys(e).forEach(function(c) {
|
|
342
|
+
const o = e[c], t = i ? i + "." + c : c;
|
|
343
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
|
}
|
|
@@ -348,28 +348,28 @@ class Ne {
|
|
|
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
|
-
const
|
|
354
|
+
const c = typeof P == "string" ? P : "", o = A.env();
|
|
355
355
|
Object.keys(o).forEach(function(t) {
|
|
356
|
-
if (
|
|
357
|
-
const p = t.split("__").map(function(
|
|
358
|
-
return d === 0 && (
|
|
356
|
+
if (c === "" || t.lastIndexOf(c, 0) === 0) {
|
|
357
|
+
const p = t.split("__").map(function(l, d) {
|
|
358
|
+
return d === 0 && (l = l.substring(c.length)), W(l);
|
|
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
|
|
366
|
-
const
|
|
365
|
+
let i;
|
|
366
|
+
const c = /* @__PURE__ */ new Set();
|
|
367
367
|
Object.keys(e).forEach(function(o) {
|
|
368
|
-
if (!
|
|
368
|
+
if (!c.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
|
+
c.add(p), e[p] = t;
|
|
373
373
|
});
|
|
374
374
|
} catch (t) {
|
|
375
375
|
B = t;
|
|
@@ -377,67 +377,67 @@ class Ne {
|
|
|
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,
|
|
385
|
-
Object.keys(
|
|
386
|
-
E(e, t.split(".")) || (N(e, t.split("."),
|
|
387
|
-
E(e, p.split(".")) || N(e, p.split("."),
|
|
384
|
+
function me(e, i, c, o = !1) {
|
|
385
|
+
Object.keys(c).forEach(function(t) {
|
|
386
|
+
E(e, t.split(".")) || (N(e, t.split("."), c[t]), o && (oe[t] = !0), (i[t] || []).forEach(function(p) {
|
|
387
|
+
E(e, p.split(".")) || N(e, p.split("."), c[t]);
|
|
388
388
|
}));
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
|
-
function E(e,
|
|
392
|
-
let
|
|
393
|
-
h["dot-notation"] || (
|
|
394
|
-
|
|
391
|
+
function E(e, i) {
|
|
392
|
+
let c = e;
|
|
393
|
+
h["dot-notation"] || (i = [i.join(".")]), i.slice(0, -1).forEach(function(t) {
|
|
394
|
+
c = c[t] || {};
|
|
395
395
|
});
|
|
396
|
-
const o =
|
|
397
|
-
return typeof
|
|
396
|
+
const o = i[i.length - 1];
|
|
397
|
+
return typeof c != "object" ? !1 : o in c;
|
|
398
398
|
}
|
|
399
|
-
function N(e,
|
|
399
|
+
function N(e, i, c) {
|
|
400
400
|
let o = e;
|
|
401
|
-
h["dot-notation"] || (
|
|
402
|
-
v =
|
|
401
|
+
h["dot-notation"] || (i = [i.join(".")]), i.slice(0, -1).forEach(function(v) {
|
|
402
|
+
v = ce(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 =
|
|
404
|
+
const t = ce(i[i.length - 1]), p = g(i.join("."), r.arrays), l = Array.isArray(c);
|
|
405
405
|
let d = h["duplicate-arguments-array"];
|
|
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)),
|
|
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)), c === Z() ? o[t] = Z(o[t]) : Array.isArray(o[t]) ? d && p && l ? o[t] = h["flatten-duplicate-arrays"] ? o[t].concat(c) : (Array.isArray(o[t][0]) ? o[t] : [o[t]]).concat([c]) : !d && !!p == !!l ? o[t] = c : o[t] = o[t].concat([c]) : o[t] === void 0 && p ? o[t] = l ? c : [c] : d && !(o[t] === void 0 || g(t, r.counts) || g(t, r.bools)) ? o[t] = [o[t], c] : o[t] = c;
|
|
407
407
|
}
|
|
408
408
|
function qe(...e) {
|
|
409
|
-
e.forEach(function(
|
|
410
|
-
Object.keys(
|
|
411
|
-
r.aliases[
|
|
409
|
+
e.forEach(function(i) {
|
|
410
|
+
Object.keys(i || {}).forEach(function(c) {
|
|
411
|
+
r.aliases[c] || (r.aliases[c] = [].concat(_[c] || []), r.aliases[c].concat(c).forEach(function(o) {
|
|
412
412
|
if (/-/.test(o) && h["camel-case-expansion"]) {
|
|
413
413
|
const t = W(o);
|
|
414
|
-
t !==
|
|
414
|
+
t !== c && r.aliases[c].indexOf(t) === -1 && (r.aliases[c].push(t), Q[t] = !0);
|
|
415
415
|
}
|
|
416
|
-
}), r.aliases[
|
|
416
|
+
}), r.aliases[c].concat(c).forEach(function(o) {
|
|
417
417
|
if (o.length > 1 && /[A-Z]/.test(o) && h["camel-case-expansion"]) {
|
|
418
418
|
const t = Oe(o, "-");
|
|
419
|
-
t !==
|
|
419
|
+
t !== c && r.aliases[c].indexOf(t) === -1 && (r.aliases[c].push(t), Q[t] = !0);
|
|
420
420
|
}
|
|
421
|
-
}), r.aliases[
|
|
422
|
-
r.aliases[o] = [
|
|
421
|
+
}), r.aliases[c].forEach(function(o) {
|
|
422
|
+
r.aliases[o] = [c].concat(r.aliases[c].filter(function(t) {
|
|
423
423
|
return o !== t;
|
|
424
424
|
}));
|
|
425
425
|
}));
|
|
426
426
|
});
|
|
427
427
|
});
|
|
428
428
|
}
|
|
429
|
-
function g(e,
|
|
430
|
-
const
|
|
431
|
-
return t ?
|
|
429
|
+
function g(e, i) {
|
|
430
|
+
const c = [].concat(r.aliases[e] || [], e), o = Object.keys(i), t = c.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 Ne {
|
|
|
445
445
|
function ve(e) {
|
|
446
446
|
if (e.match(L) || !e.match(/^-[^-]+/))
|
|
447
447
|
return !1;
|
|
448
|
-
let
|
|
448
|
+
let i = !0, c;
|
|
449
449
|
const o = e.slice(1).split("");
|
|
450
450
|
for (let t = 0; t < o.length; t++) {
|
|
451
|
-
if (
|
|
452
|
-
|
|
451
|
+
if (c = e.slice(t + 2), !ue(o[t])) {
|
|
452
|
+
i = !1;
|
|
453
453
|
break;
|
|
454
454
|
}
|
|
455
|
-
if (o[t + 1] && o[t + 1] === "=" ||
|
|
455
|
+
if (o[t + 1] && o[t + 1] === "=" || c === "-" || /[A-Za-z]/.test(o[t]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(c) || 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 Ne {
|
|
|
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 Ne {
|
|
|
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
|
k !== void 0 && typeof k == "string" && (m[k] = 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
|
|
525
|
-
return
|
|
524
|
+
function ce(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
|
|
@@ -536,23 +536,23 @@ function je(i) {
|
|
|
536
536
|
* SPDX-License-Identifier: ISC
|
|
537
537
|
*/
|
|
538
538
|
var X, ee, te;
|
|
539
|
-
const
|
|
540
|
-
if (pe && Number(pe.match(/^([^.]+)/)[1]) <
|
|
541
|
-
throw Error(`yargs parser supports a minimum Node.js version of ${
|
|
539
|
+
const le = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12, pe = (ee = (X = process == null ? void 0 : process.versions) === null || X === void 0 ? void 0 : X.node) !== null && ee !== void 0 ? ee : (te = process == null ? void 0 : process.version) === null || te === void 0 ? void 0 : te.slice(1);
|
|
540
|
+
if (pe && Number(pe.match(/^([^.]+)/)[1]) < le)
|
|
541
|
+
throw Error(`yargs parser supports a minimum Node.js version of ${le}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
|
|
542
542
|
const Qe = process ? process.env : {};
|
|
543
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(_e(
|
|
553
|
+
return require(a);
|
|
554
|
+
if (a.match(/\.json$/))
|
|
555
|
+
return JSON.parse(_e(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",
|
|
@@ -2984,6 +2984,43 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
2984
2984
|
}
|
|
2985
2985
|
}
|
|
2986
2986
|
},
|
|
2987
|
+
{
|
|
2988
|
+
id: "gemini-3-pro-preview",
|
|
2989
|
+
name: "Gemini 3 Pro Preview",
|
|
2990
|
+
description: "The best model in the world for multimodal understanding, and our most powerful agentic and vibe-coding model yet.",
|
|
2991
|
+
match: {
|
|
2992
|
+
starts_with: "gemini-3-pro-preview"
|
|
2993
|
+
},
|
|
2994
|
+
prices: {
|
|
2995
|
+
input_mtok: {
|
|
2996
|
+
base: 2,
|
|
2997
|
+
tiers: [
|
|
2998
|
+
{
|
|
2999
|
+
start: 2e5,
|
|
3000
|
+
price: 4
|
|
3001
|
+
}
|
|
3002
|
+
]
|
|
3003
|
+
},
|
|
3004
|
+
cache_read_mtok: {
|
|
3005
|
+
base: 0.2,
|
|
3006
|
+
tiers: [
|
|
3007
|
+
{
|
|
3008
|
+
start: 2e5,
|
|
3009
|
+
price: 0.4
|
|
3010
|
+
}
|
|
3011
|
+
]
|
|
3012
|
+
},
|
|
3013
|
+
output_mtok: {
|
|
3014
|
+
base: 12,
|
|
3015
|
+
tiers: [
|
|
3016
|
+
{
|
|
3017
|
+
start: 2e5,
|
|
3018
|
+
price: 18
|
|
3019
|
+
}
|
|
3020
|
+
]
|
|
3021
|
+
}
|
|
3022
|
+
}
|
|
3023
|
+
},
|
|
2987
3024
|
{
|
|
2988
3025
|
id: "gemini-embedding-001",
|
|
2989
3026
|
match: {
|
|
@@ -12569,37 +12606,37 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
12569
12606
|
]
|
|
12570
12607
|
}
|
|
12571
12608
|
];
|
|
12572
|
-
function We(
|
|
12609
|
+
function We(a, n) {
|
|
12573
12610
|
if (n <= 0) return 0;
|
|
12574
12611
|
let m = 0;
|
|
12575
|
-
const s = [...
|
|
12576
|
-
m += k *
|
|
12612
|
+
const s = [...a.tiers].sort((_, h) => _.start - h.start), u = s[0]?.start ?? n, k = Math.min(n, u);
|
|
12613
|
+
m += k * a.base / 1e6;
|
|
12577
12614
|
for (let _ = 0; _ < s.length; _++) {
|
|
12578
12615
|
const h = s[_], f = s[_ + 1]?.start ?? 1 / 0, y = Math.max(0, Math.min(n, f) - h.start);
|
|
12579
12616
|
y > 0 && (m += y * h.price / 1e6);
|
|
12580
12617
|
}
|
|
12581
12618
|
return m;
|
|
12582
12619
|
}
|
|
12583
|
-
function O(
|
|
12584
|
-
return
|
|
12620
|
+
function O(a, n, m) {
|
|
12621
|
+
return a === void 0 || n === void 0 ? 0 : typeof a == "number" ? a * n / 1e6 : We(a, n);
|
|
12585
12622
|
}
|
|
12586
|
-
function Ue(
|
|
12623
|
+
function Ue(a, n) {
|
|
12587
12624
|
let m = 0, s = 0;
|
|
12588
|
-
const u =
|
|
12589
|
-
let f =
|
|
12625
|
+
const u = a.cache_read_tokens ?? 0, k = a.cache_write_tokens ?? 0, _ = a.cache_audio_read_tokens ?? 0, h = a.output_audio_tokens ?? 0;
|
|
12626
|
+
let f = a.input_audio_tokens ?? 0;
|
|
12590
12627
|
if (f -= _, f < 0)
|
|
12591
12628
|
throw new Error("cache_audio_read_tokens cannot be greater than input_audio_tokens");
|
|
12592
|
-
let y =
|
|
12629
|
+
let y = a.input_tokens ?? 0;
|
|
12593
12630
|
if (y -= u, y -= k, y -= f, y < 0)
|
|
12594
12631
|
throw new Error("Uncached text input tokens cannot be negative");
|
|
12595
12632
|
let P = u;
|
|
12596
12633
|
if (P -= _, P < 0)
|
|
12597
12634
|
throw new Error("cache_audio_read_tokens cannot be greater than cache_read_tokens");
|
|
12598
12635
|
m += O(n.input_mtok, y), m += O(n.cache_read_mtok, P), m += O(n.cache_write_mtok, k), m += O(n.input_audio_mtok, f), m += O(n.cache_audio_read_mtok, _);
|
|
12599
|
-
let S =
|
|
12636
|
+
let S = a.output_tokens ?? 0;
|
|
12600
12637
|
if (S -= h, S < 0)
|
|
12601
12638
|
throw new Error("output_audio_tokens cannot be greater than output_tokens");
|
|
12602
|
-
s += O(n.output_mtok, S), s += O(n.output_audio_mtok,
|
|
12639
|
+
s += O(n.output_mtok, S), s += O(n.output_audio_mtok, a.output_audio_tokens);
|
|
12603
12640
|
let G = m + s;
|
|
12604
12641
|
return n.requests_kcount !== void 0 && (G += n.requests_kcount / 1e3), {
|
|
12605
12642
|
input_price: m,
|
|
@@ -12607,11 +12644,11 @@ function Ue(i, n) {
|
|
|
12607
12644
|
total_price: G
|
|
12608
12645
|
};
|
|
12609
12646
|
}
|
|
12610
|
-
function Ke(
|
|
12611
|
-
if (!Array.isArray(
|
|
12612
|
-
return
|
|
12613
|
-
for (let m =
|
|
12614
|
-
const s =
|
|
12647
|
+
function Ke(a, n) {
|
|
12648
|
+
if (!Array.isArray(a.prices))
|
|
12649
|
+
return a.prices;
|
|
12650
|
+
for (let m = a.prices.length - 1; m >= 0; m--) {
|
|
12651
|
+
const s = a.prices[m], u = s.constraint;
|
|
12615
12652
|
if (u === void 0)
|
|
12616
12653
|
return s.prices;
|
|
12617
12654
|
if (u.type === "start_date") {
|
|
@@ -12626,34 +12663,34 @@ function Ke(i, n) {
|
|
|
12626
12663
|
return s.prices;
|
|
12627
12664
|
}
|
|
12628
12665
|
}
|
|
12629
|
-
return
|
|
12666
|
+
return a.prices[0].prices;
|
|
12630
12667
|
}
|
|
12631
|
-
function j(
|
|
12632
|
-
return "or" in
|
|
12668
|
+
function j(a, n) {
|
|
12669
|
+
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;
|
|
12633
12670
|
}
|
|
12634
|
-
function Ye(
|
|
12635
|
-
const m = n.toLowerCase().trim(), s =
|
|
12636
|
-
return s ||
|
|
12671
|
+
function Ye(a, n) {
|
|
12672
|
+
const m = n.toLowerCase().trim(), s = a.find((u) => u.id === m);
|
|
12673
|
+
return s || a.find((u) => u.provider_match && j(u.provider_match, m));
|
|
12637
12674
|
}
|
|
12638
|
-
function Je(
|
|
12675
|
+
function Je(a, { modelId: n, providerApiUrl: m, providerId: s }) {
|
|
12639
12676
|
if (s)
|
|
12640
|
-
return Ye(
|
|
12677
|
+
return Ye(a, s);
|
|
12641
12678
|
if (m)
|
|
12642
|
-
return
|
|
12679
|
+
return a.find((u) => new RegExp(u.api_pattern).test(m));
|
|
12643
12680
|
if (n)
|
|
12644
|
-
return
|
|
12681
|
+
return a.find((u) => u.model_match && j(u.model_match, n));
|
|
12645
12682
|
}
|
|
12646
|
-
function Ze(
|
|
12647
|
-
return
|
|
12683
|
+
function Ze(a, n) {
|
|
12684
|
+
return a.find((m) => j(m.match, n));
|
|
12648
12685
|
}
|
|
12649
|
-
let Xe =
|
|
12650
|
-
Promise.resolve(
|
|
12651
|
-
function et(
|
|
12686
|
+
let Xe = ae;
|
|
12687
|
+
Promise.resolve(ae);
|
|
12688
|
+
function et(a, n, m) {
|
|
12652
12689
|
const s = n.toLowerCase().trim(), u = m?.provider ?? Je(Xe, { modelId: s, providerApiUrl: m?.providerApiUrl, providerId: m?.providerId });
|
|
12653
12690
|
if (!u) return null;
|
|
12654
12691
|
const k = Ze(u.models, s);
|
|
12655
12692
|
if (!k) return null;
|
|
12656
|
-
const _ = m?.timestamp ?? /* @__PURE__ */ new Date(), h = Ke(k, _), f = Ue(
|
|
12693
|
+
const _ = m?.timestamp ?? /* @__PURE__ */ new Date(), h = Ke(k, _), f = Ue(a, h);
|
|
12657
12694
|
return {
|
|
12658
12695
|
auto_update_timestamp: void 0,
|
|
12659
12696
|
model: k,
|
|
@@ -12665,15 +12702,15 @@ function et(i, n, m) {
|
|
|
12665
12702
|
const b = de(Ce(process.argv)).scriptName("genai-prices").command(
|
|
12666
12703
|
"list [provider]",
|
|
12667
12704
|
"List providers and models",
|
|
12668
|
-
(
|
|
12705
|
+
(a) => a.positional("provider", { describe: "Provider ID to filter", type: "string" })
|
|
12669
12706
|
).command(
|
|
12670
12707
|
"calc <model...>",
|
|
12671
12708
|
"Calculate price",
|
|
12672
|
-
(
|
|
12709
|
+
(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" })
|
|
12673
12710
|
).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();
|
|
12674
12711
|
function tt() {
|
|
12675
12712
|
if (b._[0] === "list") {
|
|
12676
|
-
const m =
|
|
12713
|
+
const m = ae;
|
|
12677
12714
|
if (b.provider) {
|
|
12678
12715
|
const s = m.find((u) => u.id === b.provider);
|
|
12679
12716
|
s || (console.error(`Provider ${b.provider} not found.`), process.exit(1)), console.log(`${s.name}: (${s.models.length} models)`);
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=[{id:"anthropic",name:"Anthropic",pricing_urls:["https://www.anthropic.com/pricing#api"],api_pattern:"https://api\\.anthropic\\.com",model_match:{contains:"claude"},provider_match:{contains:"anthropic"},extractors:[{api_flavor:"default",root:"usage",model_path:"model",mappings:[{path:"input_tokens",dest:"input_tokens",required:!0},{path:"cache_creation_input_tokens",dest:"input_tokens",required:!1},{path:"cache_read_input_tokens",dest:"input_tokens",required:!1},{path:"cache_creation_input_tokens",dest:"cache_write_tokens",required:!1},{path:"cache_read_input_tokens",dest:"cache_read_tokens",required:!1},{path:"output_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"claude-2",name:"Claude 2.0 / 2.1",description:`Claude 2 is Anthropic's previous generation model, offering reliable performance for various tasks. This includes Claude 2.0 and Claude 2.1.
|
|
2
2
|
`,match:{or:[{starts_with:"claude-2"},{contains:"claude-v2"}]},context_window:2e5,prices:{input_mtok:8,output_mtok:24}},{id:"claude-3-5-haiku-latest",name:"Claude Haiku 3.5",description:"Fastest, most cost-effective model",match:{or:[{starts_with:"claude-3-5-haiku"},{starts_with:"claude-3.5-haiku"}]},context_window:2e5,prices:{input_mtok:.8,cache_write_mtok:1,cache_read_mtok:.08,output_mtok:4}},{id:"claude-3-5-sonnet",name:"Claude Sonnet 3.5",description:"Claude 3.5 Sonnet is an ideal balance of intelligence and speed for enterprise workloads. Maximum utility at a lower price, dependable, balanced for scaled deployments.",match:{or:[{starts_with:"claude-3-5-sonnet"},{starts_with:"claude-3.5-sonnet"}]},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-3-7-sonnet-latest",name:"Claude Sonnet 3.7",description:"Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities.",match:{or:[{starts_with:"claude-3-7-sonnet"},{starts_with:"claude-3.7-sonnet"},{starts_with:"claude-sonnet-3.7"},{starts_with:"claude-sonnet-3-7"}]},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-3-haiku",name:"Claude Haiku 3",description:"Fastest, most cost-effective model",match:{starts_with:"claude-3-haiku"},context_window:2e5,prices:{input_mtok:.25,cache_write_mtok:.3,cache_read_mtok:.03,output_mtok:1.25}},{id:"claude-3-opus-latest",name:"Claude Opus 3",description:"Claude 3 Opus was Anthropic's most powerful model for highly complex tasks. It boasts top-level performance, intelligence, fluency, and understanding.",match:{starts_with:"claude-3-opus"},context_window:2e5,prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-3-sonnet",name:"Claude 3 Sonnet",description:"Claude 3 Sonnet is an ideal balance of intelligence and speed for enterprise workloads. Maximum utility at a lower price, dependable, balanced for scaled deployments.",match:{starts_with:"claude-3-sonnet"},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-haiku-4-5",name:"Claude Haiku 4.5",description:"Fastest and most intelligent Haiku model",match:{or:[{starts_with:"claude-haiku-4-5"},{starts_with:"claude-haiku-4.5"},{starts_with:"claude-4-5-haiku"},{starts_with:"claude-4.5-haiku"}]},context_window:2e5,prices:{input_mtok:1,cache_write_mtok:1.25,cache_read_mtok:.1,output_mtok:5}},{id:"claude-instant-1",description:"Retired, here to match price sources",match:{equals:"claude-instant-1"},prices:{input_mtok:1.63,output_mtok:55.1}},{id:"claude-instant-1.2",description:"Retired, here to match price sources",match:{equals:"claude-instant-1.2"},prices:{input_mtok:1.63,output_mtok:5.51}},{id:"claude-opus-4-0",name:"Claude Opus 4",description:"Most intelligent model for complex tasks",match:{or:[{starts_with:"claude-opus-4-0"},{starts_with:"claude-4-opus"},{equals:"claude-opus-4"},{equals:"claude-opus-4-20250514"}]},context_window:2e5,prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-opus-4-1",name:"Claude Opus 4.1",description:"Most intelligent model for complex tasks",match:{or:[{starts_with:"claude-opus-4-1"},{starts_with:"claude-opus-4.1"}]},context_window:2e5,prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-sonnet-4-0",name:"Claude Sonnet 4",description:"Optimal balance of intelligence, cost, and speed",match:{or:[{starts_with:"claude-sonnet-4-2025"},{starts_with:"claude-sonnet-4-0"},{starts_with:"claude-sonnet-4@"},{equals:"claude-sonnet-4"},{starts_with:"claude-4-sonnet"}]},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5",description:"Most intelligent model for building agents and coding",match:{or:[{starts_with:"claude-sonnet-4-5"},{starts_with:"claude-sonnet-4.5"}]},context_window:1e6,prices:{input_mtok:{base:3,tiers:[{start:2e5,price:6}]},cache_write_mtok:{base:3.75,tiers:[{start:2e5,price:7.5}]},cache_read_mtok:{base:.3,tiers:[{start:2e5,price:.6}]},output_mtok:{base:15,tiers:[{start:2e5,price:22.5}]}}},{id:"claude-v1",description:"Retired, here to match price sources",match:{equals:"claude-v1"},prices:{input_mtok:8,output_mtok:24}}]},{id:"avian",name:"Avian",pricing_urls:["https://avian.io/pricing/"],api_pattern:"https://api\\.avian\\.io",models:[{id:"Meta-Llama-3.1-405B-Instruct",match:{equals:"Meta-Llama-3.1-405B-Instruct"},prices:{input_mtok:1.5,output_mtok:1.5}},{id:"Meta-Llama-3.1-70B-Instruct",match:{equals:"Meta-Llama-3.1-70B-Instruct"},prices:{input_mtok:.45,output_mtok:.45}},{id:"Meta-Llama-3.1-8B-Instruct",match:{equals:"Meta-Llama-3.1-8B-Instruct"},prices:{input_mtok:.1,output_mtok:.1}},{id:"Meta-Llama-3.3-70B-Instruct",match:{equals:"Meta-Llama-3.3-70B-Instruct"},prices:{input_mtok:.45,output_mtok:.45}}]},{id:"aws",name:"AWS Bedrock",pricing_urls:["https://aws.amazon.com/bedrock/pricing/"],api_pattern:"https://bedrock-runtime\\.[a-z0-9-]+\\.amazonaws\\.com/",provider_match:{contains:"bedrock"},extractors:[{api_flavor:"default",root:"usage",model_path:"model",mappings:[{path:"inputTokens",dest:"input_tokens",required:!0},{path:"outputTokens",dest:"output_tokens",required:!0}]}],models:[{id:"meta.llama3-8b-instruct-v1:0",match:{contains:"llama3-8b-instruct-v1"},prices:{input_mtok:.3,output_mtok:.6}},{id:"nova-lite-v1",name:"Nova Lite 1.0",description:"Amazon Nova Lite 1.0 is a very low-cost multimodal model from Amazon that focused on fast processing of image, video, and text inputs to generate text output. Amazon Nova Lite can handle real-time customer interactions, document analysis, and visual question-answering tasks with high accuracy.",match:{or:[{contains:"nova-lite-v1"}]},prices:{input_mtok:.06,cache_read_mtok:.015,output_mtok:.24}},{id:"nova-micro-v1",name:"Nova Micro 1.0",description:"Amazon Nova Micro 1.0 is a text-only model that delivers the lowest latency responses in the Amazon Nova family of models at a very low cost. With a context length of 128K tokens and optimized for speed and cost, Amazon Nova Micro excels at tasks such as text summarization, translation, content classification, interactive chat, and brainstorming. It has simple mathematical reasoning and coding abilities.",match:{or:[{contains:"nova-micro-v1"}]},prices:{input_mtok:.035,cache_read_mtok:.00875,output_mtok:.14}},{id:"nova-pro-v1",name:"Nova Pro 1.0",description:"Amazon Nova Pro 1.0 is a capable multimodal model from Amazon focused on providing a combination of accuracy, speed, and cost for a wide range of tasks. As of December 2024, it achieves state-of-the-art performance on key benchmarks including visual question answering (TextVQA) and video understanding (VATEX).",match:{or:[{contains:"nova-pro-v1"}]},prices:{input_mtok:.8,cache_read_mtok:.2,output_mtok:3.2}}]},{id:"azure",name:"Microsoft Azure",pricing_urls:["https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/#pricing"],api_pattern:"(https?://)?([^.]*\\.)?(?:openai\\.azure\\.com|azure-api\\.net|cognitiveservices\\.azure\\.com)",price_comments:'These are prices for "*-Global" models, prices for "Regional" models are often slightly higher. Retired models are listed at https://learn.microsoft.com/th-th/azure/ai-foundry/openai/concepts/legacy-models',models:[{id:"ada",match:{or:[{equals:"ada"},{equals:"text-embedding-ada"},{equals:"text-embedding-ada-002"},{equals:"text-embedding-ada-002-v2"}]},prices:{input_mtok:.1}},{id:"babbage",match:{or:[{equals:"babbage"},{equals:"babbage-002"}]},prices:{input_mtok:.4}},{id:"curie",match:{or:[{equals:"curie"},{equals:"text-curie"},{equals:"text-curie-001"}]},prices:{input_mtok:2}},{id:"davinci",match:{or:[{equals:"davinci"},{equals:"davinci-002"},{equals:"text-davinci"},{equals:"text-davinci-002"}]},prices:{input_mtok:2}},{id:"gpt-3.5-turbo",match:{or:[{equals:"gpt-3.5-turbo"},{equals:"gpt-3.5-turbo-0301"},{equals:"gpt-3.5-turbo-0613"},{equals:"gpt-3.5-turbo-instruct"},{equals:"gpt-3.5-turbo-instruct-0914"}]},prices:{input_mtok:1.5,output_mtok:2}},{id:"gpt-3.5-turbo-0125",match:{equals:"gpt-3.5-turbo-0125"},prices:{input_mtok:.5,output_mtok:1.5}},{id:"gpt-3.5-turbo-1106",match:{equals:"gpt-3.5-turbo-1106"},prices:{input_mtok:1,output_mtok:2}},{id:"gpt-3.5-turbo-16k-0613",match:{equals:"gpt-3.5-turbo-16k-0613"},prices:{input_mtok:3,output_mtok:4}},{id:"gpt-35-16k",match:{equals:"gpt-35-16k"},prices:{input_mtok:3,output_mtok:4}},{id:"gpt-35-turbo",match:{or:[{equals:"gpt-35-turbo"},{equals:"gpt-35-turbo-0613"},{equals:"gpt-35-turbo-1106"}]},prices:{input_mtok:1.5,output_mtok:2}},{id:"gpt-35-turbo-16k",match:{or:[{equals:"gpt-35-turbo-16k"},{equals:"gpt-35-turbo-16k-0613"}]},prices:{input_mtok:3,output_mtok:4}},{id:"gpt-4",match:{or:[{equals:"gpt-4"},{equals:"gpt-4-0314"},{equals:"gpt-4-0613"}]},prices:{input_mtok:30,output_mtok:60}},{id:"gpt-4-0125-preview",match:{equals:"gpt-4-0125-preview"},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-1106-preview",match:{equals:"gpt-4-1106-preview"},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-1106-vision-preview",match:{equals:"gpt-4-1106-vision-preview"},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-32k",match:{or:[{equals:"gpt-4-32k"},{equals:"gpt-4-32k-0314"},{equals:"gpt-4-32k-0613"}]},prices:{input_mtok:60,output_mtok:120}},{id:"gpt-4-preview-1106",match:{equals:"gpt-4-preview-1106"},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-turbo",match:{or:[{equals:"gpt-4-turbo"},{equals:"gpt-4-turbo-0125-preview"},{equals:"gpt-4-turbo-2024-04-09"},{equals:"gpt-4-turbo-preview"}]},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4-vision",match:{or:[{equals:"gpt-4-vision"},{equals:"gpt-4-vision-preview"}]},prices:{input_mtok:10,output_mtok:30}},{id:"gpt-4.1",match:{or:[{equals:"gpt-4.1"},{equals:"gpt-4.1-2025-04-14"}]},prices:{input_mtok:2,cache_read_mtok:.5,output_mtok:8}},{id:"gpt-4.1-mini",match:{or:[{equals:"gpt-4.1-mini"},{equals:"gpt-4.1-mini-2025-04-14"}]},prices:{input_mtok:.4,cache_read_mtok:.1,output_mtok:1.6}},{id:"gpt-4.1-nano",match:{or:[{equals:"gpt-4.1-nano"},{equals:"gpt-4.1-nano-2025-04-14"}]},prices:{input_mtok:.1,cache_read_mtok:.03,output_mtok:.4}},{id:"gpt-4o-2024-0513",match:{or:[{equals:"gpt-4o-2024-05-13"},{equals:"gpt-4o-2024-0513"}]},prices:{input_mtok:5,output_mtok:15}},{id:"gpt-4o-2024-08-06",match:{equals:"gpt-4o-2024-08-06"},prices:{input_mtok:2.5,cache_read_mtok:1.25,output_mtok:10}},{id:"gpt-4o-2024-1120",match:{or:[{equals:"gpt-4o-2024-1120"},{equals:"gpt-4o-2024-11-20"}]},prices:{input_mtok:2.5,cache_read_mtok:1.25,output_mtok:10}},{id:"gpt-4o-mini",match:{or:[{equals:"gpt-4o-mini"},{equals:"gpt-4o-mini-0718"},{starts_with:"gpt-4o-mini-audio"}]},context_window:128e3,prices:{input_mtok:.15,cache_read_mtok:.075,output_mtok:.6,input_audio_mtok:10,output_audio_mtok:20}},{id:"gpt-4o-mini-realtime",match:{starts_with:"gpt-4o-mini-realtime"},prices:{input_mtok:.6,cache_read_mtok:.3,output_mtok:2.4,input_audio_mtok:10,cache_audio_read_mtok:.3,output_audio_mtok:20}},{id:"gpt-4o-realtime",match:{starts_with:"gpt-4o-realtime"},prices:{input_mtok:5,cache_read_mtok:2.5,output_mtok:20,input_audio_mtok:40,cache_audio_read_mtok:2.5,output_audio_mtok:80}},{id:"gpt-5",name:"GPT-5",description:"GPT-5 is OpenAI's flagship model for coding, reasoning, and agentic tasks across domains.",match:{or:[{equals:"gpt-5"},{equals:"gpt-5-2025-08-07"}]},context_window:4e5,prices:{input_mtok:1.25,cache_read_mtok:.125,output_mtok:10}},{id:"gpt-5-mini",name:"GPT-5 mini",description:"GPT-5 mini is a faster, more cost-efficient version of GPT-5. It's great for well-defined tasks and precise prompts.",match:{or:[{equals:"gpt-5-mini"},{equals:"gpt-5-mini-2025-08-07"}]},context_window:4e5,prices:{input_mtok:.25,cache_read_mtok:.025,output_mtok:2}},{id:"gpt-5-nano",name:"GPT-5 nano",description:"GPT-5 Nano is OpenAI's fastest, cheapest version of GPT-5. It's great for summarization and classification tasks.",match:{or:[{equals:"gpt-5-nano"},{equals:"gpt-5-nano-2025-04-14"}]},context_window:4e5,prices:{input_mtok:.05,cache_read_mtok:.005,output_mtok:.4}},{id:"gpt35",match:{equals:"gpt35"},prices:{input_mtok:1.5,output_mtok:2}},{id:"gpt4-turbo-preview",match:{equals:"gpt4-turbo-preview"},prices:{input_mtok:10,output_mtok:30}},{id:"mai-ds-r1:free",name:"MAI DS R1 (free)",description:"MAI-DS-R1 is a post-trained variant of DeepSeek-R1 developed by the Microsoft AI team to improve the model's responsiveness on previously blocked topics while enhancing its safety profile. Built on top of DeepSeek-R1's reasoning foundation, it integrates 110k examples from the Tulu-3 SFT dataset and 350k internally curated multilingual safety-alignment samples. The model retains strong reasoning, coding, and problem-solving capabilities, while unblocking a wide range of prompts previously restricted in R1.",match:{equals:"mai-ds-r1:free"},prices:{}},{id:"o1",match:{or:[{equals:"o1"},{equals:"o1-2024-12-17"},{equals:"o1-preview"},{equals:"o1-preview-2024-09-12"}]},prices:{input_mtok:15,cache_read_mtok:7.5,output_mtok:60}},{id:"o1-mini",match:{or:[{equals:"o1-mini"},{equals:"o1-mini-2024-09-12"}]},prices:{input_mtok:1.1,cache_read_mtok:.55,output_mtok:4.4}},{id:"o3-2025-04-16",match:{or:[{equals:"o3"},{equals:"o3-2025-04-16"}]},prices:{input_mtok:2,cache_read_mtok:.5,output_mtok:8}},{id:"o3-mini",match:{or:[{equals:"o3-mini"},{equals:"o3-mini-2025-01-31"}]},prices:{input_mtok:1.1,cache_read_mtok:.55,output_mtok:4.4}},{id:"o4-mini",match:{or:[{contains:"o4-mini"},{contains:"o4-mini-2025-04-16"}]},prices:{input_mtok:1.1,cache_read_mtok:.28,output_mtok:4.4}},{id:"phi-3-medium-128k-instruct",name:"Phi-3 Medium 128K Instruct",description:"Phi-3 128K Medium is a powerful 14-billion parameter model designed for advanced language understanding, reasoning, and instruction following. Optimized through supervised fine-tuning and preference adjustments, it excels in tasks involving common sense, mathematics, logical reasoning, and code processing.",match:{equals:"phi-3-medium-128k-instruct"},prices:{input_mtok:1,output_mtok:1}},{id:"phi-3-mini-128k-instruct",name:"Phi-3 Mini 128K Instruct",description:"Phi-3 Mini is a powerful 3.8B parameter model designed for advanced language understanding, reasoning, and instruction following. Optimized through supervised fine-tuning and preference adjustments, it excels in tasks involving common sense, mathematics, logical reasoning, and code processing.",match:{equals:"phi-3-mini-128k-instruct"},prices:{input_mtok:.1,output_mtok:.1}},{id:"phi-3.5-mini-128k-instruct",name:"Phi-3.5 Mini 128K Instruct",description:"Phi-3.5 models are lightweight, state-of-the-art open models. These models were trained with Phi-3 datasets that include both synthetic data and the filtered, publicly available websites data, with a focus on high quality and reasoning-dense properties. Phi-3.5 Mini uses 3.8B parameters, and is a dense decoder-only transformer model using the same tokenizer as Phi-3 Mini.",match:{equals:"phi-3.5-mini-128k-instruct"},prices:{input_mtok:.1,output_mtok:.1}},{id:"phi-4",name:"Phi 4",description:"Microsoft Research Phi-4 is designed to perform well in complex reasoning tasks and can operate efficiently in situations with limited memory or where quick responses are needed.",match:{equals:"phi-4"},prices:{input_mtok:.07,output_mtok:.14}},{id:"phi-4-multimodal-instruct",name:"Phi 4 Multimodal Instruct",description:"Phi-4 Multimodal Instruct is a versatile 5.6B parameter foundation model that combines advanced reasoning and instruction-following capabilities across both text and visual inputs, providing accurate text outputs. The unified architecture enables efficient, low-latency inference, suitable for edge and mobile deployments. Phi-4 Multimodal Instruct supports text inputs in multiple languages including Arabic, Chinese, English, French, German, Japanese, Spanish, and more, with visual input optimized primarily for English. It delivers impressive performance on multimodal tasks involving mathematical, scientific, and document reasoning, providing developers and enterprises a powerful yet compact model for sophisticated interactive applications. For more information, see the Phi-4 Multimodal blog post.",match:{equals:"phi-4-multimodal-instruct"},prices:{input_mtok:.05,output_mtok:.1}},{id:"phi-4-reasoning-plus",name:"Phi 4 Reasoning Plus",description:"Phi-4-reasoning-plus is an enhanced 14B parameter model from Microsoft, fine-tuned from Phi-4 with additional reinforcement learning to boost accuracy on math, science, and code reasoning tasks. It uses the same dense decoder-only transformer architecture as Phi-4, but generates longer, more comprehensive outputs structured into a step-by-step reasoning trace and final answer.",match:{equals:"phi-4-reasoning-plus"},prices:{input_mtok:.07,output_mtok:.35}},{id:"phi-4-reasoning-plus:free",name:"Phi 4 Reasoning Plus (free)",description:"Phi-4-reasoning-plus is an enhanced 14B parameter model from Microsoft, fine-tuned from Phi-4 with additional reinforcement learning to boost accuracy on math, science, and code reasoning tasks. It uses the same dense decoder-only transformer architecture as Phi-4, but generates longer, more comprehensive outputs structured into a step-by-step reasoning trace and final answer.",match:{equals:"phi-4-reasoning-plus:free"},prices:{}},{id:"phi-4-reasoning:free",name:"Phi 4 Reasoning (free)",description:"Phi-4-reasoning is a 14B parameter dense decoder-only transformer developed by Microsoft, fine-tuned from Phi-4 to enhance complex reasoning capabilities. It uses a combination of supervised fine-tuning on chain-of-thought traces and reinforcement learning, targeting math, science, and code reasoning tasks. With a 32k context window and high inference efficiency, it is optimized for structured responses in a two-part format: reasoning trace followed by a final solution.",match:{equals:"phi-4-reasoning:free"},prices:{}},{id:"text-embedding-3-large",match:{equals:"text-embedding-3-large"},prices:{input_mtok:.13}},{id:"text-embedding-3-small",match:{equals:"text-embedding-3-small"},prices:{input_mtok:.02}},{id:"wizardlm-2-8x22b",name:"WizardLM-2 8x22B",description:"WizardLM-2 8x22B is Microsoft AI's most advanced Wizard model. It demonstrates highly competitive performance compared to leading proprietary models, and it consistently outperforms all existing state-of-the-art opensource models.",match:{equals:"wizardlm-2-8x22b"},prices:{input_mtok:.48,output_mtok:.48}}]},{id:"cerebras",name:"Cerebras",pricing_urls:["https://www.cerebras.ai/pricing#pricing","https://inference-docs.cerebras.ai/models/openai-oss"],api_pattern:"https://api\\.cerebras\\.ai",model_match:{contains:"cerebras"},provider_match:{contains:"cerebras"},extractors:[{api_flavor:"chat",root:"usage",model_path:"model",mappings:[{path:"prompt_tokens",dest:"input_tokens",required:!0},{path:"completion_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"gpt-oss-120b",name:"GPT-OSS 120B",description:"OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with 120 billion parameters and 128 experts. Delivers frontier reasoning capabilities with record-breaking inference speeds on Cerebras hardware (~3,000 tokens/second).",match:{or:[{equals:"gpt-oss-120b"},{starts_with:"cerebras/gpt-oss-120b"},{starts_with:"cerebras:gpt-oss-120b"}]},context_window:131072,price_comments:"Developer tier pricing. Free tier: 65k context, Paid tier: 131k context.",prices:{input_mtok:.35,output_mtok:.75}},{id:"llama-3.3-70b",name:"Llama 3.3 70B",description:"Meta's enhanced 70B model delivering 405B-level accuracy. Optimized for chat, coding, instruction following, mathematics, and reasoning with high-speed inference on Cerebras hardware (~2,100 tokens/second).",match:{or:[{equals:"llama-3.3-70b"},{starts_with:"cerebras/llama-3.3-70b"},{starts_with:"cerebras:llama-3.3-70b"}]},context_window:128e3,price_comments:"Developer tier pricing. Free tier: 65k context, Paid tier: 128k context.",prices:{input_mtok:.85,output_mtok:1.2}},{id:"llama3.1-8b",name:"Llama 3.1 8B",description:"Meta's Llama 3.1 8B model for general-purpose tasks including chat, coding, and instruction following. Optimized for fast inference on Cerebras hardware (~2,200 tokens/second).",match:{or:[{equals:"llama3.1-8b"},{starts_with:"cerebras/llama3.1-8b"},{starts_with:"cerebras:llama3.1-8b"}]},context_window:32768,price_comments:"Developer tier pricing. Free tier: 8k context, Paid tier: 32k context.",prices:{input_mtok:.1,output_mtok:.1}},{id:"qwen-3-32b",name:"Qwen 3 32B",description:"Qwen's 32B parameter model with enhanced reasoning and coding capabilities. Supports both standard and reasoning modes for complex tasks, with fast inference speeds on Cerebras hardware (~2,600 tokens/second).",match:{or:[{equals:"qwen-3-32b"},{starts_with:"cerebras/qwen-3-32b"},{starts_with:"cerebras:qwen-3-32b"}]},context_window:131072,price_comments:"Developer tier pricing. Free tier: 65k context, Paid tier: 131k context.",prices:{input_mtok:.4,output_mtok:.8}}]},{id:"cohere",name:"Cohere",pricing_urls:["https://cohere.com/pricing"],api_pattern:"https://api\\.cohere\\.ai",model_match:{starts_with:"command-"},provider_match:{contains:"cohere"},extractors:[{api_flavor:"default",root:["usage","billed_units"],model_path:"model",mappings:[{path:"input_tokens",dest:"input_tokens",required:!0},{path:"output_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"command",name:"Command",description:"Command is an instruction-following conversational model that performs language tasks with high quality, more reliably and with a longer context than our base generative models.",match:{equals:"command"},prices:{input_mtok:1,output_mtok:2}},{id:"command-a",name:"Command A",description:`Command A is an open-weights 111B parameter model with a 256k context window focused on delivering great performance across agentic, multilingual, and coding use cases.
|
|
3
|
-
Compared to other leading proprietary and open-weights models Command A delivers maximum performance with minimum hardware costs, excelling on business-critical agentic and multilingual tasks.`,match:{starts_with:"command-a"},prices:{input_mtok:2.5,output_mtok:10}},{id:"command-r",name:"Command R",description:"Command-R is a 35B parameter model that performs conversational language tasks at a higher quality, more reliably, and with a longer context than previous models. It can be used for complex workflows like code generation, retrieval augmented generation (RAG), tool use, and agents.",match:{or:[{equals:"command-r"},{equals:"command-r-08-2024"}]},prices:{input_mtok:.15,output_mtok:.6}},{id:"command-r-plus",name:"Command R+",description:"Command R+ is a new, 104B-parameter LLM from Cohere. It's useful for roleplay, general consumer usecases, and Retrieval Augmented Generation (RAG).",match:{or:[{equals:"command-r-plus"},{equals:"command-r-plus-08-2024"}]},prices:{input_mtok:2.5,output_mtok:10}},{id:"command-r7b",name:"Command R7B",description:"Command R7B (12-2024) is a small, fast update of the Command R+ model, delivered in December 2024. It excels at RAG, tool use, agents, and similar tasks requiring complex reasoning and multiple steps.",match:{or:[{equals:"command-r7b"},{equals:"command-r7b-12-2024"}]},prices:{input_mtok:.0375,output_mtok:.15}}]},{id:"deepseek",name:"Deepseek",pricing_urls:["https://api-docs.deepseek.com/quick_start/pricing"],api_pattern:"https://api\\.deepseek\\.com",price_comments:'Deepseek off-peak pricing applies "UTC 16:30-00:30" so we switch it around and use the off-peak pricing as the default (first) price then the second price with a constraint is the "standard" pricing that applies "UTC 00:30-16:30".',model_match:{contains:"deepseek"},extractors:[{api_flavor:"chat",root:"usage",model_path:"model",mappings:[{path:"prompt_tokens",dest:"input_tokens",required:!0},{path:["prompt_tokens_details","cached_tokens"],dest:"cache_read_tokens",required:!1},{path:["completion_tokens_details","audio_tokens"],dest:"output_audio_tokens",required:!1},{path:"completion_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"deepseek-chat",name:"DeepSeek Chat",description:"DeepSeek-V3 is the latest model from the DeepSeek team, building upon the instruction following and coding abilities of the previous versions. Pre-trained on nearly 15 trillion tokens, the reported evaluations reveal that the model outperforms other open-source models and rivals leading closed-source models.",match:{or:[{starts_with:"deepseek-chat"},{equals:"deepseek-chat-v3-0324"}]},context_window:64e3,prices:[{prices:{input_mtok:.135,cache_read_mtok:.035,output_mtok:.55}},{constraint:{start_time:"00:30:00Z",end_time:"16:30:00Z",type:"time_of_date"},prices:{input_mtok:.27,cache_read_mtok:.07,output_mtok:1.1}}]},{id:"deepseek-reasoner",name:"Deepseek R1",description:"DeepSeek R1 is here: Performance on par with OpenAI o1, but open-sourced and with fully open reasoning tokens. It's 671B parameters in size, with 37B active in an inference pass.",match:{or:[{equals:"deepseek-reasoner"},{starts_with:"deepseek-r1"},{equals:"deepseek-r1-0528"}]},context_window:64e3,prices:[{prices:{input_mtok:.135,cache_read_mtok:.035,output_mtok:.55}},{constraint:{start_time:"00:30:00Z",end_time:"16:30:00Z",type:"time_of_date"},prices:{input_mtok:.55,cache_read_mtok:.14,output_mtok:2.19}}]}]},{id:"fireworks",name:"Fireworks",pricing_urls:["https://fireworks.ai/pricing"],api_pattern:"https://api\\.fireworks\\.ai",model_match:{starts_with:"accounts/fireworks/models/"},extractors:[{api_flavor:"chat",root:"usage",model_path:"model",mappings:[{path:"prompt_tokens",dest:"input_tokens",required:!0},{path:["prompt_tokens_details","cached_tokens"],dest:"cache_read_tokens",required:!1},{path:["completion_tokens_details","audio_tokens"],dest:"output_audio_tokens",required:!1},{path:"completion_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"deepseek-r1-0528",name:"DeepSeek R1 0528",description:"The updated DeepSeek-R1-0528 model delivers major improvements in reasoning, inference, and accuracy through enhanced post-training optimization and greater computational resources. It now performs at a level approaching top-tier models like O3 and Gemini 2.5 Pro, with notable gains in complex tasks such as math and programming.",match:{equals:"accounts/fireworks/models/deepseek-r1-0528"},context_window:16e4,prices:{input_mtok:3,output_mtok:8}},{id:"deepseek-v3-0324",name:"Deepseek V3 03-24",description:"A strong Mixture-of-Experts (MoE) language model with 671B total parameters with 37B activated for each token from Deepseek. Updated checkpoint.",match:{equals:"accounts/fireworks/models/deepseek-v3-0324"},context_window:16e4,price_comments:`docs give just one price - "Pricing Per 1M Tokens", we assume that's input and output`,prices:{input_mtok:.9,output_mtok:.9}},{id:"gemma-3-27b-it",name:"Gemma 3 27B Instruct",match:{equals:"accounts/fireworks/models/gemma-3-27b-it"},context_window:131e3,price_comments:`docs give just one price - "Pricing Per 1M Tokens", we assume that's input and output`,prices:{input_mtok:.1,output_mtok:.1}},{id:"llama-v3p1-8b-instruct",name:"Llama 3.1 8B Instruct",description:"The Meta Llama 3.1 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction tuned generative models in 8B, 70B and 405B sizes. The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.",match:{equals:"accounts/fireworks/models/llama-v3p1-8b-instruct"},context_window:131e3,price_comments:`docs give just one price - "Pricing Per 1M Tokens", we assume that's input and output`,prices:{input_mtok:.2,output_mtok:.2}},{id:"llama4-maverick-instruct-basic",name:"Llama 4 Maverick Instruct (Basic)",description:"The Meta Llama 3.1 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction tuned generative models in 8B, 70B and 405B sizes. The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.",match:{equals:"accounts/fireworks/models/llama4-maverick-instruct-basic"},context_window:1e6,prices:{input_mtok:.22,output_mtok:.88}},{id:"qwen2p5-vl-72b-instruct",name:"Qwen2.5-VL 72B Instruct",description:"Latest Qwen's VLM model",match:{equals:"accounts/fireworks/models/qwen2p5-vl-72b-instruct"},context_window:128e3,price_comments:`docs give just one price - "Pricing Per 1M Tokens", we assume that's input and output`,prices:{input_mtok:.9,output_mtok:.9}},{id:"qwen3-235b-a22b",name:"Qwen3 235B-A22B",description:'Qwen3 is the latest evolution in the Qwen LLM series, featuring both dense and MoE models with major advancements in reasoning, agent capabilities, multilingual support, and instruction following. It uniquely allows seamless switching between "thinking" (for complex logic, math, coding) and "non-thinking" modes (for fast, general dialogue), delivering strong performance across tasks.',match:{equals:"accounts/fireworks/models/qwen3-235b-a22b"},context_window:128e3,prices:{input_mtok:.22,output_mtok:.88}}]},{id:"google",name:"Google",pricing_urls:["https://ai.google.dev/gemini-api/docs/pricing","https://cloud.google.com/vertex-ai/generative-ai/pricing"],api_pattern:"https://(.*\\.)?googleapis\\.com",model_match:{contains:"gemini"},provider_match:{or:[{contains:"google"},{contains:"vertex"},{contains:"gemini"}]},extractors:[{api_flavor:"default",root:"usageMetadata",model_path:"modelVersion",mappings:[{path:"promptTokenCount",dest:"input_tokens",required:!1},{path:"cachedContentTokenCount",dest:"cache_read_tokens",required:!1},{path:["cacheTokensDetails",{type:"array-match",field:"modality",match:{equals:"AUDIO"}},"tokenCount"],dest:"cache_audio_read_tokens",required:!1},{path:["promptTokensDetails",{type:"array-match",field:"modality",match:{equals:"AUDIO"}},"tokenCount"],dest:"input_audio_tokens",required:!1},{path:["candidatesTokensDetails",{type:"array-match",field:"modality",match:{equals:"AUDIO"}},"tokenCount"],dest:"output_audio_tokens",required:!1},{path:"candidatesTokenCount",dest:"output_tokens",required:!1},{path:"thoughtsTokenCount",dest:"output_tokens",required:!1},{path:"toolUsePromptTokenCount",dest:"output_tokens",required:!1}]},{api_flavor:"anthropic",root:"usage",model_path:"model",mappings:[{path:"input_tokens",dest:"input_tokens",required:!0},{path:"cache_creation_input_tokens",dest:"input_tokens",required:!1},{path:"cache_read_input_tokens",dest:"input_tokens",required:!1},{path:"cache_creation_input_tokens",dest:"cache_write_tokens",required:!1},{path:"cache_read_input_tokens",dest:"cache_read_tokens",required:!1},{path:"output_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"claude-3-5-haiku",match:{contains:"claude-3-5-haiku"},context_window:2e5,prices:{input_mtok:.8,cache_write_mtok:1,cache_read_mtok:.08,output_mtok:4}},{id:"claude-3-5-sonnet",match:{contains:"claude-3-5-sonnet"},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-3-7-sonnet",match:{contains:"claude-3-7-sonnet"},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-3-haiku",match:{contains:"claude-3-haiku"},context_window:2e5,prices:{input_mtok:.25,cache_write_mtok:.3,cache_read_mtok:.03,output_mtok:1.25}},{id:"claude-3-opus",match:{contains:"claude-3-opus"},prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-4-opus",match:{or:[{contains:"claude-4-opus"},{contains:"claude-opus-4"}]},context_window:2e5,prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-4-sonnet",match:{or:[{contains:"claude-4-sonnet"},{contains:"claude-sonnet-4"}]},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"gemini-1.0-pro-vision-001",name:"gemini 1.0 pro vision",description:"Google's first-generation advanced multimodal model that can understand text, code, and images. It provides strong reasoning capabilities and follows instructions effectively.",match:{equals:"gemini-1.0-pro-vision-001"},context_window:32768,price_comments:"I can't find anything about this model or it's pricing, so trusting the original source",prices:{input_mtok:.125,output_mtok:.375}},{id:"gemini-1.5-flash",name:"gemini 1.5 flash",description:"A faster, more cost-effective variant of Gemini 1.5 that maintains strong capabilities while optimizing for performance and cost efficiency. Suitable for production deployments requiring high throughput.",match:{contains:"gemini-1.5-flash"},context_window:1e6,prices:{input_mtok:{base:.075,tiers:[{start:128e3,price:.15}]},cache_read_mtok:{base:.01875,tiers:[{start:128e3,price:.0375}]},output_mtok:{base:.3,tiers:[{start:128e3,price:.6}]}}},{id:"gemini-1.5-pro",name:"gemini 1.5 Pro",description:"Google's most capable multimodal model with an extremely long context window of up to 1 million tokens. It excels at complex reasoning, long-form content processing, and multimodal understanding.",match:{contains:"gemini-1.5-pro"},context_window:1e6,prices:{input_mtok:{base:1.25,tiers:[{start:128e3,price:2.5}]},output_mtok:{base:5,tiers:[{start:128e3,price:10}]}}},{id:"gemini-2.0-flash",name:"gemini 2.0 flash",description:"The newest generation of Google's Gemini models, featuring improved reasoning, instruction following, and factual accuracy, with the Flash variant optimized for cost-efficiency and performance.",match:{or:[{contains:"gemini-2.0-flash"},{equals:"gemini-2.0-flash-lite-001"},{equals:"gemini-2.0-flash-001"},{equals:"gemini-2.0-flash-exp:free"}]},context_window:1e6,prices:{input_mtok:.1,cache_read_mtok:{base:.025,tiers:[{start:1e6,price:.175}]},output_mtok:.4,input_audio_mtok:.7}},{id:"gemini-2.0-flash-lite",name:"gemini 2.0 flash lite",description:"A lighter, more cost-effective version of Gemini 2.0 Flash, designed for applications requiring high efficiency while maintaining good performance. Ideal for high-volume, cost-sensitive deployments.",match:{contains:"gemini-2.0-flash-lite"},context_window:1e6,prices:{input_mtok:.075,output_mtok:.3}},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash",description:`Gemini 2.5 Flash is Google's state-of-the-art workhorse model, specifically designed for advanced reasoning, coding, mathematics, and scientific tasks. It includes built-in "thinking" capabilities, enabling it to provide responses with greater accuracy and nuanced context handling.`,match:{or:[{equals:"gemini-2.5-flash"},{equals:"gemini-2.5-flash-latest"},{equals:"gemini-2.5-flash-preview-09-2025"}]},prices:{input_mtok:.3,cache_read_mtok:.03,output_mtok:2.5,input_audio_mtok:1,cache_audio_read_mtok:.1}},{id:"gemini-2.5-flash-image",name:"Gemini 2.5 Flash Image",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.",match:{or:[{equals:"gemini-2.5-flash-image"},{equals:"gemini-2.5-flash-image-preview"}]},context_window:1e6,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.",prices:{input_mtok:.3,output_mtok:30}},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite",description:'Gemini 2.5 Flash-Lite is a lightweight reasoning model in the Gemini 2.5 family, optimized for ultra-low latency and cost efficiency. It offers improved throughput, faster token generation, and better performance across common benchmarks compared to earlier Flash models. By default, "thinking" (i.e. multi-pass reasoning) is disabled to prioritize speed, but developers can enable it via the Reasoning API parameter to selectively trade off cost for intelligence.',match:{or:[{equals:"gemini-2.5-flash-lite"},{starts_with:"gemini-2.5-flash-lite-preview"}]},context_window:1e6,prices:{input_mtok:.1,cache_read_mtok:.01,output_mtok:.4,input_audio_mtok:.3,cache_audio_read_mtok:.03}},{id:"gemini-2.5-flash-preview",name:"Gemini 2.5 Flash Preview 05-20",description:`Gemini 2.5 Flash May 20th Checkpoint is Google's state-of-the-art workhorse model, specifically designed for advanced reasoning, coding, mathematics, and scientific tasks. It includes built-in "thinking" capabilities, enabling it to provide responses with greater accuracy and nuanced context handling.`,match:{or:[{contains:"gemini-2.5-flash-preview-05-20"},{contains:"gemini-2.5-flash-preview-04-17"},{equals:"gemini-2.5-flash-preview-05-20:thinking"},{equals:"gemini-2.5-flash-preview"},{equals:"gemini-2.5-flash-preview:thinking"}]},price_comments:"from https://cloud.google.com/vertex-ai/generative-ai/pricing should be retired 2025-07-15",prices:{input_mtok:.15,output_mtok:.6}},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro",description:`Gemini 2.5 Pro is Google's state-of-the-art AI model designed for advanced reasoning, coding, mathematics, and scientific tasks. It employs "thinking" capabilities, enabling it to reason through responses with enhanced accuracy and nuanced context handling. Gemini 2.5 Pro achieves top-tier performance on multiple benchmarks, including first-place positioning on the LMArena leaderboard, reflecting superior human-preference alignment and complex problem-solving abilities.`,match:{starts_with:"gemini-2.5-pro"},price_comments:"See https://ai.google.dev/gemini-api/docs/pricing#gemini-2.5-pro",prices:{input_mtok:{base:1.25,tiers:[{start:2e5,price:2.5}]},cache_read_mtok:{base:.125,tiers:[{start:2e5,price:.25}]},output_mtok:{base:10,tiers:[{start:2e5,price:15}]}}},{id:"gemini-embedding-001",match:{equals:"gemini-embedding-001"},prices:{input_mtok:.15}},{id:"gemini-flash-1.5",name:"Gemini 1.5 Flash",description:"Gemini 1.5 Flash is a foundation model that performs well at a variety of multimodal tasks such as visual understanding, classification, summarization, and creating content from image, audio and video. It's adept at processing visual and text inputs such as photographs, documents, infographics, and screenshots.",match:{equals:"gemini-flash-1.5"},price_comments:"See https://ai.google.dev/gemini-api/docs/pricing#gemini-1.5-flash",prices:{input_mtok:{base:.075,tiers:[{start:128e3,price:.15}]},cache_read_mtok:{base:.01875,tiers:[{start:128e3,price:.0375}]},output_mtok:{base:.3,tiers:[{start:128e3,price:.6}]}}},{id:"gemini-flash-1.5-8b",name:"gemini 1.5 flash",description:"A faster, more cost-effective variant of Gemini 1.5 that maintains strong capabilities while optimizing for performance and cost efficiency. Suitable for production deployments requiring high throughput.",match:{equals:"gemini-flash-1.5-8b"},context_window:1e6,price_comments:"See https://ai.google.dev/gemini-api/docs/pricing#gemini-1.5-flash-8b",prices:{input_mtok:{base:.0375,tiers:[{start:128e3,price:.075}]},cache_read_mtok:{base:.01,tiers:[{start:128e3,price:.02}]},output_mtok:{base:.15,tiers:[{start:128e3,price:.3}]}}},{id:"gemini-live-2.5-flash-preview",match:{or:[{starts_with:"gemini-live-2.5-flash-preview"},{starts_with:"gemini-2.5-flash-native-audio-preview"}]},prices:{input_mtok:.5,output_mtok:2,input_audio_mtok:3,output_audio_mtok:12}},{id:"gemini-pro",name:"gemini 1.0 pro",description:"Google's first-generation advanced multimodal model that can understand text, code, and images. It provides strong reasoning capabilities and follows instructions effectively.",match:{or:[{equals:"gemini-pro"},{equals:"gemini-1.0-pro"}]},context_window:32768,price_comments:"I can't find anything so trusting these prices, not sure the model still exists",prices:{input_mtok:.125,output_mtok:.375}},{id:"gemini-pro-1.5",name:"Gemini 1.5 Pro",description:"Google's latest multimodal model, supports image and video[0] in text or chat prompts.",match:{equals:"gemini-pro-1.5"},context_window:2e6,price_comments:"See https://ai.google.dev/gemini-api/docs/pricing#gemini-1.5-pro",prices:{input_mtok:{base:1.25,tiers:[{start:128e3,price:2.5}]},cache_read_mtok:{base:.3125,tiers:[{start:128e3,price:.625}]},output_mtok:{base:5,tiers:[{start:128e3,price:10}]}}},{id:"gemma-3",name:"Gemma 3 (free)",description:"Lightweight, state-of the art, open model built from the same technology that powers our Gemini models.",match:{or:[{starts_with:"gemma-3-"},{equals:"gemma-3"}]},prices:{}},{id:"gemma-3n",name:"Gemma 3n (free)",description:"Our open model built for efficient performance on everyday devices like mobile phones, laptops, and tablets.",match:{or:[{starts_with:"gemma-3n"}]},prices:{}}]},{id:"groq",name:"Groq",pricing_urls:["https://groq.com/pricing/"],api_pattern:"https://api\\.groq\\.com",extractors:[{api_flavor:"default",root:"usage",model_path:"model",mappings:[{path:"prompt_tokens",dest:"input_tokens",required:!0},{path:"completion_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"deepseek-r1-distill-llama-70b",name:"DeepSeek R1 Distill Llama 70B",match:{equals:"deepseek-r1-distill-llama-70b"},context_window:131072,prices:{input_mtok:.75,output_mtok:.99}},{id:"gemma-7b-it",match:{equals:"gemma-7b-it"},prices:{input_mtok:.07,output_mtok:.07}},{id:"gemma2-9b-it",name:"Gemma 2 9B 8k",match:{or:[{equals:"gemma2-9b-it"},{equals:"gemma2-9b"}]},prices:{input_mtok:.2,output_mtok:.2}},{id:"llama-3.1-405b-reasoning",match:{equals:"llama-3.1-405b-reasoning"},prices:{input_mtok:.59,output_mtok:.79}},{id:"llama-3.1-70b-versatile",match:{equals:"llama-3.1-70b-versatile"},prices:{input_mtok:.59,output_mtok:.79}},{id:"llama-3.1-8b-instant",name:"Llama 3.1 8B Instant 128k",match:{equals:"llama-3.1-8b-instant"},prices:{input_mtok:.05,output_mtok:.08}},{id:"llama-3.2-11b-text-preview",match:{equals:"llama-3.2-11b-text-preview"},prices:{input_mtok:.18,output_mtok:.18}},{id:"llama-3.2-11b-vision-preview",match:{equals:"llama-3.2-11b-vision-preview"},prices:{input_mtok:.18,output_mtok:.18}},{id:"llama-3.2-1b-preview",match:{equals:"llama-3.2-1b-preview"},prices:{input_mtok:.04,output_mtok:.04}},{id:"llama-3.2-3b-preview",match:{equals:"llama-3.2-3b-preview"},prices:{input_mtok:.06,output_mtok:.06}},{id:"llama-3.2-90b-text-preview",match:{equals:"llama-3.2-90b-text-preview"},prices:{input_mtok:.9,output_mtok:.9}},{id:"llama-3.2-90b-vision-preview",match:{equals:"llama-3.2-90b-vision-preview"},prices:{input_mtok:.9,output_mtok:.9}},{id:"llama-3.3-70b-specdec",match:{equals:"llama-3.3-70b-specdec"},prices:{input_mtok:.59,output_mtok:.99}},{id:"llama-3.3-70b-versatile",name:"Llama 3.3 70B Versatile 128k",match:{equals:"llama-3.3-70b-versatile"},prices:{input_mtok:.59,output_mtok:.79}},{id:"llama-guard-3-8b",match:{equals:"llama-guard-3-8b"},prices:{input_mtok:.2,output_mtok:.2}},{id:"llama2-70b-4096",match:{equals:"llama2-70b-4096"},prices:{input_mtok:.7,output_mtok:.8}},{id:"llama3-70b-8192",match:{equals:"llama3-70b-8192"},prices:{input_mtok:.59,output_mtok:.79}},{id:"llama3-8b-8192",match:{equals:"llama3-8b-8192"},prices:{input_mtok:.05,output_mtok:.08}},{id:"llama3-groq-70b-8192-tool-use-preview",match:{equals:"llama3-groq-70b-8192-tool-use-preview"},prices:{input_mtok:.89,output_mtok:.89}},{id:"llama3-groq-8b-8192-tool-use-preview",match:{equals:"llama3-groq-8b-8192-tool-use-preview"},prices:{input_mtok:.19,output_mtok:.19}},{id:"meta-llama/llama-4-maverick-17b-128e-instruct",name:"Llama 4 Maverick 17B 128E",match:{equals:"meta-llama/llama-4-maverick-17b-128e-instruct"},context_window:131072,prices:{input_mtok:.2,output_mtok:.6}},{id:"meta-llama/llama-4-scout-17b-16e-instruct",name:"Llama 4 Scout (17Bx16E) 128k",match:{equals:"meta-llama/llama-4-scout-17b-16e-instruct"},prices:{input_mtok:.11,output_mtok:.34}},{id:"meta-llama/llama-guard-4-12b",name:"Llama Guard 4 12B",match:{equals:"meta-llama/llama-guard-4-12b"},context_window:131072,prices:{input_mtok:.2,output_mtok:.2}},{id:"mistral-saba-24b",match:{equals:"mistral-saba-24b"},prices:{input_mtok:.79,output_mtok:.79}},{id:"mixtral-8x7b-32768",match:{equals:"mixtral-8x7b-32768"},prices:{input_mtok:.24,output_mtok:.24}},{id:"moonshotai/kimi-k2-instruct",name:"Kimi K2 1T 128k",match:{or:[{equals:"moonshotai/kimi-k2-instruct"},{equals:"moonshotai/kimi-k2-instruct-0905"}]},context_window:131072,prices:{input_mtok:1,cache_read_mtok:.5,output_mtok:3}},{id:"openai/gpt-oss-120b",description:`GPT-OSS 120B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
|
|
3
|
+
Compared to other leading proprietary and open-weights models Command A delivers maximum performance with minimum hardware costs, excelling on business-critical agentic and multilingual tasks.`,match:{starts_with:"command-a"},prices:{input_mtok:2.5,output_mtok:10}},{id:"command-r",name:"Command R",description:"Command-R is a 35B parameter model that performs conversational language tasks at a higher quality, more reliably, and with a longer context than previous models. It can be used for complex workflows like code generation, retrieval augmented generation (RAG), tool use, and agents.",match:{or:[{equals:"command-r"},{equals:"command-r-08-2024"}]},prices:{input_mtok:.15,output_mtok:.6}},{id:"command-r-plus",name:"Command R+",description:"Command R+ is a new, 104B-parameter LLM from Cohere. It's useful for roleplay, general consumer usecases, and Retrieval Augmented Generation (RAG).",match:{or:[{equals:"command-r-plus"},{equals:"command-r-plus-08-2024"}]},prices:{input_mtok:2.5,output_mtok:10}},{id:"command-r7b",name:"Command R7B",description:"Command R7B (12-2024) is a small, fast update of the Command R+ model, delivered in December 2024. It excels at RAG, tool use, agents, and similar tasks requiring complex reasoning and multiple steps.",match:{or:[{equals:"command-r7b"},{equals:"command-r7b-12-2024"}]},prices:{input_mtok:.0375,output_mtok:.15}}]},{id:"deepseek",name:"Deepseek",pricing_urls:["https://api-docs.deepseek.com/quick_start/pricing"],api_pattern:"https://api\\.deepseek\\.com",price_comments:'Deepseek off-peak pricing applies "UTC 16:30-00:30" so we switch it around and use the off-peak pricing as the default (first) price then the second price with a constraint is the "standard" pricing that applies "UTC 00:30-16:30".',model_match:{contains:"deepseek"},extractors:[{api_flavor:"chat",root:"usage",model_path:"model",mappings:[{path:"prompt_tokens",dest:"input_tokens",required:!0},{path:["prompt_tokens_details","cached_tokens"],dest:"cache_read_tokens",required:!1},{path:["completion_tokens_details","audio_tokens"],dest:"output_audio_tokens",required:!1},{path:"completion_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"deepseek-chat",name:"DeepSeek Chat",description:"DeepSeek-V3 is the latest model from the DeepSeek team, building upon the instruction following and coding abilities of the previous versions. Pre-trained on nearly 15 trillion tokens, the reported evaluations reveal that the model outperforms other open-source models and rivals leading closed-source models.",match:{or:[{starts_with:"deepseek-chat"},{equals:"deepseek-chat-v3-0324"}]},context_window:64e3,prices:[{prices:{input_mtok:.135,cache_read_mtok:.035,output_mtok:.55}},{constraint:{start_time:"00:30:00Z",end_time:"16:30:00Z",type:"time_of_date"},prices:{input_mtok:.27,cache_read_mtok:.07,output_mtok:1.1}}]},{id:"deepseek-reasoner",name:"Deepseek R1",description:"DeepSeek R1 is here: Performance on par with OpenAI o1, but open-sourced and with fully open reasoning tokens. It's 671B parameters in size, with 37B active in an inference pass.",match:{or:[{equals:"deepseek-reasoner"},{starts_with:"deepseek-r1"},{equals:"deepseek-r1-0528"}]},context_window:64e3,prices:[{prices:{input_mtok:.135,cache_read_mtok:.035,output_mtok:.55}},{constraint:{start_time:"00:30:00Z",end_time:"16:30:00Z",type:"time_of_date"},prices:{input_mtok:.55,cache_read_mtok:.14,output_mtok:2.19}}]}]},{id:"fireworks",name:"Fireworks",pricing_urls:["https://fireworks.ai/pricing"],api_pattern:"https://api\\.fireworks\\.ai",model_match:{starts_with:"accounts/fireworks/models/"},extractors:[{api_flavor:"chat",root:"usage",model_path:"model",mappings:[{path:"prompt_tokens",dest:"input_tokens",required:!0},{path:["prompt_tokens_details","cached_tokens"],dest:"cache_read_tokens",required:!1},{path:["completion_tokens_details","audio_tokens"],dest:"output_audio_tokens",required:!1},{path:"completion_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"deepseek-r1-0528",name:"DeepSeek R1 0528",description:"The updated DeepSeek-R1-0528 model delivers major improvements in reasoning, inference, and accuracy through enhanced post-training optimization and greater computational resources. It now performs at a level approaching top-tier models like O3 and Gemini 2.5 Pro, with notable gains in complex tasks such as math and programming.",match:{equals:"accounts/fireworks/models/deepseek-r1-0528"},context_window:16e4,prices:{input_mtok:3,output_mtok:8}},{id:"deepseek-v3-0324",name:"Deepseek V3 03-24",description:"A strong Mixture-of-Experts (MoE) language model with 671B total parameters with 37B activated for each token from Deepseek. Updated checkpoint.",match:{equals:"accounts/fireworks/models/deepseek-v3-0324"},context_window:16e4,price_comments:`docs give just one price - "Pricing Per 1M Tokens", we assume that's input and output`,prices:{input_mtok:.9,output_mtok:.9}},{id:"gemma-3-27b-it",name:"Gemma 3 27B Instruct",match:{equals:"accounts/fireworks/models/gemma-3-27b-it"},context_window:131e3,price_comments:`docs give just one price - "Pricing Per 1M Tokens", we assume that's input and output`,prices:{input_mtok:.1,output_mtok:.1}},{id:"llama-v3p1-8b-instruct",name:"Llama 3.1 8B Instruct",description:"The Meta Llama 3.1 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction tuned generative models in 8B, 70B and 405B sizes. The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.",match:{equals:"accounts/fireworks/models/llama-v3p1-8b-instruct"},context_window:131e3,price_comments:`docs give just one price - "Pricing Per 1M Tokens", we assume that's input and output`,prices:{input_mtok:.2,output_mtok:.2}},{id:"llama4-maverick-instruct-basic",name:"Llama 4 Maverick Instruct (Basic)",description:"The Meta Llama 3.1 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction tuned generative models in 8B, 70B and 405B sizes. The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.",match:{equals:"accounts/fireworks/models/llama4-maverick-instruct-basic"},context_window:1e6,prices:{input_mtok:.22,output_mtok:.88}},{id:"qwen2p5-vl-72b-instruct",name:"Qwen2.5-VL 72B Instruct",description:"Latest Qwen's VLM model",match:{equals:"accounts/fireworks/models/qwen2p5-vl-72b-instruct"},context_window:128e3,price_comments:`docs give just one price - "Pricing Per 1M Tokens", we assume that's input and output`,prices:{input_mtok:.9,output_mtok:.9}},{id:"qwen3-235b-a22b",name:"Qwen3 235B-A22B",description:'Qwen3 is the latest evolution in the Qwen LLM series, featuring both dense and MoE models with major advancements in reasoning, agent capabilities, multilingual support, and instruction following. It uniquely allows seamless switching between "thinking" (for complex logic, math, coding) and "non-thinking" modes (for fast, general dialogue), delivering strong performance across tasks.',match:{equals:"accounts/fireworks/models/qwen3-235b-a22b"},context_window:128e3,prices:{input_mtok:.22,output_mtok:.88}}]},{id:"google",name:"Google",pricing_urls:["https://ai.google.dev/gemini-api/docs/pricing","https://cloud.google.com/vertex-ai/generative-ai/pricing"],api_pattern:"https://(.*\\.)?googleapis\\.com",model_match:{contains:"gemini"},provider_match:{or:[{contains:"google"},{contains:"vertex"},{contains:"gemini"}]},extractors:[{api_flavor:"default",root:"usageMetadata",model_path:"modelVersion",mappings:[{path:"promptTokenCount",dest:"input_tokens",required:!1},{path:"cachedContentTokenCount",dest:"cache_read_tokens",required:!1},{path:["cacheTokensDetails",{type:"array-match",field:"modality",match:{equals:"AUDIO"}},"tokenCount"],dest:"cache_audio_read_tokens",required:!1},{path:["promptTokensDetails",{type:"array-match",field:"modality",match:{equals:"AUDIO"}},"tokenCount"],dest:"input_audio_tokens",required:!1},{path:["candidatesTokensDetails",{type:"array-match",field:"modality",match:{equals:"AUDIO"}},"tokenCount"],dest:"output_audio_tokens",required:!1},{path:"candidatesTokenCount",dest:"output_tokens",required:!1},{path:"thoughtsTokenCount",dest:"output_tokens",required:!1},{path:"toolUsePromptTokenCount",dest:"output_tokens",required:!1}]},{api_flavor:"anthropic",root:"usage",model_path:"model",mappings:[{path:"input_tokens",dest:"input_tokens",required:!0},{path:"cache_creation_input_tokens",dest:"input_tokens",required:!1},{path:"cache_read_input_tokens",dest:"input_tokens",required:!1},{path:"cache_creation_input_tokens",dest:"cache_write_tokens",required:!1},{path:"cache_read_input_tokens",dest:"cache_read_tokens",required:!1},{path:"output_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"claude-3-5-haiku",match:{contains:"claude-3-5-haiku"},context_window:2e5,prices:{input_mtok:.8,cache_write_mtok:1,cache_read_mtok:.08,output_mtok:4}},{id:"claude-3-5-sonnet",match:{contains:"claude-3-5-sonnet"},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-3-7-sonnet",match:{contains:"claude-3-7-sonnet"},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"claude-3-haiku",match:{contains:"claude-3-haiku"},context_window:2e5,prices:{input_mtok:.25,cache_write_mtok:.3,cache_read_mtok:.03,output_mtok:1.25}},{id:"claude-3-opus",match:{contains:"claude-3-opus"},prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-4-opus",match:{or:[{contains:"claude-4-opus"},{contains:"claude-opus-4"}]},context_window:2e5,prices:{input_mtok:15,cache_write_mtok:18.75,cache_read_mtok:1.5,output_mtok:75}},{id:"claude-4-sonnet",match:{or:[{contains:"claude-4-sonnet"},{contains:"claude-sonnet-4"}]},context_window:2e5,prices:{input_mtok:3,cache_write_mtok:3.75,cache_read_mtok:.3,output_mtok:15}},{id:"gemini-1.0-pro-vision-001",name:"gemini 1.0 pro vision",description:"Google's first-generation advanced multimodal model that can understand text, code, and images. It provides strong reasoning capabilities and follows instructions effectively.",match:{equals:"gemini-1.0-pro-vision-001"},context_window:32768,price_comments:"I can't find anything about this model or it's pricing, so trusting the original source",prices:{input_mtok:.125,output_mtok:.375}},{id:"gemini-1.5-flash",name:"gemini 1.5 flash",description:"A faster, more cost-effective variant of Gemini 1.5 that maintains strong capabilities while optimizing for performance and cost efficiency. Suitable for production deployments requiring high throughput.",match:{contains:"gemini-1.5-flash"},context_window:1e6,prices:{input_mtok:{base:.075,tiers:[{start:128e3,price:.15}]},cache_read_mtok:{base:.01875,tiers:[{start:128e3,price:.0375}]},output_mtok:{base:.3,tiers:[{start:128e3,price:.6}]}}},{id:"gemini-1.5-pro",name:"gemini 1.5 Pro",description:"Google's most capable multimodal model with an extremely long context window of up to 1 million tokens. It excels at complex reasoning, long-form content processing, and multimodal understanding.",match:{contains:"gemini-1.5-pro"},context_window:1e6,prices:{input_mtok:{base:1.25,tiers:[{start:128e3,price:2.5}]},output_mtok:{base:5,tiers:[{start:128e3,price:10}]}}},{id:"gemini-2.0-flash",name:"gemini 2.0 flash",description:"The newest generation of Google's Gemini models, featuring improved reasoning, instruction following, and factual accuracy, with the Flash variant optimized for cost-efficiency and performance.",match:{or:[{contains:"gemini-2.0-flash"},{equals:"gemini-2.0-flash-lite-001"},{equals:"gemini-2.0-flash-001"},{equals:"gemini-2.0-flash-exp:free"}]},context_window:1e6,prices:{input_mtok:.1,cache_read_mtok:{base:.025,tiers:[{start:1e6,price:.175}]},output_mtok:.4,input_audio_mtok:.7}},{id:"gemini-2.0-flash-lite",name:"gemini 2.0 flash lite",description:"A lighter, more cost-effective version of Gemini 2.0 Flash, designed for applications requiring high efficiency while maintaining good performance. Ideal for high-volume, cost-sensitive deployments.",match:{contains:"gemini-2.0-flash-lite"},context_window:1e6,prices:{input_mtok:.075,output_mtok:.3}},{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash",description:`Gemini 2.5 Flash is Google's state-of-the-art workhorse model, specifically designed for advanced reasoning, coding, mathematics, and scientific tasks. It includes built-in "thinking" capabilities, enabling it to provide responses with greater accuracy and nuanced context handling.`,match:{or:[{equals:"gemini-2.5-flash"},{equals:"gemini-2.5-flash-latest"},{equals:"gemini-2.5-flash-preview-09-2025"}]},prices:{input_mtok:.3,cache_read_mtok:.03,output_mtok:2.5,input_audio_mtok:1,cache_audio_read_mtok:.1}},{id:"gemini-2.5-flash-image",name:"Gemini 2.5 Flash Image",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.",match:{or:[{equals:"gemini-2.5-flash-image"},{equals:"gemini-2.5-flash-image-preview"}]},context_window:1e6,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.",prices:{input_mtok:.3,output_mtok:30}},{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite",description:'Gemini 2.5 Flash-Lite is a lightweight reasoning model in the Gemini 2.5 family, optimized for ultra-low latency and cost efficiency. It offers improved throughput, faster token generation, and better performance across common benchmarks compared to earlier Flash models. By default, "thinking" (i.e. multi-pass reasoning) is disabled to prioritize speed, but developers can enable it via the Reasoning API parameter to selectively trade off cost for intelligence.',match:{or:[{equals:"gemini-2.5-flash-lite"},{starts_with:"gemini-2.5-flash-lite-preview"}]},context_window:1e6,prices:{input_mtok:.1,cache_read_mtok:.01,output_mtok:.4,input_audio_mtok:.3,cache_audio_read_mtok:.03}},{id:"gemini-2.5-flash-preview",name:"Gemini 2.5 Flash Preview 05-20",description:`Gemini 2.5 Flash May 20th Checkpoint is Google's state-of-the-art workhorse model, specifically designed for advanced reasoning, coding, mathematics, and scientific tasks. It includes built-in "thinking" capabilities, enabling it to provide responses with greater accuracy and nuanced context handling.`,match:{or:[{contains:"gemini-2.5-flash-preview-05-20"},{contains:"gemini-2.5-flash-preview-04-17"},{equals:"gemini-2.5-flash-preview-05-20:thinking"},{equals:"gemini-2.5-flash-preview"},{equals:"gemini-2.5-flash-preview:thinking"}]},price_comments:"from https://cloud.google.com/vertex-ai/generative-ai/pricing should be retired 2025-07-15",prices:{input_mtok:.15,output_mtok:.6}},{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro",description:`Gemini 2.5 Pro is Google's state-of-the-art AI model designed for advanced reasoning, coding, mathematics, and scientific tasks. It employs "thinking" capabilities, enabling it to reason through responses with enhanced accuracy and nuanced context handling. Gemini 2.5 Pro achieves top-tier performance on multiple benchmarks, including first-place positioning on the LMArena leaderboard, reflecting superior human-preference alignment and complex problem-solving abilities.`,match:{starts_with:"gemini-2.5-pro"},price_comments:"See https://ai.google.dev/gemini-api/docs/pricing#gemini-2.5-pro",prices:{input_mtok:{base:1.25,tiers:[{start:2e5,price:2.5}]},cache_read_mtok:{base:.125,tiers:[{start:2e5,price:.25}]},output_mtok:{base:10,tiers:[{start:2e5,price:15}]}}},{id:"gemini-3-pro-preview",name:"Gemini 3 Pro Preview",description:"The best model in the world for multimodal understanding, and our most powerful agentic and vibe-coding model yet.",match:{starts_with:"gemini-3-pro-preview"},prices:{input_mtok:{base:2,tiers:[{start:2e5,price:4}]},cache_read_mtok:{base:.2,tiers:[{start:2e5,price:.4}]},output_mtok:{base:12,tiers:[{start:2e5,price:18}]}}},{id:"gemini-embedding-001",match:{equals:"gemini-embedding-001"},prices:{input_mtok:.15}},{id:"gemini-flash-1.5",name:"Gemini 1.5 Flash",description:"Gemini 1.5 Flash is a foundation model that performs well at a variety of multimodal tasks such as visual understanding, classification, summarization, and creating content from image, audio and video. It's adept at processing visual and text inputs such as photographs, documents, infographics, and screenshots.",match:{equals:"gemini-flash-1.5"},price_comments:"See https://ai.google.dev/gemini-api/docs/pricing#gemini-1.5-flash",prices:{input_mtok:{base:.075,tiers:[{start:128e3,price:.15}]},cache_read_mtok:{base:.01875,tiers:[{start:128e3,price:.0375}]},output_mtok:{base:.3,tiers:[{start:128e3,price:.6}]}}},{id:"gemini-flash-1.5-8b",name:"gemini 1.5 flash",description:"A faster, more cost-effective variant of Gemini 1.5 that maintains strong capabilities while optimizing for performance and cost efficiency. Suitable for production deployments requiring high throughput.",match:{equals:"gemini-flash-1.5-8b"},context_window:1e6,price_comments:"See https://ai.google.dev/gemini-api/docs/pricing#gemini-1.5-flash-8b",prices:{input_mtok:{base:.0375,tiers:[{start:128e3,price:.075}]},cache_read_mtok:{base:.01,tiers:[{start:128e3,price:.02}]},output_mtok:{base:.15,tiers:[{start:128e3,price:.3}]}}},{id:"gemini-live-2.5-flash-preview",match:{or:[{starts_with:"gemini-live-2.5-flash-preview"},{starts_with:"gemini-2.5-flash-native-audio-preview"}]},prices:{input_mtok:.5,output_mtok:2,input_audio_mtok:3,output_audio_mtok:12}},{id:"gemini-pro",name:"gemini 1.0 pro",description:"Google's first-generation advanced multimodal model that can understand text, code, and images. It provides strong reasoning capabilities and follows instructions effectively.",match:{or:[{equals:"gemini-pro"},{equals:"gemini-1.0-pro"}]},context_window:32768,price_comments:"I can't find anything so trusting these prices, not sure the model still exists",prices:{input_mtok:.125,output_mtok:.375}},{id:"gemini-pro-1.5",name:"Gemini 1.5 Pro",description:"Google's latest multimodal model, supports image and video[0] in text or chat prompts.",match:{equals:"gemini-pro-1.5"},context_window:2e6,price_comments:"See https://ai.google.dev/gemini-api/docs/pricing#gemini-1.5-pro",prices:{input_mtok:{base:1.25,tiers:[{start:128e3,price:2.5}]},cache_read_mtok:{base:.3125,tiers:[{start:128e3,price:.625}]},output_mtok:{base:5,tiers:[{start:128e3,price:10}]}}},{id:"gemma-3",name:"Gemma 3 (free)",description:"Lightweight, state-of the art, open model built from the same technology that powers our Gemini models.",match:{or:[{starts_with:"gemma-3-"},{equals:"gemma-3"}]},prices:{}},{id:"gemma-3n",name:"Gemma 3n (free)",description:"Our open model built for efficient performance on everyday devices like mobile phones, laptops, and tablets.",match:{or:[{starts_with:"gemma-3n"}]},prices:{}}]},{id:"groq",name:"Groq",pricing_urls:["https://groq.com/pricing/"],api_pattern:"https://api\\.groq\\.com",extractors:[{api_flavor:"default",root:"usage",model_path:"model",mappings:[{path:"prompt_tokens",dest:"input_tokens",required:!0},{path:"completion_tokens",dest:"output_tokens",required:!0}]}],models:[{id:"deepseek-r1-distill-llama-70b",name:"DeepSeek R1 Distill Llama 70B",match:{equals:"deepseek-r1-distill-llama-70b"},context_window:131072,prices:{input_mtok:.75,output_mtok:.99}},{id:"gemma-7b-it",match:{equals:"gemma-7b-it"},prices:{input_mtok:.07,output_mtok:.07}},{id:"gemma2-9b-it",name:"Gemma 2 9B 8k",match:{or:[{equals:"gemma2-9b-it"},{equals:"gemma2-9b"}]},prices:{input_mtok:.2,output_mtok:.2}},{id:"llama-3.1-405b-reasoning",match:{equals:"llama-3.1-405b-reasoning"},prices:{input_mtok:.59,output_mtok:.79}},{id:"llama-3.1-70b-versatile",match:{equals:"llama-3.1-70b-versatile"},prices:{input_mtok:.59,output_mtok:.79}},{id:"llama-3.1-8b-instant",name:"Llama 3.1 8B Instant 128k",match:{equals:"llama-3.1-8b-instant"},prices:{input_mtok:.05,output_mtok:.08}},{id:"llama-3.2-11b-text-preview",match:{equals:"llama-3.2-11b-text-preview"},prices:{input_mtok:.18,output_mtok:.18}},{id:"llama-3.2-11b-vision-preview",match:{equals:"llama-3.2-11b-vision-preview"},prices:{input_mtok:.18,output_mtok:.18}},{id:"llama-3.2-1b-preview",match:{equals:"llama-3.2-1b-preview"},prices:{input_mtok:.04,output_mtok:.04}},{id:"llama-3.2-3b-preview",match:{equals:"llama-3.2-3b-preview"},prices:{input_mtok:.06,output_mtok:.06}},{id:"llama-3.2-90b-text-preview",match:{equals:"llama-3.2-90b-text-preview"},prices:{input_mtok:.9,output_mtok:.9}},{id:"llama-3.2-90b-vision-preview",match:{equals:"llama-3.2-90b-vision-preview"},prices:{input_mtok:.9,output_mtok:.9}},{id:"llama-3.3-70b-specdec",match:{equals:"llama-3.3-70b-specdec"},prices:{input_mtok:.59,output_mtok:.99}},{id:"llama-3.3-70b-versatile",name:"Llama 3.3 70B Versatile 128k",match:{equals:"llama-3.3-70b-versatile"},prices:{input_mtok:.59,output_mtok:.79}},{id:"llama-guard-3-8b",match:{equals:"llama-guard-3-8b"},prices:{input_mtok:.2,output_mtok:.2}},{id:"llama2-70b-4096",match:{equals:"llama2-70b-4096"},prices:{input_mtok:.7,output_mtok:.8}},{id:"llama3-70b-8192",match:{equals:"llama3-70b-8192"},prices:{input_mtok:.59,output_mtok:.79}},{id:"llama3-8b-8192",match:{equals:"llama3-8b-8192"},prices:{input_mtok:.05,output_mtok:.08}},{id:"llama3-groq-70b-8192-tool-use-preview",match:{equals:"llama3-groq-70b-8192-tool-use-preview"},prices:{input_mtok:.89,output_mtok:.89}},{id:"llama3-groq-8b-8192-tool-use-preview",match:{equals:"llama3-groq-8b-8192-tool-use-preview"},prices:{input_mtok:.19,output_mtok:.19}},{id:"meta-llama/llama-4-maverick-17b-128e-instruct",name:"Llama 4 Maverick 17B 128E",match:{equals:"meta-llama/llama-4-maverick-17b-128e-instruct"},context_window:131072,prices:{input_mtok:.2,output_mtok:.6}},{id:"meta-llama/llama-4-scout-17b-16e-instruct",name:"Llama 4 Scout (17Bx16E) 128k",match:{equals:"meta-llama/llama-4-scout-17b-16e-instruct"},prices:{input_mtok:.11,output_mtok:.34}},{id:"meta-llama/llama-guard-4-12b",name:"Llama Guard 4 12B",match:{equals:"meta-llama/llama-guard-4-12b"},context_window:131072,prices:{input_mtok:.2,output_mtok:.2}},{id:"mistral-saba-24b",match:{equals:"mistral-saba-24b"},prices:{input_mtok:.79,output_mtok:.79}},{id:"mixtral-8x7b-32768",match:{equals:"mixtral-8x7b-32768"},prices:{input_mtok:.24,output_mtok:.24}},{id:"moonshotai/kimi-k2-instruct",name:"Kimi K2 1T 128k",match:{or:[{equals:"moonshotai/kimi-k2-instruct"},{equals:"moonshotai/kimi-k2-instruct-0905"}]},context_window:131072,prices:{input_mtok:1,cache_read_mtok:.5,output_mtok:3}},{id:"openai/gpt-oss-120b",description:`GPT-OSS 120B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
|
|
4
4
|
120 billion parameters and 128 experts.
|
|
5
5
|
`,match:{or:[{equals:"openai/gpt-oss-120b"},{equals:"openai/gpt-oss-safeguard-20b"}]},context_window:131072,prices:{input_mtok:.15,cache_read_mtok:.075,output_mtok:.6}},{id:"openai/gpt-oss-20b",description:`GPT-OSS 20B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
|
|
6
6
|
20 billion parameters and 32 experts.
|
package/dist/index.js
CHANGED
|
@@ -2300,6 +2300,43 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
2300
2300
|
}
|
|
2301
2301
|
}
|
|
2302
2302
|
},
|
|
2303
|
+
{
|
|
2304
|
+
id: "gemini-3-pro-preview",
|
|
2305
|
+
name: "Gemini 3 Pro Preview",
|
|
2306
|
+
description: "The best model in the world for multimodal understanding, and our most powerful agentic and vibe-coding model yet.",
|
|
2307
|
+
match: {
|
|
2308
|
+
starts_with: "gemini-3-pro-preview"
|
|
2309
|
+
},
|
|
2310
|
+
prices: {
|
|
2311
|
+
input_mtok: {
|
|
2312
|
+
base: 2,
|
|
2313
|
+
tiers: [
|
|
2314
|
+
{
|
|
2315
|
+
start: 2e5,
|
|
2316
|
+
price: 4
|
|
2317
|
+
}
|
|
2318
|
+
]
|
|
2319
|
+
},
|
|
2320
|
+
cache_read_mtok: {
|
|
2321
|
+
base: 0.2,
|
|
2322
|
+
tiers: [
|
|
2323
|
+
{
|
|
2324
|
+
start: 2e5,
|
|
2325
|
+
price: 0.4
|
|
2326
|
+
}
|
|
2327
|
+
]
|
|
2328
|
+
},
|
|
2329
|
+
output_mtok: {
|
|
2330
|
+
base: 12,
|
|
2331
|
+
tiers: [
|
|
2332
|
+
{
|
|
2333
|
+
start: 2e5,
|
|
2334
|
+
price: 18
|
|
2335
|
+
}
|
|
2336
|
+
]
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
},
|
|
2303
2340
|
{
|
|
2304
2341
|
id: "gemini-embedding-001",
|
|
2305
2342
|
match: {
|