@pydantic/genai-prices 0.0.40 → 0.0.42

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
@@ -138,14 +138,14 @@ class Ne {
138
138
  keys: []
139
139
  }, L = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/, U = new RegExp("^--" + h["negation-prefix"] + "(.+)");
140
140
  [].concat(s.array || []).filter(Boolean).forEach(function(e) {
141
- const a = typeof e == "object" ? e.key : e, l = Object.keys(e).map(function(o) {
141
+ const a = typeof e == "object" ? e.key : e, c = Object.keys(e).map(function(o) {
142
142
  return {
143
143
  boolean: "bools",
144
144
  string: "strings",
145
145
  number: "numbers"
146
146
  }[o];
147
147
  }).filter(Boolean).pop();
148
- l && (r[l][a] = !0), r.arrays[a] = !0, r.keys.push(a);
148
+ c && (r[c][a] = !0), r.arrays[a] = !0, r.keys.push(a);
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) {
@@ -174,23 +174,23 @@ class Ne {
174
174
  let F = [];
175
175
  const w = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] }), ne = {};
176
176
  for (let e = 0; e < u.length; e++) {
177
- const a = u[e], l = a.replace(/^-{3,}/, "---");
178
- let o, t, p, c, d, v;
177
+ const a = u[e], c = a.replace(/^-{3,}/, "---");
178
+ let o, t, p, l, d, v;
179
179
  if (a !== "--" && /^-/.test(a) && H(a))
180
180
  K(a);
181
- else if (l.match(/^---+(=|$)/)) {
181
+ else if (c.match(/^---+(=|$)/)) {
182
182
  K(a);
183
183
  continue;
184
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));
185
+ l = a.match(/^--?([^=]+)=([\s\S]*)$/), l !== null && Array.isArray(l) && l.length >= 3 && (g(l[1], r.arrays) ? e = V(e, l[1], u, l[2]) : g(l[1], r.nargs) !== !1 ? e = D(e, l[1], u, l[2]) : q(l[1], l[2], !0));
186
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));
187
+ l = a.match(U), l !== null && Array.isArray(l) && l.length >= 2 && (t = l[1], q(t, g(t, r.arrays) ? [!1] : !1));
188
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(L)) && !g(t, r.bools) && !g(t, r.counts) || /^(true|false)$/.test(d) ? (q(t, d), e++) : q(t, R(t))));
189
+ l = a.match(/^--?(.+)/), l !== null && Array.isArray(l) && l.length >= 2 && (t = l[1], g(t, r.arrays) ? e = V(e, t, u) : g(t, r.nargs) !== !1 ? e = D(e, t, u) : (d = u[e + 1], d !== void 0 && (!d.match(/^-/) || d.match(L)) && !g(t, r.bools) && !g(t, r.counts) || /^(true|false)$/.test(d) ? (q(t, d), e++) : q(t, R(t))));
190
190
  else if (a.match(/^-.\..+=/))
