@pydantic/genai-prices 0.0.44 → 0.0.46

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 CHANGED
@@ -1,51 +1,51 @@
1
1
  #!/usr/bin/env node
2
2
  import dt from "yargs";
3
3
  import { format as ht } from "util";
4
- import { resolve as at, normalize as It } from "path";
5
- import { readFileSync as _t, writeFile as Lt, statSync as Pt } from "fs";
4
+ import { resolve as at, normalize as Lt } from "path";
5
+ import { readFileSync as _t, writeFile as Mt, statSync as At } from "fs";
6
6
  import "assert";
7
- import { fileURLToPath as Tt } from "url";
8
- function At() {
7
+ import { fileURLToPath as Qt } from "url";
8
+ function Pt() {
9
9
  return St() ? 0 : 1;
10
10
  }
11
11
  function St() {
12
- return Gt() && !process.defaultApp;
12
+ return Tt() && !process.defaultApp;
13
13
  }
14
- function Gt() {
14
+ function Tt() {
15
15
  return !!process.versions.electron;
16
16
  }
17
- function Ct(i) {
18
- return i.slice(At() + 1);
17
+ function Gt(i) {
18
+ return i.slice(Pt() + 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(i) {
25
+ function $(i) {
26
26
  if (i !== i.toLowerCase() && i !== i.toUpperCase() || (i = i.toLowerCase()), i.indexOf("-") === -1 && i.indexOf("_") === -1)
27
27
  return i;
28
28
  {
29
- let m = "", n = !1;
29
+ let m = "", s = !1;
30
30
  const u = i.match(/^-+/);
31
31
  for (let k = u ? u[0].length : 0; k < i.length; k++) {
32
32
  let _ = i.charAt(k);
33
- n && (n = !1, _ = _.toUpperCase()), k !== 0 && (_ === "-" || _ === "_") ? n = !0 : _ !== "-" && _ !== "_" && (m += _);
33
+ s && (s = !1, _ = _.toUpperCase()), k !== 0 && (_ === "-" || _ === "_") ? s = !0 : _ !== "-" && _ !== "_" && (m += _);
34
34
  }
35
35
  return m;
36
36
  }
37
37
  }
38
- function Ot(i, s) {
38
+ function Rt(i, n) {
39
39
  const m = i.toLowerCase();
40
- s = s || "-";
41
- let n = "";
40
+ n = n || "-";
41
+ let s = "";
42
42
  for (let u = 0; u < i.length; u++) {
43
43
  const k = m.charAt(u), _ = i.charAt(u);
44
- k !== _ && u > 0 ? n += `${s}${m.charAt(u)}` : n += _;
44
+ k !== _ && u > 0 ? s += `${n}${m.charAt(u)}` : s += _;
45
45
  }
46
- return n;
46
+ return s;
47
47
  }
48
- function Rt(i) {
48
+ function Ct(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
  /**
@@ -57,14 +57,14 @@ function Et(i) {
57
57
  if (Array.isArray(i))
58
58
  return i.map((_) => typeof _ != "string" ? _ + "" : _);
59
59
  i = i.trim();
60
- let s = 0, m = null, n = null, u = null;
60
+ let n = 0, m = null, s = null, u = null;
61
61
  const k = [];
62
62
  for (let _ = 0; _ < i.length; _++) {
63
- if (m = n, n = i.charAt(_), n === " " && !u) {
64
- m !== " " && s++;
63
+ if (m = s, s = i.charAt(_), s === " " && !u) {
64
+ m !== " " && n++;
65
65
  continue;
66
66
  }
67
- n === u ? u = null : (n === "'" || n === '"') && !u && (u = n), k[s] || (k[s] = ""), k[s] += n;
67
+ s === u ? u = null : (s === "'" || s === '"') && !u && (u = s), k[n] || (k[n] = ""), k[n] += s;
68
68
  }
69
69
  return k;
70
70
  }
@@ -73,22 +73,22 @@ function Et(i) {
73
73
  * Copyright (c) 2016, Contributors
74
74
  * SPDX-License-Identifier: ISC
75
75
  */
76
- var I;
76
+ var L;
77
77
  (function(i) {
78
78
  i.BOOLEAN = "boolean", i.STRING = "string", i.NUMBER = "number", i.ARRAY = "array";
79
- })(I || (I = {}));
79
+ })(L || (L = {}));
80
80
  /**
81
81
  * @license
82
82
  * Copyright (c) 2016, Contributors
83
83
  * SPDX-License-Identifier: ISC
84
84
  */
85
- let A;
86
- class Nt {
87
- constructor(s) {
88
- A = s;
85
+ let P;
86
+ class Ot {
87
+ constructor(n) {
88
+ P = n;
89
89
  }
90
- parse(s, m) {
91
- const n = Object.assign({
90
+ parse(n, m) {
91
+ const s = Object.assign({
92
92
  alias: void 0,
93
93
  array: void 0,
94
94
  boolean: void 0,
@@ -105,7 +105,7 @@ class Nt {
105
105
  number: void 0,
106
106
  __: void 0,
107
107
  key: void 0
108
- }, m), u = Et(s), k = typeof s == "string", _ = zt(Object.assign(/* @__PURE__ */ Object.create(null), n.alias)), h = Object.assign({
108
+ }, m), u = Et(n), k = typeof n == "string", _ = Dt(Object.assign(/* @__PURE__ */ Object.create(null), s.alias)), h = Object.assign({
109
109
  "boolean-negation": !0,
110
110
  "camel-case-expansion": !0,
111
111
  "combine-arrays": !1,
@@ -124,7 +124,7 @@ class Nt {
124
124
  "strip-aliased": !1,
125
125
  "strip-dashed": !1,
126
126
  "unknown-options-as-args": !1
127
- }, n.configuration), f = Object.assign(/* @__PURE__ */ Object.create(null), n.default), y = n.configObjects || [], P = n.envPrefix, S = h["populate--"], G = S ? "--" : "_", Q = /* @__PURE__ */ Object.create(null), ot = /* @__PURE__ */ Object.create(null), C = n.__ || A.format, r = {
127
+ }, s.configuration), f = Object.assign(/* @__PURE__ */ Object.create(null), s.default), B = s.configObjects || [], A = s.envPrefix, S = h["populate--"], T = S ? "--" : "_", z = /* @__PURE__ */ Object.create(null), ot = /* @__PURE__ */ Object.create(null), G = s.__ || P.format, r = {
128
128
  aliases: /* @__PURE__ */ Object.create(null),
129
129
  arrays: /* @__PURE__ */ Object.create(null),
130
130
  bools: /* @__PURE__ */ Object.create(null),
@@ -136,8 +136,8 @@ class Nt {
136
136
  nargs: /* @__PURE__ */ Object.create(null),
137
137
  coercions: /* @__PURE__ */ Object.create(null),
138
138
  keys: []
139
- }, L = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/, U = new RegExp("^--" + h["negation-prefix"] + "(.+)");
140
- [].concat(n.array || []).filter(Boolean).forEach(function(t) {
139
+ }, M = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/, W = new RegExp("^--" + h["negation-prefix"] + "(.+)");
140
+ [].concat(s.array || []).filter(Boolean).forEach(function(t) {
141
141
  const a = typeof t == "object" ? t.key : t, c = Object.keys(t).map(function(o) {
142
142
  return {
143
143
  boolean: "bools",
@@ -146,170 +146,170 @@ class Nt {
146
146
  }[o];
147
147
  }).filter(Boolean).pop();
148
148
  c && (r[c][a] = !0), r.arrays[a] = !0, r.keys.push(a);
149
- }), [].concat(n.boolean || []).filter(Boolean).forEach(function(t) {
149
+ }), [].concat(s.boolean || []).filter(Boolean).forEach(function(t) {
150
150
  r.bools[t] = !0, r.keys.push(t);
151
- }), [].concat(n.string || []).filter(Boolean).forEach(function(t) {
151
+ }), [].concat(s.string || []).filter(Boolean).forEach(function(t) {
152
152
  r.strings[t] = !0, r.keys.push(t);
153
- }), [].concat(n.number || []).filter(Boolean).forEach(function(t) {
153
+ }), [].concat(s.number || []).filter(Boolean).forEach(function(t) {
154
154
  r.numbers[t] = !0, r.keys.push(t);
155
- }), [].concat(n.count || []).filter(Boolean).forEach(function(t) {
155
+ }), [].concat(s.count || []).filter(Boolean).forEach(function(t) {
156
156
  r.counts[t] = !0, r.keys.push(t);
157
- }), [].concat(n.normalize || []).filter(Boolean).forEach(function(t) {
157
+ }), [].concat(s.normalize || []).filter(Boolean).forEach(function(t) {
158
158
  r.normalize[t] = !0, r.keys.push(t);
159
- }), typeof n.narg == "object" && Object.entries(n.narg).forEach(([t, a]) => {
159
+ }), typeof s.narg == "object" && Object.entries(s.narg).forEach(([t, a]) => {
160
160
  typeof a == "number" && (r.nargs[t] = a, r.keys.push(t));
161
- }), typeof n.coerce == "object" && Object.entries(n.coerce).forEach(([t, a]) => {
161
+ }), typeof s.coerce == "object" && Object.entries(s.coerce).forEach(([t, a]) => {
162
162
  typeof a == "function" && (r.coercions[t] = a, r.keys.push(t));
163
- }), typeof n.config < "u" && (Array.isArray(n.config) || typeof n.config == "string" ? [].concat(n.config).filter(Boolean).forEach(function(t) {
163
+ }), typeof s.config < "u" && (Array.isArray(s.config) || typeof s.config == "string" ? [].concat(s.config).filter(Boolean).forEach(function(t) {
164
164
  r.configs[t] = !0;
165
- }) : typeof n.config == "object" && Object.entries(n.config).forEach(([t, a]) => {
165
+ }) : typeof s.config == "object" && Object.entries(s.config).forEach(([t, a]) => {
166
166
  (typeof a == "boolean" || typeof a == "function") && (r.configs[t] = a);
167
- })), qt(n.key, _, n.default, r.arrays), Object.keys(f).forEach(function(t) {
167
+ })), wt(s.key, _, s.default, r.arrays), Object.keys(f).forEach(function(t) {
168
168
  (r.aliases[t] || []).forEach(function(a) {
169
169
  f[a] = f[t];
170
170
  });
171
171
  });
172
- let B = null;
173
- Mt();
174
- let F = [];
175
- const w = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] }), st = {};
172
+ let y = null;
173
+ It();
174
+ let j = [];
175
+ const q = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] }), nt = {};
176
176
  for (let t = 0; t < u.length; t++) {
177
177
  const a = u[t], c = a.replace(/^-{3,}/, "---");
178
- let o, e, p, l, d, v;
179
- if (a !== "--" && /^-/.test(a) && H(a))
180
- K(a);
178
+ let o, e, l, p, d, v;
179
+ if (a !== "--" && /^-/.test(a) && K(a))
180
+ U(a);
181
181
  else if (c.match(/^---+(=|$)/)) {
182
- K(a);
182
+ U(a);
183
183
  continue;
184
184
  } else if (a.match(/^--.+=/) || !h["short-option-groups"] && a.match(/^-.+=/))
185
- l = a.match(/^--?([^=]+)=([\s\S]*)$/), l !== null && Array.isArray(l) && l.length >= 3 && (g(l[1], r.arrays) ? t = V(t, l[1], u, l[2]) : g(l[1], r.nargs) !== !1 ? t = D(t, l[1], u, l[2]) : q(l[1], l[2], !0));
186
- else if (a.match(U) && h["boolean-negation"])
187
- l = a.match(U), l !== null && Array.isArray(l) && l.length >= 2 && (e = l[1], q(e, g(e, r.arrays) ? [!1] : !1));
185
+ p = a.match(/^--?([^=]+)=([\s\S]*)$/), p !== null && Array.isArray(p) && p.length >= 3 && (g(p[1], r.arrays) ? t = V(t, p[1], u, p[2]) : g(p[1], r.nargs) !== !1 ? t = F(t, p[1], u, p[2]) : w(p[1], p[2], !0));
186
+ else if (a.match(W) && h["boolean-negation"])
187
+ p = a.match(W), p !== null && Array.isArray(p) && p.length >= 2 && (e = p[1], w(e, g(e, r.arrays) ? [!1] : !1));
188
188
  else if (a.match(/^--.+/) || !h["short-option-groups"] && a.match(/^-[^-]+/))
189
- l = a.match(/^--?(.+)/), l !== null && Array.isArray(l) && l.length >= 2 && (e = l[1], g(e, r.arrays) ? t = V(t, e, u) : g(e, r.nargs) !== !1 ? t = D(t, e, u) : (d = u[t + 1], d !== void 0 && (!d.match(/^-/) || d.match(L)) && !g(e, r.bools) && !g(e, r.counts) || /^(true|false)$/.test(d) ? (q(e, d), t++) : q(e, R(e))));
189
+ p = a.match(/^--?(.+)/), p !== null && Array.isArray(p) && p.length >= 2 && (e = p[1], g(e, r.arrays) ? t = V(t, e, u) : g(e, r.nargs) !== !1 ? t = F(t, e, u) : (d = u[t + 1], d !== void 0 && (!d.match(/^-/) || d.match(M)) && !g(e, r.bools) && !g(e, r.counts) || /^(true|false)$/.test(d) ? (w(e, d), t++) : w(e, C(e))));
190
190
  else if (a.match(/^-.\..+=/))
191
- l = a.match(/^-([^=]+)=([\s\S]*)$/), l !== null && Array.isArray(l) && l.length >= 3 && q(l[1], l[2]);
192
- else if (a.match(/^-.\..+/) && !a.match(L))
193
- d = u[t + 1], l = a.match(/^-(.\..+)/), l !== null && Array.isArray(l) && l.length >= 2 && (e = l[1], d !== void 0 && !d.match(/^-/) && !g(e, r.bools) && !g(e, r.counts) ? (q(e, d), t++) : q(e, R(e)));
194
- else if (a.match(/^-[^-]+/) && !a.match(L)) {
195
- p = a.slice(1, -1).split(""), o = !1;
196
- for (let x = 0; x < p.length; x++) {
197
- if (d = a.slice(x + 2), p[x + 1] && p[x + 1] === "=") {
198
- v = a.slice(x + 3), e = p[x], g(e, r.arrays) ? t = V(t, e, u, v) : g(e, r.nargs) !== !1 ? t = D(t, e, u, v) : q(e, v), o = !0;
191
+ p = a.match(/^-([^=]+)=([\s\S]*)$/), p !== null && Array.isArray(p) && p.length >= 3 && w(p[1], p[2]);
192
+ else if (a.match(/^-.\..+/) && !a.match(M))
193
+ d = u[t + 1], p = a.match(/^-(.\..+)/), p !== null && Array.isArray(p) && p.length >= 2 && (e = p[1], d !== void 0 && !d.match(/^-/) && !g(e, r.bools) && !g(e, r.counts) ? (w(e, d), t++) : w(e, C(e)));
194
+ else if (a.match(/^-[^-]+/) && !a.match(M)) {
195
+ l = a.slice(1, -1).split(""), o = !1;
196
+ for (let x = 0; x < l.length; x++) {
197
+ if (d = a.slice(x + 2), l[x + 1] && l[x + 1] === "=") {
198
+ v = a.slice(x + 3), e = l[x], g(e, r.arrays) ? t = V(t, e, u, v) : g(e, r.nargs) !== !1 ? t = F(t, e, u, v) : w(e, v), o = !0;
199
199
  break;
200
200
  }
201
201
  if (d === "-") {
202
- q(p[x], d);
202
+ w(l[x], d);
203
203
  continue;
204
204
  }
205
- if (/[A-Za-z]/.test(p[x]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(d) && g(d, r.bools) === !1) {
206
- q(p[x], d), o = !0;
205
+ if (/[A-Za-z]/.test(l[x]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(d) && g(d, r.bools) === !1) {
206
+ w(l[x], d), o = !0;
207
207
  break;
208
208
  }
209
- if (p[x + 1] && p[x + 1].match(/\W/)) {
210
- q(p[x], d), o = !0;
209
+ if (l[x + 1] && l[x + 1].match(/\W/)) {
210
+ w(l[x], d), o = !0;
211
211
  break;
212
212
  } else
213
- q(p[x], R(p[x]));
213
+ w(l[x], C(l[x]));
214
214
  }
215
- e = a.slice(-1)[0], !o && e !== "-" && (g(e, r.arrays) ? t = V(t, e, u) : g(e, r.nargs) !== !1 ? t = D(t, e, u) : (d = u[t + 1], d !== void 0 && (!/^(-|--)[^-]/.test(d) || d.match(L)) && !g(e, r.bools) && !g(e, r.counts) || /^(true|false)$/.test(d) ? (q(e, d), t++) : q(e, R(e))));
216
- } else if (a.match(/^-[0-9]$/) && a.match(L) && g(a.slice(1), r.bools))
217
- e = a.slice(1), q(e, R(e));
215
+ e = a.slice(-1)[0], !o && e !== "-" && (g(e, r.arrays) ? t = V(t, e, u) : g(e, r.nargs) !== !1 ? t = F(t, e, u) : (d = u[t + 1], d !== void 0 && (!/^(-|--)[^-]/.test(d) || d.match(M)) && !g(e, r.bools) && !g(e, r.counts) || /^(true|false)$/.test(d) ? (w(e, d), t++) : w(e, C(e))));
216
+ } else if (a.match(/^-[0-9]$/) && a.match(M) && g(a.slice(1), r.bools))
217
+ e = a.slice(1), w(e, C(e));
218
218
  else if (a === "--") {
219
- F = u.slice(t + 1);
219
+ j = u.slice(t + 1);
220
220
  break;
221
221
  } else if (h["halt-at-non-option"]) {
222
- F = u.slice(t);
222
+ j = u.slice(t);
223
223
  break;
224
224
  } else
225
- K(a);
225
+ U(a);
226
226
  }
227
- rt(w, !0), rt(w, !1), kt(w), gt(), mt(w, r.aliases, f, !0), ft(w), h["set-placeholder-key"] && bt(w), Object.keys(r.counts).forEach(function(t) {
228
- E(w, t.split(".")) || q(t, 0);
229
- }), S && F.length && (w[G] = []), F.forEach(function(t) {
230
- w[G].push(t);
231
- }), h["camel-case-expansion"] && h["strip-dashed"] && Object.keys(w).filter((t) => t !== "--" && t.includes("-")).forEach((t) => {
232
- delete w[t];
227
+ rt(q, !0), rt(q, !1), kt(q), gt(), mt(q, r.aliases, f, !0), ft(q), h["set-placeholder-key"] && bt(q), Object.keys(r.counts).forEach(function(t) {
228
+ E(q, t.split(".")) || w(t, 0);
229
+ }), S && j.length && (q[T] = []), j.forEach(function(t) {
230
+ q[T].push(t);
231
+ }), h["camel-case-expansion"] && h["strip-dashed"] && Object.keys(q).filter((t) => t !== "--" && t.includes("-")).forEach((t) => {
232
+ delete q[t];
233
233
  }), h["strip-aliased"] && [].concat(...Object.keys(_).map((t) => _[t])).forEach((t) => {
234
- h["camel-case-expansion"] && t.includes("-") && delete w[t.split(".").map((a) => W(a)).join(".")], delete w[t];
234
+ h["camel-case-expansion"] && t.includes("-") && delete q[t.split(".").map((a) => $(a)).join(".")], delete q[t];
235
235
  });
236
- function K(t) {
237
- const a = $("_", t);
238
- (typeof a == "string" || typeof a == "number") && w._.push(a);
236
+ function U(t) {
237
+ const a = H("_", t);
238
+ (typeof a == "string" || typeof a == "number") && q._.push(a);
239
239
  }
240
- function D(t, a, c, o) {
241
- let e, p = g(a, r.nargs);
242
- if (p = typeof p != "number" || isNaN(p) ? 1 : p, p === 0)
243
- return T(o) || (B = Error(C("Argument unexpected for: %s", a))), q(a, R(a)), t;
244
- let l = T(o) ? 0 : 1;
240
+ function F(t, a, c, o) {
241
+ let e, l = g(a, r.nargs);
242
+ if (l = typeof l != "number" || isNaN(l) ? 1 : l, l === 0)
243
+ return Q(o) || (y = Error(G("Argument unexpected for: %s", a))), w(a, C(a)), t;
244
+ let p = Q(o) ? 0 : 1;
245
245
  if (h["nargs-eats-options"])
246
- c.length - (t + 1) + l < p && (B = Error(C("Not enough arguments following: %s", a))), l = p;
246
+ c.length - (t + 1) + p < l && (y = Error(G("Not enough arguments following: %s", a))), p = l;
247
247
  else {
248
- for (e = t + 1; e < c.length && (!c[e].match(/^-[^0-9]/) || c[e].match(L) || H(c[e])); e++)
249
- l++;
250
- l < p && (B = Error(C("Not enough arguments following: %s", a)));
248
+ for (e = t + 1; e < c.length && (!c[e].match(/^-[^0-9]/) || c[e].match(M) || K(c[e])); e++)
249
+ p++;
250
+ p < l && (y = Error(G("Not enough arguments following: %s", a)));
251
251
  }
252
- let d = Math.min(l, p);
253
- for (!T(o) && d > 0 && (q(a, o), d--), e = t + 1; e < d + t + 1; e++)
254
- q(a, c[e]);
252
+ let d = Math.min(p, l);
253
+ for (!Q(o) && d > 0 && (w(a, o), d--), e = t + 1; e < d + t + 1; e++)
254
+ w(a, c[e]);
255
255
  return t + d;
256
256
  }
257
257
  function V(t, a, c, o) {
258
- let e = [], p = o || c[t + 1];
259
- const l = g(a, r.nargs);
260
- if (g(a, r.bools) && !/^(true|false)$/.test(p))
258
+ let e = [], l = o || c[t + 1];
259
+ const p = g(a, r.nargs);
260
+ if (g(a, r.bools) && !/^(true|false)$/.test(l))
261
261
  e.push(!0);
262
- else if (T(p) || T(o) && /^-/.test(p) && !L.test(p) && !H(p)) {
262
+ else if (Q(l) || Q(o) && /^-/.test(l) && !M.test(l) && !K(l)) {
263
263
  if (f[a] !== void 0) {
264
264
  const d = f[a];
265
265
  e = Array.isArray(d) ? d : [d];
266
266
  }
267
267
  } else {
268
- T(o) || e.push(Y(a, o, !0));
269
- for (let d = t + 1; d < c.length && !(!h["greedy-arrays"] && e.length > 0 || l && typeof l == "number" && e.length >= l || (p = c[d], /^-/.test(p) && !L.test(p) && !H(p))); d++)
270
- t = d, e.push(Y(a, p, k));
268
+ Q(o) || e.push(Y(a, o, !0));
269
+ for (let d = t + 1; d < c.length && !(!h["greedy-arrays"] && e.length > 0 || p && typeof p == "number" && e.length >= p || (l = c[d], /^-/.test(l) && !M.test(l) && !K(l))); d++)
270
+ t = d, e.push(Y(a, l, k));
271
271
  }
272
- return typeof l == "number" && (l && e.length < l || isNaN(l) && e.length === 0) && (B = Error(C("Not enough arguments following: %s", a))), q(a, e), t;
272
+ return typeof p == "number" && (p && e.length < p || isNaN(p) && e.length === 0) && (y = Error(G("Not enough arguments following: %s", a))), w(a, e), t;
273
273
  }
274
- function q(t, a, c = k) {
274
+ function w(t, a, c = k) {
275
275
  if (/-/.test(t) && h["camel-case-expansion"]) {
276
- const p = t.split(".").map(function(l) {
277
- return W(l);
276
+ const l = t.split(".").map(function(p) {
277
+ return $(p);
278
278
  }).join(".");
279
- nt(t, p);
279
+ st(t, l);
280
280
  }
281
281
  const o = Y(t, a, c), e = t.split(".");
282
- N(w, e, o), r.aliases[t] && r.aliases[t].forEach(function(p) {
283
- const l = p.split(".");
284
- N(w, l, o);
285
- }), e.length > 1 && h["dot-notation"] && (r.aliases[e[0]] || []).forEach(function(p) {
286
- let l = p.split(".");
282
+ O(q, e, o), r.aliases[t] && r.aliases[t].forEach(function(l) {
283
+ const p = l.split(".");
284
+ O(q, p, o);
285
+ }), e.length > 1 && h["dot-notation"] && (r.aliases[e[0]] || []).forEach(function(l) {
286
+ let p = l.split(".");
287
287
  const d = [].concat(e);
288
- d.shift(), l = l.concat(d), (r.aliases[t] || []).includes(l.join(".")) || N(w, l, o);
289
- }), g(t, r.normalize) && !g(t, r.arrays) && [t].concat(r.aliases[t] || []).forEach(function(l) {
290
- Object.defineProperty(st, l, {
288
+ d.shift(), p = p.concat(d), (r.aliases[t] || []).includes(p.join(".")) || O(q, p, o);
289
+ }), g(t, r.normalize) && !g(t, r.arrays) && [t].concat(r.aliases[t] || []).forEach(function(p) {
290
+ Object.defineProperty(nt, p, {
291
291
  enumerable: !0,
292
292
  get() {
293
293
  return a;
294
294
  },
295
295
  set(d) {
296
- a = typeof d == "string" ? A.normalize(d) : d;
296
+ a = typeof d == "string" ? P.normalize(d) : d;
297
297
  }
298
298
  });
299
299
  });
300
300
  }
301
- function nt(t, a) {
302
- r.aliases[t] && r.aliases[t].length || (r.aliases[t] = [a], Q[a] = !0), r.aliases[a] && r.aliases[a].length || nt(a, t);
301
+ function st(t, a) {
302
+ r.aliases[t] && r.aliases[t].length || (r.aliases[t] = [a], z[a] = !0), r.aliases[a] && r.aliases[a].length || st(a, t);
303
303
  }
304
304
  function Y(t, a, c) {
305
- c && (a = jt(a)), (g(t, r.bools) || g(t, r.counts)) && typeof a == "string" && (a = a === "true");
305
+ c && (a = Nt(a)), (g(t, r.bools) || g(t, r.counts)) && typeof a == "string" && (a = a === "true");
306
306
  let o = Array.isArray(a) ? a.map(function(e) {
307
- return $(t, e);
308
- }) : $(t, a);
309
- return g(t, r.counts) && (T(o) || typeof o == "boolean") && (o = Z()), g(t, r.normalize) && g(t, r.arrays) && (Array.isArray(a) ? o = a.map((e) => A.normalize(e)) : o = A.normalize(a)), o;
307
+ return H(t, e);
308
+ }) : H(t, a);
309
+ return g(t, r.counts) && (Q(o) || typeof o == "boolean") && (o = Z()), g(t, r.normalize) && g(t, r.arrays) && (Array.isArray(a) ? o = a.map((e) => P.normalize(e)) : o = P.normalize(a)), o;
310
310
  }
311
- function $(t, a) {
312
- return !h["parse-positional-numbers"] && t === "_" || !g(t, r.strings) && !g(t, r.bools) && !Array.isArray(a) && (Rt(a) && h["parse-numbers"] && Number.isSafeInteger(Math.floor(parseFloat(`${a}`))) || !T(a) && g(t, r.numbers)) && (a = Number(a)), a;
311
+ function H(t, a) {
312
+ return !h["parse-positional-numbers"] && t === "_" || !g(t, r.strings) && !g(t, r.bools) && !Array.isArray(a) && (Ct(a) && h["parse-numbers"] && Number.isSafeInteger(Math.floor(parseFloat(`${a}`))) || !Q(a) && g(t, r.numbers)) && (a = Number(a)), a;
313
313
  }
314
314
  function kt(t) {
315
315
  const a = /* @__PURE__ */ Object.create(null);
@@ -318,46 +318,46 @@ class Nt {
318
318
  if (o)
319
319
  try {
320
320
  let e = null;
321
- const p = A.resolve(A.cwd(), o), l = r.configs[c];
322
- if (typeof l == "function") {
321
+ const l = P.resolve(P.cwd(), o), p = r.configs[c];
322
+ if (typeof p == "function") {
323
323
  try {
324
- e = l(p);
324
+ e = p(l);
325
325
  } catch (d) {
326
326
  e = d;
327
327
  }
328
328
  if (e instanceof Error) {
329
- B = e;
329
+ y = e;
330
330
  return;
331
331
  }
332
332
  } else
333
- e = A.require(p);
333
+ e = P.require(l);
334
334
  J(e);
335
335
  } catch (e) {
336
- e.name === "PermissionDenied" ? B = e : t[c] && (B = Error(C("Invalid JSON config file: %s", o)));
336
+ e.name === "PermissionDenied" ? y = e : t[c] && (y = Error(G("Invalid JSON config file: %s", o)));
337
337
  }
338
338
  });
339
339
  }
340
340
  function J(t, a) {
341
341
  Object.keys(t).forEach(function(c) {
342
342
  const o = t[c], e = a ? a + "." + c : c;
343
- typeof o == "object" && o !== null && !Array.isArray(o) && h["dot-notation"] ? J(o, e) : (!E(w, e.split(".")) || g(e, r.arrays) && h["combine-arrays"]) && q(e, o);
343
+ typeof o == "object" && o !== null && !Array.isArray(o) && h["dot-notation"] ? J(o, e) : (!E(q, e.split(".")) || g(e, r.arrays) && h["combine-arrays"]) && w(e, o);
344
344
  });
345
345
  }
346
346
  function gt() {
347
- typeof y < "u" && y.forEach(function(t) {
347
+ typeof B < "u" && B.forEach(function(t) {
348
348
  J(t);
349
349
  });
350
350
  }
351
351
  function rt(t, a) {
352
- if (typeof P > "u")
352
+ if (typeof A > "u")
353
353
  return;
354
- const c = typeof P == "string" ? P : "", o = A.env();
354
+ const c = typeof A == "string" ? A : "", o = P.env();
355
355
  Object.keys(o).forEach(function(e) {
356
356
  if (c === "" || e.lastIndexOf(c, 0) === 0) {
357
- const p = e.split("__").map(function(l, d) {
358
- return d === 0 && (l = l.substring(c.length)), W(l);
357
+ const l = e.split("__").map(function(p, d) {
358
+ return d === 0 && (p = p.substring(c.length)), $(p);
359
359
  });
360
- (a && r.configs[p.join(".")] || !a) && !E(t, p) && q(p.join("."), o[e]);
360
+ (a && r.configs[l.join(".")] || !a) && !E(t, l) && w(l.join("."), o[e]);
361
361
  }
362
362
  });
363
363
  }
@@ -367,12 +367,12 @@ class Nt {
367
367
  Object.keys(t).forEach(function(o) {
368
368
  if (!c.has(o) && (a = g(o, r.coercions), typeof a == "function"))
369
369
  try {
370
- const e = $(o, a(t[o]));
371
- [].concat(r.aliases[o] || [], o).forEach((p) => {
372
- c.add(p), t[p] = e;
370
+ const e = H(o, a(t[o]));
371
+ [].concat(r.aliases[o] || [], o).forEach((l) => {
372
+ c.add(l), t[l] = e;
373
373
  });
374
374
  } catch (e) {
375
- B = e;
375
+ y = e;
376
376
  }
377
377
  });
378
378
  }
@@ -383,8 +383,8 @@ class Nt {
383
383
  }
384
384
  function mt(t, a, c, o = !1) {
385
385
  Object.keys(c).forEach(function(e) {
386
- E(t, e.split(".")) || (N(t, e.split("."), c[e]), o && (ot[e] = !0), (a[e] || []).forEach(function(p) {
387
- E(t, p.split(".")) || N(t, p.split("."), c[e]);
386
+ E(t, e.split(".")) || (O(t, e.split("."), c[e]), o && (ot[e] = !0), (a[e] || []).forEach(function(l) {
387
+ E(t, l.split(".")) || O(t, l.split("."), c[e]);
388
388
  }));
389
389
  });
390
390
  }
@@ -396,27 +396,27 @@ class Nt {
396
396
  const o = a[a.length - 1];
397
397
  return typeof c != "object" ? !1 : o in c;
398
398
  }
399
- function N(t, a, c) {
399
+ function O(t, a, c) {
400
400
  let o = t;
401
401
  h["dot-notation"] || (a = [a.join(".")]), a.slice(0, -1).forEach(function(v) {
402
402
  v = ct(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 e = ct(a[a.length - 1]), p = g(a.join("."), r.arrays), l = Array.isArray(c);
404
+ const e = ct(a[a.length - 1]), l = g(a.join("."), r.arrays), p = Array.isArray(c);
405
405
  let d = h["duplicate-arguments-array"];
406
- !d && g(e, r.nargs) && (d = !0, (!T(o[e]) && r.nargs[e] === 1 || Array.isArray(o[e]) && o[e].length === r.nargs[e]) && (o[e] = void 0)), c === Z() ? o[e] = Z(o[e]) : Array.isArray(o[e]) ? d && p && l ? o[e] = h["flatten-duplicate-arrays"] ? o[e].concat(c) : (Array.isArray(o[e][0]) ? o[e] : [o[e]]).concat([c]) : !d && !!p == !!l ? o[e] = c : o[e] = o[e].concat([c]) : o[e] === void 0 && p ? o[e] = l ? c : [c] : d && !(o[e] === void 0 || g(e, r.counts) || g(e, r.bools)) ? o[e] = [o[e], c] : o[e] = c;
406
+ !d && g(e, r.nargs) && (d = !0, (!Q(o[e]) && r.nargs[e] === 1 || Array.isArray(o[e]) && o[e].length === r.nargs[e]) && (o[e] = void 0)), c === Z() ? o[e] = Z(o[e]) : Array.isArray(o[e]) ? d && l && p ? o[e] = h["flatten-duplicate-arrays"] ? o[e].concat(c) : (Array.isArray(o[e][0]) ? o[e] : [o[e]]).concat([c]) : !d && !!l == !!p ? o[e] = c : o[e] = o[e].concat([c]) : o[e] === void 0 && l ? o[e] = p ? c : [c] : d && !(o[e] === void 0 || g(e, r.counts) || g(e, r.bools)) ? o[e] = [o[e], c] : o[e] = c;
407
407
  }
408
- function qt(...t) {
408
+ function wt(...t) {
409
409
  t.forEach(function(a) {
410
410
  Object.keys(a || {}).forEach(function(c) {
411
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
- const e = W(o);
414
- e !== c && r.aliases[c].indexOf(e) === -1 && (r.aliases[c].push(e), Q[e] = !0);
413
+ const e = $(o);
414
+ e !== c && r.aliases[c].indexOf(e) === -1 && (r.aliases[c].push(e), z[e] = !0);
415
415
  }
416
416
  }), r.aliases[c].concat(c).forEach(function(o) {
417
417
  if (o.length > 1 && /[A-Z]/.test(o) && h["camel-case-expansion"]) {
418
- const e = Ot(o, "-");
419
- e !== c && r.aliases[c].indexOf(e) === -1 && (r.aliases[c].push(e), Q[e] = !0);
418
+ const e = Rt(o, "-");
419
+ e !== c && r.aliases[c].indexOf(e) === -1 && (r.aliases[c].push(e), z[e] = !0);
420
420
  }
421
421
  }), r.aliases[c].forEach(function(o) {
422
422
  r.aliases[o] = [c].concat(r.aliases[c].filter(function(e) {
@@ -427,7 +427,7 @@ class Nt {
427
427
  });
428
428
  }
429
429
  function g(t, a) {
430
- const c = [].concat(r.aliases[t] || [], t), o = Object.keys(a), e = c.find((p) => o.includes(p));
430
+ const c = [].concat(r.aliases[t] || [], t), o = Object.keys(a), e = c.find((l) => o.includes(l));
431
431
  return e ? a[e] : !1;
432
432
  }
433
433
  function ut(t) {
@@ -436,14 +436,14 @@ class Nt {
436
436
  return Array.isArray(o) ? o.includes(t) : o[t];
437
437
  });
438
438
  }
439
- function wt(t, ...a) {
439
+ function qt(t, ...a) {
440
440
  return [].concat(...a).some(function(o) {
441
441
  const e = t.match(o);
442
442
  return e && ut(e[1]);
443
443
  });
444
444
  }
445
445
  function vt(t) {
446
- if (t.match(L) || !t.match(/^-[^-]+/))
446
+ if (t.match(M) || !t.match(/^-[^-]+/))
447
447
  return !1;
448
448
  let a = !0, c;
449
449
  const o = t.slice(1).split("");
@@ -457,60 +457,60 @@ class Nt {
457
457
  }
458
458
  return a;
459
459
  }
460
- function H(t) {
460
+ function K(t) {
461
461
  return h["unknown-options-as-args"] && xt(t);
462
462
  }
463
463
  function xt(t) {
464
- return t = t.replace(/^-{3,}/, "--"), t.match(L) || vt(t) ? !1 : !wt(t, /^-+([^=]+?)=[\s\S]*$/, U, /^-+([^=]+?)$/, /^-+([^=]+?)-$/, /^-+([^=]+?\d+)$/, /^-+([^=]+?)\W+.*$/);
464
+ return t = t.replace(/^-{3,}/, "--"), t.match(M) || vt(t) ? !1 : !qt(t, /^-+([^=]+?)=[\s\S]*$/, W, /^-+([^=]+?)$/, /^-+([^=]+?)-$/, /^-+([^=]+?\d+)$/, /^-+([^=]+?)\W+.*$/);
465
465
  }
466
- function R(t) {
467
- return !g(t, r.bools) && !g(t, r.counts) && `${t}` in f ? f[t] : yt(Bt(t));
466
+ function C(t) {
467
+ return !g(t, r.bools) && !g(t, r.counts) && `${t}` in f ? f[t] : Bt(yt(t));
468
468
  }
469
- function yt(t) {
469
+ function Bt(t) {
470
470
  return {
471
- [I.BOOLEAN]: !0,
472
- [I.STRING]: "",
473
- [I.NUMBER]: void 0,
474
- [I.ARRAY]: []
471
+ [L.BOOLEAN]: !0,
472
+ [L.STRING]: "",
473
+ [L.NUMBER]: void 0,
474
+ [L.ARRAY]: []
475
475
  }[t];
476
476
  }
477
- function Bt(t) {
478
- let a = I.BOOLEAN;
479
- return g(t, r.strings) ? a = I.STRING : g(t, r.numbers) ? a = I.NUMBER : g(t, r.bools) ? a = I.BOOLEAN : g(t, r.arrays) && (a = I.ARRAY), a;
477
+ function yt(t) {
478
+ let a = L.BOOLEAN;
479
+ return g(t, r.strings) ? a = L.STRING : g(t, r.numbers) ? a = L.NUMBER : g(t, r.bools) ? a = L.BOOLEAN : g(t, r.arrays) && (a = L.ARRAY), a;
480
480
  }
481
- function T(t) {
481
+ function Q(t) {
482
482
  return t === void 0;
483
483
  }
484
- function Mt() {
485
- Object.keys(r.counts).find((t) => g(t, r.arrays) ? (B = Error(C("Invalid configuration: %s, opts.count excludes opts.array.", t)), !0) : g(t, r.nargs) ? (B = Error(C("Invalid configuration: %s, opts.count excludes opts.narg.", t)), !0) : !1);
484
+ function It() {
485
+ Object.keys(r.counts).find((t) => g(t, r.arrays) ? (y = Error(G("Invalid configuration: %s, opts.count excludes opts.array.", t)), !0) : g(t, r.nargs) ? (y = Error(G("Invalid configuration: %s, opts.count excludes opts.narg.", t)), !0) : !1);
486
486
  }
487
487
  return {
488
488
  aliases: Object.assign({}, r.aliases),
489
- argv: Object.assign(st, w),
489
+ argv: Object.assign(nt, q),
490
490
  configuration: h,
491
491
  defaulted: Object.assign({}, ot),
492
- error: B,
493
- newAliases: Object.assign({}, Q)
492
+ error: y,
493
+ newAliases: Object.assign({}, z)
494
494
  };
495
495
  }
496
496
  }
497
- function zt(i) {
498
- const s = [], m = /* @__PURE__ */ Object.create(null);
499
- let n = !0;
497
+ function Dt(i) {
498
+ const n = [], m = /* @__PURE__ */ Object.create(null);
499
+ let s = !0;
500
500
  for (Object.keys(i).forEach(function(u) {
501
- s.push([].concat(i[u], u));
502
- }); n; ) {
503
- n = !1;
504
- for (let u = 0; u < s.length; u++)
505
- for (let k = u + 1; k < s.length; k++)
506
- if (s[u].filter(function(h) {
507
- return s[k].indexOf(h) !== -1;
501
+ n.push([].concat(i[u], u));
502
+ }); s; ) {
503
+ s = !1;
504
+ for (let u = 0; u < n.length; u++)
505
+ for (let k = u + 1; k < n.length; k++)
506
+ if (n[u].filter(function(h) {
507
+ return n[k].indexOf(h) !== -1;
508
508
  }).length) {
509
- s[u] = s[u].concat(s[k]), s.splice(k, 1), n = !0;
509
+ n[u] = n[u].concat(n[k]), n.splice(k, 1), s = !0;
510
510
  break;
511
511
  }
512
512
  }
513
- return s.forEach(function(u) {
513
+ return n.forEach(function(u) {
514
514
  u = u.filter(function(_, h, f) {
515
515
  return f.indexOf(_) === h;
516
516
  });
@@ -524,7 +524,7 @@ function Z(i) {
524
524
  function ct(i) {
525
525
  return i === "__proto__" ? "___proto___" : i;
526
526
  }
527
- function jt(i) {
527
+ function Nt(i) {
528
528
  return typeof i == "string" && (i[0] === "'" || i[0] === '"') && i[i.length - 1] === i[0] ? i.substring(1, i.length - 1) : i;
529
529
  }
530
530
  /**
@@ -536,15 +536,15 @@ function jt(i) {
536
536
  * SPDX-License-Identifier: ISC
537
537
  */
538
538
  var X, tt, et;
539
- const lt = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12, pt = (tt = (X = process == null ? void 0 : process.versions) === null || X === void 0 ? void 0 : X.node) !== null && tt !== void 0 ? tt : (et = process == null ? void 0 : process.version) === null || et === void 0 ? void 0 : et.slice(1);
540
- if (pt && Number(pt.match(/^([^.]+)/)[1]) < lt)
541
- throw Error(`yargs parser supports a minimum Node.js version of ${lt}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
542
- const Qt = process ? process.env : {};
543
- new Nt({
539
+ const pt = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12, lt = (tt = (X = process == null ? void 0 : process.versions) === null || X === void 0 ? void 0 : X.node) !== null && tt !== void 0 ? tt : (et = process == null ? void 0 : process.version) === null || et === void 0 ? void 0 : et.slice(1);
540
+ if (lt && Number(lt.match(/^([^.]+)/)[1]) < pt)
541
+ throw Error(`yargs parser supports a minimum Node.js version of ${pt}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
542
+ const zt = process ? process.env : {};
543
+ new Ot({
544
544
  cwd: process.cwd,
545
- env: () => Qt,
545
+ env: () => zt,
546
546
  format: ht,
547
- normalize: It,
547
+ normalize: Lt,
548
548
  resolve: at,
549
549
  // TODO: figure out a way to combine ESM and CJS coverage, such that
550
550
  // we can exercise all the lines below:
@@ -556,111 +556,111 @@ new Nt({
556
556
  throw Error("only .json config files are supported in ESM");
557
557
  }
558
558
  });
559
- const Ft = {
559
+ const jt = {
560
560
  fs: {
561
561
  readFileSync: _t,
562
- writeFile: Lt
562
+ writeFile: Mt
563
563
  },
564
564
  format: ht,
565
565
  resolve: at,
566
566
  exists: (i) => {
567
567
  try {
568
- return Pt(i).isFile();
568
+ return At(i).isFile();
569
569
  } catch {
570
570
  return !1;
571
571
  }
572
572
  }
573
573
  };
574
- let M;
575
- class Dt {
576
- constructor(s) {
577
- s = s || {}, this.directory = s.directory || "./locales", this.updateFiles = typeof s.updateFiles == "boolean" ? s.updateFiles : !0, this.locale = s.locale || "en", this.fallbackToLanguage = typeof s.fallbackToLanguage == "boolean" ? s.fallbackToLanguage : !0, this.cache = /* @__PURE__ */ Object.create(null), this.writeQueue = [];
574
+ let I;
575
+ class Ft {
576
+ constructor(n) {
577
+ n = n || {}, this.directory = n.directory || "./locales", this.updateFiles = typeof n.updateFiles == "boolean" ? n.updateFiles : !0, this.locale = n.locale || "en", this.fallbackToLanguage = typeof n.fallbackToLanguage == "boolean" ? n.fallbackToLanguage : !0, this.cache = /* @__PURE__ */ Object.create(null), this.writeQueue = [];
578
578
  }
579
- __(...s) {
579
+ __(...n) {
580
580
  if (typeof arguments[0] != "string")
581
581
  return this._taggedLiteral(arguments[0], ...arguments);
582
- const m = s.shift();
583
- let n = function() {
582
+ const m = n.shift();
583
+ let s = function() {
584
584
  };
585
- return typeof s[s.length - 1] == "function" && (n = s.pop()), n = n || function() {
585
+ return typeof n[n.length - 1] == "function" && (s = n.pop()), s = s || function() {
586
586
  }, this.cache[this.locale] || this._readLocaleFile(), !this.cache[this.locale][m] && this.updateFiles ? (this.cache[this.locale][m] = m, this._enqueueWrite({
587
587
  directory: this.directory,
588
588
  locale: this.locale,
589
- cb: n
590
- })) : n(), M.format.apply(M.format, [this.cache[this.locale][m] || m].concat(s));
589
+ cb: s
590
+ })) : s(), I.format.apply(I.format, [this.cache[this.locale][m] || m].concat(n));
591
591
  }
592
592
  __n() {
593
- const s = Array.prototype.slice.call(arguments), m = s.shift(), n = s.shift(), u = s.shift();
593
+ const n = Array.prototype.slice.call(arguments), m = n.shift(), s = n.shift(), u = n.shift();
594
594
  let k = function() {
595
595
  };
596
- typeof s[s.length - 1] == "function" && (k = s.pop()), this.cache[this.locale] || this._readLocaleFile();
597
- let _ = u === 1 ? m : n;
596
+ typeof n[n.length - 1] == "function" && (k = n.pop()), this.cache[this.locale] || this._readLocaleFile();
597
+ let _ = u === 1 ? m : s;
598
598
  this.cache[this.locale][m] && (_ = this.cache[this.locale][m][u === 1 ? "one" : "other"]), !this.cache[this.locale][m] && this.updateFiles ? (this.cache[this.locale][m] = {
599
599
  one: m,
600
- other: n
600
+ other: s
601
601
  }, this._enqueueWrite({
602
602
  directory: this.directory,
603
603
  locale: this.locale,
604
604
  cb: k
605
605
  })) : k();
606
606
  const h = [_];
607
- return ~_.indexOf("%d") && h.push(u), M.format.apply(M.format, h.concat(s));
607
+ return ~_.indexOf("%d") && h.push(u), I.format.apply(I.format, h.concat(n));
608
608
  }
609
- setLocale(s) {
610
- this.locale = s;
609
+ setLocale(n) {
610
+ this.locale = n;
611
611
  }
612
612
  getLocale() {
613
613
  return this.locale;
614
614
  }
615
- updateLocale(s) {
615
+ updateLocale(n) {
616
616
  this.cache[this.locale] || this._readLocaleFile();
617
- for (const m in s)
618
- Object.prototype.hasOwnProperty.call(s, m) && (this.cache[this.locale][m] = s[m]);
617
+ for (const m in n)
618
+ Object.prototype.hasOwnProperty.call(n, m) && (this.cache[this.locale][m] = n[m]);
619
619
  }
620
- _taggedLiteral(s, ...m) {
621
- let n = "";
622
- return s.forEach(function(u, k) {
620
+ _taggedLiteral(n, ...m) {
621
+ let s = "";
622
+ return n.forEach(function(u, k) {
623
623
  const _ = m[k + 1];
624
- n += u, typeof _ < "u" && (n += "%s");
625
- }), this.__.apply(this, [n].concat([].slice.call(m, 1)));
624
+ s += u, typeof _ < "u" && (s += "%s");
625
+ }), this.__.apply(this, [s].concat([].slice.call(m, 1)));
626
626
  }
627
- _enqueueWrite(s) {
628
- this.writeQueue.push(s), this.writeQueue.length === 1 && this._processWriteQueue();
627
+ _enqueueWrite(n) {
628
+ this.writeQueue.push(n), this.writeQueue.length === 1 && this._processWriteQueue();
629
629
  }
630
630
  _processWriteQueue() {
631
- const s = this, m = this.writeQueue[0], n = m.directory, u = m.locale, k = m.cb, _ = this._resolveLocaleFile(n, u), h = JSON.stringify(this.cache[u], null, 2);
632
- M.fs.writeFile(_, h, "utf-8", function(f) {
633
- s.writeQueue.shift(), s.writeQueue.length > 0 && s._processWriteQueue(), k(f);
631
+ const n = this, m = this.writeQueue[0], s = m.directory, u = m.locale, k = m.cb, _ = this._resolveLocaleFile(s, u), h = JSON.stringify(this.cache[u], null, 2);
632
+ I.fs.writeFile(_, h, "utf-8", function(f) {
633
+ n.writeQueue.shift(), n.writeQueue.length > 0 && n._processWriteQueue(), k(f);
634
634
  });
635
635
  }
636
636
  _readLocaleFile() {
637
- let s = {};
637
+ let n = {};
638
638
  const m = this._resolveLocaleFile(this.directory, this.locale);
639
639
  try {
640
- M.fs.readFileSync && (s = JSON.parse(M.fs.readFileSync(m, "utf-8")));
641
- } catch (n) {
642
- if (n instanceof SyntaxError && (n.message = "syntax error in " + m), n.code === "ENOENT")
643
- s = {};
640
+ I.fs.readFileSync && (n = JSON.parse(I.fs.readFileSync(m, "utf-8")));
641
+ } catch (s) {
642
+ if (s instanceof SyntaxError && (s.message = "syntax error in " + m), s.code === "ENOENT")
643
+ n = {};
644
644
  else
645
- throw n;
645
+ throw s;
646
646
  }
647
- this.cache[this.locale] = s;
647
+ this.cache[this.locale] = n;
648
648
  }
649
- _resolveLocaleFile(s, m) {
650
- let n = M.resolve(s, "./", m + ".json");
651
- if (this.fallbackToLanguage && !this._fileExistsSync(n) && ~m.lastIndexOf("_")) {
652
- const u = M.resolve(s, "./", m.split("_")[0] + ".json");
653
- this._fileExistsSync(u) && (n = u);
649
+ _resolveLocaleFile(n, m) {
650
+ let s = I.resolve(n, "./", m + ".json");
651
+ if (this.fallbackToLanguage && !this._fileExistsSync(s) && ~m.lastIndexOf("_")) {
652
+ const u = I.resolve(n, "./", m.split("_")[0] + ".json");
653
+ this._fileExistsSync(u) && (s = u);
654
654
  }
655
- return n;
655
+ return s;
656
656
  }
657
- _fileExistsSync(s) {
658
- return M.exists(s);
657
+ _fileExistsSync(n) {
658
+ return I.exists(n);
659
659
  }
660
660
  }
661
- function Vt(i, s) {
662
- M = s;
663
- const m = new Dt(i);
661
+ function Vt(i, n) {
662
+ I = n;
663
+ const m = new Ft(i);
664
664
  return {
665
665
  __: m.__.bind(m),
666
666
  __n: m.__n.bind(m),
@@ -670,16 +670,16 @@ function Vt(i, s) {
670
670
  locale: m.locale
671
671
  };
672
672
  }
673
- const $t = (i) => Vt(i, Ft);
674
- let z;
673
+ const Ht = (i) => Vt(i, jt);
674
+ let D;
675
675
  try {
676
- z = Tt(import.meta.url);
676
+ D = Qt(import.meta.url);
677
677
  } catch {
678
- z = process.cwd();
678
+ D = process.cwd();
679
679
  }
680
- const Ht = z.substring(0, z.lastIndexOf("node_modules"));
681
- Ht || process.cwd(), process.cwd, process.exit, process.nextTick, typeof process.stdout.columns < "u" && process.stdout.columns, $t({
682
- directory: at(z, "../../../locales"),
680
+ const Kt = D.substring(0, D.lastIndexOf("node_modules"));
681
+ Kt || process.cwd(), process.cwd, process.exit, process.nextTick, typeof process.stdout.columns < "u" && process.stdout.columns, Ht({
682
+ directory: at(D, "../../../locales"),
683
683
  updateFiles: !1
684
684
  });
685
685
  const it = [
@@ -994,6 +994,34 @@ const it = [
994
994
  output_mtok: 75
995
995
  }
996
996
  },
997
+ {
998
+ id: "claude-opus-4-5",
999
+ name: "Claude Opus 4.5",
1000
+ description: "Premium model combining maximum intelligence with practical performance",
1001
+ match: {
1002
+ or: [
1003
+ {
1004
+ starts_with: "claude-opus-4-5"
1005
+ },
1006
+ {
1007
+ starts_with: "claude-opus-4.5"
1008
+ },
1009
+ {
1010
+ starts_with: "claude-4-5-opus"
1011
+ },
1012
+ {
1013
+ starts_with: "claude-4.5-opus"
1014
+ }
1015
+ ]
1016
+ },
1017
+ context_window: 2e5,
1018
+ prices: {
1019
+ input_mtok: 5,
1020
+ cache_write_mtok: 6.25,
1021
+ cache_read_mtok: 0.5,
1022
+ output_mtok: 25
1023
+ }
1024
+ },
997
1025
  {
998
1026
  id: "claude-sonnet-4-0",
999
1027
  name: "Claude Sonnet 4",
@@ -4080,272 +4108,3037 @@ Compared to other leading proprietary and open-weights models Command A delivers
4080
4108
  id: "deepseek-r1-distill-llama-70b",
4081
4109
  name: "DeepSeek R1 Distill Llama 70B",
4082
4110
  match: {
4083
- equals: "deepseek-r1-distill-llama-70b"
4111
+ equals: "deepseek-r1-distill-llama-70b"
4112
+ },
4113
+ context_window: 131072,
4114
+ prices: {
4115
+ input_mtok: 0.75,
4116
+ output_mtok: 0.99
4117
+ }
4118
+ },
4119
+ {
4120
+ id: "gemma-7b-it",
4121
+ match: {
4122
+ equals: "gemma-7b-it"
4123
+ },
4124
+ prices: {
4125
+ input_mtok: 0.07,
4126
+ output_mtok: 0.07
4127
+ }
4128
+ },
4129
+ {
4130
+ id: "gemma2-9b-it",
4131
+ name: "Gemma 2 9B 8k",
4132
+ match: {
4133
+ or: [
4134
+ {
4135
+ equals: "gemma2-9b-it"
4136
+ },
4137
+ {
4138
+ equals: "gemma2-9b"
4139
+ }
4140
+ ]
4141
+ },
4142
+ prices: {
4143
+ input_mtok: 0.2,
4144
+ output_mtok: 0.2
4145
+ }
4146
+ },
4147
+ {
4148
+ id: "llama-3.1-405b-reasoning",
4149
+ match: {
4150
+ equals: "llama-3.1-405b-reasoning"
4151
+ },
4152
+ prices: {
4153
+ input_mtok: 0.59,
4154
+ output_mtok: 0.79
4155
+ }
4156
+ },
4157
+ {
4158
+ id: "llama-3.1-70b-versatile",
4159
+ match: {
4160
+ equals: "llama-3.1-70b-versatile"
4161
+ },
4162
+ prices: {
4163
+ input_mtok: 0.59,
4164
+ output_mtok: 0.79
4165
+ }
4166
+ },
4167
+ {
4168
+ id: "llama-3.1-8b-instant",
4169
+ name: "Llama 3.1 8B Instant 128k",
4170
+ match: {
4171
+ equals: "llama-3.1-8b-instant"
4172
+ },
4173
+ prices: {
4174
+ input_mtok: 0.05,
4175
+ output_mtok: 0.08
4176
+ }
4177
+ },
4178
+ {
4179
+ id: "llama-3.2-11b-text-preview",
4180
+ match: {
4181
+ equals: "llama-3.2-11b-text-preview"
4182
+ },
4183
+ prices: {
4184
+ input_mtok: 0.18,
4185
+ output_mtok: 0.18
4186
+ }
4187
+ },
4188
+ {
4189
+ id: "llama-3.2-11b-vision-preview",
4190
+ match: {
4191
+ equals: "llama-3.2-11b-vision-preview"
4192
+ },
4193
+ prices: {
4194
+ input_mtok: 0.18,
4195
+ output_mtok: 0.18
4196
+ }
4197
+ },
4198
+ {
4199
+ id: "llama-3.2-1b-preview",
4200
+ match: {
4201
+ equals: "llama-3.2-1b-preview"
4202
+ },
4203
+ prices: {
4204
+ input_mtok: 0.04,
4205
+ output_mtok: 0.04
4206
+ }
4207
+ },
4208
+ {
4209
+ id: "llama-3.2-3b-preview",
4210
+ match: {
4211
+ equals: "llama-3.2-3b-preview"
4212
+ },
4213
+ prices: {
4214
+ input_mtok: 0.06,
4215
+ output_mtok: 0.06
4216
+ }
4217
+ },
4218
+ {
4219
+ id: "llama-3.2-90b-text-preview",
4220
+ match: {
4221
+ equals: "llama-3.2-90b-text-preview"
4222
+ },
4223
+ prices: {
4224
+ input_mtok: 0.9,
4225
+ output_mtok: 0.9
4226
+ }
4227
+ },
4228
+ {
4229
+ id: "llama-3.2-90b-vision-preview",
4230
+ match: {
4231
+ equals: "llama-3.2-90b-vision-preview"
4232
+ },
4233
+ prices: {
4234
+ input_mtok: 0.9,
4235
+ output_mtok: 0.9
4236
+ }
4237
+ },
4238
+ {
4239
+ id: "llama-3.3-70b-specdec",
4240
+ match: {
4241
+ equals: "llama-3.3-70b-specdec"
4242
+ },
4243
+ prices: {
4244
+ input_mtok: 0.59,
4245
+ output_mtok: 0.99
4246
+ }
4247
+ },
4248
+ {
4249
+ id: "llama-3.3-70b-versatile",
4250
+ name: "Llama 3.3 70B Versatile 128k",
4251
+ match: {
4252
+ equals: "llama-3.3-70b-versatile"
4253
+ },
4254
+ prices: {
4255
+ input_mtok: 0.59,
4256
+ output_mtok: 0.79
4257
+ }
4258
+ },
4259
+ {
4260
+ id: "llama-guard-3-8b",
4261
+ match: {
4262
+ equals: "llama-guard-3-8b"
4263
+ },
4264
+ prices: {
4265
+ input_mtok: 0.2,
4266
+ output_mtok: 0.2
4267
+ }
4268
+ },
4269
+ {
4270
+ id: "llama2-70b-4096",
4271
+ match: {
4272
+ equals: "llama2-70b-4096"
4273
+ },
4274
+ prices: {
4275
+ input_mtok: 0.7,
4276
+ output_mtok: 0.8
4277
+ }
4278
+ },
4279
+ {
4280
+ id: "llama3-70b-8192",
4281
+ match: {
4282
+ equals: "llama3-70b-8192"
4283
+ },
4284
+ prices: {
4285
+ input_mtok: 0.59,
4286
+ output_mtok: 0.79
4287
+ }
4288
+ },
4289
+ {
4290
+ id: "llama3-8b-8192",
4291
+ match: {
4292
+ equals: "llama3-8b-8192"
4293
+ },
4294
+ prices: {
4295
+ input_mtok: 0.05,
4296
+ output_mtok: 0.08
4297
+ }
4298
+ },
4299
+ {
4300
+ id: "llama3-groq-70b-8192-tool-use-preview",
4301
+ match: {
4302
+ equals: "llama3-groq-70b-8192-tool-use-preview"
4303
+ },
4304
+ prices: {
4305
+ input_mtok: 0.89,
4306
+ output_mtok: 0.89
4307
+ }
4308
+ },
4309
+ {
4310
+ id: "llama3-groq-8b-8192-tool-use-preview",
4311
+ match: {
4312
+ equals: "llama3-groq-8b-8192-tool-use-preview"
4313
+ },
4314
+ prices: {
4315
+ input_mtok: 0.19,
4316
+ output_mtok: 0.19
4317
+ }
4318
+ },
4319
+ {
4320
+ id: "meta-llama/llama-4-maverick-17b-128e-instruct",
4321
+ name: "Llama 4 Maverick 17B 128E",
4322
+ match: {
4323
+ equals: "meta-llama/llama-4-maverick-17b-128e-instruct"
4324
+ },
4325
+ context_window: 131072,
4326
+ prices: {
4327
+ input_mtok: 0.2,
4328
+ output_mtok: 0.6
4329
+ }
4330
+ },
4331
+ {
4332
+ id: "meta-llama/llama-4-scout-17b-16e-instruct",
4333
+ name: "Llama 4 Scout (17Bx16E) 128k",
4334
+ match: {
4335
+ equals: "meta-llama/llama-4-scout-17b-16e-instruct"
4336
+ },
4337
+ prices: {
4338
+ input_mtok: 0.11,
4339
+ output_mtok: 0.34
4340
+ }
4341
+ },
4342
+ {
4343
+ id: "meta-llama/llama-guard-4-12b",
4344
+ name: "Llama Guard 4 12B",
4345
+ match: {
4346
+ equals: "meta-llama/llama-guard-4-12b"
4347
+ },
4348
+ context_window: 131072,
4349
+ prices: {
4350
+ input_mtok: 0.2,
4351
+ output_mtok: 0.2
4352
+ }
4353
+ },
4354
+ {
4355
+ id: "mistral-saba-24b",
4356
+ match: {
4357
+ equals: "mistral-saba-24b"
4358
+ },
4359
+ prices: {
4360
+ input_mtok: 0.79,
4361
+ output_mtok: 0.79
4362
+ }
4363
+ },
4364
+ {
4365
+ id: "mixtral-8x7b-32768",
4366
+ match: {
4367
+ equals: "mixtral-8x7b-32768"
4368
+ },
4369
+ prices: {
4370
+ input_mtok: 0.24,
4371
+ output_mtok: 0.24
4372
+ }
4373
+ },
4374
+ {
4375
+ id: "moonshotai/kimi-k2-instruct",
4376
+ name: "Kimi K2 1T 128k",
4377
+ match: {
4378
+ or: [
4379
+ {
4380
+ equals: "moonshotai/kimi-k2-instruct"
4381
+ },
4382
+ {
4383
+ equals: "moonshotai/kimi-k2-instruct-0905"
4384
+ }
4385
+ ]
4386
+ },
4387
+ context_window: 131072,
4388
+ prices: {
4389
+ input_mtok: 1,
4390
+ cache_read_mtok: 0.5,
4391
+ output_mtok: 3
4392
+ }
4393
+ },
4394
+ {
4395
+ id: "openai/gpt-oss-120b",
4396
+ description: `GPT-OSS 120B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
4397
+ 120 billion parameters and 128 experts.
4398
+ `,
4399
+ match: {
4400
+ or: [
4401
+ {
4402
+ equals: "openai/gpt-oss-120b"
4403
+ },
4404
+ {
4405
+ equals: "openai/gpt-oss-safeguard-20b"
4406
+ }
4407
+ ]
4408
+ },
4409
+ context_window: 131072,
4410
+ prices: {
4411
+ input_mtok: 0.15,
4412
+ cache_read_mtok: 0.075,
4413
+ output_mtok: 0.6
4414
+ }
4415
+ },
4416
+ {
4417
+ id: "openai/gpt-oss-20b",
4418
+ description: `GPT-OSS 20B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
4419
+ 20 billion parameters and 32 experts.
4420
+ `,
4421
+ match: {
4422
+ equals: "openai/gpt-oss-20b"
4423
+ },
4424
+ context_window: 131072,
4425
+ prices: {
4426
+ input_mtok: 0.075,
4427
+ cache_read_mtok: 0.0375,
4428
+ output_mtok: 0.3
4429
+ }
4430
+ },
4431
+ {
4432
+ id: "qwen/qwen3-32b",
4433
+ name: "Qwen3 32B 131k",
4434
+ match: {
4435
+ equals: "qwen/qwen3-32b"
4436
+ },
4437
+ prices: {
4438
+ input_mtok: 0.29,
4439
+ output_mtok: 0.59
4440
+ }
4441
+ }
4442
+ ]
4443
+ },
4444
+ {
4445
+ id: "huggingface_cerebras",
4446
+ name: "HuggingFace (cerebras)",
4447
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
4448
+ api_pattern: "https://router\\.huggingface\\.co/cerebras",
4449
+ provider_match: {
4450
+ and: [
4451
+ {
4452
+ contains: "huggingface"
4453
+ },
4454
+ {
4455
+ contains: "cerebras"
4456
+ }
4457
+ ]
4458
+ },
4459
+ extractors: [
4460
+ {
4461
+ api_flavor: "chat",
4462
+ root: "usage",
4463
+ model_path: "model",
4464
+ mappings: [
4465
+ {
4466
+ path: "prompt_tokens",
4467
+ dest: "input_tokens",
4468
+ required: !0
4469
+ },
4470
+ {
4471
+ path: ["prompt_tokens_details", "cached_tokens"],
4472
+ dest: "cache_read_tokens",
4473
+ required: !1
4474
+ },
4475
+ {
4476
+ path: ["prompt_tokens_details", "audio_tokens"],
4477
+ dest: "input_audio_tokens",
4478
+ required: !1
4479
+ },
4480
+ {
4481
+ path: ["completion_tokens_details", "audio_tokens"],
4482
+ dest: "output_audio_tokens",
4483
+ required: !1
4484
+ },
4485
+ {
4486
+ path: "completion_tokens",
4487
+ dest: "output_tokens",
4488
+ required: !0
4489
+ }
4490
+ ]
4491
+ }
4492
+ ],
4493
+ models: [
4494
+ {
4495
+ id: "Qwen/Qwen3-235B-A22B-Instruct-2507",
4496
+ name: "Qwen3-235B-A22B-Instruct-2507",
4497
+ match: {
4498
+ equals: "qwen/qwen3-235b-a22b-instruct-2507"
4499
+ },
4500
+ prices: {
4501
+ input_mtok: 0.6,
4502
+ output_mtok: 1.2
4503
+ }
4504
+ },
4505
+ {
4506
+ id: "Qwen/Qwen3-32B",
4507
+ name: "Qwen3-32B",
4508
+ match: {
4509
+ equals: "qwen/qwen3-32b"
4510
+ },
4511
+ prices: {
4512
+ input_mtok: 0.4,
4513
+ output_mtok: 0.8
4514
+ }
4515
+ },
4516
+ {
4517
+ id: "meta-llama/Llama-3.1-8B-Instruct",
4518
+ name: "Llama-3.1-8B-Instruct",
4519
+ match: {
4520
+ equals: "meta-llama/llama-3.1-8b-instruct"
4521
+ },
4522
+ prices: {
4523
+ input_mtok: 0.1,
4524
+ output_mtok: 0.1
4525
+ }
4526
+ },
4527
+ {
4528
+ id: "meta-llama/Llama-3.3-70B-Instruct",
4529
+ name: "Llama-3.3-70B-Instruct",
4530
+ match: {
4531
+ equals: "meta-llama/llama-3.3-70b-instruct"
4532
+ },
4533
+ prices: {
4534
+ input_mtok: 0.85,
4535
+ output_mtok: 1.2
4536
+ }
4537
+ },
4538
+ {
4539
+ id: "openai/gpt-oss-120b",
4540
+ name: "gpt-oss-120b",
4541
+ match: {
4542
+ equals: "openai/gpt-oss-120b"
4543
+ },
4544
+ prices: {
4545
+ input_mtok: 0.25,
4546
+ output_mtok: 0.69
4547
+ }
4548
+ }
4549
+ ]
4550
+ },
4551
+ {
4552
+ id: "huggingface_fireworks-ai",
4553
+ name: "HuggingFace (fireworks-ai)",
4554
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
4555
+ api_pattern: "https://router\\.huggingface\\.co/fireworks-ai",
4556
+ provider_match: {
4557
+ and: [
4558
+ {
4559
+ contains: "huggingface"
4560
+ },
4561
+ {
4562
+ contains: "fireworks-ai"
4563
+ }
4564
+ ]
4565
+ },
4566
+ extractors: [
4567
+ {
4568
+ api_flavor: "chat",
4569
+ root: "usage",
4570
+ model_path: "model",
4571
+ mappings: [
4572
+ {
4573
+ path: "prompt_tokens",
4574
+ dest: "input_tokens",
4575
+ required: !0
4576
+ },
4577
+ {
4578
+ path: ["prompt_tokens_details", "cached_tokens"],
4579
+ dest: "cache_read_tokens",
4580
+ required: !1
4581
+ },
4582
+ {
4583
+ path: ["prompt_tokens_details", "audio_tokens"],
4584
+ dest: "input_audio_tokens",
4585
+ required: !1
4586
+ },
4587
+ {
4588
+ path: ["completion_tokens_details", "audio_tokens"],
4589
+ dest: "output_audio_tokens",
4590
+ required: !1
4591
+ },
4592
+ {
4593
+ path: "completion_tokens",
4594
+ dest: "output_tokens",
4595
+ required: !0
4596
+ }
4597
+ ]
4598
+ }
4599
+ ],
4600
+ models: [
4601
+ {
4602
+ id: "Qwen/Qwen2.5-VL-32B-Instruct",
4603
+ name: "Qwen2.5-VL-32B-Instruct",
4604
+ match: {
4605
+ equals: "qwen/qwen2.5-vl-32b-instruct"
4606
+ },
4607
+ context_window: 128e3,
4608
+ prices: {
4609
+ input_mtok: 0.22,
4610
+ output_mtok: 0.88
4611
+ }
4612
+ },
4613
+ {
4614
+ id: "Qwen/Qwen3-235B-A22B",
4615
+ name: "Qwen3-235B-A22B",
4616
+ match: {
4617
+ or: [
4618
+ {
4619
+ equals: "qwen/qwen3-235b-a22b"
4620
+ },
4621
+ {
4622
+ equals: "qwen/qwen3-235b-a22b-instruct-2507"
4623
+ }
4624
+ ]
4625
+ },
4626
+ context_window: 131072,
4627
+ prices: {
4628
+ input_mtok: 0.22,
4629
+ output_mtok: 0.88
4630
+ }
4631
+ },
4632
+ {
4633
+ id: "Qwen/Qwen3-30B-A3B",
4634
+ name: "Qwen3-30B-A3B",
4635
+ match: {
4636
+ equals: "qwen/qwen3-30b-a3b"
4637
+ },
4638
+ context_window: 131072,
4639
+ prices: {
4640
+ input_mtok: 0.15,
4641
+ output_mtok: 0.6
4642
+ }
4643
+ },
4644
+ {
4645
+ id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
4646
+ name: "Qwen3-Coder-480B-A35B-Instruct",
4647
+ match: {
4648
+ equals: "qwen/qwen3-coder-480b-a35b-instruct"
4649
+ },
4650
+ context_window: 262144,
4651
+ prices: {
4652
+ input_mtok: 0.45,
4653
+ output_mtok: 1.8
4654
+ }
4655
+ },
4656
+ {
4657
+ id: "SentientAGI/Dobby-Unhinged-Llama-3.3-70B",
4658
+ name: "Dobby-Unhinged-Llama-3.3-70B",
4659
+ match: {
4660
+ equals: "sentientagi/dobby-unhinged-llama-3.3-70b"
4661
+ },
4662
+ context_window: 131072,
4663
+ prices: {
4664
+ input_mtok: 0.9,
4665
+ output_mtok: 0.9
4666
+ }
4667
+ },
4668
+ {
4669
+ id: "deepseek-ai/DeepSeek-R1-0528",
4670
+ name: "DeepSeek-R1-0528",
4671
+ match: {
4672
+ equals: "deepseek-ai/deepseek-r1-0528"
4673
+ },
4674
+ context_window: 163840,
4675
+ prices: {
4676
+ input_mtok: 3,
4677
+ output_mtok: 8
4678
+ }
4679
+ },
4680
+ {
4681
+ id: "deepseek-ai/DeepSeek-V3-0324",
4682
+ name: "DeepSeek-V3-0324",
4683
+ match: {
4684
+ equals: "deepseek-ai/deepseek-v3-0324"
4685
+ },
4686
+ context_window: 163840,
4687
+ prices: {
4688
+ input_mtok: 0.9,
4689
+ output_mtok: 0.9
4690
+ }
4691
+ },
4692
+ {
4693
+ id: "meta-llama/Llama-3.1-405B-Instruct",
4694
+ name: "Llama-3.1-405B-Instruct",
4695
+ match: {
4696
+ equals: "meta-llama/llama-3.1-405b-instruct"
4697
+ },
4698
+ context_window: 131072,
4699
+ prices: {
4700
+ input_mtok: 3,
4701
+ output_mtok: 3
4702
+ }
4703
+ },
4704
+ {
4705
+ id: "meta-llama/Llama-3.1-70B-Instruct",
4706
+ name: "Llama-3.1-70B-Instruct",
4707
+ match: {
4708
+ equals: "meta-llama/llama-3.1-70b-instruct"
4709
+ },
4710
+ context_window: 131072,
4711
+ prices: {
4712
+ input_mtok: 0.9,
4713
+ output_mtok: 0.9
4714
+ }
4715
+ },
4716
+ {
4717
+ id: "meta-llama/Llama-3.1-8B-Instruct",
4718
+ name: "Llama-3.1-8B-Instruct",
4719
+ match: {
4720
+ equals: "meta-llama/llama-3.1-8b-instruct"
4721
+ },
4722
+ context_window: 131072,
4723
+ prices: {
4724
+ input_mtok: 0.2,
4725
+ output_mtok: 0.2
4726
+ }
4727
+ },
4728
+ {
4729
+ id: "meta-llama/Llama-3.3-70B-Instruct",
4730
+ name: "Llama-3.3-70B-Instruct",
4731
+ match: {
4732
+ equals: "meta-llama/llama-3.3-70b-instruct"
4733
+ },
4734
+ context_window: 131072,
4735
+ prices: {
4736
+ input_mtok: 0.9,
4737
+ output_mtok: 0.9
4738
+ }
4739
+ },
4740
+ {
4741
+ id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct",
4742
+ name: "Llama-4-Maverick-17B-128E-Instruct",
4743
+ match: {
4744
+ equals: "meta-llama/llama-4-maverick-17b-128e-instruct"
4745
+ },
4746
+ context_window: 1048576,
4747
+ prices: {
4748
+ input_mtok: 0.22,
4749
+ output_mtok: 0.88
4750
+ }
4751
+ },
4752
+ {
4753
+ id: "meta-llama/Llama-4-Scout-17B-16E-Instruct",
4754
+ name: "Llama-4-Scout-17B-16E-Instruct",
4755
+ match: {
4756
+ equals: "meta-llama/llama-4-scout-17b-16e-instruct"
4757
+ },
4758
+ context_window: 1048576,
4759
+ prices: {
4760
+ input_mtok: 0.15,
4761
+ output_mtok: 0.6
4762
+ }
4763
+ },
4764
+ {
4765
+ id: "moonshotai/Kimi-K2-Instruct",
4766
+ name: "Kimi-K2-Instruct",
4767
+ match: {
4768
+ equals: "moonshotai/kimi-k2-instruct"
4769
+ },
4770
+ context_window: 131072,
4771
+ prices: {
4772
+ input_mtok: 0.6,
4773
+ output_mtok: 2.5
4774
+ }
4775
+ },
4776
+ {
4777
+ id: "openai/gpt-oss-120b",
4778
+ name: "gpt-oss-120b",
4779
+ match: {
4780
+ equals: "openai/gpt-oss-120b"
4781
+ },
4782
+ context_window: 131072,
4783
+ prices: {
4784
+ input_mtok: 0.15,
4785
+ output_mtok: 0.6
4786
+ }
4787
+ },
4788
+ {
4789
+ id: "openai/gpt-oss-20b",
4790
+ name: "gpt-oss-20b",
4791
+ match: {
4792
+ equals: "openai/gpt-oss-20b"
4793
+ },
4794
+ context_window: 131072,
4795
+ prices: {
4796
+ input_mtok: 0.05,
4797
+ output_mtok: 0.2
4798
+ }
4799
+ },
4800
+ {
4801
+ id: "zai-org/GLM-4.5",
4802
+ name: "GLM-4.5",
4803
+ match: {
4804
+ equals: "zai-org/glm-4.5"
4805
+ },
4806
+ context_window: 131072,
4807
+ prices: {
4808
+ input_mtok: 0.55,
4809
+ output_mtok: 2.19
4810
+ }
4811
+ }
4812
+ ]
4813
+ },
4814
+ {
4815
+ id: "huggingface_groq",
4816
+ name: "HuggingFace (groq)",
4817
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
4818
+ api_pattern: "https://router\\.huggingface\\.co/groq",
4819
+ provider_match: {
4820
+ and: [
4821
+ {
4822
+ contains: "huggingface"
4823
+ },
4824
+ {
4825
+ contains: "groq"
4826
+ }
4827
+ ]
4828
+ },
4829
+ extractors: [
4830
+ {
4831
+ api_flavor: "chat",
4832
+ root: "usage",
4833
+ model_path: "model",
4834
+ mappings: [
4835
+ {
4836
+ path: "prompt_tokens",
4837
+ dest: "input_tokens",
4838
+ required: !0
4839
+ },
4840
+ {
4841
+ path: ["prompt_tokens_details", "cached_tokens"],
4842
+ dest: "cache_read_tokens",
4843
+ required: !1
4844
+ },
4845
+ {
4846
+ path: ["prompt_tokens_details", "audio_tokens"],
4847
+ dest: "input_audio_tokens",
4848
+ required: !1
4849
+ },
4850
+ {
4851
+ path: ["completion_tokens_details", "audio_tokens"],
4852
+ dest: "output_audio_tokens",
4853
+ required: !1
4854
+ },
4855
+ {
4856
+ path: "completion_tokens",
4857
+ dest: "output_tokens",
4858
+ required: !0
4859
+ }
4860
+ ]
4861
+ }
4862
+ ],
4863
+ models: [
4864
+ {
4865
+ id: "Qwen/Qwen3-32B",
4866
+ name: "Qwen3-32B",
4867
+ match: {
4868
+ equals: "qwen/qwen3-32b"
4869
+ },
4870
+ context_window: 131072,
4871
+ prices: {
4872
+ input_mtok: 0.29,
4873
+ output_mtok: 0.59
4874
+ }
4875
+ },
4876
+ {
4877
+ id: "meta-llama/Llama-3.3-70B-Instruct",
4878
+ name: "Llama-3.3-70B-Instruct",
4879
+ match: {
4880
+ equals: "meta-llama/llama-3.3-70b-instruct"
4881
+ },
4882
+ context_window: 131072,
4883
+ prices: {
4884
+ input_mtok: 0.59,
4885
+ output_mtok: 0.79
4886
+ }
4887
+ },
4888
+ {
4889
+ id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct",
4890
+ name: "Llama-4-Maverick-17B-128E-Instruct",
4891
+ match: {
4892
+ equals: "meta-llama/llama-4-maverick-17b-128e-instruct"
4893
+ },
4894
+ context_window: 131072,
4895
+ prices: {
4896
+ input_mtok: 0.2,
4897
+ output_mtok: 0.6
4898
+ }
4899
+ },
4900
+ {
4901
+ id: "meta-llama/Llama-4-Scout-17B-16E-Instruct",
4902
+ name: "Llama-4-Scout-17B-16E-Instruct",
4903
+ match: {
4904
+ equals: "meta-llama/llama-4-scout-17b-16e-instruct"
4905
+ },
4906
+ context_window: 131072,
4907
+ prices: {
4908
+ input_mtok: 0.11,
4909
+ output_mtok: 0.34
4910
+ }
4911
+ },
4912
+ {
4913
+ id: "meta-llama/Llama-Guard-4-12B",
4914
+ name: "Llama-Guard-4-12B",
4915
+ match: {
4916
+ equals: "meta-llama/llama-guard-4-12b"
4917
+ },
4918
+ context_window: 131072,
4919
+ prices: {
4920
+ input_mtok: 0.2,
4921
+ output_mtok: 0.2
4922
+ }
4923
+ },
4924
+ {
4925
+ id: "openai/gpt-oss-120b",
4926
+ name: "gpt-oss-120b",
4927
+ match: {
4928
+ equals: "openai/gpt-oss-120b"
4929
+ },
4930
+ context_window: 131072,
4931
+ prices: {
4932
+ input_mtok: 0.15,
4933
+ output_mtok: 0.75
4934
+ }
4935
+ },
4936
+ {
4937
+ id: "openai/gpt-oss-20b",
4938
+ name: "gpt-oss-20b",
4939
+ match: {
4940
+ equals: "openai/gpt-oss-20b"
4941
+ },
4942
+ context_window: 131072,
4943
+ prices: {
4944
+ input_mtok: 0.1,
4945
+ output_mtok: 0.5
4946
+ }
4947
+ }
4948
+ ]
4949
+ },
4950
+ {
4951
+ id: "huggingface_hyperbolic",
4952
+ name: "HuggingFace (hyperbolic)",
4953
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
4954
+ api_pattern: "https://router\\.huggingface\\.co/hyperbolic",
4955
+ provider_match: {
4956
+ and: [
4957
+ {
4958
+ contains: "huggingface"
4959
+ },
4960
+ {
4961
+ contains: "hyperbolic"
4962
+ }
4963
+ ]
4964
+ },
4965
+ extractors: [
4966
+ {
4967
+ api_flavor: "chat",
4968
+ root: "usage",
4969
+ model_path: "model",
4970
+ mappings: [
4971
+ {
4972
+ path: "prompt_tokens",
4973
+ dest: "input_tokens",
4974
+ required: !0
4975
+ },
4976
+ {
4977
+ path: ["prompt_tokens_details", "cached_tokens"],
4978
+ dest: "cache_read_tokens",
4979
+ required: !1
4980
+ },
4981
+ {
4982
+ path: ["prompt_tokens_details", "audio_tokens"],
4983
+ dest: "input_audio_tokens",
4984
+ required: !1
4985
+ },
4986
+ {
4987
+ path: ["completion_tokens_details", "audio_tokens"],
4988
+ dest: "output_audio_tokens",
4989
+ required: !1
4990
+ },
4991
+ {
4992
+ path: "completion_tokens",
4993
+ dest: "output_tokens",
4994
+ required: !0
4995
+ }
4996
+ ]
4997
+ }
4998
+ ],
4999
+ models: [
5000
+ {
5001
+ id: "Qwen/QwQ-32B",
5002
+ name: "QwQ-32B",
5003
+ match: {
5004
+ equals: "qwen/qwq-32b"
5005
+ },
5006
+ context_window: 131072,
5007
+ prices: {
5008
+ input_mtok: 0.4,
5009
+ output_mtok: 0.4
5010
+ }
5011
+ },
5012
+ {
5013
+ id: "Qwen/Qwen2.5-72B-Instruct",
5014
+ name: "Qwen2.5-72B-Instruct",
5015
+ match: {
5016
+ equals: "qwen/qwen2.5-72b-instruct"
5017
+ },
5018
+ context_window: 131072,
5019
+ prices: {
5020
+ input_mtok: 0.4,
5021
+ output_mtok: 0.4
5022
+ }
5023
+ },
5024
+ {
5025
+ id: "Qwen/Qwen2.5-Coder-32B-Instruct",
5026
+ name: "Qwen2.5-Coder-32B-Instruct",
5027
+ match: {
5028
+ equals: "qwen/qwen2.5-coder-32b-instruct"
5029
+ },
5030
+ context_window: 32768,
5031
+ prices: {
5032
+ input_mtok: 0.2,
5033
+ output_mtok: 0.2
5034
+ }
5035
+ },
5036
+ {
5037
+ id: "Qwen/Qwen2.5-VL-72B-Instruct",
5038
+ name: "Qwen2.5-VL-72B-Instruct",
5039
+ match: {
5040
+ equals: "qwen/qwen2.5-vl-72b-instruct"
5041
+ },
5042
+ context_window: 32768,
5043
+ prices: {
5044
+ input_mtok: 0.6,
5045
+ output_mtok: 0.6
5046
+ }
5047
+ },
5048
+ {
5049
+ id: "Qwen/Qwen2.5-VL-7B-Instruct",
5050
+ name: "Qwen2.5-VL-7B-Instruct",
5051
+ match: {
5052
+ equals: "qwen/qwen2.5-vl-7b-instruct"
5053
+ },
5054
+ context_window: 32768,
5055
+ prices: {
5056
+ input_mtok: 0.2,
5057
+ output_mtok: 0.2
5058
+ }
5059
+ },
5060
+ {
5061
+ id: "Qwen/Qwen3-235B-A22B-Instruct-2507",
5062
+ name: "Qwen3-235B-A22B-Instruct-2507",
5063
+ match: {
5064
+ equals: "qwen/qwen3-235b-a22b-instruct-2507"
5065
+ },
5066
+ context_window: 262144,
5067
+ prices: {
5068
+ input_mtok: 2,
5069
+ output_mtok: 2
5070
+ }
5071
+ },
5072
+ {
5073
+ id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
5074
+ name: "Qwen3-Coder-480B-A35B-Instruct",
5075
+ match: {
5076
+ equals: "qwen/qwen3-coder-480b-a35b-instruct"
5077
+ },
5078
+ context_window: 262144,
5079
+ prices: {
5080
+ input_mtok: 2,
5081
+ output_mtok: 2
5082
+ }
5083
+ },
5084
+ {
5085
+ id: "Qwen/Qwen3-Next-80B-A3B-Instruct",
5086
+ name: "Qwen3-Next-80B-A3B-Instruct",
5087
+ match: {
5088
+ equals: "qwen/qwen3-next-80b-a3b-instruct"
5089
+ },
5090
+ context_window: 262144,
5091
+ prices: {
5092
+ input_mtok: 0.3,
5093
+ output_mtok: 0.3
5094
+ }
5095
+ },
5096
+ {
5097
+ id: "Qwen/Qwen3-Next-80B-A3B-Thinking",
5098
+ name: "Qwen3-Next-80B-A3B-Thinking",
5099
+ match: {
5100
+ equals: "qwen/qwen3-next-80b-a3b-thinking"
5101
+ },
5102
+ context_window: 262144,
5103
+ prices: {
5104
+ input_mtok: 0.3,
5105
+ output_mtok: 0.3
5106
+ }
5107
+ },
5108
+ {
5109
+ id: "deepseek-ai/DeepSeek-R1",
5110
+ name: "DeepSeek-R1",
5111
+ match: {
5112
+ equals: "deepseek-ai/deepseek-r1"
5113
+ },
5114
+ context_window: 163840,
5115
+ prices: {
5116
+ input_mtok: 2,
5117
+ output_mtok: 2
5118
+ }
5119
+ },
5120
+ {
5121
+ id: "deepseek-ai/DeepSeek-R1-0528",
5122
+ name: "DeepSeek-R1-0528",
5123
+ match: {
5124
+ equals: "deepseek-ai/deepseek-r1-0528"
5125
+ },
5126
+ context_window: 163840,
5127
+ prices: {
5128
+ input_mtok: 3,
5129
+ output_mtok: 3
5130
+ }
5131
+ },
5132
+ {
5133
+ id: "deepseek-ai/DeepSeek-V3-0324",
5134
+ name: "DeepSeek-V3-0324",
5135
+ match: {
5136
+ equals: "deepseek-ai/deepseek-v3-0324"
5137
+ },
5138
+ context_window: 163840,
5139
+ prices: {
5140
+ input_mtok: 1.25,
5141
+ output_mtok: 1.25
5142
+ }
5143
+ },
5144
+ {
5145
+ id: "meta-llama/Llama-3.1-70B-Instruct",
5146
+ name: "Llama-3.1-70B-Instruct",
5147
+ match: {
5148
+ equals: "meta-llama/llama-3.1-70b-instruct"
5149
+ },
5150
+ context_window: 131072,
5151
+ prices: {
5152
+ input_mtok: 0.4,
5153
+ output_mtok: 0.4
5154
+ }
5155
+ },
5156
+ {
5157
+ id: "meta-llama/Llama-3.1-8B-Instruct",
5158
+ name: "Llama-3.1-8B-Instruct",
5159
+ match: {
5160
+ equals: "meta-llama/llama-3.1-8b-instruct"
5161
+ },
5162
+ context_window: 131072,
5163
+ prices: {
5164
+ input_mtok: 0.1,
5165
+ output_mtok: 0.1
5166
+ }
5167
+ },
5168
+ {
5169
+ id: "meta-llama/Llama-3.2-3B-Instruct",
5170
+ name: "Llama-3.2-3B-Instruct",
5171
+ match: {
5172
+ equals: "meta-llama/llama-3.2-3b-instruct"
5173
+ },
5174
+ context_window: 131072,
5175
+ prices: {
5176
+ input_mtok: 0.1,
5177
+ output_mtok: 0.1
5178
+ }
5179
+ },
5180
+ {
5181
+ id: "meta-llama/Llama-3.3-70B-Instruct",
5182
+ name: "Llama-3.3-70B-Instruct",
5183
+ match: {
5184
+ equals: "meta-llama/llama-3.3-70b-instruct"
5185
+ },
5186
+ context_window: 131072,
5187
+ prices: {
5188
+ input_mtok: 0.4,
5189
+ output_mtok: 0.4
5190
+ }
5191
+ },
5192
+ {
5193
+ id: "meta-llama/Meta-Llama-3-70B-Instruct",
5194
+ name: "Meta-Llama-3-70B-Instruct",
5195
+ match: {
5196
+ equals: "meta-llama/meta-llama-3-70b-instruct"
5197
+ },
5198
+ context_window: 8192,
5199
+ prices: {
5200
+ input_mtok: 0.4,
5201
+ output_mtok: 0.4
5202
+ }
5203
+ },
5204
+ {
5205
+ id: "openai/gpt-oss-120b",
5206
+ name: "gpt-oss-120b",
5207
+ match: {
5208
+ equals: "openai/gpt-oss-120b"
5209
+ },
5210
+ context_window: 131072,
5211
+ prices: {
5212
+ input_mtok: 0.3,
5213
+ output_mtok: 0.3
5214
+ }
5215
+ },
5216
+ {
5217
+ id: "openai/gpt-oss-20b",
5218
+ name: "gpt-oss-20b",
5219
+ match: {
5220
+ equals: "openai/gpt-oss-20b"
5221
+ },
5222
+ context_window: 131072,
5223
+ prices: {
5224
+ input_mtok: 0.1,
5225
+ output_mtok: 0.1
5226
+ }
5227
+ }
5228
+ ]
5229
+ },
5230
+ {
5231
+ id: "huggingface_nebius",
5232
+ name: "HuggingFace (nebius)",
5233
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
5234
+ api_pattern: "https://router\\.huggingface\\.co/nebius",
5235
+ provider_match: {
5236
+ and: [
5237
+ {
5238
+ contains: "huggingface"
5239
+ },
5240
+ {
5241
+ contains: "nebius"
5242
+ }
5243
+ ]
5244
+ },
5245
+ extractors: [
5246
+ {
5247
+ api_flavor: "chat",
5248
+ root: "usage",
5249
+ model_path: "model",
5250
+ mappings: [
5251
+ {
5252
+ path: "prompt_tokens",
5253
+ dest: "input_tokens",
5254
+ required: !0
5255
+ },
5256
+ {
5257
+ path: ["prompt_tokens_details", "cached_tokens"],
5258
+ dest: "cache_read_tokens",
5259
+ required: !1
5260
+ },
5261
+ {
5262
+ path: ["prompt_tokens_details", "audio_tokens"],
5263
+ dest: "input_audio_tokens",
5264
+ required: !1
5265
+ },
5266
+ {
5267
+ path: ["completion_tokens_details", "audio_tokens"],
5268
+ dest: "output_audio_tokens",
5269
+ required: !1
5270
+ },
5271
+ {
5272
+ path: "completion_tokens",
5273
+ dest: "output_tokens",
5274
+ required: !0
5275
+ }
5276
+ ]
5277
+ }
5278
+ ],
5279
+ models: [
5280
+ {
5281
+ id: "NousResearch/Hermes-4-405B",
5282
+ name: "Hermes-4-405B",
5283
+ match: {
5284
+ equals: "nousresearch/hermes-4-405b"
5285
+ },
5286
+ context_window: 131072,
5287
+ prices: {
5288
+ input_mtok: 1,
5289
+ output_mtok: 3
5290
+ }
5291
+ },
5292
+ {
5293
+ id: "NousResearch/Hermes-4-70B",
5294
+ name: "Hermes-4-70B",
5295
+ match: {
5296
+ equals: "nousresearch/hermes-4-70b"
5297
+ },
5298
+ context_window: 131072,
5299
+ prices: {
5300
+ input_mtok: 0.13,
5301
+ output_mtok: 0.4
5302
+ }
5303
+ },
5304
+ {
5305
+ id: "Qwen/Qwen2.5-Coder-7B",
5306
+ name: "Qwen2.5-Coder-7B",
5307
+ match: {
5308
+ equals: "qwen/qwen2.5-coder-7b"
5309
+ },
5310
+ context_window: 32768,
5311
+ prices: {
5312
+ input_mtok: 0.03,
5313
+ output_mtok: 0.09
5314
+ }
5315
+ },
5316
+ {
5317
+ id: "Qwen/Qwen2.5-VL-72B-Instruct",
5318
+ name: "Qwen2.5-VL-72B-Instruct",
5319
+ match: {
5320
+ equals: "qwen/qwen2.5-vl-72b-instruct"
5321
+ },
5322
+ context_window: 32e3,
5323
+ prices: {
5324
+ input_mtok: 0.25,
5325
+ output_mtok: 0.75
5326
+ }
5327
+ },
5328
+ {
5329
+ id: "Qwen/Qwen3-235B-A22B-Instruct-2507",
5330
+ name: "Qwen3-235B-A22B-Instruct-2507",
5331
+ match: {
5332
+ equals: "qwen/qwen3-235b-a22b-instruct-2507"
5333
+ },
5334
+ context_window: 262144,
5335
+ prices: {
5336
+ input_mtok: 0.2,
5337
+ output_mtok: 0.6
5338
+ }
5339
+ },
5340
+ {
5341
+ id: "Qwen/Qwen3-30B-A3B-Instruct-2507",
5342
+ name: "Qwen3-30B-A3B-Instruct-2507",
5343
+ match: {
5344
+ equals: "qwen/qwen3-30b-a3b-instruct-2507"
5345
+ },
5346
+ context_window: 262144,
5347
+ prices: {
5348
+ input_mtok: 0.1,
5349
+ output_mtok: 0.3
5350
+ }
5351
+ },
5352
+ {
5353
+ id: "Qwen/Qwen3-30B-A3B-Thinking-2507",
5354
+ name: "Qwen3-30B-A3B-Thinking-2507",
5355
+ match: {
5356
+ equals: "qwen/qwen3-30b-a3b-thinking-2507"
5357
+ },
5358
+ context_window: 262144,
5359
+ prices: {
5360
+ input_mtok: 0.1,
5361
+ output_mtok: 0.3
5362
+ }
5363
+ },
5364
+ {
5365
+ id: "Qwen/Qwen3-32B",
5366
+ name: "Qwen3-32B",
5367
+ match: {
5368
+ equals: "qwen/qwen3-32b"
5369
+ },
5370
+ context_window: 40960,
5371
+ prices: {
5372
+ input_mtok: 0.1,
5373
+ output_mtok: 0.3
5374
+ }
5375
+ },
5376
+ {
5377
+ id: "Qwen/Qwen3-Coder-30B-A3B-Instruct",
5378
+ name: "Qwen3-Coder-30B-A3B-Instruct",
5379
+ match: {
5380
+ equals: "qwen/qwen3-coder-30b-a3b-instruct"
5381
+ },
5382
+ context_window: 262144,
5383
+ prices: {
5384
+ input_mtok: 0.1,
5385
+ output_mtok: 0.3
5386
+ }
5387
+ },
5388
+ {
5389
+ id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
5390
+ name: "Qwen3-Coder-480B-A35B-Instruct",
5391
+ match: {
5392
+ equals: "qwen/qwen3-coder-480b-a35b-instruct"
5393
+ },
5394
+ context_window: 262144,
5395
+ prices: {
5396
+ input_mtok: 0.4,
5397
+ output_mtok: 1.8
5398
+ }
5399
+ },
5400
+ {
5401
+ id: "deepseek-ai/DeepSeek-R1-0528",
5402
+ name: "DeepSeek-R1-0528",
5403
+ match: {
5404
+ equals: "deepseek-ai/deepseek-r1-0528"
5405
+ },
5406
+ context_window: 163840,
5407
+ prices: {
5408
+ input_mtok: 0.8,
5409
+ output_mtok: 2.4
5410
+ }
5411
+ },
5412
+ {
5413
+ id: "deepseek-ai/DeepSeek-V3-0324",
5414
+ name: "DeepSeek-V3-0324",
5415
+ match: {
5416
+ equals: "deepseek-ai/deepseek-v3-0324"
5417
+ },
5418
+ context_window: 32768,
5419
+ prices: {
5420
+ input_mtok: 0.75,
5421
+ output_mtok: 2.25
5422
+ }
5423
+ },
5424
+ {
5425
+ id: "google/gemma-2-2b-it",
5426
+ name: "gemma-2-2b-it",
5427
+ match: {
5428
+ equals: "google/gemma-2-2b-it"
5429
+ },
5430
+ context_window: 8192,
5431
+ prices: {
5432
+ input_mtok: 0.02,
5433
+ output_mtok: 0.06
5434
+ }
5435
+ },
5436
+ {
5437
+ id: "google/gemma-2-9b-it",
5438
+ name: "gemma-2-9b-it",
5439
+ match: {
5440
+ equals: "google/gemma-2-9b-it"
5441
+ },
5442
+ context_window: 8192,
5443
+ prices: {
5444
+ input_mtok: 0.03,
5445
+ output_mtok: 0.09
5446
+ }
5447
+ },
5448
+ {
5449
+ id: "google/gemma-3-27b-it",
5450
+ name: "gemma-3-27b-it",
5451
+ match: {
5452
+ equals: "google/gemma-3-27b-it"
5453
+ },
5454
+ context_window: 11e4,
5455
+ prices: {
5456
+ input_mtok: 0.2,
5457
+ output_mtok: 0.6
5458
+ }
5459
+ },
5460
+ {
5461
+ id: "meta-llama/Llama-3.1-8B-Instruct",
5462
+ name: "Llama-3.1-8B-Instruct",
5463
+ match: {
5464
+ equals: "meta-llama/llama-3.1-8b-instruct"
5465
+ },
5466
+ context_window: 131072,
5467
+ prices: {
5468
+ input_mtok: 0.03,
5469
+ output_mtok: 0.09
5470
+ }
5471
+ },
5472
+ {
5473
+ id: "meta-llama/Llama-3.3-70B-Instruct",
5474
+ name: "Llama-3.3-70B-Instruct",
5475
+ match: {
5476
+ equals: "meta-llama/llama-3.3-70b-instruct"
5477
+ },
5478
+ context_window: 131072,
5479
+ prices: {
5480
+ input_mtok: 0.25,
5481
+ output_mtok: 0.75
5482
+ }
5483
+ },
5484
+ {
5485
+ id: "moonshotai/Kimi-K2-Instruct",
5486
+ name: "Kimi-K2-Instruct",
5487
+ match: {
5488
+ equals: "moonshotai/kimi-k2-instruct"
5489
+ },
5490
+ context_window: 131072,
5491
+ prices: {
5492
+ input_mtok: 0.5,
5493
+ output_mtok: 2.4
5494
+ }
5495
+ },
5496
+ {
5497
+ id: "nvidia/Llama-3_1-Nemotron-Ultra-253B-v1",
5498
+ name: "Llama-3_1-Nemotron-Ultra-253B-v1",
5499
+ match: {
5500
+ equals: "nvidia/llama-3_1-nemotron-ultra-253b-v1"
5501
+ },
5502
+ context_window: 131072,
5503
+ prices: {
5504
+ input_mtok: 0.6,
5505
+ output_mtok: 1.8
5506
+ }
5507
+ },
5508
+ {
5509
+ id: "openai/gpt-oss-120b",
5510
+ name: "gpt-oss-120b",
5511
+ match: {
5512
+ equals: "openai/gpt-oss-120b"
5513
+ },
5514
+ context_window: 131072,
5515
+ prices: {
5516
+ input_mtok: 0.15,
5517
+ output_mtok: 0.6
5518
+ }
5519
+ },
5520
+ {
5521
+ id: "openai/gpt-oss-20b",
5522
+ name: "gpt-oss-20b",
5523
+ match: {
5524
+ equals: "openai/gpt-oss-20b"
5525
+ },
5526
+ context_window: 131072,
5527
+ prices: {
5528
+ input_mtok: 0.05,
5529
+ output_mtok: 0.2
5530
+ }
5531
+ },
5532
+ {
5533
+ id: "zai-org/GLM-4.5",
5534
+ name: "GLM-4.5",
5535
+ match: {
5536
+ equals: "zai-org/glm-4.5"
5537
+ },
5538
+ context_window: 131072,
5539
+ prices: {
5540
+ input_mtok: 0.6,
5541
+ output_mtok: 2.2
5542
+ }
5543
+ },
5544
+ {
5545
+ id: "zai-org/GLM-4.5-Air",
5546
+ name: "GLM-4.5-Air",
5547
+ match: {
5548
+ equals: "zai-org/glm-4.5-air"
5549
+ },
5550
+ context_window: 131072,
5551
+ prices: {
5552
+ input_mtok: 0.2,
5553
+ output_mtok: 1.2
5554
+ }
5555
+ }
5556
+ ]
5557
+ },
5558
+ {
5559
+ id: "huggingface_novita",
5560
+ name: "HuggingFace (novita)",
5561
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
5562
+ api_pattern: "https://router\\.huggingface\\.co/novita",
5563
+ provider_match: {
5564
+ and: [
5565
+ {
5566
+ contains: "huggingface"
5567
+ },
5568
+ {
5569
+ contains: "novita"
5570
+ }
5571
+ ]
5572
+ },
5573
+ extractors: [
5574
+ {
5575
+ api_flavor: "chat",
5576
+ root: "usage",
5577
+ model_path: "model",
5578
+ mappings: [
5579
+ {
5580
+ path: "prompt_tokens",
5581
+ dest: "input_tokens",
5582
+ required: !0
5583
+ },
5584
+ {
5585
+ path: ["prompt_tokens_details", "cached_tokens"],
5586
+ dest: "cache_read_tokens",
5587
+ required: !1
5588
+ },
5589
+ {
5590
+ path: ["prompt_tokens_details", "audio_tokens"],
5591
+ dest: "input_audio_tokens",
5592
+ required: !1
5593
+ },
5594
+ {
5595
+ path: ["completion_tokens_details", "audio_tokens"],
5596
+ dest: "output_audio_tokens",
5597
+ required: !1
5598
+ },
5599
+ {
5600
+ path: "completion_tokens",
5601
+ dest: "output_tokens",
5602
+ required: !0
5603
+ }
5604
+ ]
5605
+ }
5606
+ ],
5607
+ models: [
5608
+ {
5609
+ id: "MiniMaxAI/MiniMax-M1-80k",
5610
+ name: "MiniMax-M1-80k",
5611
+ match: {
5612
+ equals: "minimaxai/minimax-m1-80k"
5613
+ },
5614
+ context_window: 1e6,
5615
+ prices: {
5616
+ input_mtok: 0.44,
5617
+ output_mtok: 1.76
5618
+ }
5619
+ },
5620
+ {
5621
+ id: "MiniMaxAI/MiniMax-M2",
5622
+ name: "MiniMax-M2",
5623
+ match: {
5624
+ equals: "minimaxai/minimax-m2"
5625
+ },
5626
+ context_window: 204800,
5627
+ prices: {
5628
+ input_mtok: 0.24,
5629
+ output_mtok: 0.96
5630
+ }
5631
+ },
5632
+ {
5633
+ id: "NousResearch/Hermes-2-Pro-Llama-3-8B",
5634
+ name: "Hermes-2-Pro-Llama-3-8B",
5635
+ match: {
5636
+ equals: "nousresearch/hermes-2-pro-llama-3-8b"
5637
+ },
5638
+ context_window: 8192,
5639
+ prices: {
5640
+ input_mtok: 0.14,
5641
+ output_mtok: 0.14
5642
+ }
5643
+ },
5644
+ {
5645
+ id: "Qwen/Qwen2.5-72B-Instruct",
5646
+ name: "Qwen2.5-72B-Instruct",
5647
+ match: {
5648
+ equals: "qwen/qwen2.5-72b-instruct"
5649
+ },
5650
+ context_window: 32e3,
5651
+ prices: {
5652
+ input_mtok: 0.304,
5653
+ output_mtok: 0.32
5654
+ }
5655
+ },
5656
+ {
5657
+ id: "Qwen/Qwen3-235B-A22B",
5658
+ name: "Qwen3-235B-A22B",
5659
+ match: {
5660
+ equals: "qwen/qwen3-235b-a22b"
5661
+ },
5662
+ context_window: 40960,
5663
+ prices: {
5664
+ input_mtok: 0.16,
5665
+ output_mtok: 0.64
5666
+ }
5667
+ },
5668
+ {
5669
+ id: "Qwen/Qwen3-235B-A22B-Instruct-2507",
5670
+ name: "Qwen3-235B-A22B-Instruct-2507",
5671
+ match: {
5672
+ equals: "qwen/qwen3-235b-a22b-instruct-2507"
5673
+ },
5674
+ context_window: 131072,
5675
+ prices: {
5676
+ input_mtok: 0.072,
5677
+ output_mtok: 0.464
5678
+ }
5679
+ },
5680
+ {
5681
+ id: "Qwen/Qwen3-235B-A22B-Thinking-2507",
5682
+ name: "Qwen3-235B-A22B-Thinking-2507",
5683
+ match: {
5684
+ equals: "qwen/qwen3-235b-a22b-thinking-2507"
5685
+ },
5686
+ context_window: 131072,
5687
+ prices: {
5688
+ input_mtok: 0.24,
5689
+ output_mtok: 2.4
5690
+ }
5691
+ },
5692
+ {
5693
+ id: "Qwen/Qwen3-30B-A3B",
5694
+ name: "Qwen3-30B-A3B",
5695
+ match: {
5696
+ equals: "qwen/qwen3-30b-a3b"
5697
+ },
5698
+ context_window: 40960,
5699
+ prices: {
5700
+ input_mtok: 0.072,
5701
+ output_mtok: 0.36
5702
+ }
5703
+ },
5704
+ {
5705
+ id: "Qwen/Qwen3-32B",
5706
+ name: "Qwen3-32B",
5707
+ match: {
5708
+ equals: "qwen/qwen3-32b"
5709
+ },
5710
+ context_window: 40960,
5711
+ prices: {
5712
+ input_mtok: 0.08,
5713
+ output_mtok: 0.36
5714
+ }
5715
+ },
5716
+ {
5717
+ id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
5718
+ name: "Qwen3-Coder-480B-A35B-Instruct",
5719
+ match: {
5720
+ equals: "qwen/qwen3-coder-480b-a35b-instruct"
5721
+ },
5722
+ context_window: 262144,
5723
+ prices: {
5724
+ input_mtok: 0.232,
5725
+ output_mtok: 0.96
5726
+ }
5727
+ },
5728
+ {
5729
+ id: "Qwen/Qwen3-Next-80B-A3B-Instruct",
5730
+ name: "Qwen3-Next-80B-A3B-Instruct",
5731
+ match: {
5732
+ equals: "qwen/qwen3-next-80b-a3b-instruct"
5733
+ },
5734
+ context_window: 131072,
5735
+ prices: {
5736
+ input_mtok: 0.12,
5737
+ output_mtok: 1.2
5738
+ }
5739
+ },
5740
+ {
5741
+ id: "Qwen/Qwen3-Next-80B-A3B-Thinking",
5742
+ name: "Qwen3-Next-80B-A3B-Thinking",
5743
+ match: {
5744
+ equals: "qwen/qwen3-next-80b-a3b-thinking"
5745
+ },
5746
+ context_window: 131072,
5747
+ prices: {
5748
+ input_mtok: 0.12,
5749
+ output_mtok: 1.2
5750
+ }
5751
+ },
5752
+ {
5753
+ id: "Qwen/Qwen3-VL-235B-A22B-Instruct",
5754
+ name: "Qwen3-VL-235B-A22B-Instruct",
5755
+ match: {
5756
+ equals: "qwen/qwen3-vl-235b-a22b-instruct"
5757
+ },
5758
+ context_window: 131072,
5759
+ prices: {
5760
+ input_mtok: 0.24,
5761
+ output_mtok: 1.2
5762
+ }
5763
+ },
5764
+ {
5765
+ id: "Qwen/Qwen3-VL-235B-A22B-Thinking",
5766
+ name: "Qwen3-VL-235B-A22B-Thinking",
5767
+ match: {
5768
+ equals: "qwen/qwen3-vl-235b-a22b-thinking"
5769
+ },
5770
+ context_window: 131072,
5771
+ prices: {
5772
+ input_mtok: 0.784,
5773
+ output_mtok: 3.16
5774
+ }
5775
+ },
5776
+ {
5777
+ id: "Qwen/Qwen3-VL-30B-A3B-Instruct",
5778
+ name: "Qwen3-VL-30B-A3B-Instruct",
5779
+ match: {
5780
+ equals: "qwen/qwen3-vl-30b-a3b-instruct"
5781
+ },
5782
+ context_window: 131072,
5783
+ prices: {
5784
+ input_mtok: 0.16,
5785
+ output_mtok: 0.56
5786
+ }
5787
+ },
5788
+ {
5789
+ id: "Qwen/Qwen3-VL-30B-A3B-Thinking",
5790
+ name: "Qwen3-VL-30B-A3B-Thinking",
5791
+ match: {
5792
+ equals: "qwen/qwen3-vl-30b-a3b-thinking"
5793
+ },
5794
+ context_window: 131072,
5795
+ prices: {
5796
+ input_mtok: 0.16,
5797
+ output_mtok: 0.8
5798
+ }
5799
+ },
5800
+ {
5801
+ id: "Qwen/Qwen3-VL-8B-Instruct",
5802
+ name: "Qwen3-VL-8B-Instruct",
5803
+ match: {
5804
+ equals: "qwen/qwen3-vl-8b-instruct"
5805
+ },
5806
+ context_window: 131072,
5807
+ prices: {
5808
+ input_mtok: 0.064,
5809
+ output_mtok: 0.4
5810
+ }
5811
+ },
5812
+ {
5813
+ id: "Sao10K/L3-70B-Euryale-v2.1",
5814
+ name: "L3-70B-Euryale-v2.1",
5815
+ match: {
5816
+ equals: "sao10k/l3-70b-euryale-v2.1"
5817
+ },
5818
+ context_window: 8192,
5819
+ prices: {
5820
+ input_mtok: 1.48,
5821
+ output_mtok: 1.48
5822
+ }
5823
+ },
5824
+ {
5825
+ id: "Sao10K/L3-8B-Lunaris-v1",
5826
+ name: "L3-8B-Lunaris-v1",
5827
+ match: {
5828
+ equals: "sao10k/l3-8b-lunaris-v1"
5829
+ },
5830
+ context_window: 8192,
5831
+ prices: {
5832
+ input_mtok: 0.05,
5833
+ output_mtok: 0.05
5834
+ }
5835
+ },
5836
+ {
5837
+ id: "Sao10K/L3-8B-Stheno-v3.2",
5838
+ name: "L3-8B-Stheno-v3.2",
5839
+ match: {
5840
+ equals: "sao10k/l3-8b-stheno-v3.2"
5841
+ },
5842
+ context_window: 8192,
5843
+ prices: {
5844
+ input_mtok: 0.05,
5845
+ output_mtok: 0.05
5846
+ }
5847
+ },
5848
+ {
5849
+ id: "alpindale/WizardLM-2-8x22B",
5850
+ name: "WizardLM-2-8x22B",
5851
+ match: {
5852
+ equals: "alpindale/wizardlm-2-8x22b"
5853
+ },
5854
+ context_window: 65535,
5855
+ prices: {
5856
+ input_mtok: 0.496,
5857
+ output_mtok: 0.496
5858
+ }
5859
+ },
5860
+ {
5861
+ id: "baichuan-inc/Baichuan-M2-32B",
5862
+ name: "Baichuan-M2-32B",
5863
+ match: {
5864
+ equals: "baichuan-inc/baichuan-m2-32b"
5865
+ },
5866
+ context_window: 131072,
5867
+ prices: {
5868
+ input_mtok: 0.056,
5869
+ output_mtok: 0.056
5870
+ }
5871
+ },
5872
+ {
5873
+ id: "baidu/ERNIE-4.5-21B-A3B-PT",
5874
+ name: "ERNIE-4.5-21B-A3B-PT",
5875
+ match: {
5876
+ equals: "baidu/ernie-4.5-21b-a3b-pt"
5877
+ },
5878
+ context_window: 12e4,
5879
+ prices: {
5880
+ input_mtok: 0.056,
5881
+ output_mtok: 0.224
5882
+ }
5883
+ },
5884
+ {
5885
+ id: "baidu/ERNIE-4.5-300B-A47B-Base-PT",
5886
+ name: "ERNIE-4.5-300B-A47B-Base-PT",
5887
+ match: {
5888
+ equals: "baidu/ernie-4.5-300b-a47b-base-pt"
5889
+ },
5890
+ context_window: 123e3,
5891
+ prices: {
5892
+ input_mtok: 0.224,
5893
+ output_mtok: 0.88
5894
+ }
5895
+ },
5896
+ {
5897
+ id: "baidu/ERNIE-4.5-VL-28B-A3B-PT",
5898
+ name: "ERNIE-4.5-VL-28B-A3B-PT",
5899
+ match: {
5900
+ equals: "baidu/ernie-4.5-vl-28b-a3b-pt"
5901
+ },
5902
+ context_window: 3e4,
5903
+ prices: {
5904
+ input_mtok: 0.112,
5905
+ output_mtok: 0.448
5906
+ }
5907
+ },
5908
+ {
5909
+ id: "baidu/ERNIE-4.5-VL-424B-A47B-Base-PT",
5910
+ name: "ERNIE-4.5-VL-424B-A47B-Base-PT",
5911
+ match: {
5912
+ equals: "baidu/ernie-4.5-vl-424b-a47b-base-pt"
5913
+ },
5914
+ context_window: 123e3,
5915
+ prices: {
5916
+ input_mtok: 0.336,
5917
+ output_mtok: 1
5918
+ }
5919
+ },
5920
+ {
5921
+ id: "deepseek-ai/DeepSeek-Prover-V2-671B",
5922
+ name: "DeepSeek-Prover-V2-671B",
5923
+ match: {
5924
+ equals: "deepseek-ai/deepseek-prover-v2-671b"
5925
+ },
5926
+ context_window: 16e4,
5927
+ prices: {
5928
+ input_mtok: 0.56,
5929
+ output_mtok: 2
5930
+ }
5931
+ },
5932
+ {
5933
+ id: "deepseek-ai/DeepSeek-R1",
5934
+ name: "DeepSeek-R1",
5935
+ match: {
5936
+ or: [
5937
+ {
5938
+ equals: "deepseek-ai/deepseek-r1"
5939
+ },
5940
+ {
5941
+ equals: "deepseek-ai/deepseek-r1-0528"
5942
+ }
5943
+ ]
5944
+ },
5945
+ context_window: 64e3,
5946
+ prices: {
5947
+ input_mtok: 0.56,
5948
+ output_mtok: 2
5949
+ }
5950
+ },
5951
+ {
5952
+ id: "deepseek-ai/DeepSeek-R1-0528-Qwen3-8B",
5953
+ name: "DeepSeek-R1-0528-Qwen3-8B",
5954
+ match: {
5955
+ equals: "deepseek-ai/deepseek-r1-0528-qwen3-8b"
5956
+ },
5957
+ context_window: 128e3,
5958
+ prices: {
5959
+ input_mtok: 0.048,
5960
+ output_mtok: 0.072
5961
+ }
5962
+ },
5963
+ {
5964
+ id: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
5965
+ name: "DeepSeek-R1-Distill-Llama-70B",
5966
+ match: {
5967
+ equals: "deepseek-ai/deepseek-r1-distill-llama-70b"
5968
+ },
5969
+ context_window: 8192,
5970
+ prices: {
5971
+ input_mtok: 0.64,
5972
+ output_mtok: 0.64
5973
+ }
5974
+ },
5975
+ {
5976
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B",
5977
+ name: "DeepSeek-R1-Distill-Qwen-14B",
5978
+ match: {
5979
+ equals: "deepseek-ai/deepseek-r1-distill-qwen-14b"
5980
+ },
5981
+ context_window: 32768,
5982
+ prices: {
5983
+ input_mtok: 0.12,
5984
+ output_mtok: 0.12
5985
+ }
5986
+ },
5987
+ {
5988
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",
5989
+ name: "DeepSeek-R1-Distill-Qwen-32B",
5990
+ match: {
5991
+ equals: "deepseek-ai/deepseek-r1-distill-qwen-32b"
5992
+ },
5993
+ context_window: 64e3,
5994
+ prices: {
5995
+ input_mtok: 0.24,
5996
+ output_mtok: 0.24
5997
+ }
5998
+ },
5999
+ {
6000
+ id: "deepseek-ai/DeepSeek-V3",
6001
+ name: "DeepSeek-V3",
6002
+ match: {
6003
+ equals: "deepseek-ai/deepseek-v3"
6004
+ },
6005
+ context_window: 64e3,
6006
+ prices: {
6007
+ input_mtok: 0.32,
6008
+ output_mtok: 1.04
6009
+ }
6010
+ },
6011
+ {
6012
+ id: "deepseek-ai/DeepSeek-V3-0324",
6013
+ name: "DeepSeek-V3-0324",
6014
+ match: {
6015
+ equals: "deepseek-ai/deepseek-v3-0324"
6016
+ },
6017
+ context_window: 163840,
6018
+ prices: {
6019
+ input_mtok: 0.216,
6020
+ output_mtok: 0.896
6021
+ }
6022
+ },
6023
+ {
6024
+ id: "deepseek-ai/DeepSeek-V3.1",
6025
+ name: "DeepSeek-V3.1",
6026
+ match: {
6027
+ or: [
6028
+ {
6029
+ equals: "deepseek-ai/deepseek-v3.1"
6030
+ },
6031
+ {
6032
+ equals: "deepseek-ai/deepseek-v3.1-terminus"
6033
+ }
6034
+ ]
6035
+ },
6036
+ context_window: 131072,
6037
+ prices: {
6038
+ input_mtok: 0.216,
6039
+ output_mtok: 0.8
6040
+ }
6041
+ },
6042
+ {
6043
+ id: "deepseek-ai/DeepSeek-V3.2-Exp",
6044
+ name: "DeepSeek-V3.2-Exp",
6045
+ match: {
6046
+ equals: "deepseek-ai/deepseek-v3.2-exp"
6047
+ },
6048
+ context_window: 163840,
6049
+ prices: {
6050
+ input_mtok: 0.216,
6051
+ output_mtok: 0.328
6052
+ }
6053
+ },
6054
+ {
6055
+ id: "meta-llama/Llama-3.1-8B-Instruct",
6056
+ name: "Llama-3.1-8B-Instruct",
6057
+ match: {
6058
+ equals: "meta-llama/llama-3.1-8b-instruct"
6059
+ },
6060
+ context_window: 16384,
6061
+ prices: {
6062
+ input_mtok: 0.02,
6063
+ output_mtok: 0.05
6064
+ }
6065
+ },
6066
+ {
6067
+ id: "meta-llama/Llama-3.2-3B-Instruct",
6068
+ name: "Llama-3.2-3B-Instruct",
6069
+ match: {
6070
+ equals: "meta-llama/llama-3.2-3b-instruct"
6071
+ },
6072
+ context_window: 32768,
6073
+ prices: {
6074
+ input_mtok: 0.024,
6075
+ output_mtok: 0.04
6076
+ }
6077
+ },
6078
+ {
6079
+ id: "meta-llama/Llama-3.3-70B-Instruct",
6080
+ name: "Llama-3.3-70B-Instruct",
6081
+ match: {
6082
+ equals: "meta-llama/llama-3.3-70b-instruct"
6083
+ },
6084
+ context_window: 131072,
6085
+ prices: {
6086
+ input_mtok: 0.104,
6087
+ output_mtok: 0.312
6088
+ }
6089
+ },
6090
+ {
6091
+ id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
6092
+ name: "Llama-4-Maverick-17B-128E-Instruct-FP8",
6093
+ match: {
6094
+ equals: "meta-llama/llama-4-maverick-17b-128e-instruct-fp8"
6095
+ },
6096
+ context_window: 1048576,
6097
+ prices: {
6098
+ input_mtok: 0.136,
6099
+ output_mtok: 0.68
6100
+ }
6101
+ },
6102
+ {
6103
+ id: "meta-llama/Llama-4-Scout-17B-16E-Instruct",
6104
+ name: "Llama-4-Scout-17B-16E-Instruct",
6105
+ match: {
6106
+ equals: "meta-llama/llama-4-scout-17b-16e-instruct"
6107
+ },
6108
+ context_window: 131072,
6109
+ prices: {
6110
+ input_mtok: 0.08,
6111
+ output_mtok: 0.4
6112
+ }
6113
+ },
6114
+ {
6115
+ id: "meta-llama/Meta-Llama-3-70B-Instruct",
6116
+ name: "Meta-Llama-3-70B-Instruct",
6117
+ match: {
6118
+ equals: "meta-llama/meta-llama-3-70b-instruct"
6119
+ },
6120
+ context_window: 8192,
6121
+ prices: {
6122
+ input_mtok: 0.51,
6123
+ output_mtok: 0.74
6124
+ }
6125
+ },
6126
+ {
6127
+ id: "meta-llama/Meta-Llama-3-8B-Instruct",
6128
+ name: "Meta-Llama-3-8B-Instruct",
6129
+ match: {
6130
+ equals: "meta-llama/meta-llama-3-8b-instruct"
6131
+ },
6132
+ context_window: 8192,
6133
+ prices: {
6134
+ input_mtok: 0.032,
6135
+ output_mtok: 0.032
6136
+ }
6137
+ },
6138
+ {
6139
+ id: "moonshotai/Kimi-K2-Instruct",
6140
+ name: "Kimi-K2-Instruct",
6141
+ match: {
6142
+ equals: "moonshotai/kimi-k2-instruct"
6143
+ },
6144
+ context_window: 131072,
6145
+ prices: {
6146
+ input_mtok: 0.456,
6147
+ output_mtok: 1.84
6148
+ }
6149
+ },
6150
+ {
6151
+ id: "moonshotai/Kimi-K2-Instruct-0905",
6152
+ name: "Kimi-K2-Instruct-0905",
6153
+ match: {
6154
+ equals: "moonshotai/kimi-k2-instruct-0905"
6155
+ },
6156
+ context_window: 262144,
6157
+ prices: {
6158
+ input_mtok: 0.48,
6159
+ output_mtok: 2
6160
+ }
6161
+ },
6162
+ {
6163
+ id: "moonshotai/Kimi-K2-Thinking",
6164
+ name: "Kimi-K2-Thinking",
6165
+ match: {
6166
+ equals: "moonshotai/kimi-k2-thinking"
6167
+ },
6168
+ context_window: 262144,
6169
+ prices: {
6170
+ input_mtok: 0.48,
6171
+ output_mtok: 2
6172
+ }
6173
+ },
6174
+ {
6175
+ id: "openai/gpt-oss-120b",
6176
+ name: "gpt-oss-120b",
6177
+ match: {
6178
+ equals: "openai/gpt-oss-120b"
6179
+ },
6180
+ context_window: 131072,
6181
+ prices: {
6182
+ input_mtok: 0.04,
6183
+ output_mtok: 0.2
6184
+ }
6185
+ },
6186
+ {
6187
+ id: "openai/gpt-oss-20b",
6188
+ name: "gpt-oss-20b",
6189
+ match: {
6190
+ equals: "openai/gpt-oss-20b"
6191
+ },
6192
+ context_window: 131072,
6193
+ prices: {
6194
+ input_mtok: 0.032,
6195
+ output_mtok: 0.12
6196
+ }
6197
+ },
6198
+ {
6199
+ id: "zai-org/GLM-4-32B-0414",
6200
+ name: "GLM-4-32B-0414",
6201
+ match: {
6202
+ equals: "zai-org/glm-4-32b-0414"
6203
+ },
6204
+ context_window: 32e3,
6205
+ prices: {
6206
+ input_mtok: 0.55,
6207
+ output_mtok: 1.66
6208
+ }
6209
+ },
6210
+ {
6211
+ id: "zai-org/GLM-4.1V-9B-Thinking",
6212
+ name: "GLM-4.1V-9B-Thinking",
6213
+ match: {
6214
+ equals: "zai-org/glm-4.1v-9b-thinking"
6215
+ },
6216
+ context_window: 65536,
6217
+ prices: {
6218
+ input_mtok: 0.028,
6219
+ output_mtok: 0.1104
6220
+ }
6221
+ },
6222
+ {
6223
+ id: "zai-org/GLM-4.5",
6224
+ name: "GLM-4.5",
6225
+ match: {
6226
+ equals: "zai-org/glm-4.5"
6227
+ },
6228
+ context_window: 131072,
6229
+ prices: {
6230
+ input_mtok: 0.48,
6231
+ output_mtok: 1.76
6232
+ }
6233
+ },
6234
+ {
6235
+ id: "zai-org/GLM-4.5-Air",
6236
+ name: "GLM-4.5-Air",
6237
+ match: {
6238
+ equals: "zai-org/glm-4.5-air"
6239
+ },
6240
+ context_window: 131072,
6241
+ prices: {
6242
+ input_mtok: 0.104,
6243
+ output_mtok: 0.68
6244
+ }
6245
+ },
6246
+ {
6247
+ id: "zai-org/GLM-4.5V",
6248
+ name: "GLM-4.5V",
6249
+ match: {
6250
+ equals: "zai-org/glm-4.5v"
6251
+ },
6252
+ context_window: 65536,
6253
+ prices: {
6254
+ input_mtok: 0.48,
6255
+ output_mtok: 1.44
6256
+ }
6257
+ },
6258
+ {
6259
+ id: "zai-org/GLM-4.6",
6260
+ name: "GLM-4.6",
6261
+ match: {
6262
+ equals: "zai-org/glm-4.6"
6263
+ },
6264
+ context_window: 204800,
6265
+ prices: {
6266
+ input_mtok: 0.48,
6267
+ output_mtok: 1.76
6268
+ }
6269
+ }
6270
+ ]
6271
+ },
6272
+ {
6273
+ id: "huggingface_nscale",
6274
+ name: "HuggingFace (nscale)",
6275
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
6276
+ api_pattern: "https://router\\.huggingface\\.co/nscale",
6277
+ provider_match: {
6278
+ and: [
6279
+ {
6280
+ contains: "huggingface"
6281
+ },
6282
+ {
6283
+ contains: "nscale"
6284
+ }
6285
+ ]
6286
+ },
6287
+ extractors: [
6288
+ {
6289
+ api_flavor: "chat",
6290
+ root: "usage",
6291
+ model_path: "model",
6292
+ mappings: [
6293
+ {
6294
+ path: "prompt_tokens",
6295
+ dest: "input_tokens",
6296
+ required: !0
6297
+ },
6298
+ {
6299
+ path: ["prompt_tokens_details", "cached_tokens"],
6300
+ dest: "cache_read_tokens",
6301
+ required: !1
6302
+ },
6303
+ {
6304
+ path: ["prompt_tokens_details", "audio_tokens"],
6305
+ dest: "input_audio_tokens",
6306
+ required: !1
6307
+ },
6308
+ {
6309
+ path: ["completion_tokens_details", "audio_tokens"],
6310
+ dest: "output_audio_tokens",
6311
+ required: !1
6312
+ },
6313
+ {
6314
+ path: "completion_tokens",
6315
+ dest: "output_tokens",
6316
+ required: !0
6317
+ }
6318
+ ]
6319
+ }
6320
+ ],
6321
+ models: [
6322
+ {
6323
+ id: "Qwen/QwQ-32B",
6324
+ name: "QwQ-32B",
6325
+ match: {
6326
+ equals: "qwen/qwq-32b"
6327
+ },
6328
+ context_window: 131072,
6329
+ prices: {
6330
+ input_mtok: 0.18,
6331
+ output_mtok: 0.2
6332
+ }
6333
+ },
6334
+ {
6335
+ id: "Qwen/Qwen2.5-Coder-32B-Instruct",
6336
+ name: "Qwen2.5-Coder-32B-Instruct",
6337
+ match: {
6338
+ equals: "qwen/qwen2.5-coder-32b-instruct"
6339
+ },
6340
+ context_window: 131072,
6341
+ prices: {
6342
+ input_mtok: 0.06,
6343
+ output_mtok: 0.2
6344
+ }
6345
+ },
6346
+ {
6347
+ id: "Qwen/Qwen2.5-Coder-3B-Instruct",
6348
+ name: "Qwen2.5-Coder-3B-Instruct",
6349
+ match: {
6350
+ equals: "qwen/qwen2.5-coder-3b-instruct"
6351
+ },
6352
+ context_window: 32768,
6353
+ prices: {
6354
+ input_mtok: 0.01,
6355
+ output_mtok: 0.03
6356
+ }
6357
+ },
6358
+ {
6359
+ id: "Qwen/Qwen2.5-Coder-7B-Instruct",
6360
+ name: "Qwen2.5-Coder-7B-Instruct",
6361
+ match: {
6362
+ equals: "qwen/qwen2.5-coder-7b-instruct"
6363
+ },
6364
+ context_window: 131072,
6365
+ prices: {
6366
+ input_mtok: 0.01,
6367
+ output_mtok: 0.03
6368
+ }
6369
+ },
6370
+ {
6371
+ id: "Qwen/Qwen3-14B",
6372
+ name: "Qwen3-14B",
6373
+ match: {
6374
+ equals: "qwen/qwen3-14b"
6375
+ },
6376
+ context_window: 40960,
6377
+ prices: {
6378
+ input_mtok: 0.07,
6379
+ output_mtok: 0.2
6380
+ }
6381
+ },
6382
+ {
6383
+ id: "Qwen/Qwen3-235B-A22B",
6384
+ name: "Qwen3-235B-A22B",
6385
+ match: {
6386
+ or: [
6387
+ {
6388
+ equals: "qwen/qwen3-235b-a22b"
6389
+ },
6390
+ {
6391
+ equals: "qwen/qwen3-235b-a22b-instruct-2507"
6392
+ }
6393
+ ]
6394
+ },
6395
+ context_window: 32e3,
6396
+ prices: {
6397
+ input_mtok: 0.2,
6398
+ output_mtok: 0.6
6399
+ }
6400
+ },
6401
+ {
6402
+ id: "Qwen/Qwen3-32B",
6403
+ name: "Qwen3-32B",
6404
+ match: {
6405
+ equals: "qwen/qwen3-32b"
6406
+ },
6407
+ context_window: 40960,
6408
+ prices: {
6409
+ input_mtok: 0.08,
6410
+ output_mtok: 0.25
6411
+ }
6412
+ },
6413
+ {
6414
+ id: "Qwen/Qwen3-4B-Instruct-2507",
6415
+ name: "Qwen3-4B-Instruct-2507",
6416
+ match: {
6417
+ equals: "qwen/qwen3-4b-instruct-2507"
6418
+ },
6419
+ context_window: 262144,
6420
+ prices: {
6421
+ input_mtok: 0.01,
6422
+ output_mtok: 0.03
6423
+ }
6424
+ },
6425
+ {
6426
+ id: "Qwen/Qwen3-4B-Thinking-2507",
6427
+ name: "Qwen3-4B-Thinking-2507",
6428
+ match: {
6429
+ equals: "qwen/qwen3-4b-thinking-2507"
6430
+ },
6431
+ context_window: 262144,
6432
+ prices: {
6433
+ input_mtok: 0.01,
6434
+ output_mtok: 0.03
6435
+ }
6436
+ },
6437
+ {
6438
+ id: "Qwen/Qwen3-8B",
6439
+ name: "Qwen3-8B",
6440
+ match: {
6441
+ equals: "qwen/qwen3-8b"
6442
+ },
6443
+ context_window: 40960,
6444
+ prices: {
6445
+ input_mtok: 0.07,
6446
+ output_mtok: 0.18
6447
+ }
6448
+ },
6449
+ {
6450
+ id: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
6451
+ name: "DeepSeek-R1-Distill-Llama-70B",
6452
+ match: {
6453
+ equals: "deepseek-ai/deepseek-r1-distill-llama-70b"
6454
+ },
6455
+ context_window: 131072,
6456
+ prices: {
6457
+ input_mtok: 0.75,
6458
+ output_mtok: 0.75
6459
+ }
6460
+ },
6461
+ {
6462
+ id: "deepseek-ai/DeepSeek-R1-Distill-Llama-8B",
6463
+ name: "DeepSeek-R1-Distill-Llama-8B",
6464
+ match: {
6465
+ equals: "deepseek-ai/deepseek-r1-distill-llama-8b"
6466
+ },
6467
+ context_window: 131072,
6468
+ prices: {
6469
+ input_mtok: 0.05,
6470
+ output_mtok: 0.05
6471
+ }
6472
+ },
6473
+ {
6474
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B",
6475
+ name: "DeepSeek-R1-Distill-Qwen-1.5B",
6476
+ match: {
6477
+ equals: "deepseek-ai/deepseek-r1-distill-qwen-1.5b"
6478
+ },
6479
+ context_window: 131072,
6480
+ prices: {
6481
+ input_mtok: 0.1,
6482
+ output_mtok: 0.1
6483
+ }
6484
+ },
6485
+ {
6486
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B",
6487
+ name: "DeepSeek-R1-Distill-Qwen-14B",
6488
+ match: {
6489
+ equals: "deepseek-ai/deepseek-r1-distill-qwen-14b"
6490
+ },
6491
+ context_window: 131072,
6492
+ prices: {
6493
+ input_mtok: 0.2,
6494
+ output_mtok: 0.2
6495
+ }
6496
+ },
6497
+ {
6498
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",
6499
+ name: "DeepSeek-R1-Distill-Qwen-32B",
6500
+ match: {
6501
+ equals: "deepseek-ai/deepseek-r1-distill-qwen-32b"
6502
+ },
6503
+ context_window: 131072,
6504
+ prices: {
6505
+ input_mtok: 0.3,
6506
+ output_mtok: 0.3
6507
+ }
6508
+ },
6509
+ {
6510
+ id: "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B",
6511
+ name: "DeepSeek-R1-Distill-Qwen-7B",
6512
+ match: {
6513
+ equals: "deepseek-ai/deepseek-r1-distill-qwen-7b"
6514
+ },
6515
+ context_window: 131072,
6516
+ prices: {
6517
+ input_mtok: 0.15,
6518
+ output_mtok: 0.15
6519
+ }
6520
+ },
6521
+ {
6522
+ id: "meta-llama/Llama-3.1-8B-Instruct",
6523
+ name: "Llama-3.1-8B-Instruct",
6524
+ match: {
6525
+ equals: "meta-llama/llama-3.1-8b-instruct"
6526
+ },
6527
+ context_window: 131072,
6528
+ prices: {
6529
+ input_mtok: 0.06,
6530
+ output_mtok: 0.06
6531
+ }
6532
+ },
6533
+ {
6534
+ id: "meta-llama/Llama-3.3-70B-Instruct",
6535
+ name: "Llama-3.3-70B-Instruct",
6536
+ match: {
6537
+ equals: "meta-llama/llama-3.3-70b-instruct"
6538
+ },
6539
+ context_window: 131072,
6540
+ prices: {
6541
+ input_mtok: 0.4,
6542
+ output_mtok: 0.4
6543
+ }
6544
+ },
6545
+ {
6546
+ id: "meta-llama/Llama-4-Scout-17B-16E-Instruct",
6547
+ name: "Llama-4-Scout-17B-16E-Instruct",
6548
+ match: {
6549
+ equals: "meta-llama/llama-4-scout-17b-16e-instruct"
6550
+ },
6551
+ context_window: 89e4,
6552
+ prices: {
6553
+ input_mtok: 0.09,
6554
+ output_mtok: 0.29
6555
+ }
6556
+ },
6557
+ {
6558
+ id: "openai/gpt-oss-120b",
6559
+ name: "gpt-oss-120b",
6560
+ match: {
6561
+ equals: "openai/gpt-oss-120b"
6562
+ },
6563
+ context_window: 131072,
6564
+ prices: {
6565
+ input_mtok: 0.1,
6566
+ output_mtok: 0.4
6567
+ }
6568
+ },
6569
+ {
6570
+ id: "openai/gpt-oss-20b",
6571
+ name: "gpt-oss-20b",
6572
+ match: {
6573
+ equals: "openai/gpt-oss-20b"
6574
+ },
6575
+ context_window: 131072,
6576
+ prices: {
6577
+ input_mtok: 0.05,
6578
+ output_mtok: 0.2
6579
+ }
6580
+ }
6581
+ ]
6582
+ },
6583
+ {
6584
+ id: "huggingface_publicai",
6585
+ name: "HuggingFace (publicai)",
6586
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
6587
+ api_pattern: "https://router\\.huggingface\\.co/publicai",
6588
+ provider_match: {
6589
+ and: [
6590
+ {
6591
+ contains: "huggingface"
6592
+ },
6593
+ {
6594
+ contains: "publicai"
6595
+ }
6596
+ ]
6597
+ },
6598
+ extractors: [
6599
+ {
6600
+ api_flavor: "chat",
6601
+ root: "usage",
6602
+ model_path: "model",
6603
+ mappings: [
6604
+ {
6605
+ path: "prompt_tokens",
6606
+ dest: "input_tokens",
6607
+ required: !0
6608
+ },
6609
+ {
6610
+ path: ["prompt_tokens_details", "cached_tokens"],
6611
+ dest: "cache_read_tokens",
6612
+ required: !1
6613
+ },
6614
+ {
6615
+ path: ["prompt_tokens_details", "audio_tokens"],
6616
+ dest: "input_audio_tokens",
6617
+ required: !1
6618
+ },
6619
+ {
6620
+ path: ["completion_tokens_details", "audio_tokens"],
6621
+ dest: "output_audio_tokens",
6622
+ required: !1
6623
+ },
6624
+ {
6625
+ path: "completion_tokens",
6626
+ dest: "output_tokens",
6627
+ required: !0
6628
+ }
6629
+ ]
6630
+ }
6631
+ ],
6632
+ models: [
6633
+ {
6634
+ id: "aisingapore/Gemma-SEA-LION-v4-27B-IT",
6635
+ name: "Gemma-SEA-LION-v4-27B-IT",
6636
+ match: {
6637
+ equals: "aisingapore/gemma-sea-lion-v4-27b-it"
6638
+ },
6639
+ prices: {}
6640
+ },
6641
+ {
6642
+ id: "aisingapore/Qwen-SEA-LION-v4-32B-IT",
6643
+ name: "Qwen-SEA-LION-v4-32B-IT",
6644
+ match: {
6645
+ equals: "aisingapore/qwen-sea-lion-v4-32b-it"
6646
+ },
6647
+ prices: {}
6648
+ },
6649
+ {
6650
+ id: "allenai/Olmo-3-7B-Instruct",
6651
+ name: "Olmo-3-7B-Instruct",
6652
+ match: {
6653
+ equals: "allenai/olmo-3-7b-instruct"
6654
+ },
6655
+ prices: {}
6656
+ },
6657
+ {
6658
+ id: "swiss-ai/Apertus-70B-Instruct-2509",
6659
+ name: "Apertus-70B-Instruct-2509",
6660
+ match: {
6661
+ equals: "swiss-ai/apertus-70b-instruct-2509"
6662
+ },
6663
+ prices: {}
6664
+ },
6665
+ {
6666
+ id: "swiss-ai/Apertus-8B-Instruct-2509",
6667
+ name: "Apertus-8B-Instruct-2509",
6668
+ match: {
6669
+ equals: "swiss-ai/apertus-8b-instruct-2509"
6670
+ },
6671
+ prices: {}
6672
+ }
6673
+ ]
6674
+ },
6675
+ {
6676
+ id: "huggingface_sambanova",
6677
+ name: "HuggingFace (sambanova)",
6678
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
6679
+ api_pattern: "https://router\\.huggingface\\.co/sambanova",
6680
+ provider_match: {
6681
+ and: [
6682
+ {
6683
+ contains: "huggingface"
6684
+ },
6685
+ {
6686
+ contains: "sambanova"
6687
+ }
6688
+ ]
6689
+ },
6690
+ extractors: [
6691
+ {
6692
+ api_flavor: "chat",
6693
+ root: "usage",
6694
+ model_path: "model",
6695
+ mappings: [
6696
+ {
6697
+ path: "prompt_tokens",
6698
+ dest: "input_tokens",
6699
+ required: !0
6700
+ },
6701
+ {
6702
+ path: ["prompt_tokens_details", "cached_tokens"],
6703
+ dest: "cache_read_tokens",
6704
+ required: !1
6705
+ },
6706
+ {
6707
+ path: ["prompt_tokens_details", "audio_tokens"],
6708
+ dest: "input_audio_tokens",
6709
+ required: !1
6710
+ },
6711
+ {
6712
+ path: ["completion_tokens_details", "audio_tokens"],
6713
+ dest: "output_audio_tokens",
6714
+ required: !1
6715
+ },
6716
+ {
6717
+ path: "completion_tokens",
6718
+ dest: "output_tokens",
6719
+ required: !0
6720
+ }
6721
+ ]
6722
+ }
6723
+ ],
6724
+ models: [
6725
+ {
6726
+ id: "Qwen/Qwen3-32B",
6727
+ name: "Qwen3-32B",
6728
+ match: {
6729
+ equals: "qwen/qwen3-32b"
6730
+ },
6731
+ context_window: 32768,
6732
+ prices: {
6733
+ input_mtok: 0.4,
6734
+ output_mtok: 0.8
6735
+ }
6736
+ },
6737
+ {
6738
+ id: "deepseek-ai/DeepSeek-R1-0528",
6739
+ name: "DeepSeek-R1-0528",
6740
+ match: {
6741
+ equals: "deepseek-ai/deepseek-r1-0528"
6742
+ },
6743
+ context_window: 131072,
6744
+ prices: {
6745
+ input_mtok: 5,
6746
+ output_mtok: 7
6747
+ }
6748
+ },
6749
+ {
6750
+ id: "deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
6751
+ name: "DeepSeek-R1-Distill-Llama-70B",
6752
+ match: {
6753
+ equals: "deepseek-ai/deepseek-r1-distill-llama-70b"
6754
+ },
6755
+ context_window: 131072,
6756
+ prices: {
6757
+ input_mtok: 0.7,
6758
+ output_mtok: 1.4
6759
+ }
6760
+ },
6761
+ {
6762
+ id: "deepseek-ai/DeepSeek-V3-0324",
6763
+ name: "DeepSeek-V3-0324",
6764
+ match: {
6765
+ equals: "deepseek-ai/deepseek-v3-0324"
6766
+ },
6767
+ context_window: 131072,
6768
+ prices: {
6769
+ input_mtok: 3,
6770
+ output_mtok: 4.5
6771
+ }
6772
+ },
6773
+ {
6774
+ id: "meta-llama/Llama-3.1-8B-Instruct",
6775
+ name: "Llama-3.1-8B-Instruct",
6776
+ match: {
6777
+ equals: "meta-llama/llama-3.1-8b-instruct"
6778
+ },
6779
+ context_window: 16384,
6780
+ prices: {
6781
+ input_mtok: 0.1,
6782
+ output_mtok: 0.2
6783
+ }
6784
+ },
6785
+ {
6786
+ id: "meta-llama/Llama-3.3-70B-Instruct",
6787
+ name: "Llama-3.3-70B-Instruct",
6788
+ match: {
6789
+ equals: "meta-llama/llama-3.3-70b-instruct"
6790
+ },
6791
+ context_window: 131072,
6792
+ prices: {
6793
+ input_mtok: 0.6,
6794
+ output_mtok: 1.2
6795
+ }
6796
+ },
6797
+ {
6798
+ id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct",
6799
+ name: "Llama-4-Maverick-17B-128E-Instruct",
6800
+ match: {
6801
+ equals: "meta-llama/llama-4-maverick-17b-128e-instruct"
6802
+ },
6803
+ context_window: 131072,
6804
+ prices: {
6805
+ input_mtok: 0.63,
6806
+ output_mtok: 1.8
6807
+ }
6808
+ },
6809
+ {
6810
+ id: "tokyotech-llm/Llama-3.3-Swallow-70B-Instruct-v0.4",
6811
+ name: "Llama-3.3-Swallow-70B-Instruct-v0.4",
6812
+ match: {
6813
+ equals: "tokyotech-llm/llama-3.3-swallow-70b-instruct-v0.4"
6814
+ },
6815
+ context_window: 131072,
6816
+ prices: {
6817
+ input_mtok: 0.6,
6818
+ output_mtok: 1.2
6819
+ }
6820
+ }
6821
+ ]
6822
+ },
6823
+ {
6824
+ id: "huggingface_together",
6825
+ name: "HuggingFace (together)",
6826
+ pricing_urls: ["https://router.huggingface.co/v1/models", "https://huggingface.co/inference/models"],
6827
+ api_pattern: "https://router\\.huggingface\\.co/together",
6828
+ provider_match: {
6829
+ and: [
6830
+ {
6831
+ contains: "huggingface"
6832
+ },
6833
+ {
6834
+ contains: "together"
6835
+ }
6836
+ ]
6837
+ },
6838
+ extractors: [
6839
+ {
6840
+ api_flavor: "chat",
6841
+ root: "usage",
6842
+ model_path: "model",
6843
+ mappings: [
6844
+ {
6845
+ path: "prompt_tokens",
6846
+ dest: "input_tokens",
6847
+ required: !0
6848
+ },
6849
+ {
6850
+ path: ["prompt_tokens_details", "cached_tokens"],
6851
+ dest: "cache_read_tokens",
6852
+ required: !1
6853
+ },
6854
+ {
6855
+ path: ["prompt_tokens_details", "audio_tokens"],
6856
+ dest: "input_audio_tokens",
6857
+ required: !1
6858
+ },
6859
+ {
6860
+ path: ["completion_tokens_details", "audio_tokens"],
6861
+ dest: "output_audio_tokens",
6862
+ required: !1
6863
+ },
6864
+ {
6865
+ path: "completion_tokens",
6866
+ dest: "output_tokens",
6867
+ required: !0
6868
+ }
6869
+ ]
6870
+ }
6871
+ ],
6872
+ models: [
6873
+ {
6874
+ id: "Qwen/Qwen2.5-72B-Instruct",
6875
+ name: "Qwen2.5-72B-Instruct",
6876
+ match: {
6877
+ equals: "qwen/qwen2.5-72b-instruct"
4084
6878
  },
4085
6879
  context_window: 131072,
4086
6880
  prices: {
4087
- input_mtok: 0.75,
4088
- output_mtok: 0.99
6881
+ input_mtok: 1.2,
6882
+ output_mtok: 1.2
4089
6883
  }
4090
6884
  },
4091
6885
  {
4092
- id: "gemma-7b-it",
6886
+ id: "Qwen/Qwen2.5-7B-Instruct",
6887
+ name: "Qwen2.5-7B-Instruct",
4093
6888
  match: {
4094
- equals: "gemma-7b-it"
6889
+ equals: "qwen/qwen2.5-7b-instruct"
4095
6890
  },
6891
+ context_window: 32768,
4096
6892
  prices: {
4097
- input_mtok: 0.07,
4098
- output_mtok: 0.07
6893
+ input_mtok: 0.3,
6894
+ output_mtok: 0.3
4099
6895
  }
4100
6896
  },
4101
6897
  {
4102
- id: "gemma2-9b-it",
4103
- name: "Gemma 2 9B 8k",
6898
+ id: "Qwen/Qwen3-235B-A22B",
6899
+ name: "Qwen3-235B-A22B",
4104
6900
  match: {
4105
6901
  or: [
4106
6902
  {
4107
- equals: "gemma2-9b-it"
6903
+ equals: "qwen/qwen3-235b-a22b"
4108
6904
  },
4109
6905
  {
4110
- equals: "gemma2-9b"
6906
+ equals: "qwen/qwen3-235b-a22b-fp8"
6907
+ },
6908
+ {
6909
+ equals: "qwen/qwen3-235b-a22b-instruct-2507"
4111
6910
  }
4112
6911
  ]
4113
6912
  },
6913
+ context_window: 40960,
4114
6914
  prices: {
4115
6915
  input_mtok: 0.2,
4116
- output_mtok: 0.2
4117
- }
4118
- },
4119
- {
4120
- id: "llama-3.1-405b-reasoning",
4121
- match: {
4122
- equals: "llama-3.1-405b-reasoning"
4123
- },
4124
- prices: {
4125
- input_mtok: 0.59,
4126
- output_mtok: 0.79
4127
- }
4128
- },
4129
- {
4130
- id: "llama-3.1-70b-versatile",
4131
- match: {
4132
- equals: "llama-3.1-70b-versatile"
4133
- },
4134
- prices: {
4135
- input_mtok: 0.59,
4136
- output_mtok: 0.79
4137
- }
4138
- },
4139
- {
4140
- id: "llama-3.1-8b-instant",
4141
- name: "Llama 3.1 8B Instant 128k",
4142
- match: {
4143
- equals: "llama-3.1-8b-instant"
4144
- },
4145
- prices: {
4146
- input_mtok: 0.05,
4147
- output_mtok: 0.08
4148
- }
4149
- },
4150
- {
4151
- id: "llama-3.2-11b-text-preview",
4152
- match: {
4153
- equals: "llama-3.2-11b-text-preview"
4154
- },
4155
- prices: {
4156
- input_mtok: 0.18,
4157
- output_mtok: 0.18
4158
- }
4159
- },
4160
- {
4161
- id: "llama-3.2-11b-vision-preview",
4162
- match: {
4163
- equals: "llama-3.2-11b-vision-preview"
4164
- },
4165
- prices: {
4166
- input_mtok: 0.18,
4167
- output_mtok: 0.18
4168
- }
4169
- },
4170
- {
4171
- id: "llama-3.2-1b-preview",
4172
- match: {
4173
- equals: "llama-3.2-1b-preview"
4174
- },
4175
- prices: {
4176
- input_mtok: 0.04,
4177
- output_mtok: 0.04
6916
+ output_mtok: 0.6
4178
6917
  }
4179
6918
  },
4180
6919
  {
4181
- id: "llama-3.2-3b-preview",
6920
+ id: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
6921
+ name: "Qwen3-Coder-480B-A35B-Instruct",
4182
6922
  match: {
4183
- equals: "llama-3.2-3b-preview"
6923
+ or: [
6924
+ {
6925
+ equals: "qwen/qwen3-coder-480b-a35b-instruct"
6926
+ },
6927
+ {
6928
+ equals: "qwen/qwen3-coder-480b-a35b-instruct-fp8"
6929
+ }
6930
+ ]
4184
6931
  },
6932
+ context_window: 262144,
4185
6933
  prices: {
4186
- input_mtok: 0.06,
4187
- output_mtok: 0.06
6934
+ input_mtok: 2,
6935
+ output_mtok: 2
4188
6936
  }
4189
6937
  },
4190
6938
  {
4191
- id: "llama-3.2-90b-text-preview",
6939
+ id: "Qwen/Qwen3-Next-80B-A3B-Instruct",
6940
+ name: "Qwen3-Next-80B-A3B-Instruct",
4192
6941
  match: {
4193
- equals: "llama-3.2-90b-text-preview"
6942
+ equals: "qwen/qwen3-next-80b-a3b-instruct"
4194
6943
  },
6944
+ context_window: 262144,
4195
6945
  prices: {
4196
- input_mtok: 0.9,
4197
- output_mtok: 0.9
6946
+ input_mtok: 0.15,
6947
+ output_mtok: 1.5
4198
6948
  }
4199
6949
  },
4200
6950
  {
4201
- id: "llama-3.2-90b-vision-preview",
6951
+ id: "Qwen/Qwen3-Next-80B-A3B-Thinking",
6952
+ name: "Qwen3-Next-80B-A3B-Thinking",
4202
6953
  match: {
4203
- equals: "llama-3.2-90b-vision-preview"
6954
+ equals: "qwen/qwen3-next-80b-a3b-thinking"
4204
6955
  },
6956
+ context_window: 262144,
4205
6957
  prices: {
4206
- input_mtok: 0.9,
4207
- output_mtok: 0.9
6958
+ input_mtok: 0.15,
6959
+ output_mtok: 1.5
4208
6960
  }
4209
6961
  },
4210
6962
  {
4211
- id: "llama-3.3-70b-specdec",
6963
+ id: "deepcogito/cogito-671b-v2.1",
6964
+ name: "cogito-671b-v2.1",
4212
6965
  match: {
4213
- equals: "llama-3.3-70b-specdec"
6966
+ or: [
6967
+ {
6968
+ equals: "deepcogito/cogito-671b-v2.1"
6969
+ },
6970
+ {
6971
+ equals: "deepcogito/cogito-671b-v2.1-fp8"
6972
+ }
6973
+ ]
4214
6974
  },
6975
+ context_window: 163840,
4215
6976
  prices: {
4216
- input_mtok: 0.59,
4217
- output_mtok: 0.99
6977
+ input_mtok: 1.25,
6978
+ output_mtok: 1.25
4218
6979
  }
4219
6980
  },
4220
6981
  {
4221
- id: "llama-3.3-70b-versatile",
4222
- name: "Llama 3.3 70B Versatile 128k",
6982
+ id: "deepcogito/cogito-v2-preview-llama-109B-MoE",
6983
+ name: "cogito-v2-preview-llama-109B-MoE",
4223
6984
  match: {
4224
- equals: "llama-3.3-70b-versatile"
6985
+ equals: "deepcogito/cogito-v2-preview-llama-109b-moe"
4225
6986
  },
6987
+ context_window: 32767,
4226
6988
  prices: {
4227
- input_mtok: 0.59,
4228
- output_mtok: 0.79
6989
+ input_mtok: 0.18000000000000002,
6990
+ output_mtok: 0.5900000000000001
4229
6991
  }
4230
6992
  },
4231
6993
  {
4232
- id: "llama-guard-3-8b",
6994
+ id: "deepcogito/cogito-v2-preview-llama-405B",
6995
+ name: "cogito-v2-preview-llama-405B",
4233
6996
  match: {
4234
- equals: "llama-guard-3-8b"
6997
+ equals: "deepcogito/cogito-v2-preview-llama-405b"
4235
6998
  },
6999
+ context_window: 32768,
4236
7000
  prices: {
4237
- input_mtok: 0.2,
4238
- output_mtok: 0.2
7001
+ input_mtok: 3.5,
7002
+ output_mtok: 3.5
4239
7003
  }
4240
7004
  },
4241
7005
  {
4242
- id: "llama2-70b-4096",
7006
+ id: "deepcogito/cogito-v2-preview-llama-70B",
7007
+ name: "cogito-v2-preview-llama-70B",
4243
7008
  match: {
4244
- equals: "llama2-70b-4096"
7009
+ equals: "deepcogito/cogito-v2-preview-llama-70b"
4245
7010
  },
7011
+ context_window: 32768,
4246
7012
  prices: {
4247
- input_mtok: 0.7,
4248
- output_mtok: 0.8
7013
+ input_mtok: 0.88,
7014
+ output_mtok: 0.88
4249
7015
  }
4250
7016
  },
4251
7017
  {
4252
- id: "llama3-70b-8192",
7018
+ id: "deepseek-ai/DeepSeek-R1",
7019
+ name: "DeepSeek-R1",
4253
7020
  match: {
4254
- equals: "llama3-70b-8192"
7021
+ or: [
7022
+ {
7023
+ equals: "deepseek-ai/deepseek-r1"
7024
+ },
7025
+ {
7026
+ equals: "deepseek-ai/deepseek-r1-0528"
7027
+ }
7028
+ ]
4255
7029
  },
7030
+ context_window: 163840,
4256
7031
  prices: {
4257
- input_mtok: 0.59,
4258
- output_mtok: 0.79
7032
+ input_mtok: 3,
7033
+ output_mtok: 7
4259
7034
  }
4260
7035
  },
4261
7036
  {
4262
- id: "llama3-8b-8192",
7037
+ id: "deepseek-ai/DeepSeek-V3",
7038
+ name: "DeepSeek-V3",
4263
7039
  match: {
4264
- equals: "llama3-8b-8192"
7040
+ or: [
7041
+ {
7042
+ equals: "deepseek-ai/deepseek-v3"
7043
+ },
7044
+ {
7045
+ equals: "deepseek-ai/deepseek-v3-0324"
7046
+ }
7047
+ ]
4265
7048
  },
7049
+ context_window: 131072,
4266
7050
  prices: {
4267
- input_mtok: 0.05,
4268
- output_mtok: 0.08
7051
+ input_mtok: 1.25,
7052
+ output_mtok: 1.25
4269
7053
  }
4270
7054
  },
4271
7055
  {
4272
- id: "llama3-groq-70b-8192-tool-use-preview",
7056
+ id: "deepseek-ai/DeepSeek-V3.1",
7057
+ name: "DeepSeek-V3.1",
4273
7058
  match: {
4274
- equals: "llama3-groq-70b-8192-tool-use-preview"
7059
+ equals: "deepseek-ai/deepseek-v3.1"
4275
7060
  },
7061
+ context_window: 131072,
4276
7062
  prices: {
4277
- input_mtok: 0.89,
4278
- output_mtok: 0.89
7063
+ input_mtok: 0.6,
7064
+ output_mtok: 1.7
4279
7065
  }
4280
7066
  },
4281
7067
  {
4282
- id: "llama3-groq-8b-8192-tool-use-preview",
7068
+ id: "marin-community/marin-8b-instruct",
7069
+ name: "marin-8b-instruct",
4283
7070
  match: {
4284
- equals: "llama3-groq-8b-8192-tool-use-preview"
7071
+ equals: "marin-community/marin-8b-instruct"
4285
7072
  },
7073
+ context_window: 4096,
4286
7074
  prices: {
4287
- input_mtok: 0.19,
4288
- output_mtok: 0.19
7075
+ input_mtok: 0.18000000000000002,
7076
+ output_mtok: 0.18000000000000002
4289
7077
  }
4290
7078
  },
4291
7079
  {
4292
- id: "meta-llama/llama-4-maverick-17b-128e-instruct",
4293
- name: "Llama 4 Maverick 17B 128E",
7080
+ id: "meta-llama/Llama-3.2-3B-Instruct",
7081
+ name: "Llama-3.2-3B-Instruct",
4294
7082
  match: {
4295
- equals: "meta-llama/llama-4-maverick-17b-128e-instruct"
7083
+ equals: "meta-llama/llama-3.2-3b-instruct"
4296
7084
  },
4297
7085
  context_window: 131072,
4298
7086
  prices: {
4299
- input_mtok: 0.2,
4300
- output_mtok: 0.6
7087
+ input_mtok: 0.060000000000000005,
7088
+ output_mtok: 0.060000000000000005
4301
7089
  }
4302
7090
  },
4303
7091
  {
4304
- id: "meta-llama/llama-4-scout-17b-16e-instruct",
4305
- name: "Llama 4 Scout (17Bx16E) 128k",
7092
+ id: "meta-llama/Llama-3.3-70B-Instruct",
7093
+ name: "Llama-3.3-70B-Instruct",
4306
7094
  match: {
4307
- equals: "meta-llama/llama-4-scout-17b-16e-instruct"
7095
+ equals: "meta-llama/llama-3.3-70b-instruct"
4308
7096
  },
7097
+ context_window: 131072,
4309
7098
  prices: {
4310
- input_mtok: 0.11,
4311
- output_mtok: 0.34
7099
+ input_mtok: 0.88,
7100
+ output_mtok: 0.88
4312
7101
  }
4313
7102
  },
4314
7103
  {
4315
- id: "meta-llama/llama-guard-4-12b",
4316
- name: "Llama Guard 4 12B",
7104
+ id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
7105
+ name: "Llama-4-Maverick-17B-128E-Instruct-FP8",
4317
7106
  match: {
4318
- equals: "meta-llama/llama-guard-4-12b"
7107
+ equals: "meta-llama/llama-4-maverick-17b-128e-instruct-fp8"
4319
7108
  },
4320
- context_window: 131072,
7109
+ context_window: 1048576,
4321
7110
  prices: {
4322
- input_mtok: 0.2,
4323
- output_mtok: 0.2
7111
+ input_mtok: 0.27,
7112
+ output_mtok: 0.85
4324
7113
  }
4325
7114
  },
4326
7115
  {
4327
- id: "mistral-saba-24b",
7116
+ id: "meta-llama/Llama-4-Scout-17B-16E-Instruct",
7117
+ name: "Llama-4-Scout-17B-16E-Instruct",
4328
7118
  match: {
4329
- equals: "mistral-saba-24b"
7119
+ equals: "meta-llama/llama-4-scout-17b-16e-instruct"
4330
7120
  },
7121
+ context_window: 1048576,
4331
7122
  prices: {
4332
- input_mtok: 0.79,
4333
- output_mtok: 0.79
7123
+ input_mtok: 0.18000000000000002,
7124
+ output_mtok: 0.5900000000000001
4334
7125
  }
4335
7126
  },
4336
7127
  {
4337
- id: "mixtral-8x7b-32768",
7128
+ id: "meta-llama/Meta-Llama-3-70B-Instruct",
7129
+ name: "Meta-Llama-3-70B-Instruct",
4338
7130
  match: {
4339
- equals: "mixtral-8x7b-32768"
7131
+ equals: "meta-llama/meta-llama-3-70b-instruct"
4340
7132
  },
7133
+ context_window: 8192,
4341
7134
  prices: {
4342
- input_mtok: 0.24,
4343
- output_mtok: 0.24
7135
+ input_mtok: 0.88,
7136
+ output_mtok: 0.88
4344
7137
  }
4345
7138
  },
4346
7139
  {
4347
- id: "moonshotai/kimi-k2-instruct",
4348
- name: "Kimi K2 1T 128k",
7140
+ id: "moonshotai/Kimi-K2-Instruct",
7141
+ name: "Kimi-K2-Instruct",
4349
7142
  match: {
4350
7143
  or: [
4351
7144
  {
@@ -4359,56 +7152,55 @@ Compared to other leading proprietary and open-weights models Command A delivers
4359
7152
  context_window: 131072,
4360
7153
  prices: {
4361
7154
  input_mtok: 1,
4362
- cache_read_mtok: 0.5,
4363
7155
  output_mtok: 3
4364
7156
  }
4365
7157
  },
7158
+ {
7159
+ id: "moonshotai/Kimi-K2-Thinking",
7160
+ name: "Kimi-K2-Thinking",
7161
+ match: {
7162
+ equals: "moonshotai/kimi-k2-thinking"
7163
+ },
7164
+ context_window: 262144,
7165
+ prices: {
7166
+ input_mtok: 1.2,
7167
+ output_mtok: 4
7168
+ }
7169
+ },
4366
7170
  {
4367
7171
  id: "openai/gpt-oss-120b",
4368
- description: `GPT-OSS 120B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
4369
- 120 billion parameters and 128 experts.
4370
- `,
7172
+ name: "gpt-oss-120b",
4371
7173
  match: {
4372
- or: [
4373
- {
4374
- equals: "openai/gpt-oss-120b"
4375
- },
4376
- {
4377
- equals: "openai/gpt-oss-safeguard-20b"
4378
- }
4379
- ]
7174
+ equals: "openai/gpt-oss-120b"
4380
7175
  },
4381
7176
  context_window: 131072,
4382
7177
  prices: {
4383
7178
  input_mtok: 0.15,
4384
- cache_read_mtok: 0.075,
4385
7179
  output_mtok: 0.6
4386
7180
  }
4387
7181
  },
4388
7182
  {
4389
7183
  id: "openai/gpt-oss-20b",
4390
- description: `GPT-OSS 20B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with
4391
- 20 billion parameters and 32 experts.
4392
- `,
7184
+ name: "gpt-oss-20b",
4393
7185
  match: {
4394
7186
  equals: "openai/gpt-oss-20b"
4395
7187
  },
4396
7188
  context_window: 131072,
4397
7189
  prices: {
4398
- input_mtok: 0.075,
4399
- cache_read_mtok: 0.0375,
4400
- output_mtok: 0.3
7190
+ input_mtok: 0.05,
7191
+ output_mtok: 0.2
4401
7192
  }
4402
7193
  },
4403
7194
  {
4404
- id: "qwen/qwen3-32b",
4405
- name: "Qwen3 32B 131k",
7195
+ id: "zai-org/GLM-4.5-Air-FP8",
7196
+ name: "GLM-4.5-Air-FP8",
4406
7197
  match: {
4407
- equals: "qwen/qwen3-32b"
7198
+ equals: "zai-org/glm-4.5-air-fp8"
4408
7199
  },
7200
+ context_window: 131072,
4409
7201
  prices: {
4410
- input_mtok: 0.29,
4411
- output_mtok: 0.59
7202
+ input_mtok: 0.2,
7203
+ output_mtok: 1.1
4412
7204
  }
4413
7205
  }
4414
7206
  ]
@@ -13440,91 +16232,91 @@ Compared to other leading proprietary and open-weights models Command A delivers
13440
16232
  ]
13441
16233
  }
13442
16234
  ];
13443
- function Wt(i, s) {
13444
- if (s <= 0) return 0;
16235
+ function $t(i, n) {
16236
+ if (n <= 0) return 0;
13445
16237
  let m = 0;
13446
- const n = [...i.tiers].sort((_, h) => _.start - h.start), u = n[0]?.start ?? s, k = Math.min(s, u);
16238
+ const s = [...i.tiers].sort((_, h) => _.start - h.start), u = s[0]?.start ?? n, k = Math.min(n, u);
13447
16239
  m += k * i.base / 1e6;
13448
- for (let _ = 0; _ < n.length; _++) {
13449
- const h = n[_], f = n[_ + 1]?.start ?? 1 / 0, y = Math.max(0, Math.min(s, f) - h.start);
13450
- y > 0 && (m += y * h.price / 1e6);
16240
+ for (let _ = 0; _ < s.length; _++) {
16241
+ const h = s[_], f = s[_ + 1]?.start ?? 1 / 0, B = Math.max(0, Math.min(n, f) - h.start);
16242
+ B > 0 && (m += B * h.price / 1e6);
13451
16243
  }
13452
16244
  return m;
13453
16245
  }
13454
- function O(i, s, m) {
13455
- return i === void 0 || s === void 0 ? 0 : typeof i == "number" ? i * s / 1e6 : Wt(i, s);
16246
+ function R(i, n, m) {
16247
+ return i === void 0 || n === void 0 ? 0 : typeof i == "number" ? i * n / 1e6 : $t(i, n);
13456
16248
  }
13457
- function Ut(i, s) {
13458
- let m = 0, n = 0;
16249
+ function Wt(i, n) {
16250
+ let m = 0, s = 0;
13459
16251
  const u = i.cache_read_tokens ?? 0, k = i.cache_write_tokens ?? 0, _ = i.cache_audio_read_tokens ?? 0, h = i.output_audio_tokens ?? 0;
13460
16252
  let f = i.input_audio_tokens ?? 0;
13461
16253
  if (f -= _, f < 0)
13462
16254
  throw new Error("cache_audio_read_tokens cannot be greater than input_audio_tokens");
13463
- let y = i.input_tokens ?? 0;
13464
- if (y -= u, y -= k, y -= f, y < 0)
16255
+ let B = i.input_tokens ?? 0;
16256
+ if (B -= u, B -= k, B -= f, B < 0)
13465
16257
  throw new Error("Uncached text input tokens cannot be negative");
13466
- let P = u;
13467
- if (P -= _, P < 0)
16258
+ let A = u;
16259
+ if (A -= _, A < 0)
13468
16260
  throw new Error("cache_audio_read_tokens cannot be greater than cache_read_tokens");
13469
- m += O(s.input_mtok, y), m += O(s.cache_read_mtok, P), m += O(s.cache_write_mtok, k), m += O(s.input_audio_mtok, f), m += O(s.cache_audio_read_mtok, _);
16261
+ m += R(n.input_mtok, B), m += R(n.cache_read_mtok, A), m += R(n.cache_write_mtok, k), m += R(n.input_audio_mtok, f), m += R(n.cache_audio_read_mtok, _);
13470
16262
  let S = i.output_tokens ?? 0;
13471
16263
  if (S -= h, S < 0)
13472
16264
  throw new Error("output_audio_tokens cannot be greater than output_tokens");
13473
- n += O(s.output_mtok, S), n += O(s.output_audio_mtok, i.output_audio_tokens);
13474
- let G = m + n;
13475
- return s.requests_kcount !== void 0 && (G += s.requests_kcount / 1e3), {
16265
+ s += R(n.output_mtok, S), s += R(n.output_audio_mtok, i.output_audio_tokens);
16266
+ let T = m + s;
16267
+ return n.requests_kcount !== void 0 && (T += n.requests_kcount / 1e3), {
13476
16268
  input_price: m,
13477
- output_price: n,
13478
- total_price: G
16269
+ output_price: s,
16270
+ total_price: T
13479
16271
  };
13480
16272
  }
13481
- function Kt(i, s) {
16273
+ function Ut(i, n) {
13482
16274
  if (!Array.isArray(i.prices))
13483
16275
  return i.prices;
13484
16276
  for (let m = i.prices.length - 1; m >= 0; m--) {
13485
- const n = i.prices[m], u = n.constraint;
16277
+ const s = i.prices[m], u = s.constraint;
13486
16278
  if (u === void 0)
13487
- return n.prices;
16279
+ return s.prices;
13488
16280
  if (u.type === "start_date") {
13489
- if (s >= new Date(u.start_date))
13490
- return n.prices;
16281
+ if (n >= new Date(u.start_date))
16282
+ return s.prices;
13491
16283
  } else {
13492
- const k = s.toISOString().slice(11, 19), _ = u.start_time, h = u.end_time;
16284
+ const k = n.toISOString().slice(11, 19), _ = u.start_time, h = u.end_time;
13493
16285
  if (h < _) {
13494
16286
  if (k >= _ || k < h)
13495
- return n.prices;
16287
+ return s.prices;
13496
16288
  } else if (k >= _ && k < h)
13497
- return n.prices;
16289
+ return s.prices;
13498
16290
  }
13499
16291
  }
13500
16292
  return i.prices[0].prices;
13501
16293
  }
13502
- function j(i, s) {
13503
- return "or" in i ? i.or.some((m) => j(m, s)) : "and" in i ? i.and.every((m) => j(m, s)) : "equals" in i ? s === i.equals : "starts_with" in i ? s.startsWith(i.starts_with) : "ends_with" in i ? s.endsWith(i.ends_with) : "contains" in i ? s.includes(i.contains) : "regex" in i ? new RegExp(i.regex).test(s) : !1;
16294
+ function N(i, n) {
16295
+ return "or" in i ? i.or.some((m) => N(m, n)) : "and" in i ? i.and.every((m) => N(m, n)) : "equals" in i ? n === i.equals : "starts_with" in i ? n.startsWith(i.starts_with) : "ends_with" in i ? n.endsWith(i.ends_with) : "contains" in i ? n.includes(i.contains) : "regex" in i ? new RegExp(i.regex).test(n) : !1;
13504
16296
  }
13505
- function Yt(i, s) {
13506
- const m = s.toLowerCase().trim(), n = i.find((u) => u.id === m);
13507
- return n || i.find((u) => u.provider_match && j(u.provider_match, m));
16297
+ function Yt(i, n) {
16298
+ const m = n.toLowerCase().trim(), s = i.find((u) => u.id === m);
16299
+ return s || i.find((u) => u.provider_match && N(u.provider_match, m));
13508
16300
  }
13509
- function Jt(i, { modelId: s, providerApiUrl: m, providerId: n }) {
13510
- if (n)
13511
- return Yt(i, n);
16301
+ function Jt(i, { modelId: n, providerApiUrl: m, providerId: s }) {
16302
+ if (s)
16303
+ return Yt(i, s);
13512
16304
  if (m)
13513
16305
  return i.find((u) => new RegExp(u.api_pattern).test(m));
13514
- if (s)
13515
- return i.find((u) => u.model_match && j(u.model_match, s));
16306
+ if (n)
16307
+ return i.find((u) => u.model_match && N(u.model_match, n));
13516
16308
  }
13517
- function Zt(i, s) {
13518
- return i.find((m) => j(m.match, s));
16309
+ function Zt(i, n) {
16310
+ return i.find((m) => N(m.match, n));
13519
16311
  }
13520
16312
  let Xt = it;
13521
16313
  Promise.resolve(it);
13522
- function te(i, s, m) {
13523
- const n = s.toLowerCase().trim(), u = m?.provider ?? Jt(Xt, { modelId: n, providerApiUrl: m?.providerApiUrl, providerId: m?.providerId });
16314
+ function te(i, n, m) {
16315
+ const s = n.toLowerCase().trim(), u = m?.provider ?? Jt(Xt, { modelId: s, providerApiUrl: m?.providerApiUrl, providerId: m?.providerId });
13524
16316
  if (!u) return null;
13525
- const k = Zt(u.models, n);
16317
+ const k = Zt(u.models, s);
13526
16318
  if (!k) return null;
13527
- const _ = m?.timestamp ?? /* @__PURE__ */ new Date(), h = Kt(k, _), f = Ut(i, h);
16319
+ const _ = m?.timestamp ?? /* @__PURE__ */ new Date(), h = Ut(k, _), f = Wt(i, h);
13528
16320
  return {
13529
16321
  auto_update_timestamp: void 0,
13530
16322
  model: k,
@@ -13533,7 +16325,7 @@ function te(i, s, m) {
13533
16325
  ...f
13534
16326
  };
13535
16327
  }
13536
- const b = dt(Ct(process.argv)).scriptName("genai-prices").command(
16328
+ const b = dt(Gt(process.argv)).scriptName("genai-prices").command(
13537
16329
  "list [provider]",
13538
16330
  "List providers and models",
13539
16331
  (i) => i.positional("provider", { describe: "Provider ID to filter", type: "string" })
@@ -13546,20 +16338,20 @@ function ee() {
13546
16338
  if (b._[0] === "list") {
13547
16339
  const m = it;
13548
16340
  if (b.provider) {
13549
- const n = m.find((u) => u.id === b.provider);
13550
- n || (console.error(`Provider ${b.provider} not found.`), process.exit(1)), console.log(`${n.name}: (${n.models.length} models)`);
13551
- for (const u of n.models)
13552
- console.log(` ${n.id}:${u.id}${u.name ? ": " + u.name : ""}`);
16341
+ const s = m.find((u) => u.id === b.provider);
16342
+ s || (console.error(`Provider ${b.provider} not found.`), process.exit(1)), console.log(`${s.name}: (${s.models.length} models)`);
16343
+ for (const u of s.models)
16344
+ console.log(` ${s.id}:${u.id}${u.name ? ": " + u.name : ""}`);
13553
16345
  } else
13554
- for (const n of m) {
13555
- console.log(`${n.name}: (${n.models.length} models)`);
13556
- for (const u of n.models)
13557
- console.log(` ${n.id}:${u.id}${u.name ? ": " + u.name : ""}`);
16346
+ for (const s of m) {
16347
+ console.log(`${s.name}: (${s.models.length} models)`);
16348
+ for (const u of s.models)
16349
+ console.log(` ${s.id}:${u.id}${u.name ? ": " + u.name : ""}`);
13558
16350
  }
13559
16351
  process.exit(0);
13560
16352
  }
13561
- const s = b._[0] === "calc" ? Array.isArray(b.model) ? b.model : [b.model] : b._.filter((m) => typeof m == "string");
13562
- if (s.length > 0) {
16353
+ const n = b._[0] === "calc" ? Array.isArray(b.model) ? b.model : [b.model] : b._.filter((m) => typeof m == "string");
16354
+ if (n.length > 0) {
13563
16355
  const m = {
13564
16356
  cache_audio_read_tokens: b["cache-audio-read-tokens"] !== void 0 ? Number(b["cache-audio-read-tokens"]) : void 0,
13565
16357
  cache_read_tokens: b["cache-read-tokens"] !== void 0 ? Number(b["cache-read-tokens"]) : void 0,
@@ -13569,28 +16361,28 @@ function ee() {
13569
16361
  output_audio_tokens: b["output-audio-tokens"] !== void 0 ? Number(b["output-audio-tokens"]) : void 0,
13570
16362
  output_tokens: b["output-tokens"] !== void 0 ? Number(b["output-tokens"]) : void 0,
13571
16363
  requests: b.requests !== void 0 ? Number(b.requests) : void 0
13572
- }, n = b.timestamp ? new Date(String(b.timestamp)) : void 0;
16364
+ }, s = b.timestamp ? new Date(String(b.timestamp)) : void 0;
13573
16365
  let u = !1;
13574
- for (const k of s) {
16366
+ for (const k of n) {
13575
16367
  let _, h = k;
13576
16368
  h.includes(":") && ([_, h] = h.split(":", 2));
13577
16369
  try {
13578
- const f = te(m, h, { providerId: _, timestamp: n });
16370
+ const f = te(m, h, { providerId: _, timestamp: s });
13579
16371
  if (!f) {
13580
16372
  u = !0, console.error(`No price found for model ${k}`);
13581
16373
  continue;
13582
16374
  }
13583
- const y = f.model.context_window, P = [
16375
+ const B = f.model.context_window, A = [
13584
16376
  ["Provider", f.provider.name],
13585
16377
  ["Model", f.model.name ?? f.model.id],
13586
16378
  ["Model Prices", JSON.stringify(f.model_price)],
13587
- ["Context Window", y !== void 0 ? y.toLocaleString() : void 0],
16379
+ ["Context Window", B !== void 0 ? B.toLocaleString() : void 0],
13588
16380
  ["Total Price", `$${f.total_price}`],
13589
16381
  ["Input Price", `$${f.input_price}`],
13590
16382
  ["Output Price", `$${f.output_price}`]
13591
16383
  ];
13592
- for (const [S, G] of P)
13593
- G !== void 0 && console.log(`${S.padStart(14)}: ${G}`);
16384
+ for (const [S, T] of A)
16385
+ T !== void 0 && console.log(`${S.padStart(14)}: ${T}`);
13594
16386
  console.log("");
13595
16387
  } catch (f) {
13596
16388
  u = !0, f instanceof Error && console.error(`Error for model ${k}:`, f.message);