@pydantic/genai-prices 0.0.60 → 0.0.62

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
@@ -172,7 +172,7 @@ class De {
172
172
  let L = null;
173
173
  Ae();
174
174
  let V = [];
175
- const w = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] }), se = {};
175
+ const b = 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;
@@ -182,39 +182,39 @@ class De {
182
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 = 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));
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]) : w(p[1], p[2], !0));
186
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));
187
+ p = a.match(U), p !== null && Array.isArray(p) && p.length >= 2 && (t = p[1], w(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 = 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))));
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) ? (w(t, d), e++) : w(t, R(t))));
190
190
  else if (a.match(/^-.\..+=/))
191
- p = a.match(/^-([^=]+)=([\s\S]*)$/), p !== null && Array.isArray(p) && p.length >= 3 && b(p[1], p[2]);
191
+ p = a.match(/^-([^=]+)=([\s\S]*)$/), p !== null && Array.isArray(p) && p.length >= 3 && w(p[1], p[2]);
192
192
  else if (a.match(/^-.\..+/) && !a.match(I))
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)));
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) ? (w(t, d), e++) : w(t, R(t)));
194
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 = K(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) : w(t, v), n = !0;
199
199
  break;
200
200
  }
201
201
  if (d === "-") {
202
- b(l[x], d);
202
+ w(l[x], d);
203
203
  continue;
204
204
  }
205
205
  if (/[A-Za-z]/.test(l[x]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(d) && g(d, m.bools) === !1) {
206
- b(l[x], d), n = !0;
206
+ w(l[x], d), n = !0;
207
207
  break;
208
208
  }
209
209
  if (l[x + 1] && l[x + 1].match(/\W/)) {
210
- b(l[x], d), n = !0;
210
+ w(l[x], d), n = !0;
211
211
  break;
212
212
  } else
213
- b(l[x], R(l[x]));
213
+ w(l[x], R(l[x]));
214
214
  }
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))));
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) ? (w(t, d), e++) : w(t, R(t))));
216
216
  } else if (a.match(/^-[0-9]$/) && a.match(I) && g(a.slice(1), m.bools))
217
- t = a.slice(1), b(t, R(t));
217
+ t = a.slice(1), w(t, R(t));
218
218
  else if (a === "--") {
219
219
  V = r.slice(e + 1);
220
220
  break;
@@ -224,23 +224,23 @@ class De {
224
224
  } else
225
225
  Y(a);
226
226
  }
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
- N(w, e.split(".")) || b(e, 0);
229
- }), Q && V.length && (w[y] = []), V.forEach(function(e) {
230
- w[y].push(e);
231
- }), k["camel-case-expansion"] && k["strip-dashed"] && Object.keys(w).filter((e) => e !== "--" && e.includes("-")).forEach((e) => {
232
- delete w[e];
227
+ me(b, !0), me(b, !1), fe(b), we(), ue(b, m.aliases, q, !0), be(b), k["set-placeholder-key"] && ve(b), Object.keys(m.counts).forEach(function(e) {
228
+ N(b, e.split(".")) || w(e, 0);
229
+ }), Q && V.length && (b[y] = []), V.forEach(function(e) {
230
+ b[y].push(e);
231
+ }), k["camel-case-expansion"] && k["strip-dashed"] && Object.keys(b).filter((e) => e !== "--" && e.includes("-")).forEach((e) => {
232
+ delete b[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) => W(a)).join(".")], delete w[e];
234
+ k["camel-case-expansion"] && e.includes("-") && delete b[e.split(".").map((a) => W(a)).join(".")], delete b[e];
235
235
  });
236
236
  function Y(e) {
237
237
  const a = H("_", e);
238
- (typeof a == "string" || typeof a == "number") && w._.push(a);
238
+ (typeof a == "string" || typeof a == "number") && b._.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 G(n) || (L = Error(M("Argument unexpected for: %s", a))), b(a, R(a)), e;
243
+ return G(n) || (L = Error(M("Argument unexpected for: %s", a))), w(a, R(a)), e;
244
244
  let p = G(n) ? 0 : 1;
245
245
  if (k["nargs-eats-options"])
246
246
  c.length - (e + 1) + p < l && (L = Error(M("Not enough arguments following: %s", a))), p = l;
@@ -250,8 +250,8 @@ class De {
250
250
  p < l && (L = Error(M("Not enough arguments following: %s", a)));
251
251
  }
252
252
  let d = Math.min(p, l);
253
- for (!G(n) && d > 0 && (b(a, n), d--), t = e + 1; t < d + e + 1; t++)
254
- b(a, c[t]);
253
+ for (!G(n) && d > 0 && (w(a, n), d--), t = e + 1; t < d + e + 1; t++)
254
+ w(a, c[t]);
255
255
  return e + d;
256
256
  }