191
- c = a.match(/^-([^=]+)=([\s\S]*)$/), c !== null && Array.isArray(c) && c.length >= 3 && q(c[1], c[2]);
191
+ l = a.match(/^-([^=]+)=([\s\S]*)$/), l !== null && Array.isArray(l) && l.length >= 3 && q(l[1], l[2]);
192
192
  else if (a.match(/^-.\..+/) && !a.match(L))
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, R(t)));
193
+ d = u[e + 1], l = a.match(/^-(.\..+)/), l !== null && Array.isArray(l) && l.length >= 2 && (t = l[1], d !== void 0 && !d.match(/^-/) && !g(t, r.bools) && !g(t, r.counts) ? (q(t, d), e++) : q(t, R(t)));
194
194
  else if (a.match(/^-[^-]+/) && !a.match(L)) {
195
195
  p = a.slice(1, -1).split(""), o = !1;
196
196
  for (let x = 0; x < p.length; x++) {
@@ -237,26 +237,26 @@ class Ne {
237
237
  const a = $("_", e);
238
238
  (typeof a == "string" || typeof a == "number") && w._.push(a);
239
239
  }
240
- function D(e, a, l, o) {
240
+ function D(e, a, c, o) {
241
241
  let t, p = g(a, r.nargs);
242
242
  if (p = typeof p != "number" || isNaN(p) ? 1 : p, p === 0)
243
243
  return T(o) || (B = Error(C("Argument unexpected for: %s", a))), q(a, R(a)), e;
244
- let c = T(o) ? 0 : 1;
244
+ let l = T(o) ? 0 : 1;
245
245
  if (h["nargs-eats-options"])
246
- l.length - (e + 1) + c < p && (B = Error(C("Not enough arguments following: %s", a))), c = p;
246
+ c.length - (e + 1) + l < p && (B = Error(C("Not enough arguments following: %s", a))), l = p;
247
247
  else {
248
- for (t = e + 1; t < l.length && (!l[t].match(/^-[^0-9]/) || l[t].match(L) || H(l[t])); t++)
249
- c++;
250
- c < p && (B = Error(C("Not enough arguments following: %s", a)));
248
+ for (t = e + 1; t < c.length && (!c[t].match(/^-[^0-9]/) || c[t].match(L) || H(c[t])); t++)
249
+ l++;
250
+ l < p && (B = Error(C("Not enough arguments following: %s", a)));
251
251
  }
252
- let d = Math.min(c, p);
252
+ let d = Math.min(l, p);
253
253
  for (!T(o) && d > 0 && (q(a, o), d--), t = e + 1; t < d + e + 1; t++)
254
- q(a, l[t]);
254
+ q(a, c[t]);
255
255
  return e + d;
256
256
  }
257
- function V(e, a, l, o) {
258
- let t = [], p = o || l[e + 1];
259
- const c = g(a, r.nargs);
257
+ function V(e, a, c, o) {
258
+ let t = [], p = o || c[e + 1];
259
+ const l = g(a, r.nargs);
260
260
  if (g(a, r.bools) && !/^(true|false)$/.test(p))
261
261
  t.push(!0);
262
262
  else if (T(p) || T(o) && /^-/.test(p) && !L.test(p) && !H(p)) {
@@ -266,28 +266,28 @@ class Ne {
266
266
  }
267
267
  } else {
268
268
  T(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) && !L.test(p) && !H(p))); d++)
269
+ for (let d = e + 1; d < c.length && !(!h["greedy-arrays"] && t.length > 0 || l && typeof l == "number" && t.length >= l || (p = c[d], /^-/.test(p) && !L.test(p) && !H(p))); d++)
270
270
  e = d, t.push(Y(a, p, k));
271
271
  }
272
- return typeof c == "number" && (c && t.length < c || isNaN(c) && t.length === 0) && (B = Error(C("Not enough arguments following: %s", a))), q(a, t), e;
272
+ return typeof l == "number" && (l && t.length < l || isNaN(l) && t.length === 0) && (B = Error(C("Not enough arguments following: %s", a))), q(a, t), e;
273
273
  }
274
- function q(e, a, l = k) {
274
+ function q(e, a, c = k) {
275
275
  if (/-/.test(e) && h["camel-case-expansion"]) {
276
- const p = e.split(".").map(function(c) {
277
- return W(c);
276
+ const p = e.split(".").map(function(l) {
277
+ return W(l);
278
278
  }).join(".");
279
279
  se(e, p);
280
280
  }
281
- const o = Y(e, a, l), t = e.split(".");
281
+ const o = Y(e, a, c), t = e.split(".");
282
282
  N(w, t, o), r.aliases[e] && r.aliases[e].forEach(function(p) {
283
- const c = p.split(".");
284
- N(w, c, o);
283
+ const l = p.split(".");
284
+ N(w, l, o);
285
285
  }), t.length > 1 && h["dot-notation"] && (r.aliases[t[0]] || []).forEach(function(p) {
286
- let c = p.split(".");
286
+ let l = p.split(".");
287
287
  const d = [].concat(t);
288
- d.shift(), c = c.concat(d), (r.aliases[e] || []).includes(c.join(".")) || N(w, c, o);
289
- }), g(e, r.normalize) && !g(e, r.arrays) && [e].concat(r.aliases[e] || []).forEach(function(c) {
290
- Object.defineProperty(ne, c, {
288
+ d.shift(), l = l.concat(d), (r.aliases[e] || []).includes(l.join(".")) || N(w, l, o);
289
+ }), g(e, r.normalize) && !g(e, r.arrays) && [e].concat(r.aliases[e] || []).forEach(function(l) {
290
+ Object.defineProperty(ne, l, {
291
291
  enumerable: !0,
292
292
  get() {
293
293
  return a;
@@ -301,8 +301,8 @@ class Ne {
301
301
  function se(e, a) {
302
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);
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");
304
+ function Y(e, a, c) {
305
+ c && (a = je(a)), (g(e, r.bools) || g(e, r.counts)) && typeof a == "string" && (a = a === "true");
306
306
  let o = Array.isArray(a) ? a.map(function(t) {
307
307
  return $(e, t);
308
308
  }) : $(e, a);
@@ -313,15 +313,15 @@ class Ne {
313
313
  }
314
314
  function ke(e) {
315
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];
316
+ me(a, r.aliases, f), Object.keys(r.configs).forEach(function(c) {
317
+ const o = e[c] || a[c];
318
318
  if (o)
319
319
  try {
320
320
  let t = null;
321
- const p = A.resolve(A.cwd(), o), c = r.configs[l];
322
- if (typeof c == "function") {
321
+ const p = A.resolve(A.cwd(), o), l = r.configs[c];
322
+ if (typeof l == "function") {
323
323
  try {
324
- t = c(p);
324
+ t = l(p);
325
325
  } catch (d) {
326
326
  t = d;
327
327
  }
@@ -333,13 +333,13 @@ class Ne {
333
333
  t = A.require(p);
334
334
  J(t);
335
335
  } catch (t) {
336
- t.name === "PermissionDenied" ? B = t : e[l] && (B = Error(C("Invalid JSON config file: %s", o)));
336
+ t.name === "PermissionDenied" ? B = t : e[c] && (B = Error(C("Invalid JSON config file: %s", o)));
337
337
  }
338
338
  });
339
339
  }
340
340
  function J(e, a) {
341
- Object.keys(e).forEach(function(l) {
342
- const o = e[l], t = a ? a + "." + l : l;
341
+ Object.keys(e).forEach(function(c) {
342
+ const o = e[c], t = a ? a + "." + c : c;
343
343
  typeof o == "object" && o !== null && !Array.isArray(o) && h["dot-notation"] ? J(o, t) : (!E(w, t.split(".")) || g(t, r.arrays) && h["combine-arrays"]) && q(t, o);
344
344
  });
345
345
  }
@@ -351,11 +351,11 @@ class Ne {
351
351
  function re(e, a) {
352
352
  if (typeof P > "u")
353
353
  return;
354
- const l = typeof P == "string" ? P : "", o = A.env();
354
+ const c = typeof P == "string" ? P : "", o = A.env();
355
355
  Object.keys(o).forEach(function(t) {
356
- if (l === "" || t.lastIndexOf(l, 0) === 0) {
357
- const p = t.split("__").map(function(c, d) {
358
- return d === 0 && (c = c.substring(l.length)), W(c);
356
+ if (c === "" || t.lastIndexOf(c, 0) === 0) {
357
+ const p = t.split("__").map(function(l, d) {
358
+ return d === 0 && (l = l.substring(c.length)), W(l);
359
359
  });
360
360
  (a && r.configs[p.join(".")] || !a) && !E(e, p) && q(p.join("."), o[t]);
361
361
  }
@@ -363,13 +363,13 @@ class Ne {
363
363
  }
364
364
  function fe(e) {
365
365
  let a;
366
- const l = /* @__PURE__ */ new Set();
366
+ const c = /* @__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 (!c.has(o) && (a = g(o, r.coercions), typeof a == "function"))
369
369
  try {
370
370
  const t = $(o, a(e[o]));
371
371
  [].concat(r.aliases[o] || [], o).forEach((p) => {
372
- l.add(p), e[p] = t;
372
+ c.add(p), e[p] = t;
373
373
  });
374
374
  } catch (t) {
375
375
  B = t;
@@ -381,45 +381,45 @@ class Ne {
381
381
  ~a.indexOf(".") || typeof e[a] > "u" && (e[a] = void 0);
382
382
  }), e;
383
383
  }
384
- function me(e, a, l, o = !1) {
385
- Object.keys(l).forEach(function(t) {
386
- E(e, t.split(".")) || (N(e, t.split("."), l[t]), o && (oe[t] = !0), (a[t] || []).forEach(function(p) {
387
- E(e, p.split(".")) || N(e, p.split("."), l[t]);
384
+ function me(e, a, c, o = !1) {
385
+ Object.keys(c).forEach(function(t) {
386
+ E(e, t.split(".")) || (N(e, t.split("."), c[t]), o && (oe[t] = !0), (a[t] || []).forEach(function(p) {
387
+ E(e, p.split(".")) || N(e, p.split("."), c[t]);
388
388
  }));
389
389
  });
390
390
  }
391
391
  function E(e, a) {
392
- let l = e;
392
+ let c = e;
393
393
  h["dot-notation"] || (a = [a.join(".")]), a.slice(0, -1).forEach(function(t) {
394
- l = l[t] || {};
394
+ c = c[t] || {};
395
395
  });
396
396
  const o = a[a.length - 1];
397
- return typeof l != "object" ? !1 : o in l;
397
+ return typeof c != "object" ? !1 : o in c;
398
398
  }
399
- function N(e, a, l) {
399
+ function N(e, a, c) {
400
400
  let o = e;
401
401
  h["dot-notation"] || (a = [a.join(".")]), a.slice(0, -1).forEach(function(v) {
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];
402
+ v = ce(v), typeof o == "object" && o[v] === void 0 && (o[v] = {}), typeof o[v] != "object" || Array.isArray(o[v]) ? (Array.isArray(o[v]) ? o[v].push({}) : o[v] = [o[v], {}], o = o[v][o[v].length - 1]) : o = o[v];
403
403
  });
404
- const t = le(a[a.length - 1]), p = g(a.join("."), r.arrays), c = Array.isArray(l);
404
+ const t = ce(a[a.length - 1]), p = g(a.join("."), r.arrays), l = Array.isArray(c);
405
405
  let d = h["duplicate-arguments-array"];
406
- !d && g(t, r.nargs) && (d = !0, (!T(o[t]) && r.nargs[t] === 1 || Array.isArray(o[t]) && o[t].length === r.nargs[t]) && (o[t] = void 0)), 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)), c === Z() ? o[t] = Z(o[t]) : Array.isArray(o[t]) ? d && p && l ? o[t] = h["flatten-duplicate-arrays"] ? o[t].concat(c) : (Array.isArray(o[t][0]) ? o[t] : [o[t]]).concat([c]) : !d && !!p == !!l ? o[t] = c : o[t] = o[t].concat([c]) : o[t] === void 0 && p ? o[t] = l ? c : [c] : d && !(o[t] === void 0 || g(t, r.counts) || g(t, r.bools)) ? o[t] = [o[t], c] : o[t] = c;
407
407
  }
408
408
  function qe(...e) {
409
409
  e.forEach(function(a) {
410
- Object.keys(a || {}).forEach(function(l) {
411
- r.aliases[l] || (r.aliases[l] = [].concat(_[l] || []), r.aliases[l].concat(l).forEach(function(o) {
410
+ Object.keys(a || {}).forEach(function(c) {
411
+ r.aliases[c] || (r.aliases[c] = [].concat(_[c] || []), r.aliases[c].concat(c).forEach(function(o) {
412
412
  if (/-/.test(o) && h["camel-case-expansion"]) {
413
413
  const t = W(o);
414
- t !== l && r.aliases[l].indexOf(t) === -1 && (r.aliases[l].push(t), Q[t] = !0);
414
+ t !== c && r.aliases[c].indexOf(t) === -1 && (r.aliases[c].push(t), Q[t] = !0);
415
415
  }
416
- }), r.aliases[l].concat(l).forEach(function(o) {
416
+ }), r.aliases[c].concat(c).forEach(function(o) {
417
417
  if (o.length > 1 && /[A-Z]/.test(o) && h["camel-case-expansion"]) {
418
418
  const t = Oe(o, "-");
419
- t !== l && r.aliases[l].indexOf(t) === -1 && (r.aliases[l].push(t), Q[t] = !0);
419
+ t !== c && r.aliases[c].indexOf(t) === -1 && (r.aliases[c].push(t), Q[t] = !0);
420
420
  }
421
- }), r.aliases[l].forEach(function(o) {
422
- r.aliases[o] = [l].concat(r.aliases[l].filter(function(t) {
421
+ }), r.aliases[c].forEach(function(o) {
422
+ r.aliases[o] = [c].concat(r.aliases[c].filter(function(t) {
423
423
  return o !== t;
424
424
  }));
425
425
  }));
@@ -427,7 +427,7 @@ class Ne {
427
427
  });
428
428
  }
429
429
  function g(e, a) {
430
- const l = [].concat(r.aliases[e] || [], e), o = Object.keys(a), t = l.find((p) => o.includes(p));
430
+ const c = [].concat(r.aliases[e] || [], e), o = Object.keys(a), t = c.find((p) => o.includes(p));
431
431
  return t ? a[t] : !1;
432
432
  }
433
433
  function ue(e) {
@@ -445,14 +445,14 @@ class Ne {
445
445
  function ve(e) {
446
446
  if (e.match(L) || !e.match(/^-[^-]+/))
447
447
  return !1;
448
- let a = !0, l;
448
+ let a = !0, c;
449
449
  const o = e.slice(1).split("");
450
450
  for (let t = 0; t < o.length; t++) {
451
- if (l = e.slice(t + 2), !ue(o[t])) {
451
+ if (c = e.slice(t + 2), !ue(o[t])) {
452
452
  a = !1;
453
453
  break;
454
454
  }
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/))
455
+ if (o[t + 1] && o[t + 1] === "=" || c === "-" || /[A-Za-z]/.test(o[t]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(c) || o[t + 1] && o[t + 1].match(/\W/))
456
456
  break;
457
457
  }
458
458
  return a;
@@ -521,7 +521,7 @@ function ze(i) {
521
521
  function Z(i) {
522
522
  return i !== void 0 ? i + 1 : 1;
523
523
  }
524
- function le(i) {
524
+ function ce(i) {
525
525
  return i === "__proto__" ? "___proto___" : i;
526
526
  }
527
527
  function je(i) {
@@ -536,9 +536,9 @@ function je(i) {
536
536
  * SPDX-License-Identifier: ISC
537
537
  */
538
538
  var X, ee, te;
539
- const ce = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12, pe = (ee = (X = process == null ? void 0 : process.versions) === null || X === void 0 ? void 0 : X.node) !== null && ee !== void 0 ? ee : (te = process == null ? void 0 : process.version) === null || te === void 0 ? void 0 : te.slice(1);
540
- if (pe && Number(pe.match(/^([^.]+)/)[1]) < ce)
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`);
539
+ const le = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12, pe = (ee = (X = process == null ? void 0 : process.versions) === null || X === void 0 ? void 0 : X.node) !== null && ee !== void 0 ? ee : (te = process == null ? void 0 : process.version) === null || te === void 0 ? void 0 : te.slice(1);
540
+ if (pe && Number(pe.match(/^([^.]+)/)[1]) < le)
541
+ throw Error(`yargs parser supports a minimum Node.js version of ${le}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
542
542
  const Qe = process ? process.env : {};
543
543
  new Ne({
544
544
  cwd: process.cwd,
@@ -1143,29 +1143,52 @@ const ie = [
1143
1143
  required: !0
1144
1144
  }
1145
1145
  ]
1146
+ },
1147
+ {
1148
+ api_flavor: "anthropic",
1149
+ root: "usage",
1150
+ model_path: "model",
1151
+ mappings: [
1152
+ {
1153
+ path: "input_tokens",
1154
+ dest: "input_tokens",
1155
+ required: !0
1156
+ },
1157
+ {
1158
+ path: "cache_creation_input_tokens",
1159
+ dest: "input_tokens",
1160
+ required: !1
1161
+ },
1162
+ {
1163
+ path: "cache_read_input_tokens",
1164
+ dest: "input_tokens",
1165
+ required: !1
1166
+ },
1167
+ {
1168
+ path: "cache_creation_input_tokens",
1169
+ dest: "cache_write_tokens",
1170
+ required: !1
1171
+ },
1172
+ {
1173
+ path: "cache_read_input_tokens",
1174
+ dest: "cache_read_tokens",
1175
+ required: !1
1176
+ },
1177
+ {
1178
+ path: "output_tokens",
1179
+ dest: "output_tokens",
1180
+ required: !0
1181
+ }
1182
+ ]
1146
1183
  }
1147
1184
  ],
1148
1185
  models: [
1149
1186
  {
1150
- id: "meta.llama3-8b-instruct-v1:0",
1151
- match: {
1152
- contains: "llama3-8b-instruct-v1"
1153
- },
1154
- prices: {
1155
- input_mtok: 0.3,
1156
- output_mtok: 0.6
1157
- }
1158
- },
1159
- {
1160
- id: "nova-lite-v1",
1161
- name: "Nova Lite 1.0",
1187
+ id: "amazon.nova-lite-v1:0",
1188
+ name: "Nova Lite",
1162
1189
  description: "Amazon Nova Lite 1.0 is a very low-cost multimodal model from Amazon that focused on fast processing of image, video, and text inputs to generate text output. Amazon Nova Lite can handle real-time customer interactions, document analysis, and visual question-answering tasks with high accuracy.",
1163
1190
  match: {
1164
- or: [
1165
- {
1166
- contains: "nova-lite-v1"
1167
- }
1168
- ]
1191
+ contains: "nova-lite"
1169
1192
  },
1170
1193
  prices: {
1171
1194
  input_mtok: 0.06,
@@ -1174,15 +1197,11 @@ const ie = [
1174
1197
  }
1175
1198
  },
1176
1199
  {
1177
- id: "nova-micro-v1",
1178
- name: "Nova Micro 1.0",
1200
+ id: "amazon.nova-micro-v1:0",
1201
+ name: "Nova Micro",
1179
1202
  description: "Amazon Nova Micro 1.0 is a text-only model that delivers the lowest latency responses in the Amazon Nova family of models at a very low cost. With a context length of 128K tokens and optimized for speed and cost, Amazon Nova Micro excels at tasks such as text summarization, translation, content classification, interactive chat, and brainstorming. It has simple mathematical reasoning and coding abilities.",
1180
1203
  match: {
1181
- or: [
1182
- {
1183
- contains: "nova-micro-v1"
1184
- }
1185
- ]
1204
+ contains: "nova-micro"
1186
1205
  },
1187
1206
  prices: {
1188
1207
  input_mtok: 0.035,
@@ -1191,21 +1210,315 @@ const ie = [
1191
1210
  }
1192
1211
  },
1193
1212
  {
1194
- id: "nova-pro-v1",
1195
- name: "Nova Pro 1.0",
1213
+ id: "amazon.nova-premier-v1:0",
1214
+ name: "Nova Premier",
1215
+ match: {
1216
+ contains: "nova-premier"
1217
+ },
1218
+ prices: {
1219
+ input_mtok: 2.5,
1220
+ cache_read_mtok: 0.625,
1221
+ output_mtok: 12.5
1222
+ }
1223
+ },
1224
+ {
1225
+ id: "amazon.nova-pro-v1:0",
1226
+ name: "Nova Pro",
1196
1227
  description: "Amazon Nova Pro 1.0 is a capable multimodal model from Amazon focused on providing a combination of accuracy, speed, and cost for a wide range of tasks. As of December 2024, it achieves state-of-the-art performance on key benchmarks including visual question answering (TextVQA) and video understanding (VATEX).",
1197
1228
  match: {
1198
- or: [
1199
- {
1200
- contains: "nova-pro-v1"
1201
- }
1202
- ]
1229
+ contains: "nova-pro"
1203
1230
  },
1204
1231
  prices: {
1205
1232
  input_mtok: 0.8,
1206
1233
  cache_read_mtok: 0.2,
1207
1234
  output_mtok: 3.2
1208
1235
  }
1236
+ },
1237
+ {
1238
+ id: "amazon.nova-sonic-v1:0",
1239
+ name: "Nova Sonic",
1240
+ match: {
1241
+ contains: "nova-sonic"
1242
+ },
1243
+ prices: {
1244
+ input_mtok: 0.06,
1245
+ output_mtok: 0.24,
1246
+ input_audio_mtok: 3.4,
1247
+ output_audio_mtok: 13.6
1248
+ }
1249
+ },
1250
+ {
1251
+ id: "amazon.titan-embed-text-v1",
1252
+ name: "Titan Embeddings G1 - Text",
1253
+ match: {
1254
+ contains: "titan-embed-text"
1255
+ },
1256
+ prices: {
1257
+ input_mtok: 0.1
1258
+ }
1259
+ },
1260
+ {
1261
+ id: "amazon.titan-text-express-v1",
1262
+ name: "Titan Text G1 - Express",
1263
+ match: {
1264
+ contains: "titan-text-express"
1265
+ },
1266
+ prices: {
1267
+ input_mtok: 0.2,
1268
+ output_mtok: 0.6
1269
+ }
1270
+ },
1271
+ {
1272
+ id: "amazon.titan-text-lite-v1",
1273
+ name: "Titan Text G1 - Lite",
1274
+ match: {
1275
+ contains: "titan-text-lite"
1276
+ },
1277
+ prices: {
1278
+ input_mtok: 0.15,
1279
+ output_mtok: 0.2
1280
+ }
1281
+ },
1282
+ {
1283
+ id: "anthropic.claude-3-haiku-20240307-v1:0",
1284
+ name: "Claude 3 Haiku",
1285
+ match: {
1286
+ contains: "claude-3-haiku-20240307"
1287
+ },
1288
+ prices: {
1289
+ input_mtok: 0.25
1290
+ }
1291
+ },
1292
+ {
1293
+ id: "deepseek.r1-v1:0",
1294
+ name: "DeepSeek-R1",
1295
+ match: {
1296
+ contains: "r1"
1297
+ },
1298
+ prices: {
1299
+ input_mtok: 1.35,
1300
+ output_mtok: 5.4
1301
+ }
1302
+ },
1303
+ {
1304
+ id: "meta.llama3-1-70b-instruct-v1:0",
1305
+ name: "Llama 3.1 70B Instruct",
1306
+ match: {
1307
+ contains: "llama3-1-70b-instruct"
1308
+ },
1309
+ prices: {
1310
+ input_mtok: 0.72,
1311
+ output_mtok: 0.72
1312
+ }
1313
+ },
1314
+ {
1315
+ id: "meta.llama3-1-8b-instruct-v1:0",
1316
+ name: "Llama 3.1 8B Instruct",
1317
+ match: {
1318
+ contains: "llama3-1-8b-instruct"
1319
+ },
1320
+ prices: {
1321
+ input_mtok: 0.22,
1322
+ output_mtok: 0.22
1323
+ }
1324
+ },
1325
+ {
1326
+ id: "meta.llama3-2-11b-instruct-v1:0",
1327
+ name: "Llama 3.2 11B Instruct",
1328
+ match: {
1329
+ contains: "llama3-2-11b-instruct"
1330
+ },
1331
+ prices: {
1332
+ input_mtok: 0.16,
1333
+ output_mtok: 0.16
1334
+ }
1335
+ },
1336
+ {
1337
+ id: "meta.llama3-2-1b-instruct-v1:0",
1338
+ name: "Llama 3.2 1B Instruct",
1339
+ match: {
1340
+ contains: "llama3-2-1b-instruct"
1341
+ },
1342
+ prices: {
1343
+ input_mtok: 0.1,
1344
+ output_mtok: 0.1
1345
+ }
1346
+ },
1347
+ {
1348
+ id: "meta.llama3-2-3b-instruct-v1:0",
1349
+ name: "Llama 3.2 3B Instruct",
1350
+ match: {
1351
+ contains: "llama3-2-3b-instruct"
1352
+ },
1353
+ prices: {
1354
+ input_mtok: 0.15,
1355
+ output_mtok: 0.15
1356
+ }
1357
+ },
1358
+ {
1359
+ id: "meta.llama3-2-90b-instruct-v1:0",
1360
+ name: "Llama 3.2 90B Instruct",
1361
+ match: {
1362
+ contains: "llama3-2-90b-instruct"
1363
+ },
1364
+ prices: {
1365
+ input_mtok: 0.72,
1366
+ output_mtok: 0.72
1367
+ }
1368
+ },
1369
+ {
1370
+ id: "meta.llama3-3-70b-instruct-v1:0",
1371
+ name: "Llama 3.3 70B Instruct",
1372
+ match: {
1373
+ contains: "llama3-3-70b-instruct"
1374
+ },
1375
+ prices: {
1376
+ input_mtok: 0.72,
1377
+ output_mtok: 0.72
1378
+ }
1379
+ },
1380
+ {
1381
+ id: "meta.llama3-70b-instruct-v1:0",
1382
+ name: "Llama 3 70B Instruct",
1383
+ match: {
1384
+ contains: "llama3-70b-instruct"
1385
+ },
1386
+ prices: {
1387
+ input_mtok: 2.65,
1388
+ output_mtok: 3.5
1389
+ }
1390
+ },
1391
+ {
1392
+ id: "meta.llama3-8b-instruct-v1:0",
1393
+ name: "Llama 3 8B Instruct",
1394
+ match: {
1395
+ contains: "llama3-8b-instruct"
1396
+ },
1397
+ prices: {
1398
+ input_mtok: 0.3,
1399
+ output_mtok: 0.6
1400
+ }
1401
+ },
1402
+ {
1403
+ id: "meta.llama4-maverick-17b-instruct-v1:0",
1404
+ name: "Llama 4 Maverick 17B Instruct",
1405
+ match: {
1406
+ contains: "llama4-maverick-17b-instruct"
1407
+ },
1408
+ prices: {
1409
+ input_mtok: 0.24,
1410
+ output_mtok: 0.97
1411
+ }
1412
+ },
1413
+ {
1414
+ id: "meta.llama4-scout-17b-instruct-v1:0",
1415
+ name: "Llama 4 Scout 17B Instruct",
1416
+ match: {
1417
+ contains: "llama4-scout-17b-instruct"
1418
+ },
1419
+ prices: {
1420
+ input_mtok: 0.17,
1421
+ output_mtok: 0.66
1422
+ }
1423
+ },
1424
+ {
1425
+ id: "mistral.mistral-7b-instruct-v0:2",
1426
+ name: "Mistral 7B Instruct",
1427
+ match: {
1428
+ contains: "mistral-7b-instruct"
1429
+ },
1430
+ prices: {
1431
+ input_mtok: 0.15,
1432
+ output_mtok: 0.2
1433
+ }
1434
+ },
1435
+ {
1436
+ id: "mistral.mistral-large-2402-v1:0",
1437
+ name: "Mistral Large (24.02)",
1438
+ match: {
1439
+ contains: "mistral-large-2402"
1440
+ },
1441
+ prices: {
1442
+ input_mtok: 4,
1443
+ output_mtok: 12
1444
+ }
1445
+ },
1446
+ {
1447
+ id: "mistral.mistral-small-2402-v1:0",
1448
+ name: "Mistral Small (24.02)",
1449
+ match: {
1450
+ contains: "mistral-small-2402"
1451
+ },
1452
+ prices: {
1453
+ input_mtok: 1,
1454
+ output_mtok: 3
1455
+ }
1456
+ },
1457
+ {
1458
+ id: "mistral.mixtral-8x7b-instruct-v0:1",
1459
+ name: "Mixtral 8x7B Instruct",
1460
+ match: {
1461
+ contains: "mixtral-8x7b-instruct"
1462
+ },
1463
+ prices: {
1464
+ input_mtok: 0.45,
1465
+ output_mtok: 0.7
1466
+ }
1467
+ },
1468
+ {
1469
+ id: "mistral.pixtral-large-2502-v1:0",
1470
+ name: "Pixtral Large (25.02)",
1471
+ match: {
1472
+ contains: "pixtral-large-2502"
1473
+ },
1474
+ prices: {
1475
+ input_mtok: 2,
1476
+ output_mtok: 6
1477
+ }
1478
+ },
1479
+ {
1480
+ id: "openai.gpt-oss-120b-1:0",
1481
+ name: "gpt-oss-120b",
1482
+ match: {
1483
+ contains: "gpt-oss-120b"
1484
+ },
1485
+ prices: {
1486
+ input_mtok: 0.15,
1487
+ output_mtok: 0.6
1488
+ }
1489
+ },
1490
+ {
1491
+ id: "openai.gpt-oss-20b-1:0",
1492
+ name: "gpt-oss-20b",
1493
+ match: {
1494
+ contains: "gpt-oss-20b"
1495
+ },
1496
+ prices: {
1497
+ input_mtok: 0.07,
1498
+ output_mtok: 0.3
1499
+ }
1500
+ },
1501
+ {
1502
+ id: "qwen.qwen3-32b-v1:0",
1503
+ name: "Qwen3 32B (dense)",
1504
+ match: {
1505
+ contains: "qwen3-32b"
1506
+ },
1507
+ prices: {
1508
+ input_mtok: 0.15,
1509
+ output_mtok: 0.6
1510
+ }
1511
+ },
1512
+ {
1513
+ id: "qwen.qwen3-coder-30b-a3b-v1:0",
1514
+ name: "Qwen3-Coder-30B-A3B-Instruct",
1515
+ match: {
1516
+ contains: "qwen3-coder-30b-a3b"
1517
+ },
1518
+ prices: {
1519
+ input_mtok: 0.15,
1520
+ output_mtok: 0.6
1521
+ }
1209
1522
  }
1210
1523
  ]
1211
1524
  },
@@ -2984,6 +3297,43 @@ Compared to other leading proprietary and open-weights models Command A delivers
2984
3297
  }
2985
3298
  }
2986
3299
  },
3300
+ {
3301
+ id: "gemini-3-pro-preview",
3302
+ name: "Gemini 3 Pro Preview",
3303
+ description: "The best model in the world for multimodal understanding, and our most powerful agentic and vibe-coding model yet.",
3304
+ match: {
3305
+ starts_with: "gemini-3-pro-preview"
3306
+ },
3307
+ prices: {
3308
+ input_mtok: {
3309
+ base: 2,
3310
+ tiers: [
3311
+ {
3312
+ start: 2e5,
3313
+ price: 4
3314
+ }
3315
+ ]
3316
+ },
3317
+ cache_read_mtok: {
3318
+ base: 0.2,
3319
+ tiers: [
3320
+ {
3321
+ start: 2e5,
3322
+ price: 0.4
3323
+ }
3324
+ ]
3325
+ },
3326
+ output_mtok: {
3327
+ base: 12,
3328
+ tiers: [
3329
+ {
3330
+ start: 2e5,
3331
+ price: 18
3332
+ }
3333
+ ]
3334
+ }
3335
+ }
3336
+ },
2987
3337
  {
2988
3338
  id: "gemini-embedding-001",
2989
3339
  match: {