@pydantic/genai-prices 0.0.62 → 0.0.64
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 +538 -51
- package/dist/index.cjs +3 -3
- package/dist/index.js +497 -10
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import he from "yargs";
|
|
3
3
|
import { format as ke } from "util";
|
|
4
|
-
import { resolve as oe, normalize as
|
|
5
|
-
import { readFileSync as ge, writeFile as
|
|
4
|
+
import { resolve as oe, normalize as Qe } from "path";
|
|
5
|
+
import { readFileSync as ge, writeFile as Pe, statSync as Se } from "fs";
|
|
6
6
|
import "assert";
|
|
7
|
-
import { fileURLToPath as
|
|
7
|
+
import { fileURLToPath as Te } from "url";
|
|
8
8
|
function Ge() {
|
|
9
9
|
return Ce() ? 0 : 1;
|
|
10
10
|
}
|
|
@@ -35,7 +35,7 @@ function W(i) {
|
|
|
35
35
|
return u;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function Ne(i, o) {
|
|
39
39
|
const u = i.toLowerCase();
|
|
40
40
|
o = o || "-";
|
|
41
41
|
let s = "";
|
|
@@ -45,7 +45,7 @@ function Oe(i, o) {
|
|
|
45
45
|
}
|
|
46
46
|
return s;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function Oe(i) {
|
|
49
49
|
return i == null ? !1 : typeof i == "number" || /^0x[0-9a-f]+$/i.test(i) ? !0 : /^0[^.]/.test(i) ? !1 : /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(i);
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
@@ -73,10 +73,10 @@ function Ee(i) {
|
|
|
73
73
|
* Copyright (c) 2016, Contributors
|
|
74
74
|
* SPDX-License-Identifier: ISC
|
|
75
75
|
*/
|
|
76
|
-
var
|
|
76
|
+
var Q;
|
|
77
77
|
(function(i) {
|
|
78
78
|
i.BOOLEAN = "boolean", i.STRING = "string", i.NUMBER = "number", i.ARRAY = "array";
|
|
79
|
-
})(
|
|
79
|
+
})(Q || (Q = {}));
|
|
80
80
|
/**
|
|
81
81
|
* @license
|
|
82
82
|
* Copyright (c) 2016, Contributors
|
|
@@ -124,7 +124,7 @@ class De {
|
|
|
124
124
|
"strip-aliased": !1,
|
|
125
125
|
"strip-dashed": !1,
|
|
126
126
|
"unknown-options-as-args": !1
|
|
127
|
-
}, s.configuration), q = Object.assign(/* @__PURE__ */ Object.create(null), s.default),
|
|
127
|
+
}, s.configuration), q = Object.assign(/* @__PURE__ */ Object.create(null), s.default), S = s.configObjects || [], B = s.envPrefix, P = k["populate--"], y = P ? "--" : "_", T = /* @__PURE__ */ Object.create(null), N = /* @__PURE__ */ Object.create(null), M = s.__ || C.format, m = {
|
|
128
128
|
aliases: /* @__PURE__ */ Object.create(null),
|
|
129
129
|
arrays: /* @__PURE__ */ Object.create(null),
|
|
130
130
|
bools: /* @__PURE__ */ Object.create(null),
|
|
@@ -225,8 +225,8 @@ class De {
|
|
|
225
225
|
Y(a);
|
|
226
226
|
}
|
|
227
227
|
me(b, !0), me(b, !1), fe(b), we(), ue(b, m.aliases, q, !0), be(b), k["set-placeholder-key"] && ve(b), Object.keys(m.counts).forEach(function(e) {
|
|
228
|
-
|
|
229
|
-
}),
|
|
228
|
+
O(b, e.split(".")) || w(e, 0);
|
|
229
|
+
}), P && V.length && (b[y] = []), V.forEach(function(e) {
|
|
230
230
|
b[y].push(e);
|
|
231
231
|
}), k["camel-case-expansion"] && k["strip-dashed"] && Object.keys(b).filter((e) => e !== "--" && e.includes("-")).forEach((e) => {
|
|
232
232
|
delete b[e];
|
|
@@ -299,7 +299,7 @@ class De {
|
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
301
|
function re(e, a) {
|
|
302
|
-
m.aliases[e] && m.aliases[e].length || (m.aliases[e] = [a],
|
|
302
|
+
m.aliases[e] && m.aliases[e].length || (m.aliases[e] = [a], T[a] = !0), m.aliases[a] && m.aliases[a].length || re(a, e);
|
|
303
303
|
}
|
|
304
304
|
function J(e, a, c) {
|
|
305
305
|
c && (a = Ve(a)), (g(e, m.bools) || g(e, m.counts)) && typeof a == "string" && (a = a === "true");
|
|
@@ -309,7 +309,7 @@ class De {
|
|
|
309
309
|
return g(e, m.counts) && (G(n) || typeof n == "boolean") && (n = X()), g(e, m.normalize) && g(e, m.arrays) && (Array.isArray(a) ? n = a.map((t) => C.normalize(t)) : n = C.normalize(a)), n;
|
|
310
310
|
}
|
|
311
311
|
function H(e, a) {
|
|
312
|
-
return !k["parse-positional-numbers"] && e === "_" || !g(e, m.strings) && !g(e, m.bools) && !Array.isArray(a) && (
|
|
312
|
+
return !k["parse-positional-numbers"] && e === "_" || !g(e, m.strings) && !g(e, m.bools) && !Array.isArray(a) && (Oe(a) && k["parse-numbers"] && Number.isSafeInteger(Math.floor(parseFloat(`${a}`))) || !G(a) && g(e, m.numbers)) && (a = Number(a)), a;
|
|
313
313
|
}
|
|
314
314
|
function fe(e) {
|
|
315
315
|
const a = /* @__PURE__ */ Object.create(null);
|
|
@@ -340,11 +340,11 @@ class De {
|
|
|
340
340
|
function Z(e, a) {
|
|
341
341
|
Object.keys(e).forEach(function(c) {
|
|
342
342
|
const n = e[c], t = a ? a + "." + c : c;
|
|
343
|
-
typeof n == "object" && n !== null && !Array.isArray(n) && k["dot-notation"] ? Z(n, t) : (!
|
|
343
|
+
typeof n == "object" && n !== null && !Array.isArray(n) && k["dot-notation"] ? Z(n, t) : (!O(b, t.split(".")) || g(t, m.arrays) && k["combine-arrays"]) && w(t, n);
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
function we() {
|
|
347
|
-
typeof
|
|
347
|
+
typeof S < "u" && S.forEach(function(e) {
|
|
348
348
|
Z(e);
|
|
349
349
|
});
|
|
350
350
|
}
|
|
@@ -357,7 +357,7 @@ class De {
|
|
|
357
357
|
const l = t.split("__").map(function(p, d) {
|
|
358
358
|
return d === 0 && (p = p.substring(c.length)), W(p);
|
|
359
359
|
});
|
|
360
|
-
(a && m.configs[l.join(".")] || !a) && !
|
|
360
|
+
(a && m.configs[l.join(".")] || !a) && !O(e, l) && w(l.join("."), n[t]);
|
|
361
361
|
}
|
|
362
362
|
});
|
|
363
363
|
}
|
|
@@ -383,12 +383,12 @@ class De {
|
|
|
383
383
|
}
|
|
384
384
|
function ue(e, a, c, n = !1) {
|
|
385
385
|
Object.keys(c).forEach(function(t) {
|
|
386
|
-
|
|
387
|
-
|
|
386
|
+
O(e, t.split(".")) || (E(e, t.split("."), c[t]), n && (N[t] = !0), (a[t] || []).forEach(function(l) {
|
|
387
|
+
O(e, l.split(".")) || E(e, l.split("."), c[t]);
|
|
388
388
|
}));
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function O(e, a) {
|
|
392
392
|
let c = e;
|
|
393
393
|
k["dot-notation"] || (a = [a.join(".")]), a.slice(0, -1).forEach(function(t) {
|
|
394
394
|
c = c[t] || {};
|
|
@@ -411,12 +411,12 @@ class De {
|
|
|
411
411
|
m.aliases[c] || (m.aliases[c] = [].concat(_[c] || []), m.aliases[c].concat(c).forEach(function(n) {
|
|
412
412
|
if (/-/.test(n) && k["camel-case-expansion"]) {
|
|
413
413
|
const t = W(n);
|
|
414
|
-
t !== c && m.aliases[c].indexOf(t) === -1 && (m.aliases[c].push(t),
|
|
414
|
+
t !== c && m.aliases[c].indexOf(t) === -1 && (m.aliases[c].push(t), T[t] = !0);
|
|
415
415
|
}
|
|
416
416
|
}), m.aliases[c].concat(c).forEach(function(n) {
|
|
417
417
|
if (n.length > 1 && /[A-Z]/.test(n) && k["camel-case-expansion"]) {
|
|
418
|
-
const t =
|
|
419
|
-
t !== c && m.aliases[c].indexOf(t) === -1 && (m.aliases[c].push(t),
|
|
418
|
+
const t = Ne(n, "-");
|
|
419
|
+
t !== c && m.aliases[c].indexOf(t) === -1 && (m.aliases[c].push(t), T[t] = !0);
|
|
420
420
|
}
|
|
421
421
|
}), m.aliases[c].forEach(function(n) {
|
|
422
422
|
m.aliases[n] = [c].concat(m.aliases[c].filter(function(t) {
|
|
@@ -468,15 +468,15 @@ class De {
|
|
|
468
468
|
}
|
|
469
469
|
function Me(e) {
|
|
470
470
|
return {
|
|
471
|
-
[
|
|
472
|
-
[
|
|
473
|
-
[
|
|
474
|
-
[
|
|
471
|
+
[Q.BOOLEAN]: !0,
|
|
472
|
+
[Q.STRING]: "",
|
|
473
|
+
[Q.NUMBER]: void 0,
|
|
474
|
+
[Q.ARRAY]: []
|
|
475
475
|
}[e];
|
|
476
476
|
}
|
|
477
477
|
function Le(e) {
|
|
478
|
-
let a =
|
|
479
|
-
return g(e, m.strings) ? a =
|
|
478
|
+
let a = Q.BOOLEAN;
|
|
479
|
+
return g(e, m.strings) ? a = Q.STRING : g(e, m.numbers) ? a = Q.NUMBER : g(e, m.bools) ? a = Q.BOOLEAN : g(e, m.arrays) && (a = Q.ARRAY), a;
|
|
480
480
|
}
|
|
481
481
|
function G(e) {
|
|
482
482
|
return e === void 0;
|
|
@@ -488,9 +488,9 @@ class De {
|
|
|
488
488
|
aliases: Object.assign({}, m.aliases),
|
|
489
489
|
argv: Object.assign(se, b),
|
|
490
490
|
configuration: k,
|
|
491
|
-
defaulted: Object.assign({},
|
|
491
|
+
defaulted: Object.assign({}, N),
|
|
492
492
|
error: L,
|
|
493
|
-
newAliases: Object.assign({},
|
|
493
|
+
newAliases: Object.assign({}, T)
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
496
|
}
|
|
@@ -544,7 +544,7 @@ new De({
|
|
|
544
544
|
cwd: process.cwd,
|
|
545
545
|
env: () => je,
|
|
546
546
|
format: ke,
|
|
547
|
-
normalize:
|
|
547
|
+
normalize: Qe,
|
|
548
548
|
resolve: oe,
|
|
549
549
|
// TODO: figure out a way to combine ESM and CJS coverage, such that
|
|
550
550
|
// we can exercise all the lines below:
|
|
@@ -559,13 +559,13 @@ new De({
|
|
|
559
559
|
const Ke = {
|
|
560
560
|
fs: {
|
|
561
561
|
readFileSync: ge,
|
|
562
|
-
writeFile:
|
|
562
|
+
writeFile: Pe
|
|
563
563
|
},
|
|
564
564
|
format: ke,
|
|
565
565
|
resolve: oe,
|
|
566
566
|
exists: (i) => {
|
|
567
567
|
try {
|
|
568
|
-
return
|
|
568
|
+
return Se(i).isFile();
|
|
569
569
|
} catch {
|
|
570
570
|
return !1;
|
|
571
571
|
}
|
|
@@ -673,7 +673,7 @@ function $e(i, o) {
|
|
|
673
673
|
const We = (i) => $e(i, Ke);
|
|
674
674
|
let D;
|
|
675
675
|
try {
|
|
676
|
-
D =
|
|
676
|
+
D = Te(import.meta.url);
|
|
677
677
|
} catch {
|
|
678
678
|
D = process.cwd();
|
|
679
679
|
}
|
|
@@ -1105,6 +1105,35 @@ const ne = [
|
|
|
1105
1105
|
output_mtok: 25
|
|
1106
1106
|
}
|
|
1107
1107
|
},
|
|
1108
|
+
{
|
|
1109
|
+
id: "claude-opus-4-8",
|
|
1110
|
+
name: "Claude Opus 4.8",
|
|
1111
|
+
description: "Our most capable model for complex reasoning and agentic coding",
|
|
1112
|
+
match: {
|
|
1113
|
+
or: [
|
|
1114
|
+
{
|
|
1115
|
+
starts_with: "claude-opus-4-8"
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
starts_with: "claude-opus-4.8"
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
starts_with: "claude-4-8-opus"
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
starts_with: "claude-4.8-opus"
|
|
1125
|
+
}
|
|
1126
|
+
]
|
|
1127
|
+
},
|
|
1128
|
+
context_window: 1e6,
|
|
1129
|
+
price_comments: "Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing",
|
|
1130
|
+
prices: {
|
|
1131
|
+
input_mtok: 5,
|
|
1132
|
+
cache_write_mtok: 6.25,
|
|
1133
|
+
cache_read_mtok: 0.5,
|
|
1134
|
+
output_mtok: 25
|
|
1135
|
+
}
|
|
1136
|
+
},
|
|
1108
1137
|
{
|
|
1109
1138
|
id: "claude-sonnet-4-0",
|
|
1110
1139
|
name: "Claude Sonnet 4",
|
|
@@ -1580,6 +1609,18 @@ const ne = [
|
|
|
1580
1609
|
output_mtok: 25
|
|
1581
1610
|
}
|
|
1582
1611
|
},
|
|
1612
|
+
{
|
|
1613
|
+
id: "global.anthropic.claude-opus-4-8-v1:0",
|
|
1614
|
+
match: {
|
|
1615
|
+
contains: "global.anthropic.claude-opus-4-8"
|
|
1616
|
+
},
|
|
1617
|
+
prices: {
|
|
1618
|
+
input_mtok: 5,
|
|
1619
|
+
cache_write_mtok: 6.25,
|
|
1620
|
+
cache_read_mtok: 0.5,
|
|
1621
|
+
output_mtok: 25
|
|
1622
|
+
}
|
|
1623
|
+
},
|
|
1583
1624
|
{
|
|
1584
1625
|
id: "global.anthropic.claude-sonnet-4-20250514-v1:0",
|
|
1585
1626
|
match: {
|
|
@@ -1648,6 +1689,39 @@ const ne = [
|
|
|
1648
1689
|
}
|
|
1649
1690
|
}
|
|
1650
1691
|
},
|
|
1692
|
+
{
|
|
1693
|
+
id: "google.gemma-3-12b-it",
|
|
1694
|
+
name: "Gemma 3 12B IT",
|
|
1695
|
+
match: {
|
|
1696
|
+
contains: "google.gemma-3-12b-it"
|
|
1697
|
+
},
|
|
1698
|
+
prices: {
|
|
1699
|
+
input_mtok: 0.09,
|
|
1700
|
+
output_mtok: 0.29
|
|
1701
|
+
}
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
id: "google.gemma-3-27b-it",
|
|
1705
|
+
name: "Gemma 3 27B IT",
|
|
1706
|
+
match: {
|
|
1707
|
+
contains: "google.gemma-3-27b-it"
|
|
1708
|
+
},
|
|
1709
|
+
prices: {
|
|
1710
|
+
input_mtok: 0.23,
|
|
1711
|
+
output_mtok: 0.38
|
|
1712
|
+
}
|
|
1713
|
+
},
|
|
1714
|
+
{
|
|
1715
|
+
id: "google.gemma-3-4b-it",
|
|
1716
|
+
name: "Gemma 3 4B IT",
|
|
1717
|
+
match: {
|
|
1718
|
+
contains: "google.gemma-3-4b-it"
|
|
1719
|
+
},
|
|
1720
|
+
prices: {
|
|
1721
|
+
input_mtok: 0.04,
|
|
1722
|
+
output_mtok: 0.08
|
|
1723
|
+
}
|
|
1724
|
+
},
|
|
1651
1725
|
{
|
|
1652
1726
|
id: "meta.llama3-1-70b-instruct-v1:0",
|
|
1653
1727
|
name: "Llama 3.1 70B Instruct",
|
|
@@ -1769,6 +1843,61 @@ const ne = [
|
|
|
1769
1843
|
output_mtok: 0.66
|
|
1770
1844
|
}
|
|
1771
1845
|
},
|
|
1846
|
+
{
|
|
1847
|
+
id: "mistral.devstral-2-123b",
|
|
1848
|
+
name: "Devstral 2 123B",
|
|
1849
|
+
match: {
|
|
1850
|
+
contains: "mistral.devstral-2-123b"
|
|
1851
|
+
},
|
|
1852
|
+
prices: {
|
|
1853
|
+
input_mtok: 0.4,
|
|
1854
|
+
output_mtok: 2
|
|
1855
|
+
}
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
id: "mistral.magistral-small-2509",
|
|
1859
|
+
name: "Magistral Small 2509",
|
|
1860
|
+
match: {
|
|
1861
|
+
contains: "mistral.magistral-small-2509"
|
|
1862
|
+
},
|
|
1863
|
+
prices: {
|
|
1864
|
+
input_mtok: 0.5,
|
|
1865
|
+
output_mtok: 1.5
|
|
1866
|
+
}
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
id: "mistral.ministral-3-14b-instruct",
|
|
1870
|
+
name: "Ministral 14B 3.0",
|
|
1871
|
+
match: {
|
|
1872
|
+
contains: "mistral.ministral-3-14b-instruct"
|
|
1873
|
+
},
|
|
1874
|
+
prices: {
|
|
1875
|
+
input_mtok: 0.2,
|
|
1876
|
+
output_mtok: 0.2
|
|
1877
|
+
}
|
|
1878
|
+
},
|
|
1879
|
+
{
|
|
1880
|
+
id: "mistral.ministral-3-3b-instruct",
|
|
1881
|
+
name: "Ministral 3B 3.0",
|
|
1882
|
+
match: {
|
|
1883
|
+
contains: "mistral.ministral-3-3b-instruct"
|
|
1884
|
+
},
|
|
1885
|
+
prices: {
|
|
1886
|
+
input_mtok: 0.1,
|
|
1887
|
+
output_mtok: 0.1
|
|
1888
|
+
}
|
|
1889
|
+
},
|
|
1890
|
+
{
|
|
1891
|
+
id: "mistral.ministral-3-8b-instruct",
|
|
1892
|
+
name: "Ministral 8B 3.0",
|
|
1893
|
+
match: {
|
|
1894
|
+
contains: "mistral.ministral-3-8b-instruct"
|
|
1895
|
+
},
|
|
1896
|
+
prices: {
|
|
1897
|
+
input_mtok: 0.15,
|
|
1898
|
+
output_mtok: 0.15
|
|
1899
|
+
}
|
|
1900
|
+
},
|
|
1772
1901
|
{
|
|
1773
1902
|
id: "mistral.mistral-7b-instruct-v0:2",
|
|
1774
1903
|
name: "Mistral 7B Instruct",
|
|
@@ -1791,6 +1920,17 @@ const ne = [
|
|
|
1791
1920
|
output_mtok: 12
|
|
1792
1921
|
}
|
|
1793
1922
|
},
|
|
1923
|
+
{
|
|
1924
|
+
id: "mistral.mistral-large-3-675b-instruct",
|
|
1925
|
+
name: "Mistral Large 3",
|
|
1926
|
+
match: {
|
|
1927
|
+
contains: "mistral.mistral-large-3-675b-instruct"
|
|
1928
|
+
},
|
|
1929
|
+
prices: {
|
|
1930
|
+
input_mtok: 0.5,
|
|
1931
|
+
output_mtok: 1.5
|
|
1932
|
+
}
|
|
1933
|
+
},
|
|
1794
1934
|
{
|
|
1795
1935
|
id: "mistral.mistral-small-2402-v1:0",
|
|
1796
1936
|
name: "Mistral Small (24.02)",
|
|
@@ -1824,6 +1964,28 @@ const ne = [
|
|
|
1824
1964
|
output_mtok: 6
|
|
1825
1965
|
}
|
|
1826
1966
|
},
|
|
1967
|
+
{
|
|
1968
|
+
id: "mistral.voxtral-mini-3b-2507",
|
|
1969
|
+
name: "Voxtral Mini 3B 2507",
|
|
1970
|
+
match: {
|
|
1971
|
+
contains: "mistral.voxtral-mini-3b-2507"
|
|
1972
|
+
},
|
|
1973
|
+
prices: {
|
|
1974
|
+
input_mtok: 0.04,
|
|
1975
|
+
output_mtok: 0.04
|
|
1976
|
+
}
|
|
1977
|
+
},
|
|
1978
|
+
{
|
|
1979
|
+
id: "mistral.voxtral-small-24b-2507",
|
|
1980
|
+
name: "Voxtral Small 24B 2507",
|
|
1981
|
+
match: {
|
|
1982
|
+
contains: "mistral.voxtral-small-24b-2507"
|
|
1983
|
+
},
|
|
1984
|
+
prices: {
|
|
1985
|
+
input_mtok: 0.1,
|
|
1986
|
+
output_mtok: 0.3
|
|
1987
|
+
}
|
|
1988
|
+
},
|
|
1827
1989
|
{
|
|
1828
1990
|
id: "nvidia.nemotron-nano-3-30b:0",
|
|
1829
1991
|
name: "Nemotron 3 Nano 30B",
|
|
@@ -2257,6 +2419,37 @@ const ne = [
|
|
|
2257
2419
|
output_mtok: 27.5
|
|
2258
2420
|
}
|
|
2259
2421
|
},
|
|
2422
|
+
{
|
|
2423
|
+
id: "regional.anthropic.claude-opus-4-8-v1:0",
|
|
2424
|
+
match: {
|
|
2425
|
+
or: [
|
|
2426
|
+
{
|
|
2427
|
+
starts_with: "anthropic.claude-opus-4-8"
|
|
2428
|
+
},
|
|
2429
|
+
{
|
|
2430
|
+
starts_with: "claude-opus-4-8"
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
contains: "us.anthropic.claude-opus-4-8"
|
|
2434
|
+
},
|
|
2435
|
+
{
|
|
2436
|
+
contains: "au.anthropic.claude-opus-4-8"
|
|
2437
|
+
},
|
|
2438
|
+
{
|
|
2439
|
+
contains: "eu.anthropic.claude-opus-4-8"
|
|
2440
|
+
},
|
|
2441
|
+
{
|
|
2442
|
+
contains: "jp.anthropic.claude-opus-4-8"
|
|
2443
|
+
}
|
|
2444
|
+
]
|
|
2445
|
+
},
|
|
2446
|
+
prices: {
|
|
2447
|
+
input_mtok: 5.5,
|
|
2448
|
+
cache_write_mtok: 6.875,
|
|
2449
|
+
cache_read_mtok: 0.55,
|
|
2450
|
+
output_mtok: 27.5
|
|
2451
|
+
}
|
|
2452
|
+
},
|
|
2260
2453
|
{
|
|
2261
2454
|
id: "regional.anthropic.claude-sonnet-4-20250514-v1:0",
|
|
2262
2455
|
match: {
|
|
@@ -3244,12 +3437,258 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
3244
3437
|
]
|
|
3245
3438
|
},
|
|
3246
3439
|
context_window: 1e6,
|
|
3247
|
-
|
|
3440
|
+
prices: {
|
|
3441
|
+
input_mtok: 0.435,
|
|
3442
|
+
cache_read_mtok: 3625e-6,
|
|
3443
|
+
output_mtok: 0.87
|
|
3444
|
+
}
|
|
3445
|
+
}
|
|
3446
|
+
]
|
|
3447
|
+
},
|
|
3448
|
+
{
|
|
3449
|
+
id: "doubleword",
|
|
3450
|
+
name: "Doubleword",
|
|
3451
|
+
pricing_urls: ["https://docs.doubleword.ai/inference-api/models"],
|
|
3452
|
+
api_pattern: "https://api\\.doubleword\\.ai",
|
|
3453
|
+
price_comments: "Doubleword publishes Realtime, Async, and Batch prices. This provider currently encodes only Realtime pricing.",
|
|
3454
|
+
extractors: [
|
|
3455
|
+
{
|
|
3456
|
+
api_flavor: "chat",
|
|
3457
|
+
root: "usage",
|
|
3458
|
+
model_path: "model",
|
|
3459
|
+
mappings: [
|
|
3460
|
+
{
|
|
3461
|
+
path: "prompt_tokens",
|
|
3462
|
+
dest: "input_tokens",
|
|
3463
|
+
required: !0
|
|
3464
|
+
},
|
|
3465
|
+
{
|
|
3466
|
+
path: ["prompt_tokens_details", "cached_tokens"],
|
|
3467
|
+
dest: "cache_read_tokens",
|
|
3468
|
+
required: !1
|
|
3469
|
+
},
|
|
3470
|
+
{
|
|
3471
|
+
path: ["prompt_tokens_details", "cache_write_tokens"],
|
|
3472
|
+
dest: "cache_write_tokens",
|
|
3473
|
+
required: !1
|
|
3474
|
+
},
|
|
3475
|
+
{
|
|
3476
|
+
path: "completion_tokens",
|
|
3477
|
+
dest: "output_tokens",
|
|
3478
|
+
required: !0
|
|
3479
|
+
}
|
|
3480
|
+
]
|
|
3481
|
+
},
|
|
3482
|
+
{
|
|
3483
|
+
api_flavor: "responses",
|
|
3484
|
+
root: "usage",
|
|
3485
|
+
model_path: "model",
|
|
3486
|
+
mappings: [
|
|
3487
|
+
{
|
|
3488
|
+
path: "input_tokens",
|
|
3489
|
+
dest: "input_tokens",
|
|
3490
|
+
required: !0
|
|
3491
|
+
},
|
|
3492
|
+
{
|
|
3493
|
+
path: ["input_tokens_details", "cached_tokens"],
|
|
3494
|
+
dest: "cache_read_tokens",
|
|
3495
|
+
required: !1
|
|
3496
|
+
},
|
|
3497
|
+
{
|
|
3498
|
+
path: "output_tokens",
|
|
3499
|
+
dest: "output_tokens",
|
|
3500
|
+
required: !0
|
|
3501
|
+
}
|
|
3502
|
+
]
|
|
3503
|
+
},
|
|
3504
|
+
{
|
|
3505
|
+
api_flavor: "embeddings",
|
|
3506
|
+
root: "usage",
|
|
3507
|
+
model_path: "model",
|
|
3508
|
+
mappings: [
|
|
3509
|
+
{
|
|
3510
|
+
path: "prompt_tokens",
|
|
3511
|
+
dest: "input_tokens",
|
|
3512
|
+
required: !0
|
|
3513
|
+
}
|
|
3514
|
+
]
|
|
3515
|
+
}
|
|
3516
|
+
],
|
|
3517
|
+
models: [
|
|
3518
|
+
{
|
|
3519
|
+
id: "Qwen/Qwen3-14B-FP8",
|
|
3520
|
+
name: "Qwen3 14B",
|
|
3521
|
+
match: {
|
|
3522
|
+
equals: "Qwen/Qwen3-14B-FP8"
|
|
3523
|
+
},
|
|
3524
|
+
prices: {
|
|
3525
|
+
input_mtok: 0.05,
|
|
3526
|
+
output_mtok: 0.6
|
|
3527
|
+
}
|
|
3528
|
+
},
|
|
3529
|
+
{
|
|
3530
|
+
id: "Qwen/Qwen3-Embedding-8B",
|
|
3531
|
+
name: "Qwen3 Embedding 8B",
|
|
3532
|
+
match: {
|
|
3533
|
+
equals: "Qwen/Qwen3-Embedding-8B"
|
|
3534
|
+
},
|
|
3535
|
+
prices: {
|
|
3536
|
+
input_mtok: 0.04
|
|
3537
|
+
}
|
|
3538
|
+
},
|
|
3539
|
+
{
|
|
3540
|
+
id: "Qwen/Qwen3-VL-235B-A22B-Instruct-FP8",
|
|
3541
|
+
name: "Qwen3 VL 235B A22B Instruct",
|
|
3542
|
+
match: {
|
|
3543
|
+
equals: "Qwen/Qwen3-VL-235B-A22B-Instruct-FP8"
|
|
3544
|
+
},
|
|
3545
|
+
prices: {
|
|
3546
|
+
input_mtok: 0.6,
|
|
3547
|
+
output_mtok: 1.2
|
|
3548
|
+
}
|
|
3549
|
+
},
|
|
3550
|
+
{
|
|
3551
|
+
id: "Qwen/Qwen3-VL-30B-A3B-Instruct-FP8",
|
|
3552
|
+
name: "Qwen3 VL 30B A3B Instruct",
|
|
3553
|
+
match: {
|
|
3554
|
+
equals: "Qwen/Qwen3-VL-30B-A3B-Instruct-FP8"
|
|
3555
|
+
},
|
|
3556
|
+
prices: {
|
|
3557
|
+
input_mtok: 0.16,
|
|
3558
|
+
output_mtok: 0.8
|
|
3559
|
+
}
|
|
3560
|
+
},
|
|
3561
|
+
{
|
|
3562
|
+
id: "Qwen/Qwen3.5-35B-A3B-FP8",
|
|
3563
|
+
name: "Qwen3.5 35B A3B",
|
|
3564
|
+
match: {
|
|
3565
|
+
equals: "Qwen/Qwen3.5-35B-A3B-FP8"
|
|
3566
|
+
},
|
|
3567
|
+
prices: {
|
|
3568
|
+
input_mtok: 0.25,
|
|
3569
|
+
output_mtok: 2
|
|
3570
|
+
}
|
|
3571
|
+
},
|
|
3572
|
+
{
|
|
3573
|
+
id: "Qwen/Qwen3.5-397B-A17B",
|
|
3574
|
+
name: "Qwen3.5 397B A17B",
|
|
3575
|
+
match: {
|
|
3576
|
+
equals: "Qwen/Qwen3.5-397B-A17B"
|
|
3577
|
+
},
|
|
3578
|
+
prices: {
|
|
3579
|
+
input_mtok: 0.6,
|
|
3580
|
+
output_mtok: 3.6
|
|
3581
|
+
}
|
|
3582
|
+
},
|
|
3583
|
+
{
|
|
3584
|
+
id: "Qwen/Qwen3.5-9B",
|
|
3585
|
+
name: "Qwen3.5 9B",
|
|
3586
|
+
match: {
|
|
3587
|
+
equals: "Qwen/Qwen3.5-9B"
|
|
3588
|
+
},
|
|
3589
|
+
prices: {
|
|
3590
|
+
input_mtok: 0.08,
|
|
3591
|
+
output_mtok: 0.7
|
|
3592
|
+
}
|
|
3593
|
+
},
|
|
3594
|
+
{
|
|
3595
|
+
id: "Qwen/Qwen3.6-35B-A3B-FP8",
|
|
3596
|
+
name: "Qwen3.6 35B A3B",
|
|
3597
|
+
match: {
|
|
3598
|
+
equals: "Qwen/Qwen3.6-35B-A3B-FP8"
|
|
3599
|
+
},
|
|
3600
|
+
prices: {
|
|
3601
|
+
input_mtok: 0.25,
|
|
3602
|
+
output_mtok: 2
|
|
3603
|
+
}
|
|
3604
|
+
},
|
|
3605
|
+
{
|
|
3606
|
+
id: "deepseek-ai/DeepSeek-V4-Flash",
|
|
3607
|
+
name: "DeepSeek V4 Flash",
|
|
3608
|
+
match: {
|
|
3609
|
+
equals: "deepseek-ai/DeepSeek-V4-Flash"
|
|
3610
|
+
},
|
|
3611
|
+
prices: {
|
|
3612
|
+
input_mtok: 0.14,
|
|
3613
|
+
output_mtok: 0.28
|
|
3614
|
+
}
|
|
3615
|
+
},
|
|
3616
|
+
{
|
|
3617
|
+
id: "deepseek-ai/DeepSeek-V4-Pro",
|
|
3618
|
+
name: "DeepSeek V4 Pro",
|
|
3619
|
+
match: {
|
|
3620
|
+
equals: "deepseek-ai/DeepSeek-V4-Pro"
|
|
3621
|
+
},
|
|
3248
3622
|
prices: {
|
|
3249
3623
|
input_mtok: 1.74,
|
|
3250
|
-
cache_read_mtok: 0.0145,
|
|
3251
3624
|
output_mtok: 3.48
|
|
3252
3625
|
}
|
|
3626
|
+
},
|
|
3627
|
+
{
|
|
3628
|
+
id: "google/gemma-4-31B-it",
|
|
3629
|
+
name: "Gemma 4 31B IT",
|
|
3630
|
+
match: {
|
|
3631
|
+
equals: "google/gemma-4-31B-it"
|
|
3632
|
+
},
|
|
3633
|
+
prices: {
|
|
3634
|
+
input_mtok: 0.14,
|
|
3635
|
+
output_mtok: 0.4
|
|
3636
|
+
}
|
|
3637
|
+
},
|
|
3638
|
+
{
|
|
3639
|
+
id: "mistralai/Devstral-2-123B-Instruct-2512",
|
|
3640
|
+
name: "Devstral 2 123B Instruct 2512",
|
|
3641
|
+
match: {
|
|
3642
|
+
equals: "mistralai/Devstral-2-123B-Instruct-2512"
|
|
3643
|
+
},
|
|
3644
|
+
prices: {
|
|
3645
|
+
input_mtok: 0.4,
|
|
3646
|
+
output_mtok: 2
|
|
3647
|
+
}
|
|
3648
|
+
},
|
|
3649
|
+
{
|
|
3650
|
+
id: "moonshotai/Kimi-K2.6",
|
|
3651
|
+
name: "Kimi K2.6",
|
|
3652
|
+
match: {
|
|
3653
|
+
equals: "moonshotai/Kimi-K2.6"
|
|
3654
|
+
},
|
|
3655
|
+
prices: {
|
|
3656
|
+
input_mtok: 0.95,
|
|
3657
|
+
output_mtok: 4
|
|
3658
|
+
}
|
|
3659
|
+
},
|
|
3660
|
+
{
|
|
3661
|
+
id: "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4",
|
|
3662
|
+
name: "Nemotron 3 Super 120B A12B",
|
|
3663
|
+
match: {
|
|
3664
|
+
equals: "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4"
|
|
3665
|
+
},
|
|
3666
|
+
prices: {
|
|
3667
|
+
input_mtok: 0.3,
|
|
3668
|
+
output_mtok: 0.75
|
|
3669
|
+
}
|
|
3670
|
+
},
|
|
3671
|
+
{
|
|
3672
|
+
id: "openai/gpt-oss-20b",
|
|
3673
|
+
name: "GPT OSS 20B",
|
|
3674
|
+
match: {
|
|
3675
|
+
equals: "openai/gpt-oss-20b"
|
|
3676
|
+
},
|
|
3677
|
+
prices: {
|
|
3678
|
+
input_mtok: 0.04,
|
|
3679
|
+
output_mtok: 0.3
|
|
3680
|
+
}
|
|
3681
|
+
},
|
|
3682
|
+
{
|
|
3683
|
+
id: "zai-org/GLM-5.1-FP8",
|
|
3684
|
+
name: "GLM 5.1",
|
|
3685
|
+
match: {
|
|
3686
|
+
equals: "zai-org/GLM-5.1-FP8"
|
|
3687
|
+
},
|
|
3688
|
+
prices: {
|
|
3689
|
+
input_mtok: 1.4,
|
|
3690
|
+
output_mtok: 4.4
|
|
3691
|
+
}
|
|
3253
3692
|
}
|
|
3254
3693
|
]
|
|
3255
3694
|
},
|
|
@@ -3838,6 +4277,33 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
3838
4277
|
output_mtok: 25
|
|
3839
4278
|
}
|
|
3840
4279
|
},
|
|
4280
|
+
{
|
|
4281
|
+
id: "claude-opus-4-8",
|
|
4282
|
+
match: {
|
|
4283
|
+
or: [
|
|
4284
|
+
{
|
|
4285
|
+
contains: "claude-4-8-opus"
|
|
4286
|
+
},
|
|
4287
|
+
{
|
|
4288
|
+
contains: "claude-opus-4-8"
|
|
4289
|
+
},
|
|
4290
|
+
{
|
|
4291
|
+
contains: "claude-4.8-opus"
|
|
4292
|
+
},
|
|
4293
|
+
{
|
|
4294
|
+
contains: "claude-opus-4.8"
|
|
4295
|
+
}
|
|
4296
|
+
]
|
|
4297
|
+
},
|
|
4298
|
+
context_window: 1e6,
|
|
4299
|
+
price_comments: "Flat pricing across full 1M context window. Ref: https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models",
|
|
4300
|
+
prices: {
|
|
4301
|
+
input_mtok: 5,
|
|
4302
|
+
cache_write_mtok: 6.25,
|
|
4303
|
+
cache_read_mtok: 0.5,
|
|
4304
|
+
output_mtok: 25
|
|
4305
|
+
}
|
|
4306
|
+
},
|
|
3841
4307
|
{
|
|
3842
4308
|
id: "gemini-1.0-pro-vision-001",
|
|
3843
4309
|
name: "gemini 1.0 pro vision",
|
|
@@ -11768,6 +12234,27 @@ Compared to other leading proprietary and open-weights models Command A delivers
|
|
|
11768
12234
|
output_mtok: 25
|
|
11769
12235
|
}
|
|
11770
12236
|
},
|
|
12237
|
+
{
|
|
12238
|
+
id: "anthropic/claude-opus-4.8",
|
|
12239
|
+
match: {
|
|
12240
|
+
or: [
|
|
12241
|
+
{
|
|
12242
|
+
equals: "anthropic/claude-opus-4.8"
|
|
12243
|
+
},
|
|
12244
|
+
{
|
|
12245
|
+
equals: "anthropic/claude-opus-4.8:beta"
|
|
12246
|
+
}
|
|
12247
|
+
]
|
|
12248
|
+
},
|
|
12249
|
+
context_window: 1e6,
|
|
12250
|
+
price_comments: "Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing",
|
|
12251
|
+
prices: {
|
|
12252
|
+
input_mtok: 5,
|
|
12253
|
+
cache_write_mtok: 6.25,
|
|
12254
|
+
cache_read_mtok: 0.5,
|
|
12255
|
+
output_mtok: 25
|
|
12256
|
+
}
|
|
12257
|
+
},
|
|
11771
12258
|
{
|
|
11772
12259
|
id: "anthropic/claude-sonnet-4.5",
|
|
11773
12260
|
match: {
|
|
@@ -19357,20 +19844,20 @@ function z(i, o, u, s) {
|
|
|
19357
19844
|
}
|
|
19358
19845
|
function Je(i, o) {
|
|
19359
19846
|
let u = 0, s = 0;
|
|
19360
|
-
const r = i.input_tokens ?? 0, h = i.cache_read_tokens ?? 0, _ = i.cache_write_tokens ?? 0, k = i.cache_audio_read_tokens ?? 0, q = i.input_audio_tokens ?? 0,
|
|
19847
|
+
const r = i.input_tokens ?? 0, h = i.cache_read_tokens ?? 0, _ = i.cache_write_tokens ?? 0, k = i.cache_audio_read_tokens ?? 0, q = i.input_audio_tokens ?? 0, S = i.output_audio_tokens ?? 0, B = o.cache_audio_read_mtok === void 0 ? 0 : k, P = o.cache_audio_read_mtok === void 0 && o.cache_read_mtok !== void 0 ? k : 0;
|
|
19361
19848
|
let y = 0;
|
|
19362
|
-
if (o.input_audio_mtok !== void 0 && (y = q - B -
|
|
19849
|
+
if (o.input_audio_mtok !== void 0 && (y = q - B - P), y < 0)
|
|
19363
19850
|
throw new Error("cache_audio_read_tokens cannot be greater than input_audio_tokens");
|
|
19364
|
-
let
|
|
19365
|
-
if (o.cache_read_mtok !== void 0 && (
|
|
19851
|
+
let T = 0;
|
|
19852
|
+
if (o.cache_read_mtok !== void 0 && (T = h - B), T < 0)
|
|
19366
19853
|
throw new Error("cache_audio_read_tokens cannot be greater than cache_read_tokens");
|
|
19367
|
-
const
|
|
19854
|
+
const N = o.cache_write_mtok === void 0 ? 0 : _;
|
|
19368
19855
|
let M = 0;
|
|
19369
|
-
if (o.input_mtok !== void 0 && (M = r -
|
|
19856
|
+
if (o.input_mtok !== void 0 && (M = r - T - N - y - B), M < 0)
|
|
19370
19857
|
throw new Error("Uncached text input tokens cannot be negative");
|
|
19371
|
-
u += z(o.input_mtok, M, "input_mtok", r), u += z(o.cache_read_mtok,
|
|
19858
|
+
u += z(o.input_mtok, M, "input_mtok", r), u += z(o.cache_read_mtok, T, "cache_read_mtok", r), u += z(o.cache_write_mtok, N, "cache_write_mtok", r), u += z(o.input_audio_mtok, y, "input_audio_mtok", r), u += z(o.cache_audio_read_mtok, B, "cache_audio_read_mtok", r);
|
|
19372
19859
|
let m = 0;
|
|
19373
|
-
if (o.output_mtok !== void 0 && (m = (i.output_tokens ?? 0) - (o.output_audio_mtok === void 0 ? 0 :
|
|
19860
|
+
if (o.output_mtok !== void 0 && (m = (i.output_tokens ?? 0) - (o.output_audio_mtok === void 0 ? 0 : S)), m < 0)
|
|
19374
19861
|
throw new Error("output_audio_tokens cannot be greater than output_tokens");
|
|
19375
19862
|
s += z(o.output_mtok, m, "output_mtok", r), s += z(o.output_audio_mtok, i.output_audio_tokens, "output_audio_mtok", r);
|
|
19376
19863
|
let I = u + s;
|
|
@@ -19439,20 +19926,20 @@ Promise.resolve(ne);
|
|
|
19439
19926
|
function tt(i, o, u) {
|
|
19440
19927
|
let s = o.toLowerCase().trim(), r = u?.providerId;
|
|
19441
19928
|
if (r && r.toLowerCase() === "litellm" && s.includes("/")) {
|
|
19442
|
-
const B = s.indexOf("/"),
|
|
19443
|
-
|
|
19929
|
+
const B = s.indexOf("/"), P = s.slice(0, B), y = s.slice(B + 1);
|
|
19930
|
+
P && y && _e(ie, { providerId: P }) && (r = P, s = y);
|
|
19444
19931
|
}
|
|
19445
19932
|
const h = u?.provider ?? _e(ie, { modelId: s, providerApiUrl: u?.providerApiUrl, providerId: r });
|
|
19446
19933
|
if (!h) return null;
|
|
19447
19934
|
const _ = qe(h, s, ie);
|
|
19448
19935
|
if (!_) return null;
|
|
19449
|
-
const k = u?.timestamp ?? /* @__PURE__ */ new Date(), q = Ze(_, k),
|
|
19936
|
+
const k = u?.timestamp ?? /* @__PURE__ */ new Date(), q = Ze(_, k), S = Je(i, q);
|
|
19450
19937
|
return {
|
|
19451
19938
|
auto_update_timestamp: void 0,
|
|
19452
19939
|
model: _,
|
|
19453
19940
|
model_price: q,
|
|
19454
19941
|
provider: h,
|
|
19455
|
-
...
|
|
19942
|
+
...S
|
|
19456
19943
|
};
|
|
19457
19944
|
}
|
|
19458
19945
|
const f = he(Re(process.argv)).scriptName("genai-prices").command(
|
|
@@ -19502,17 +19989,17 @@ function at() {
|
|
|
19502
19989
|
r = !0, console.error(`No price found for model ${h}`);
|
|
19503
19990
|
continue;
|
|
19504
19991
|
}
|
|
19505
|
-
const
|
|
19992
|
+
const S = q.model.context_window, B = [
|
|
19506
19993
|
["Provider", q.provider.name],
|
|
19507
19994
|
["Model", q.model.name ?? q.model.id],
|
|
19508
19995
|
["Model Prices", JSON.stringify(q.model_price)],
|
|
19509
|
-
["Context Window",
|
|
19996
|
+
["Context Window", S !== void 0 ? S.toLocaleString() : void 0],
|
|
19510
19997
|
["Total Price", `$${q.total_price}`],
|
|
19511
19998
|
["Input Price", `$${q.input_price}`],
|
|
19512
19999
|
["Output Price", `$${q.output_price}`]
|
|
19513
20000
|
];
|
|
19514
|
-
for (const [
|
|
19515
|
-
y !== void 0 && console.log(`${
|
|
20001
|
+
for (const [P, y] of B)
|
|
20002
|
+
y !== void 0 && console.log(`${P.padStart(14)}: ${y}`);
|
|
19516
20003
|
console.log("");
|
|
19517
20004
|
} catch (q) {
|
|
19518
20005
|
r = !0, q instanceof Error && console.error(`Error for model ${h}:`, q.message);
|