257
257
  function K(e, a, c, n) {
@@ -269,9 +269,9 @@ class De {
269
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
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) && (L = Error(M("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))), w(a, t), e;
273
273
  }
274
- function b(e, a, c = h) {
274
+ function w(e, a, c = h) {
275
275
  if (/-/.test(e) && k["camel-case-expansion"]) {
276
276
  const l = e.split(".").map(function(p) {
277
277
  return W(p);
@@ -279,13 +279,13 @@ class De {
279
279
  re(e, l);
280
280
  }
281
281
  const n = J(e, a, c), t = e.split(".");
282
- E(w, t, n), m.aliases[e] && m.aliases[e].forEach(function(l) {
282
+ E(b, t, n), m.aliases[e] && m.aliases[e].forEach(function(l) {
283
283
  const p = l.split(".");
284
- E(w, p, n);
284
+ E(b, 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(".")) || E(w, p, n);
288
+ d.shift(), p = p.concat(d), (m.aliases[e] || []).includes(p.join(".")) || E(b, 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,
@@ -340,10 +340,10 @@ class De {
340
340
  function Z(e, a) {
341
341
  Object.keys(e).forEach(function(c) {
342
342
  const n = e[c], t = a ? a + "." + c : c;
343
- typeof n == "object" && n !== null && !Array.isArray(n) && k["dot-notation"] ? Z(n, t) : (!N(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(b, t.split(".")) || g(t, m.arrays) && k["combine-arrays"]) && w(t, n);
344
344
  });
345
345
  }
346
- function be() {
346
+ function we() {
347
347
  typeof T < "u" && T.forEach(function(e) {
348
348
  Z(e);
349
349
  });
@@ -357,11 +357,11 @@ class De {
357
357
  const l = t.split("__").map(function(p, d) {
358
358
  return d === 0 && (p = p.substring(c.length)), W(p);
359
359
  });
360
- (a && m.configs[l.join(".")] || !a) && !N(e, l) && b(l.join("."), n[t]);
360
+ (a && m.configs[l.join(".")] || !a) && !N(e, l) && w(l.join("."), n[t]);
361
361
  }
362
362
  });
363
363
  }
364
- function we(e) {
364
+ function be(e) {
365
365
  let a;
366
366
  const c = /* @__PURE__ */ new Set();
367
367
  Object.keys(e).forEach(function(n) {
@@ -486,7 +486,7 @@ class De {
486
486
  }
487
487
  return {
488
488
  aliases: Object.assign({}, m.aliases),
489
- argv: Object.assign(se, w),
489
+ argv: Object.assign(se, b),
490
490
  configuration: k,
491
491
  defaulted: Object.assign({}, O),
492
492
  error: L,
@@ -1327,7 +1327,14 @@ const ne = [
1327
1327
  pricing_urls: ["https://aws.amazon.com/bedrock/pricing/"],
1328
1328
  api_pattern: "https://bedrock-runtime\\.[a-z0-9-]+\\.amazonaws\\.com/",
1329
1329
  provider_match: {
1330
- contains: "bedrock"
1330
+ or: [
1331
+ {
1332
+ contains: "bedrock"
1333
+ },
1334
+ {
1335
+ contains: "amazon"
1336
+ }
1337
+ ]
1331
1338
  },
1332
1339
  extractors: [
1333
1340
  {
@@ -4251,6 +4258,21 @@ Compared to other leading proprietary and open-weights models Command A delivers
4251
4258
  }
4252
4259
  }
4253
4260
  },
4261
+ {
4262
+ id: "gemini-3.5-flash",
4263
+ name: "Gemini 3.5 Flash",
4264
+ description: "Google's most intelligent model built for speed, combining frontier intelligence with improved reasoning, coding, and multimodal understanding.",
4265
+ match: {
4266
+ starts_with: "gemini-3.5-flash"
4267
+ },
4268
+ context_window: 1e6,
4269
+ price_comments: "See https://ai.google.dev/gemini-api/docs/pricing. Standard tier pricing shown; Batch and Flex tiers offer 50% discount on input/output.",
4270
+ prices: {
4271
+ input_mtok: 1.5,
4272
+ cache_read_mtok: 0.15,
4273
+ output_mtok: 9
4274
+ }
4275
+ },
4254
4276
  {
4255
4277
  id: "gemini-embedding-001",
4256
4278
  match: {
@@ -10821,12 +10843,18 @@ Compared to other leading proprietary and open-weights models Command A delivers
10821
10843
  {
10822
10844
  equals: "gpt-5.5-2026-04-23"
10823
10845
  },
10846
+ {
10847
+ equals: "gpt-5.5-2026-04-24"
10848
+ },
10824
10849
  {
10825
10850
  equals: "gpt-5-5"
10826
10851
  },
10827
10852
  {
10828
10853
  equals: "gpt-5-5-2026-04-23"
10829
10854
  },
10855
+ {
10856
+ equals: "gpt-5-5-2026-04-24"
10857
+ },
10830
10858
  {
10831
10859
  equals: "gpt-5.5-chat"
10832
10860
  },