@pydantic/genai-prices 0.0.56 → 0.0.61

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 he from "yargs";
3
3
  import { format as ke } from "util";
4
- import { resolve as ie, normalize as Pe } from "path";
4
+ import { resolve as oe, normalize as Pe } from "path";
5
5
  import { readFileSync as ge, writeFile as Qe, statSync as Te } from "fs";
6
6
  import "assert";
7
7
  import { fileURLToPath as Se } from "url";
@@ -22,7 +22,7 @@ function Re(i) {
22
22
  * Copyright (c) 2016, Contributors
23
23
  * SPDX-License-Identifier: ISC
24
24
  */
25
- function $(i) {
25
+ function W(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
  {
@@ -35,7 +35,7 @@ function $(i) {
35
35
  return u;
36
36
  }
37
37
  }
38
- function Ee(i, o) {
38
+ function Oe(i, o) {
39
39
  const u = i.toLowerCase();
40
40
  o = o || "-";
41
41
  let s = "";
@@ -45,7 +45,7 @@ function Ee(i, o) {
45
45
  }
46
46
  return s;
47
47
  }
48
- function Oe(i) {
48
+ function Ne(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
  /**
@@ -53,7 +53,7 @@ function Oe(i) {
53
53
  * Copyright (c) 2016, Contributors
54
54
  * SPDX-License-Identifier: ISC
55
55
  */
56
- function Ne(i) {
56
+ function Ee(i) {
57
57
  if (Array.isArray(i))
58
58
  return i.map((_) => typeof _ != "string" ? _ + "" : _);
59
59
  i = i.trim();
@@ -82,10 +82,10 @@ var P;
82
82
  * Copyright (c) 2016, Contributors
83
83
  * SPDX-License-Identifier: ISC
84
84
  */
85
- let S;
85
+ let C;
86
86
  class De {
87
87
  constructor(o) {
88
- S = o;
88
+ C = o;
89
89
  }
90
90
  parse(o, u) {
91
91
  const s = Object.assign({
@@ -105,7 +105,7 @@ class De {
105
105
  number: void 0,
106
106
  __: void 0,
107
107
  key: void 0
108
- }, u), r = Ne(o), h = typeof o == "string", _ = Fe(Object.assign(/* @__PURE__ */ Object.create(null), s.alias)), k = Object.assign({
108
+ }, u), r = Ee(o), h = typeof o == "string", _ = Fe(Object.assign(/* @__PURE__ */ Object.create(null), s.alias)), k = Object.assign({
109
109
  "boolean-negation": !0,
110
110
  "camel-case-expansion": !0,
111
111
  "combine-arrays": !1,
@@ -124,7 +124,7 @@ class De {
124
124
  "strip-aliased": !1,
125
125
  "strip-dashed": !1,
126
126
  "unknown-options-as-args": !1
127
- }, s.configuration), q = Object.assign(/* @__PURE__ */ Object.create(null), s.default), y = s.configObjects || [], B = s.envPrefix, I = k["populate--"], L = I ? "--" : "_", G = /* @__PURE__ */ Object.create(null), ne = /* @__PURE__ */ Object.create(null), C = s.__ || S.format, m = {
127
+ }, s.configuration), q = Object.assign(/* @__PURE__ */ Object.create(null), s.default), T = s.configObjects || [], B = s.envPrefix, Q = k["populate--"], y = Q ? "--" : "_", S = /* @__PURE__ */ Object.create(null), O = /* @__PURE__ */ Object.create(null), M = s.__ || C.format, m = {
128
128
  aliases: /* @__PURE__ */ Object.create(null),
129
129
  arrays: /* @__PURE__ */ Object.create(null),
130
130
  bools: /* @__PURE__ */ Object.create(null),
@@ -136,7 +136,7 @@ class De {
136
136
  nargs: /* @__PURE__ */ Object.create(null),
137
137
  coercions: /* @__PURE__ */ Object.create(null),
138
138
  keys: []
139
- }, Q = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/, W = new RegExp("^--" + k["negation-prefix"] + "(.+)");
139
+ }, I = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/, U = new RegExp("^--" + k["negation-prefix"] + "(.+)");
140
140
  [].concat(s.array || []).filter(Boolean).forEach(function(e) {
141
141
  const a = typeof e == "object" ? e.key : e, c = Object.keys(e).map(function(n) {
142
142
  return {
@@ -169,33 +169,33 @@ class De {
169
169
  q[a] = q[e];
170
170
  });
171
171
  });
172
- let M = null;
172
+ let L = null;
173
173
  Ae();
174
- let F = [];
174
+ let V = [];
175
175
  const w = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] }), se = {};
176
176
  for (let e = 0; e < r.length; e++) {
177
177
  const a = r[e], c = a.replace(/^-{3,}/, "---");
178
178
  let n, t, l, p, d, v;
179
- if (a !== "--" && /^-/.test(a) && H(a))
180
- U(a);
179
+ if (a !== "--" && /^-/.test(a) && $(a))
180
+ Y(a);
181
181
  else if (c.match(/^---+(=|$)/)) {
182
- U(a);
182
+ Y(a);
183
183
  continue;
184
184
  } else if (a.match(/^--.+=/) || !k["short-option-groups"] && a.match(/^-.+=/))
185
- p = a.match(/^--?([^=]+)=([\s\S]*)$/), p !== null && Array.isArray(p) && p.length >= 3 && (g(p[1], m.arrays) ? e = V(e, p[1], r, p[2]) : g(p[1], m.nargs) !== !1 ? e = j(e, p[1], r, p[2]) : b(p[1], p[2], !0));
186
- else if (a.match(W) && k["boolean-negation"])
187
- p = a.match(W), p !== null && Array.isArray(p) && p.length >= 2 && (t = p[1], b(t, g(t, m.arrays) ? [!1] : !1));
185
+ p = a.match(/^--?([^=]+)=([\s\S]*)$/), p !== null && Array.isArray(p) && p.length >= 3 && (g(p[1], m.arrays) ? e = K(e, p[1], r, p[2]) : g(p[1], m.nargs) !== !1 ? e = j(e, p[1], r, p[2]) : b(p[1], p[2], !0));
186
+ else if (a.match(U) && k["boolean-negation"])
187
+ p = a.match(U), p !== null && Array.isArray(p) && p.length >= 2 && (t = p[1], b(t, g(t, m.arrays) ? [!1] : !1));
188
188
  else if (a.match(/^--.+/) || !k["short-option-groups"] && a.match(/^-[^-]+/))
189
- p = a.match(/^--?(.+)/), p !== null && Array.isArray(p) && p.length >= 2 && (t = p[1], g(t, m.arrays) ? e = V(e, t, r) : g(t, m.nargs) !== !1 ? e = j(e, t, r) : (d = r[e + 1], d !== void 0 && (!d.match(/^-/) || d.match(Q)) && !g(t, m.bools) && !g(t, m.counts) || /^(true|false)$/.test(d) ? (b(t, d), e++) : b(t, R(t))));
189
+ p = a.match(/^--?(.+)/), p !== null && Array.isArray(p) && p.length >= 2 && (t = p[1], g(t, m.arrays) ? e = K(e, t, r) : g(t, m.nargs) !== !1 ? e = j(e, t, r) : (d = r[e + 1], d !== void 0 && (!d.match(/^-/) || d.match(I)) && !g(t, m.bools) && !g(t, m.counts) || /^(true|false)$/.test(d) ? (b(t, d), e++) : b(t, R(t))));
190
190
  else if (a.match(/^-.\..+=/))
191
191
  p = a.match(/^-([^=]+)=([\s\S]*)$/), p !== null && Array.isArray(p) && p.length >= 3 && b(p[1], p[2]);
192
- else if (a.match(/^-.\..+/) && !a.match(Q))
192
+ else if (a.match(/^-.\..+/) && !a.match(I))
193
193
  d = r[e + 1], p = a.match(/^-(.\..+)/), p !== null && Array.isArray(p) && p.length >= 2 && (t = p[1], d !== void 0 && !d.match(/^-/) && !g(t, m.bools) && !g(t, m.counts) ? (b(t, d), e++) : b(t, R(t)));
194
- else if (a.match(/^-[^-]+/) && !a.match(Q)) {
194
+ else if (a.match(/^-[^-]+/) && !a.match(I)) {
195
195
  l = a.slice(1, -1).split(""), n = !1;
196
196
  for (let x = 0; x < l.length; x++) {
197
197
  if (d = a.slice(x + 2), l[x + 1] && l[x + 1] === "=") {
198
- v = a.slice(x + 3), t = l[x], g(t, m.arrays) ? e = V(e, t, r, v) : g(t, m.nargs) !== !1 ? e = j(e, t, r, v) : b(t, v), n = !0;
198
+ v = a.slice(x + 3), t = l[x], g(t, m.arrays) ? e = K(e, t, r, v) : g(t, m.nargs) !== !1 ? e = j(e, t, r, v) : b(t, v), n = !0;
199
199
  break;
200
200
  }
201
201
  if (d === "-") {
@@ -212,80 +212,80 @@ class De {
212
212
  } else
213
213
  b(l[x], R(l[x]));
214
214
  }
215
- t = a.slice(-1)[0], !n && t !== "-" && (g(t, m.arrays) ? e = V(e, t, r) : g(t, m.nargs) !== !1 ? e = j(e, t, r) : (d = r[e + 1], d !== void 0 && (!/^(-|--)[^-]/.test(d) || d.match(Q)) && !g(t, m.bools) && !g(t, m.counts) || /^(true|false)$/.test(d) ? (b(t, d), e++) : b(t, R(t))));
216
- } else if (a.match(/^-[0-9]$/) && a.match(Q) && g(a.slice(1), m.bools))
215
+ t = a.slice(-1)[0], !n && t !== "-" && (g(t, m.arrays) ? e = K(e, t, r) : g(t, m.nargs) !== !1 ? e = j(e, t, r) : (d = r[e + 1], d !== void 0 && (!/^(-|--)[^-]/.test(d) || d.match(I)) && !g(t, m.bools) && !g(t, m.counts) || /^(true|false)$/.test(d) ? (b(t, d), e++) : b(t, R(t))));
216
+ } else if (a.match(/^-[0-9]$/) && a.match(I) && g(a.slice(1), m.bools))
217
217
  t = a.slice(1), b(t, R(t));
218
218
  else if (a === "--") {
219
- F = r.slice(e + 1);
219
+ V = r.slice(e + 1);
220
220
  break;
221
221
  } else if (k["halt-at-non-option"]) {
222
- F = r.slice(e);
222
+ V = r.slice(e);
223
223
  break;
224
224
  } else
225
- U(a);
225
+ Y(a);
226
226
  }
227
227
  me(w, !0), me(w, !1), fe(w), be(), ue(w, m.aliases, q, !0), we(w), k["set-placeholder-key"] && ve(w), Object.keys(m.counts).forEach(function(e) {
228
- E(w, e.split(".")) || b(e, 0);
229
- }), I && F.length && (w[L] = []), F.forEach(function(e) {
230
- w[L].push(e);
228
+ N(w, e.split(".")) || b(e, 0);
229
+ }), Q && V.length && (w[y] = []), V.forEach(function(e) {
230
+ w[y].push(e);
231
231
  }), k["camel-case-expansion"] && k["strip-dashed"] && Object.keys(w).filter((e) => e !== "--" && e.includes("-")).forEach((e) => {
232
232
  delete w[e];
233
233
  }), k["strip-aliased"] && [].concat(...Object.keys(_).map((e) => _[e])).forEach((e) => {
234
- k["camel-case-expansion"] && e.includes("-") && delete w[e.split(".").map((a) => $(a)).join(".")], delete w[e];
234
+ k["camel-case-expansion"] && e.includes("-") && delete w[e.split(".").map((a) => W(a)).join(".")], delete w[e];
235
235
  });
236
- function U(e) {
237
- const a = K("_", e);
236
+ function Y(e) {
237
+ const a = H("_", e);
238
238
  (typeof a == "string" || typeof a == "number") && w._.push(a);
239
239
  }
240
240
  function j(e, a, c, n) {
241
241
  let t, l = g(a, m.nargs);
242
242
  if (l = typeof l != "number" || isNaN(l) ? 1 : l, l === 0)
243
- return T(n) || (M = Error(C("Argument unexpected for: %s", a))), b(a, R(a)), e;
244
- let p = T(n) ? 0 : 1;
243
+ return G(n) || (L = Error(M("Argument unexpected for: %s", a))), b(a, R(a)), e;
244
+ let p = G(n) ? 0 : 1;
245
245
  if (k["nargs-eats-options"])
246
- c.length - (e + 1) + p < l && (M = Error(C("Not enough arguments following: %s", a))), p = l;
246
+ c.length - (e + 1) + p < l && (L = Error(M("Not enough arguments following: %s", a))), p = l;
247
247
  else {
248
- for (t = e + 1; t < c.length && (!c[t].match(/^-[^0-9]/) || c[t].match(Q) || H(c[t])); t++)
248
+ for (t = e + 1; t < c.length && (!c[t].match(/^-[^0-9]/) || c[t].match(I) || $(c[t])); t++)
249
249
  p++;
250
- p < l && (M = Error(C("Not enough arguments following: %s", a)));
250
+ p < l && (L = Error(M("Not enough arguments following: %s", a)));
251
251
  }
252
252
  let d = Math.min(p, l);
253
- for (!T(n) && d > 0 && (b(a, n), d--), t = e + 1; t < d + e + 1; t++)
253
+ for (!G(n) && d > 0 && (b(a, n), d--), t = e + 1; t < d + e + 1; t++)
254
254
  b(a, c[t]);
255
255
  return e + d;
256
256
  }
257
- function V(e, a, c, n) {
257
+ function K(e, a, c, n) {
258
258
  let t = [], l = n || c[e + 1];
259
259
  const p = g(a, m.nargs);
260
260
  if (g(a, m.bools) && !/^(true|false)$/.test(l))
261
261
  t.push(!0);
262
- else if (T(l) || T(n) && /^-/.test(l) && !Q.test(l) && !H(l)) {
262
+ else if (G(l) || G(n) && /^-/.test(l) && !I.test(l) && !$(l)) {
263
263
  if (q[a] !== void 0) {
264
264
  const d = q[a];
265
265
  t = Array.isArray(d) ? d : [d];
266
266
  }
267
267
  } else {
268
- T(n) || t.push(Y(a, n, !0));
269
- for (let d = e + 1; d < c.length && !(!k["greedy-arrays"] && t.length > 0 || p && typeof p == "number" && t.length >= p || (l = c[d], /^-/.test(l) && !Q.test(l) && !H(l))); d++)
270
- e = d, t.push(Y(a, l, h));
268
+ G(n) || t.push(J(a, n, !0));
269
+ for (let d = e + 1; d < c.length && !(!k["greedy-arrays"] && t.length > 0 || p && typeof p == "number" && t.length >= p || (l = c[d], /^-/.test(l) && !I.test(l) && !$(l))); d++)
270
+ e = d, t.push(J(a, l, h));
271
271
  }
272
- return typeof p == "number" && (p && t.length < p || isNaN(p) && t.length === 0) && (M = Error(C("Not enough arguments following: %s", a))), b(a, t), e;
272
+ return typeof p == "number" && (p && t.length < p || isNaN(p) && t.length === 0) && (L = Error(M("Not enough arguments following: %s", a))), b(a, t), e;
273
273
  }
274
274
  function b(e, a, c = h) {
275
275
  if (/-/.test(e) && k["camel-case-expansion"]) {
276
276
  const l = e.split(".").map(function(p) {
277
- return $(p);
277
+ return W(p);
278
278
  }).join(".");
279
279
  re(e, l);
280
280
  }
281
- const n = Y(e, a, c), t = e.split(".");
282
- O(w, t, n), m.aliases[e] && m.aliases[e].forEach(function(l) {
281
+ const n = J(e, a, c), t = e.split(".");
282
+ E(w, t, n), m.aliases[e] && m.aliases[e].forEach(function(l) {
283
283
  const p = l.split(".");
284
- O(w, p, n);
284
+ E(w, p, n);
285
285
  }), t.length > 1 && k["dot-notation"] && (m.aliases[t[0]] || []).forEach(function(l) {
286
286
  let p = l.split(".");
287
287
  const d = [].concat(t);
288
- d.shift(), p = p.concat(d), (m.aliases[e] || []).includes(p.join(".")) || O(w, p, n);
288
+ d.shift(), p = p.concat(d), (m.aliases[e] || []).includes(p.join(".")) || E(w, p, n);
289
289
  }), g(e, m.normalize) && !g(e, m.arrays) && [e].concat(m.aliases[e] || []).forEach(function(p) {
290
290
  Object.defineProperty(se, p, {
291
291
  enumerable: !0,
@@ -293,23 +293,23 @@ class De {
293
293
  return a;
294
294
  },
295
295
  set(d) {
296
- a = typeof d == "string" ? S.normalize(d) : d;
296
+ a = typeof d == "string" ? C.normalize(d) : d;
297
297
  }
298
298
  });
299
299
  });
300
300
  }
301
301
  function re(e, a) {
302
- m.aliases[e] && m.aliases[e].length || (m.aliases[e] = [a], G[a] = !0), m.aliases[a] && m.aliases[a].length || re(a, e);
302
+ m.aliases[e] && m.aliases[e].length || (m.aliases[e] = [a], S[a] = !0), m.aliases[a] && m.aliases[a].length || re(a, e);
303
303
  }
304
- function Y(e, a, c) {
305
- c && (a = je(a)), (g(e, m.bools) || g(e, m.counts)) && typeof a == "string" && (a = a === "true");
304
+ function J(e, a, c) {
305
+ c && (a = Ve(a)), (g(e, m.bools) || g(e, m.counts)) && typeof a == "string" && (a = a === "true");
306
306
  let n = Array.isArray(a) ? a.map(function(t) {
307
- return K(e, t);
308
- }) : K(e, a);
309
- return g(e, m.counts) && (T(n) || typeof n == "boolean") && (n = Z()), g(e, m.normalize) && g(e, m.arrays) && (Array.isArray(a) ? n = a.map((t) => S.normalize(t)) : n = S.normalize(a)), n;
307
+ return H(e, t);
308
+ }) : H(e, a);
309
+ return g(e, m.counts) && (G(n) || typeof n == "boolean") && (n = X()), g(e, m.normalize) && g(e, m.arrays) && (Array.isArray(a) ? n = a.map((t) => C.normalize(t)) : n = C.normalize(a)), n;
310
310
  }
311
- function K(e, a) {
312
- return !k["parse-positional-numbers"] && e === "_" || !g(e, m.strings) && !g(e, m.bools) && !Array.isArray(a) && (Oe(a) && k["parse-numbers"] && Number.isSafeInteger(Math.floor(parseFloat(`${a}`))) || !T(a) && g(e, m.numbers)) && (a = Number(a)), a;
311
+ function H(e, a) {
312
+ return !k["parse-positional-numbers"] && e === "_" || !g(e, m.strings) && !g(e, m.bools) && !Array.isArray(a) && (Ne(a) && k["parse-numbers"] && Number.isSafeInteger(Math.floor(parseFloat(`${a}`))) || !G(a) && g(e, m.numbers)) && (a = Number(a)), a;
313
313
  }
314
314
  function fe(e) {
315
315
  const a = /* @__PURE__ */ Object.create(null);
@@ -318,7 +318,7 @@ class De {
318
318
  if (n)
319
319
  try {
320
320
  let t = null;
321
- const l = S.resolve(S.cwd(), n), p = m.configs[c];
321
+ const l = C.resolve(C.cwd(), n), p = m.configs[c];
322
322
  if (typeof p == "function") {
323
323
  try {
324
324
  t = p(l);
@@ -326,38 +326,38 @@ class De {
326
326
  t = d;
327
327
  }
328
328
  if (t instanceof Error) {
329
- M = t;
329
+ L = t;
330
330
  return;
331
331
  }
332
332
  } else
333
- t = S.require(l);
334
- J(t);
333
+ t = C.require(l);
334
+ Z(t);
335
335
  } catch (t) {
336
- t.name === "PermissionDenied" ? M = t : e[c] && (M = Error(C("Invalid JSON config file: %s", n)));
336
+ t.name === "PermissionDenied" ? L = t : e[c] && (L = Error(M("Invalid JSON config file: %s", n)));
337
337
  }
338
338
  });
339
339
  }
340
- function J(e, a) {
340
+ function Z(e, a) {
341
341
  Object.keys(e).forEach(function(c) {
342
342
  const n = e[c], t = a ? a + "." + c : c;
343
- typeof n == "object" && n !== null && !Array.isArray(n) && k["dot-notation"] ? J(n, t) : (!E(w, t.split(".")) || g(t, m.arrays) && k["combine-arrays"]) && b(t, n);
343
+ typeof n == "object" && n !== null && !Array.isArray(n) && k["dot-notation"] ? Z(n, t) : (!N(w, t.split(".")) || g(t, m.arrays) && k["combine-arrays"]) && b(t, n);
344
344
  });
345
345
  }
346
346
  function be() {
347
- typeof y < "u" && y.forEach(function(e) {
348
- J(e);
347
+ typeof T < "u" && T.forEach(function(e) {
348
+ Z(e);
349
349
  });
350
350
  }
351
351
  function me(e, a) {
352
352
  if (typeof B > "u")
353
353
  return;
354
- const c = typeof B == "string" ? B : "", n = S.env();
354
+ const c = typeof B == "string" ? B : "", n = C.env();
355
355
  Object.keys(n).forEach(function(t) {
356
356
  if (c === "" || t.lastIndexOf(c, 0) === 0) {
357
357
  const l = t.split("__").map(function(p, d) {
358
- return d === 0 && (p = p.substring(c.length)), $(p);
358
+ return d === 0 && (p = p.substring(c.length)), W(p);
359
359
  });
360
- (a && m.configs[l.join(".")] || !a) && !E(e, l) && b(l.join("."), n[t]);
360
+ (a && m.configs[l.join(".")] || !a) && !N(e, l) && b(l.join("."), n[t]);
361
361
  }
362
362
  });
363
363
  }
@@ -367,12 +367,12 @@ class De {
367
367
  Object.keys(e).forEach(function(n) {
368
368
  if (!c.has(n) && (a = g(n, m.coercions), typeof a == "function"))
369
369
  try {
370
- const t = K(n, a(e[n]));
370
+ const t = H(n, a(e[n]));
371
371
  [].concat(m.aliases[n] || [], n).forEach((l) => {
372
372
  c.add(l), e[l] = t;
373
373
  });
374
374
  } catch (t) {
375
- M = t;
375
+ L = t;
376
376
  }
377
377
  });
378
378
  }
@@ -383,12 +383,12 @@ class De {
383
383
  }
384
384
  function ue(e, a, c, n = !1) {
385
385
  Object.keys(c).forEach(function(t) {
386
- E(e, t.split(".")) || (O(e, t.split("."), c[t]), n && (ne[t] = !0), (a[t] || []).forEach(function(l) {
387
- E(e, l.split(".")) || O(e, l.split("."), c[t]);
386
+ N(e, t.split(".")) || (E(e, t.split("."), c[t]), n && (O[t] = !0), (a[t] || []).forEach(function(l) {
387
+ N(e, l.split(".")) || E(e, l.split("."), c[t]);
388
388
  }));
389
389
  });
390
390
  }
391
- function E(e, a) {
391
+ function N(e, a) {
392
392
  let c = e;
393
393
  k["dot-notation"] || (a = [a.join(".")]), a.slice(0, -1).forEach(function(t) {
394
394
  c = c[t] || {};
@@ -396,27 +396,27 @@ class De {
396
396
  const n = a[a.length - 1];
397
397
  return typeof c != "object" ? !1 : n in c;
398
398
  }
399
- function O(e, a, c) {
399
+ function E(e, a, c) {
400
400
  let n = e;
401
401
  k["dot-notation"] || (a = [a.join(".")]), a.slice(0, -1).forEach(function(v) {
402
402
  v = pe(v), typeof n == "object" && n[v] === void 0 && (n[v] = {}), typeof n[v] != "object" || Array.isArray(n[v]) ? (Array.isArray(n[v]) ? n[v].push({}) : n[v] = [n[v], {}], n = n[v][n[v].length - 1]) : n = n[v];
403
403
  });
404
404
  const t = pe(a[a.length - 1]), l = g(a.join("."), m.arrays), p = Array.isArray(c);
405
405
  let d = k["duplicate-arguments-array"];
406
- !d && g(t, m.nargs) && (d = !0, (!T(n[t]) && m.nargs[t] === 1 || Array.isArray(n[t]) && n[t].length === m.nargs[t]) && (n[t] = void 0)), c === Z() ? n[t] = Z(n[t]) : Array.isArray(n[t]) ? d && l && p ? n[t] = k["flatten-duplicate-arrays"] ? n[t].concat(c) : (Array.isArray(n[t][0]) ? n[t] : [n[t]]).concat([c]) : !d && !!l == !!p ? n[t] = c : n[t] = n[t].concat([c]) : n[t] === void 0 && l ? n[t] = p ? c : [c] : d && !(n[t] === void 0 || g(t, m.counts) || g(t, m.bools)) ? n[t] = [n[t], c] : n[t] = c;
406
+ !d && g(t, m.nargs) && (d = !0, (!G(n[t]) && m.nargs[t] === 1 || Array.isArray(n[t]) && n[t].length === m.nargs[t]) && (n[t] = void 0)), c === X() ? n[t] = X(n[t]) : Array.isArray(n[t]) ? d && l && p ? n[t] = k["flatten-duplicate-arrays"] ? n[t].concat(c) : (Array.isArray(n[t][0]) ? n[t] : [n[t]]).concat([c]) : !d && !!l == !!p ? n[t] = c : n[t] = n[t].concat([c]) : n[t] === void 0 && l ? n[t] = p ? c : [c] : d && !(n[t] === void 0 || g(t, m.counts) || g(t, m.bools)) ? n[t] = [n[t], c] : n[t] = c;
407
407
  }
408
408
  function xe(...e) {
409
409
  e.forEach(function(a) {
410
410
  Object.keys(a || {}).forEach(function(c) {
411
411
  m.aliases[c] || (m.aliases[c] = [].concat(_[c] || []), m.aliases[c].concat(c).forEach(function(n) {
412
412
  if (/-/.test(n) && k["camel-case-expansion"]) {
413
- const t = $(n);
414
- t !== c && m.aliases[c].indexOf(t) === -1 && (m.aliases[c].push(t), G[t] = !0);
413
+ const t = W(n);
414
+ t !== c && m.aliases[c].indexOf(t) === -1 && (m.aliases[c].push(t), S[t] = !0);
415
415
  }
416
416
  }), m.aliases[c].concat(c).forEach(function(n) {
417
417
  if (n.length > 1 && /[A-Z]/.test(n) && k["camel-case-expansion"]) {
418
- const t = Ee(n, "-");
419
- t !== c && m.aliases[c].indexOf(t) === -1 && (m.aliases[c].push(t), G[t] = !0);
418
+ const t = Oe(n, "-");
419
+ t !== c && m.aliases[c].indexOf(t) === -1 && (m.aliases[c].push(t), S[t] = !0);
420
420
  }
421
421
  }), m.aliases[c].forEach(function(n) {
422
422
  m.aliases[n] = [c].concat(m.aliases[c].filter(function(t) {
@@ -443,7 +443,7 @@ class De {
443
443
  });
444
444
  }
445
445
  function ye(e) {
446
- if (e.match(Q) || !e.match(/^-[^-]+/))
446
+ if (e.match(I) || !e.match(/^-[^-]+/))
447
447
  return !1;
448
448
  let a = !0, c;
449
449
  const n = e.slice(1).split("");
@@ -457,16 +457,16 @@ class De {
457
457
  }
458
458
  return a;
459
459
  }
460
- function H(e) {
460
+ function $(e) {
461
461
  return k["unknown-options-as-args"] && Ie(e);
462
462
  }
463
463
  function Ie(e) {
464
- return e = e.replace(/^-{3,}/, "--"), e.match(Q) || ye(e) ? !1 : !Be(e, /^-+([^=]+?)=[\s\S]*$/, W, /^-+([^=]+?)$/, /^-+([^=]+?)-$/, /^-+([^=]+?\d+)$/, /^-+([^=]+?)\W+.*$/);
464
+ return e = e.replace(/^-{3,}/, "--"), e.match(I) || ye(e) ? !1 : !Be(e, /^-+([^=]+?)=[\s\S]*$/, U, /^-+([^=]+?)$/, /^-+([^=]+?)-$/, /^-+([^=]+?\d+)$/, /^-+([^=]+?)\W+.*$/);
465
465
  }
466
466
  function R(e) {
467
- return !g(e, m.bools) && !g(e, m.counts) && `${e}` in q ? q[e] : Le(Me(e));
467
+ return !g(e, m.bools) && !g(e, m.counts) && `${e}` in q ? q[e] : Me(Le(e));
468
468
  }
469
- function Le(e) {
469
+ function Me(e) {
470
470
  return {
471
471
  [P.BOOLEAN]: !0,
472
472
  [P.STRING]: "",
@@ -474,23 +474,23 @@ class De {
474
474
  [P.ARRAY]: []
475
475
  }[e];
476
476
  }
477
- function Me(e) {
477
+ function Le(e) {
478
478
  let a = P.BOOLEAN;
479
479
  return g(e, m.strings) ? a = P.STRING : g(e, m.numbers) ? a = P.NUMBER : g(e, m.bools) ? a = P.BOOLEAN : g(e, m.arrays) && (a = P.ARRAY), a;
480
480
  }
481
- function T(e) {
481
+ function G(e) {
482
482
  return e === void 0;
483
483
  }
484
484
  function Ae() {
485
- Object.keys(m.counts).find((e) => g(e, m.arrays) ? (M = Error(C("Invalid configuration: %s, opts.count excludes opts.array.", e)), !0) : g(e, m.nargs) ? (M = Error(C("Invalid configuration: %s, opts.count excludes opts.narg.", e)), !0) : !1);
485
+ Object.keys(m.counts).find((e) => g(e, m.arrays) ? (L = Error(M("Invalid configuration: %s, opts.count excludes opts.array.", e)), !0) : g(e, m.nargs) ? (L = Error(M("Invalid configuration: %s, opts.count excludes opts.narg.", e)), !0) : !1);
486
486
  }
487
487
  return {
488
488
  aliases: Object.assign({}, m.aliases),
489
489
  argv: Object.assign(se, w),
490
490
  configuration: k,
491
- defaulted: Object.assign({}, ne),
492
- error: M,
493
- newAliases: Object.assign({}, G)
491
+ defaulted: Object.assign({}, O),
492
+ error: L,
493
+ newAliases: Object.assign({}, S)
494
494
  };
495
495
  }
496
496
  }
@@ -518,13 +518,13 @@ function Fe(i) {
518
518
  h !== void 0 && typeof h == "string" && (u[h] = r);
519
519
  }), u;
520
520
  }
521
- function Z(i) {
521
+ function X(i) {
522
522
  return i !== void 0 ? i + 1 : 1;
523
523
  }
524
524
  function pe(i) {
525
525
  return i === "__proto__" ? "___proto___" : i;
526
526
  }
527
- function je(i) {
527
+ function Ve(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
  /**
@@ -535,17 +535,17 @@ function je(i) {
535
535
  * Copyright (c) 2016, Contributors
536
536
  * SPDX-License-Identifier: ISC
537
537
  */
538
- var X, ee, te;
539
- const le = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12, de = (ee = (X = process == null ? void 0 : process.versions) === null || X === void 0 ? void 0 : X.node) !== null && ee !== void 0 ? ee : (te = process == null ? void 0 : process.version) === null || te === void 0 ? void 0 : te.slice(1);
538
+ var ee, te, ae;
539
+ const le = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12, de = (te = (ee = process == null ? void 0 : process.versions) === null || ee === void 0 ? void 0 : ee.node) !== null && te !== void 0 ? te : (ae = process == null ? void 0 : process.version) === null || ae === void 0 ? void 0 : ae.slice(1);
540
540
  if (de && Number(de.match(/^([^.]+)/)[1]) < le)
541
541
  throw Error(`yargs parser supports a minimum Node.js version of ${le}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
542
- const Ve = process ? process.env : {};
542
+ const je = process ? process.env : {};
543
543
  new De({
544
544
  cwd: process.cwd,
545
- env: () => Ve,
545
+ env: () => je,
546
546
  format: ke,
547
547
  normalize: Pe,
548
- resolve: ie,
548
+ resolve: oe,
549
549
  // TODO: figure out a way to combine ESM and CJS coverage, such that
550
550
  // we can exercise all the lines below:
551
551
  require: (i) => {
@@ -562,7 +562,7 @@ const Ke = {
562
562
  writeFile: Qe
563
563
  },
564
564
  format: ke,
565
- resolve: ie,
565
+ resolve: oe,
566
566
  exists: (i) => {
567
567
  try {
568
568
  return Te(i).isFile();
@@ -671,18 +671,18 @@ function $e(i, o) {
671
671
  };
672
672
  }
673
673
  const We = (i) => $e(i, Ke);
674
- let N;
674
+ let D;
675
675
  try {
676
- N = Se(import.meta.url);
676
+ D = Se(import.meta.url);
677
677
  } catch {
678
- N = process.cwd();
678
+ D = process.cwd();
679
679
  }
680
- const Ue = N.substring(0, N.lastIndexOf("node_modules"));
680
+ const Ue = D.substring(0, D.lastIndexOf("node_modules"));
681
681
  Ue || process.cwd(), process.cwd, process.exit, process.nextTick, typeof process.stdout.columns < "u" && process.stdout.columns, We({
682
- directory: ie(N, "../../../locales"),
682
+ directory: oe(D, "../../../locales"),
683
683
  updateFiles: !1
684
684
  });
685
- const oe = [
685
+ const ne = [
686
686
  {
687
687
  id: "anthropic",
688
688
  name: "Anthropic",
@@ -1076,6 +1076,35 @@ const oe = [
1076
1076
  }
1077
1077
  ]
1078
1078
  },
1079
+ {
1080
+ id: "claude-opus-4-7",
1081
+ name: "Claude Opus 4.7",
1082
+ description: "Our most capable model for complex reasoning and agentic coding",
1083
+ match: {
1084
+ or: [
1085
+ {
1086
+ starts_with: "claude-opus-4-7"
1087
+ },
1088
+ {
1089
+ starts_with: "claude-opus-4.7"
1090
+ },
1091
+ {
1092
+ starts_with: "claude-4-7-opus"
1093
+ },
1094
+ {
1095
+ starts_with: "claude-4.7-opus"
1096
+ }
1097
+ ]
1098
+ },
1099
+ context_window: 1e6,
1100
+ price_comments: "Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing",
1101
+ prices: {
1102
+ input_mtok: 5,
1103
+ cache_write_mtok: 6.25,
1104
+ cache_read_mtok: 0.5,
1105
+ output_mtok: 25
1106
+ }
1107
+ },
1079
1108
  {
1080
1109
  id: "claude-sonnet-4-0",
1081
1110
  name: "Claude Sonnet 4",
@@ -1532,6 +1561,18 @@ const oe = [
1532
1561
  }
1533
1562
  }
1534
1563
  },
1564
+ {
1565
+ id: "global.anthropic.claude-opus-4-7-v1:0",
1566
+ match: {
1567
+ contains: "global.anthropic.claude-opus-4-7"
1568
+ },
1569
+ prices: {
1570
+ input_mtok: 5,
1571
+ cache_write_mtok: 6.25,
1572
+ cache_read_mtok: 0.5,
1573
+ output_mtok: 25
1574
+ }
1575
+ },
1535
1576
  {
1536
1577
  id: "global.anthropic.claude-sonnet-4-20250514-v1:0",
1537
1578
  match: {
@@ -1776,6 +1817,39 @@ const oe = [
1776
1817
  output_mtok: 6
1777
1818
  }
1778
1819
  },
1820
+ {
1821
+ id: "nvidia.nemotron-nano-3-30b:0",
1822
+ name: "Nemotron 3 Nano 30B",
1823
+ match: {
1824
+ contains: "nvidia.nemotron-nano-3-30b"
1825
+ },
1826
+ prices: {
1827
+ input_mtok: 0.06,
1828
+ output_mtok: 0.24
1829
+ }
1830
+ },
1831
+ {
1832
+ id: "nvidia.nemotron-nano-9b-v2:0",
1833
+ name: "Nemotron 2 Nano 9B",
1834
+ match: {
1835
+ contains: "nvidia.nemotron-nano-9b-v2"
1836
+ },
1837
+ prices: {
1838
+ input_mtok: 0.06,
1839
+ output_mtok: 0.23
1840
+ }
1841
+ },
1842
+ {
1843
+ id: "nvidia.nemotron-super-3-120b:0",
1844
+ name: "Nemotron 3 Super 120B",
1845
+ match: {
1846
+ contains: "nvidia.nemotron-super-3-120b"
1847
+ },
1848
+ prices: {
1849
+ input_mtok: 0.15,
1850
+ output_mtok: 0.65
1851
+ }
1852
+ },
1779
1853
  {
1780
1854
  id: "openai.gpt-oss-120b-1:0",
1781
1855
  name: "gpt-oss-120b",
@@ -2139,6 +2213,43 @@ const oe = [
2139
2213
  }
2140
2214
  }
2141
2215
  },
2216
+ {
2217
+ id: "regional.anthropic.claude-opus-4-7-v1:0",
2218
+ match: {
2219
+ or: [
2220
+ {
2221
+ starts_with: "anthropic.claude-opus-4-7"
2222
+ },
2223
+ {
2224
+ starts_with: "claude-opus-4-7"
2225
+ },
2226
+ {
2227
+ contains: "us.anthropic.claude-opus-4-7"
2228
+ },
2229
+ {
2230
+ contains: "au.anthropic.claude-opus-4-7"
2231
+ },
2232
+ {
2233
+ contains: "apac.anthropic.claude-opus-4-7"
2234
+ },
2235
+ {
2236
+ contains: "eu.anthropic.claude-opus-4-7"
2237
+ },
2238
+ {
2239
+ contains: "us-gov.anthropic.claude-opus-4-7"
2240
+ },
2241
+ {
2242
+ contains: "jp.anthropic.claude-opus-4-7"
2243
+ }
2244
+ ]
2245
+ },
2246
+ prices: {
2247
+ input_mtok: 5.5,
2248
+ cache_write_mtok: 6.875,
2249
+ cache_read_mtok: 0.55,
2250
+ output_mtok: 27.5
2251
+ }
2252
+ },
2142
2253
  {
2143
2254
  id: "regional.anthropic.claude-sonnet-4-20250514-v1:0",
2144
2255
  match: {
@@ -3095,6 +3206,43 @@ Compared to other leading proprietary and open-weights models Command A delivers
3095
3206
  }
3096
3207
  }
3097
3208
  ]
3209
+ },
3210
+ {
3211
+ id: "deepseek-v4-flash",
3212
+ name: "DeepSeek V4 Flash",
3213
+ description: "DeepSeek-V4-Flash. Supports both non-thinking and thinking (default) modes, JSON output, tool calls, chat prefix completion, and FIM completion (non-thinking only).",
3214
+ match: {
3215
+ or: [
3216
+ {
3217
+ starts_with: "deepseek-v4-flash"
3218
+ }
3219
+ ]
3220
+ },
3221
+ context_window: 1e6,
3222
+ prices: {
3223
+ input_mtok: 0.14,
3224
+ cache_read_mtok: 28e-4,
3225
+ output_mtok: 0.28
3226
+ }
3227
+ },
3228
+ {
3229
+ id: "deepseek-v4-pro",
3230
+ name: "DeepSeek V4 Pro",
3231
+ description: "DeepSeek-V4-Pro. Supports both non-thinking and thinking (default) modes, JSON output, tool calls, chat prefix completion, and FIM completion (non-thinking only).",
3232
+ match: {
3233
+ or: [
3234
+ {
3235
+ starts_with: "deepseek-v4-pro"
3236
+ }
3237
+ ]
3238
+ },
3239
+ context_window: 1e6,
3240
+ price_comments: "Standard (non-promotional) pricing. DeepSeek is offering a temporary 75% promotional discount that is not reflected here.",
3241
+ prices: {
3242
+ input_mtok: 1.74,
3243
+ cache_read_mtok: 0.0145,
3244
+ output_mtok: 3.48
3245
+ }
3098
3246
  }
3099
3247
  ]
3100
3248
  },
@@ -3408,7 +3556,7 @@ Compared to other leading proprietary and open-weights models Command A delivers
3408
3556
  },
3409
3557
  {
3410
3558
  path: "toolUsePromptTokenCount",
3411
- dest: "output_tokens",
3559
+ dest: "input_tokens",
3412
3560
  required: !1
3413
3561
  }
3414
3562
  ]
@@ -3656,6 +3804,33 @@ Compared to other leading proprietary and open-weights models Command A delivers
3656
3804
  }
3657
3805
  }
3658
3806
  },
3807
+ {
3808
+ id: "claude-opus-4-7",
3809
+ match: {
3810
+ or: [
3811
+ {
3812
+ contains: "claude-4-7-opus"
3813
+ },
3814
+ {
3815
+ contains: "claude-opus-4-7"
3816
+ },
3817
+ {
3818
+ contains: "claude-4.7-opus"
3819
+ },
3820
+ {
3821
+ contains: "claude-opus-4.7"
3822
+ }
3823
+ ]
3824
+ },
3825
+ context_window: 1e6,
3826
+ price_comments: "Flat pricing across full 1M context window. Ref: https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models",
3827
+ prices: {
3828
+ input_mtok: 5,
3829
+ cache_write_mtok: 6.25,
3830
+ cache_read_mtok: 0.5,
3831
+ output_mtok: 25
3832
+ }
3833
+ },
3659
3834
  {
3660
3835
  id: "gemini-1.0-pro-vision-001",
3661
3836
  name: "gemini 1.0 pro vision",
@@ -3763,17 +3938,10 @@ Compared to other leading proprietary and open-weights models Command A delivers
3763
3938
  context_window: 1e6,
3764
3939
  prices: {
3765
3940
  input_mtok: 0.1,
3766
- cache_read_mtok: {
3767
- base: 0.025,
3768
- tiers: [
3769
- {
3770
- start: 1e6,
3771
- price: 0.175
3772
- }
3773
- ]
3774
- },
3941
+ cache_read_mtok: 0.025,
3775
3942
  output_mtok: 0.4,
3776
- input_audio_mtok: 0.7
3943
+ input_audio_mtok: 0.7,
3944
+ cache_audio_read_mtok: 0.175
3777
3945
  }
3778
3946
  },
3779
3947
  {
@@ -4030,14 +4198,14 @@ Compared to other leading proprietary and open-weights models Command A delivers
4030
4198
  }
4031
4199
  },
4032
4200
  {
4033
- id: "gemini-3.1-flash-lite-preview",
4034
- name: "Gemini 3.1 Flash Lite Preview",
4201
+ id: "gemini-3.1-flash-lite",
4202
+ name: "Gemini 3.1 Flash Lite",
4035
4203
  description: "Google's fastest and most cost-efficient Gemini 3 series model, built for intelligence at scale. Optimized for high-volume, low-latency applications while maintaining strong multimodal capabilities.",
4036
4204
  match: {
4037
- starts_with: "gemini-3.1-flash-lite-preview"
4205
+ starts_with: "gemini-3.1-flash-lite"
4038
4206
  },
4039
4207
  context_window: 1e6,
4040
- price_comments: "See https://ai.google.dev/gemini-api/docs/pricing. Preview model - pricing may change before becoming stable.",
4208
+ price_comments: "See https://ai.google.dev/gemini-api/docs/pricing.",
4041
4209
  prices: {
4042
4210
  input_mtok: 0.25,
4043
4211
  cache_read_mtok: 0.025,
@@ -10027,6 +10195,7 @@ Compared to other leading proprietary and open-weights models Command A delivers
10027
10195
  },
10028
10196
  context_window: 128e3,
10029
10197
  prices: {
10198
+ input_mtok: 2.5,
10030
10199
  output_mtok: 10,
10031
10200
  input_audio_mtok: 2.5
10032
10201
  }
@@ -10077,6 +10246,7 @@ Compared to other leading proprietary and open-weights models Command A delivers
10077
10246
  starts_with: "gpt-4o-mini-audio"
10078
10247
  },
10079
10248
  prices: {
10249
+ input_mtok: 0.15,
10080
10250
  output_mtok: 0.6,
10081
10251
  input_audio_mtok: 0.15
10082
10252
  }
@@ -10113,6 +10283,7 @@ Compared to other leading proprietary and open-weights models Command A delivers
10113
10283
  },
10114
10284
  prices: {
10115
10285
  input_mtok: 0.6,
10286
+ output_mtok: 12,
10116
10287
  output_audio_mtok: 12
10117
10288
  }
10118
10289
  },
@@ -10437,6 +10608,39 @@ Compared to other leading proprietary and open-weights models Command A delivers
10437
10608
  output_mtok: 168
10438
10609
  }
10439
10610
  },
10611
+ {
10612
+ id: "gpt-5.3",
10613
+ name: "GPT-5.3 Chat",
10614
+ description: "GPT-5.3 Instant model used in ChatGPT",
10615
+ match: {
10616
+ or: [
10617
+ {
10618
+ equals: "gpt-5.3"
10619
+ },
10620
+ {
10621
+ equals: "gpt-5-3"
10622
+ },
10623
+ {
10624
+ equals: "gpt-5.3-chat"
10625
+ },
10626
+ {
10627
+ equals: "gpt-5.3-chat-latest"
10628
+ },
10629
+ {
10630
+ equals: "gpt-5-3-chat"
10631
+ },
10632
+ {
10633
+ equals: "gpt-5-3-chat-latest"
10634
+ }
10635
+ ]
10636
+ },
10637
+ context_window: 128e3,
10638
+ prices: {
10639
+ input_mtok: 1.75,
10640
+ cache_read_mtok: 0.175,
10641
+ output_mtok: 14
10642
+ }
10643
+ },
10440
10644
  {
10441
10645
  id: "gpt-5.3-codex",
10442
10646
  name: "GPT-5.3-Codex",
@@ -10605,6 +10809,83 @@ Compared to other leading proprietary and open-weights models Command A delivers
10605
10809
  }
10606
10810
  }
10607
10811
  },
10812
+ {
10813
+ id: "gpt-5.5",
10814
+ name: "GPT-5.5",
10815
+ description: "The best model for coding and agentic tasks across industries",
10816
+ match: {
10817
+ or: [
10818
+ {
10819
+ equals: "gpt-5.5"
10820
+ },
10821
+ {
10822
+ equals: "gpt-5.5-2026-04-23"
10823
+ },
10824
+ {
10825
+ equals: "gpt-5.5-2026-04-24"
10826
+ },
10827
+ {
10828
+ equals: "gpt-5-5"
10829
+ },
10830
+ {
10831
+ equals: "gpt-5-5-2026-04-23"
10832
+ },
10833
+ {
10834
+ equals: "gpt-5-5-2026-04-24"
10835
+ },
10836
+ {
10837
+ equals: "gpt-5.5-chat"
10838
+ },
10839
+ {
10840
+ equals: "gpt-5.5-chat-latest"
10841
+ },
10842
+ {
10843
+ equals: "gpt-5-5-chat"
10844
+ },
10845
+ {
10846
+ equals: "gpt-5-5-chat-latest"
10847
+ },
10848
+ {
10849
+ equals: "gpt-5.5-codex"
10850
+ },
10851
+ {
10852
+ equals: "gpt-5-5-codex"
10853
+ }
10854
+ ]
10855
+ },
10856
+ context_window: 1e6,
10857
+ prices: {
10858
+ input_mtok: 5,
10859
+ cache_read_mtok: 0.5,
10860
+ output_mtok: 30
10861
+ }
10862
+ },
10863
+ {
10864
+ id: "gpt-5.5-pro",
10865
+ name: "GPT-5.5 Pro",
10866
+ description: "Version of GPT-5.5 that produces smarter and more precise responses.",
10867
+ match: {
10868
+ or: [
10869
+ {
10870
+ equals: "gpt-5.5-pro"
10871
+ },
10872
+ {
10873
+ equals: "gpt-5.5-pro-2026-04-23"
10874
+ },
10875
+ {
10876
+ equals: "gpt-5-5-pro"
10877
+ },
10878
+ {
10879
+ equals: "gpt-5-5-pro-2026-04-23"
10880
+ }
10881
+ ]
10882
+ },
10883
+ context_window: 1e6,
10884
+ prices: {
10885
+ input_mtok: 30,
10886
+ output_mtok: 180
10887
+ }
10888
+ },
10608
10889
  {
10609
10890
  id: "gpt-realtime",
10610
10891
  match: {
@@ -10926,6 +11207,45 @@ Compared to other leading proprietary and open-weights models Command A delivers
10926
11207
  name: "OpenRouter",
10927
11208
  pricing_urls: ["https://openrouter.ai/models"],
10928
11209
  api_pattern: "https://(api\\.)?openrouter\\.ai",
11210
+ extractors: [
11211
+ {
11212
+ api_flavor: "chat",
11213
+ root: "usage",
11214
+ model_path: "model",
11215
+ mappings: [
11216
+ {
11217
+ path: "prompt_tokens",
11218
+ dest: "input_tokens",
11219
+ required: !0
11220
+ },
11221
+ {
11222
+ path: ["prompt_tokens_details", "cached_tokens"],
11223
+ dest: "cache_read_tokens",
11224
+ required: !1
11225
+ },
11226
+ {
11227
+ path: ["prompt_tokens_details", "cache_write_tokens"],
11228
+ dest: "cache_write_tokens",
11229
+ required: !1
11230
+ },
11231
+ {
11232
+ path: ["prompt_tokens_details", "audio_tokens"],
11233
+ dest: "input_audio_tokens",
11234
+ required: !1
11235
+ },
11236
+ {
11237
+ path: ["completion_tokens_details", "audio_tokens"],
11238
+ dest: "output_audio_tokens",
11239
+ required: !1
11240
+ },
11241
+ {
11242
+ path: "completion_tokens",
11243
+ dest: "output_tokens",
11244
+ required: !0
11245
+ }
11246
+ ]
11247
+ }
11248
+ ],
10929
11249
  models: [
10930
11250
  {
10931
11251
  id: "01-ai/yi-large",
@@ -11317,6 +11637,18 @@ Compared to other leading proprietary and open-weights models Command A delivers
11317
11637
  {
11318
11638
  equals: "anthropic/claude-haiku-4.5"
11319
11639
  },
11640
+ {
11641
+ equals: "anthropic/claude-4.5-haiku-20251001"
11642
+ },
11643
+ {
11644
+ equals: "anthropic/claude-4.5-haiku-20251001:beta"
11645
+ },
11646
+ {
11647
+ equals: "anthropic/claude-haiku-4.5-20251001"
11648
+ },
11649
+ {
11650
+ equals: "anthropic/claude-haiku-4.5-20251001:beta"
11651
+ },
11320
11652
  {
11321
11653
  equals: "anthropic/claude-haiku-4.5:beta"
11322
11654
  }
@@ -11336,6 +11668,18 @@ Compared to other leading proprietary and open-weights models Command A delivers
11336
11668
  {
11337
11669
  equals: "anthropic/claude-opus-4.5"
11338
11670
  },
11671
+ {
11672
+ equals: "anthropic/claude-4.5-opus-20251124"
11673
+ },
11674
+ {
11675
+ equals: "anthropic/claude-4.5-opus-20251124:beta"
11676
+ },
11677
+ {
11678
+ equals: "anthropic/claude-opus-4.5-20251124"
11679
+ },
11680
+ {
11681
+ equals: "anthropic/claude-opus-4.5-20251124:beta"
11682
+ },
11339
11683
  {
11340
11684
  equals: "anthropic/claude-opus-4.5:beta"
11341
11685
  }
@@ -11355,48 +11699,51 @@ Compared to other leading proprietary and open-weights models Command A delivers
11355
11699
  {
11356
11700
  equals: "anthropic/claude-opus-4.6"
11357
11701
  },
11702
+ {
11703
+ equals: "anthropic/claude-4.6-opus-20260205"
11704
+ },
11705
+ {
11706
+ equals: "anthropic/claude-4.6-opus-20260205:beta"
11707
+ },
11708
+ {
11709
+ equals: "anthropic/claude-opus-4.6-20260205"
11710
+ },
11711
+ {
11712
+ equals: "anthropic/claude-opus-4.6-20260205:beta"
11713
+ },
11358
11714
  {
11359
11715
  equals: "anthropic/claude-opus-4.6:beta"
11360
11716
  }
11361
11717
  ]
11362
11718
  },
11719
+ context_window: 1e6,
11720
+ price_comments: "Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing",
11363
11721
  prices: {
11364
- input_mtok: {
11365
- base: 5,
11366
- tiers: [
11367
- {
11368
- start: 2e5,
11369
- price: 10
11370
- }
11371
- ]
11372
- },
11373
- cache_write_mtok: {
11374
- base: 6.25,
11375
- tiers: [
11376
- {
11377
- start: 2e5,
11378
- price: 12.5
11379
- }
11380
- ]
11381
- },
11382
- cache_read_mtok: {
11383
- base: 0.5,
11384
- tiers: [
11385
- {
11386
- start: 2e5,
11387
- price: 1
11388
- }
11389
- ]
11390
- },
11391
- output_mtok: {
11392
- base: 25,
11393
- tiers: [
11394
- {
11395
- start: 2e5,
11396
- price: 37.5
11397
- }
11398
- ]
11399
- }
11722
+ input_mtok: 5,
11723
+ cache_write_mtok: 6.25,
11724
+ cache_read_mtok: 0.5,
11725
+ output_mtok: 25
11726
+ }
11727
+ },
11728
+ {
11729
+ id: "anthropic/claude-opus-4.7",
11730
+ match: {
11731
+ or: [
11732
+ {
11733
+ equals: "anthropic/claude-opus-4.7"
11734
+ },
11735
+ {
11736
+ equals: "anthropic/claude-opus-4.7:beta"
11737
+ }
11738
+ ]
11739
+ },
11740
+ context_window: 1e6,
11741
+ price_comments: "Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing",
11742
+ prices: {
11743
+ input_mtok: 5,
11744
+ cache_write_mtok: 6.25,
11745
+ cache_read_mtok: 0.5,
11746
+ output_mtok: 25
11400
11747
  }
11401
11748
  },
11402
11749
  {
@@ -11406,12 +11753,25 @@ Compared to other leading proprietary and open-weights models Command A delivers
11406
11753
  {
11407
11754
  equals: "anthropic/claude-sonnet-4.5"
11408
11755
  },
11756
+ {
11757
+ equals: "anthropic/claude-4.5-sonnet-20250929"
11758
+ },
11759
+ {
11760
+ equals: "anthropic/claude-4.5-sonnet-20250929:beta"
11761
+ },
11762
+ {
11763
+ equals: "anthropic/claude-sonnet-4.5-20250929"
11764
+ },
11765
+ {
11766
+ equals: "anthropic/claude-sonnet-4.5-20250929:beta"
11767
+ },
11409
11768
  {
11410
11769
  equals: "anthropic/claude-sonnet-4.5:beta"
11411
11770
  }
11412
11771
  ]
11413
11772
  },
11414
11773
  context_window: 1e6,
11774
+ price_comments: "Tiered pricing: Unlike 4.6 models, Sonnet 4.5 has long-context surcharge. Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing",
11415
11775
  prices: {
11416
11776
  input_mtok: {
11417
11777
  base: 3,
@@ -11458,11 +11818,25 @@ Compared to other leading proprietary and open-weights models Command A delivers
11458
11818
  {
11459
11819
  equals: "anthropic/claude-sonnet-4.6"
11460
11820
  },
11821
+ {
11822
+ equals: "anthropic/claude-4.6-sonnet-20260217"
11823
+ },
11824
+ {
11825
+ equals: "anthropic/claude-4.6-sonnet-20260217:beta"
11826
+ },
11827
+ {
11828
+ equals: "anthropic/claude-sonnet-4.6-20260217"
11829
+ },
11830
+ {
11831
+ equals: "anthropic/claude-sonnet-4.6-20260217:beta"
11832
+ },
11461
11833
  {
11462
11834
  equals: "anthropic/claude-sonnet-4.6:beta"
11463
11835
  }
11464
11836
  ]
11465
11837
  },
11838
+ context_window: 1e6,
11839
+ price_comments: "Flat pricing across full 1M context window (no tiered pricing). Ref: https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing",
11466
11840
  prices: {
11467
11841
  input_mtok: 3,
11468
11842
  cache_write_mtok: 3.75,
@@ -12361,6 +12735,19 @@ Compared to other leading proprietary and open-weights models Command A delivers
12361
12735
  },
12362
12736
  prices: {}
12363
12737
  },
12738
+ {
12739
+ id: "deepseek/deepseek-v3.2",
12740
+ name: "DeepSeek V3.2",
12741
+ match: {
12742
+ equals: "deepseek/deepseek-v3.2"
12743
+ },
12744
+ context_window: 131072,
12745
+ prices: {
12746
+ input_mtok: 0.252,
12747
+ cache_read_mtok: 0.0252,
12748
+ output_mtok: 0.378
12749
+ }
12750
+ },
12364
12751
  {
12365
12752
  id: "deepseek/deepseek-v3.2-exp",
12366
12753
  name: "DeepSeek V3.2 Experimental",
@@ -18885,6 +19272,30 @@ Compared to other leading proprietary and open-weights models Command A delivers
18885
19272
  output_mtok: 0.5
18886
19273
  }
18887
19274
  },
19275
+ {
19276
+ id: "grok-4.3",
19277
+ name: "Grok 4.3",
19278
+ description: "Most advanced flagship model, leading the industry in non-hallucination rate, agentic tool calling, and instruction following capabilities. Supports text and image inputs with text outputs, function calling, structured outputs, and reasoning.",
19279
+ match: {
19280
+ or: [
19281
+ {
19282
+ equals: "grok-4.3"
19283
+ },
19284
+ {
19285
+ equals: "grok-4.3-latest"
19286
+ },
19287
+ {
19288
+ equals: "grok-latest"
19289
+ }
19290
+ ]
19291
+ },
19292
+ context_window: 1e6,
19293
+ prices: {
19294
+ input_mtok: 1.25,
19295
+ cache_read_mtok: 0.2,
19296
+ output_mtok: 2.5
19297
+ }
19298
+ },
18888
19299
  {
18889
19300
  id: "grok-code-fast-1",
18890
19301
  name: "Grok Code Fast 1",
@@ -18924,26 +19335,27 @@ function z(i, o, u, s) {
18924
19335
  }
18925
19336
  function Je(i, o) {
18926
19337
  let u = 0, s = 0;
18927
- const r = i.input_tokens ?? 0, h = i.cache_read_tokens ?? 0, _ = i.cache_write_tokens ?? 0, k = i.cache_audio_read_tokens ?? 0, q = i.output_audio_tokens ?? 0;
18928
- let y = i.input_audio_tokens ?? 0;
18929
- if (y -= k, y < 0)
19338
+ const r = i.input_tokens ?? 0, h = i.cache_read_tokens ?? 0, _ = i.cache_write_tokens ?? 0, k = i.cache_audio_read_tokens ?? 0, q = i.input_audio_tokens ?? 0, T = i.output_audio_tokens ?? 0, B = o.cache_audio_read_mtok === void 0 ? 0 : k, Q = o.cache_audio_read_mtok === void 0 && o.cache_read_mtok !== void 0 ? k : 0;
19339
+ let y = 0;
19340
+ if (o.input_audio_mtok !== void 0 && (y = q - B - Q), y < 0)
18930
19341
  throw new Error("cache_audio_read_tokens cannot be greater than input_audio_tokens");
18931
- let B = i.input_tokens ?? 0;
18932
- if (B -= h, B -= _, B -= y, B < 0)
18933
- throw new Error("Uncached text input tokens cannot be negative");
18934
- let I = h;
18935
- if (I -= k, I < 0)
19342
+ let S = 0;
19343
+ if (o.cache_read_mtok !== void 0 && (S = h - B), S < 0)
18936
19344
  throw new Error("cache_audio_read_tokens cannot be greater than cache_read_tokens");
18937
- u += z(o.input_mtok, B, "input_mtok", r), u += z(o.cache_read_mtok, I, "cache_read_mtok", r), u += z(o.cache_write_mtok, _, "cache_write_mtok", r), u += z(o.input_audio_mtok, y, "input_audio_mtok", r), u += z(o.cache_audio_read_mtok, k, "cache_audio_read_mtok", r);
18938
- let L = i.output_tokens ?? 0;
18939
- if (L -= q, L < 0)
19345
+ const O = o.cache_write_mtok === void 0 ? 0 : _;
19346
+ let M = 0;
19347
+ if (o.input_mtok !== void 0 && (M = r - S - O - y - B), M < 0)
19348
+ throw new Error("Uncached text input tokens cannot be negative");
19349
+ u += z(o.input_mtok, M, "input_mtok", r), u += z(o.cache_read_mtok, S, "cache_read_mtok", r), u += z(o.cache_write_mtok, O, "cache_write_mtok", r), u += z(o.input_audio_mtok, y, "input_audio_mtok", r), u += z(o.cache_audio_read_mtok, B, "cache_audio_read_mtok", r);
19350
+ let m = 0;
19351
+ if (o.output_mtok !== void 0 && (m = (i.output_tokens ?? 0) - (o.output_audio_mtok === void 0 ? 0 : T)), m < 0)
18940
19352
  throw new Error("output_audio_tokens cannot be greater than output_tokens");
18941
- s += z(o.output_mtok, L, "output_mtok", r), s += z(o.output_audio_mtok, i.output_audio_tokens, "output_audio_mtok", r);
18942
- let G = u + s;
18943
- return o.requests_kcount !== void 0 && (G += o.requests_kcount / 1e3), {
19353
+ s += z(o.output_mtok, m, "output_mtok", r), s += z(o.output_audio_mtok, i.output_audio_tokens, "output_audio_mtok", r);
19354
+ let I = u + s;
19355
+ return o.requests_kcount !== void 0 && (I += o.requests_kcount / 1e3), {
18944
19356
  input_price: u,
18945
19357
  output_price: s,
18946
- total_price: G
19358
+ total_price: I
18947
19359
  };
18948
19360
  }
18949
19361
  function Ze(i, o) {
@@ -18967,12 +19379,12 @@ function Ze(i, o) {
18967
19379
  }
18968
19380
  return i.prices[0].prices;
18969
19381
  }
18970
- function D(i, o) {
18971
- return "or" in i ? i.or.some((u) => D(u, o)) : "and" in i ? i.and.every((u) => D(u, o)) : "equals" in i ? o === i.equals : "starts_with" in i ? o.startsWith(i.starts_with) : "ends_with" in i ? o.endsWith(i.ends_with) : "contains" in i ? o.includes(i.contains) : "regex" in i ? new RegExp(i.regex).test(o) : !1;
19382
+ function F(i, o) {
19383
+ return "or" in i ? i.or.some((u) => F(u, o)) : "and" in i ? i.and.every((u) => F(u, o)) : "equals" in i ? o === i.equals : "starts_with" in i ? o.startsWith(i.starts_with) : "ends_with" in i ? o.endsWith(i.ends_with) : "contains" in i ? o.includes(i.contains) : "regex" in i ? new RegExp(i.regex).test(o) : !1;
18972
19384
  }
18973
19385
  function Xe(i, o) {
18974
19386
  const u = o.toLowerCase().trim(), s = i.find((r) => r.id === u);
18975
- return s || i.find((r) => r.provider_match && D(r.provider_match, u));
19387
+ return s || i.find((r) => r.provider_match && F(r.provider_match, u));
18976
19388
  }
18977
19389
  function _e(i, { modelId: o, providerApiUrl: u, providerId: s }) {
18978
19390
  if (s) {
@@ -18983,10 +19395,10 @@ function _e(i, { modelId: o, providerApiUrl: u, providerId: s }) {
18983
19395
  if (u)
18984
19396
  return i.find((r) => new RegExp(r.api_pattern).test(u));
18985
19397
  if (o)
18986
- return i.find((r) => r.model_match && D(r.model_match, o));
19398
+ return i.find((r) => r.model_match && F(r.model_match, o));
18987
19399
  }
18988
19400
  function et(i, o) {
18989
- return i.find((u) => D(u.match, o));
19401
+ return i.find((u) => F(u.match, o));
18990
19402
  }
18991
19403
  function qe(i, o, u) {
18992
19404
  const s = et(i.models, o);
@@ -19000,25 +19412,25 @@ function qe(i, o, u) {
19000
19412
  }
19001
19413
  }
19002
19414
  }
19003
- let ae = oe;
19004
- Promise.resolve(oe);
19415
+ let ie = ne;
19416
+ Promise.resolve(ne);
19005
19417
  function tt(i, o, u) {
19006
19418
  let s = o.toLowerCase().trim(), r = u?.providerId;
19007
19419
  if (r && r.toLowerCase() === "litellm" && s.includes("/")) {
19008
- const B = s.indexOf("/"), I = s.slice(0, B), L = s.slice(B + 1);
19009
- I && L && _e(ae, { providerId: I }) && (r = I, s = L);
19420
+ const B = s.indexOf("/"), Q = s.slice(0, B), y = s.slice(B + 1);
19421
+ Q && y && _e(ie, { providerId: Q }) && (r = Q, s = y);
19010
19422
  }
19011
- const h = u?.provider ?? _e(ae, { modelId: s, providerApiUrl: u?.providerApiUrl, providerId: r });
19423
+ const h = u?.provider ?? _e(ie, { modelId: s, providerApiUrl: u?.providerApiUrl, providerId: r });
19012
19424
  if (!h) return null;
19013
- const _ = qe(h, s, ae);
19425
+ const _ = qe(h, s, ie);
19014
19426
  if (!_) return null;
19015
- const k = u?.timestamp ?? /* @__PURE__ */ new Date(), q = Ze(_, k), y = Je(i, q);
19427
+ const k = u?.timestamp ?? /* @__PURE__ */ new Date(), q = Ze(_, k), T = Je(i, q);
19016
19428
  return {
19017
19429
  auto_update_timestamp: void 0,
19018
19430
  model: _,
19019
19431
  model_price: q,
19020
19432
  provider: h,
19021
- ...y
19433
+ ...T
19022
19434
  };
19023
19435
  }
19024
19436
  const f = he(Re(process.argv)).scriptName("genai-prices").command(
@@ -19032,7 +19444,7 @@ const f = he(Re(process.argv)).scriptName("genai-prices").command(
19032
19444
  ).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();
19033
19445
  function at() {
19034
19446
  if (f._[0] === "list") {
19035
- const u = oe;
19447
+ const u = ne;
19036
19448
  if (f.provider) {
19037
19449
  const s = u.find((r) => r.id === f.provider);
19038
19450
  s || (console.error(`Provider ${f.provider} not found.`), process.exit(1)), console.log(`${s.name}: (${s.models.length} models)`);
@@ -19068,17 +19480,17 @@ function at() {
19068
19480
  r = !0, console.error(`No price found for model ${h}`);
19069
19481
  continue;
19070
19482
  }
19071
- const y = q.model.context_window, B = [
19483
+ const T = q.model.context_window, B = [
19072
19484
  ["Provider", q.provider.name],
19073
19485
  ["Model", q.model.name ?? q.model.id],
19074
19486
  ["Model Prices", JSON.stringify(q.model_price)],
19075
- ["Context Window", y !== void 0 ? y.toLocaleString() : void 0],
19487
+ ["Context Window", T !== void 0 ? T.toLocaleString() : void 0],
19076
19488
  ["Total Price", `$${q.total_price}`],
19077
19489
  ["Input Price", `$${q.input_price}`],
19078
19490
  ["Output Price", `$${q.output_price}`]
19079
19491
  ];
19080
- for (const [I, L] of B)
19081
- L !== void 0 && console.log(`${I.padStart(14)}: ${L}`);
19492
+ for (const [Q, y] of B)
19493
+ y !== void 0 && console.log(`${Q.padStart(14)}: ${y}`);
19082
19494
  console.log("");
19083
19495
  } catch (q) {
19084
19496
  r = !0, q instanceof Error && console.error(`Error for model ${h}:`, q.message);