@ipv9/tokentracker-cli 0.39.53 → 0.39.55

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.
Files changed (22) hide show
  1. package/dashboard/dist/assets/{Card-BZkG7ExP.js → Card-CtvDXZw0.js} +1 -1
  2. package/dashboard/dist/assets/{DashboardPage-BXs8ZVPT.js → DashboardPage-Y1wWgbMc.js} +3 -3
  3. package/dashboard/dist/assets/{IpCheckPage-Hm0zUwdf.js → IpCheckPage-Bor8g4lv.js} +1 -1
  4. package/dashboard/dist/assets/{LimitsPage-BxsnbmDo.js → LimitsPage-CIac9eQA.js} +1 -1
  5. package/dashboard/dist/assets/{LocalOnlyNotice-BvwC1vCO.js → LocalOnlyNotice-Dr74ws0K.js} +1 -1
  6. package/dashboard/dist/assets/{PopoverPopup-HsE_7fXK.js → PopoverPopup-DhIs9KLg.js} +1 -1
  7. package/dashboard/dist/assets/{Select-7_WyWhaS.js → Select-B-hdqLRw.js} +1 -1
  8. package/dashboard/dist/assets/{SettingsPage-DbJxd3N7.js → SettingsPage-CGmMNqQ4.js} +1 -1
  9. package/dashboard/dist/assets/{SkillsPage-Dae3HfP-.js → SkillsPage-D70T7nYt.js} +1 -1
  10. package/dashboard/dist/assets/{WrappedPage-DZU9PYF5.js → WrappedPage-CXCjVq_h.js} +1 -1
  11. package/dashboard/dist/assets/{format-DtQGOz67.js → format-Cf1THGDG.js} +1 -1
  12. package/dashboard/dist/assets/{limitDisplay-B1ZUkTHM.js → limitDisplay-HHiXLwsI.js} +1 -1
  13. package/dashboard/dist/assets/{main-BBQHiOju.js → main-B5OWbrt1.js} +4 -3
  14. package/dashboard/dist/assets/{mock-data-Ct1Wvcew.js → mock-data-D7OvhHFq.js} +1 -1
  15. package/dashboard/dist/assets/{use-limits-display-prefs-CYoiCfEE.js → use-limits-display-prefs-CJObZZbn.js} +1 -1
  16. package/dashboard/dist/assets/{useCurrency-DGkZG989.js → useCurrency-AuPUpwUc.js} +1 -1
  17. package/dashboard/dist/index.html +1 -1
  18. package/package.json +1 -1
  19. package/src/lib/pricing/curated-overrides.json +2 -2
  20. package/src/lib/pricing/matcher.js +36 -1
  21. package/src/lib/pricing/seed-snapshot.json +1 -1
  22. package/src/lib/rollout.js +92 -34
@@ -100,7 +100,26 @@ function lookupContainedExactCaseInsensitive(table, model) {
100
100
  return null;
101
101
  }
102
102
 
103
- function lookupPricing(model, { curated, litellm, source } = {}) {
103
+ // Strips known "vendor build-label" noise so an already-priced model hiding
104
+ // under an auto-pilot/canary wrapper name can still resolve without a
105
+ // hand-added curated entry for every wrapped variant (issue #193). Scoped to
106
+ // the exact shapes seen in production: an "-auto-pilot-" infix used as a
107
+ // build-label separator, and a trailing "-vN-canary" / "-canary" release
108
+ // marker. Deliberately does NOT touch "-preview"/"-beta"/reasoning-effort
109
+ // suffixes (handled separately by stripReasoningSuffix) since those can carry
110
+ // real pricing distinctions.
111
+ const AUTO_PILOT_INFIX = /-auto-pilot-/g;
112
+ const CANARY_SUFFIX = /-v\d+-canary$|-canary$/;
113
+
114
+ function stripVendorRenameNoise(model) {
115
+ if (typeof model !== "string" || !model) return "";
116
+ let stripped = model.replace(AUTO_PILOT_INFIX, "-");
117
+ stripped = stripped.replace(CANARY_SUFFIX, "");
118
+ return stripped;
119
+ }
120
+
121
+ function lookupPricing(model, opts = {}) {
122
+ const { curated, litellm, source, _denoised = false } = opts;
104
123
  if (!model || typeof model !== "string") {
105
124
  return { hit: false, source: "empty", value: null };
106
125
  }
@@ -202,6 +221,21 @@ function lookupPricing(model, { curated, litellm, source } = {}) {
202
221
  }
203
222
  }
204
223
 
224
+ // 8. Vendor-rename denoise retry (issue #193). Runs LAST and only once (the
225
+ // `_denoised` guard prevents re-entering this branch on the recursive
226
+ // call), after every tier above has already had first crack at the raw
227
+ // model id — so a real curated/LiteLLM entry that happens to already
228
+ // contain "-auto-pilot-" or "-canary" is never shadowed by the stripped
229
+ // retry. Only fires when stripping actually changed the string, so it
230
+ // cannot loop or duplicate work for models with no vendor-rename noise.
231
+ if (!_denoised) {
232
+ const denoised = stripVendorRenameNoise(model);
233
+ if (denoised && denoised !== model) {
234
+ const retry = lookupPricing(denoised, { curated, litellm, source, _denoised: true });
235
+ if (retry.hit) return retry;
236
+ }
237
+ }
238
+
205
239
  return { hit: false, source: "miss", value: null };
206
240
  }
207
241
 
@@ -249,6 +283,7 @@ function buildLitellmPerMillionMap(rawData) {
249
283
  module.exports = {
250
284
  lookupPricing,
251
285
  stripReasoningSuffix,
286
+ stripVendorRenameNoise,
252
287
  normalizeAntigravityModel,
253
288
  convertLitellmEntry,
254
289
  buildLitellmPerMillionMap,