@pydantic/genai-prices 0.0.35 → 0.0.37

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