@faithfulalabi/agent-lens 0.15.2 → 0.15.3

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.
@@ -28,14 +28,22 @@ export const PRICING_TABLE = Object.freeze({
28
28
  'claude-opus-4-5': { input: 5, output: 25, cache_read: 0.5, cache_write: 6.25 },
29
29
  'claude-opus-4-1': { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 },
30
30
  'claude-opus-4': { input: 15, output: 75, cache_read: 1.5, cache_write: 18.75 },
31
+ 'claude-sonnet-5-5': { input: 2, output: 10, cache_read: 0.1, cache_write: 2.5 },
31
32
  'claude-sonnet-5': { input: 2, output: 10, cache_read: 0.2, cache_write: 2.5 },
32
33
  'claude-sonnet-4-6': { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 },
33
34
  'claude-sonnet-4-5': { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 },
34
35
  'claude-sonnet-4': { input: 3, output: 15, cache_read: 0.3, cache_write: 3.75 },
36
+ 'claude-haiku-5-5': {
37
+ input: 0.1,
38
+ output: 0.5,
39
+ cache_read: 0.01,
40
+ cache_write: 0.125,
41
+ over_100k: { input: 0.5, output: 2.5, cache_read: 0.05, cache_write: 0.625 },
42
+ },
35
43
  'claude-haiku-4-5': { input: 1, output: 5, cache_read: 0.1, cache_write: 1.25 },
36
44
  'claude-3-5-haiku': { input: 0.8, output: 4, cache_read: 0.08, cache_write: 1 },
37
45
  });
38
- export const PRICING_TABLE_DATE = '2026-10-28';
46
+ export const PRICING_TABLE_DATE = '2026-10-29';
39
47
  export const PRICING_VERSION = `${PRICING_TABLE_DATE}+${createHash('sha256')
40
48
  .update(canonicalJson(PRICING_TABLE), 'utf8')
41
49
  .digest('hex')
@@ -57,7 +65,9 @@ export function estimateCost(model, usage) {
57
65
  const key = normalizeModelKey(model);
58
66
  if (key === undefined)
59
67
  return null;
60
- const price = PRICING_TABLE[key];
68
+ const row = PRICING_TABLE[key];
69
+ const prompt = (usage.tokens_in ?? 0) + (usage.cache_read ?? 0) + (usage.cache_write ?? 0);
70
+ const price = row.over_100k && prompt > 100_000 ? row.over_100k : row;
61
71
  const oneHour = usage.cache_write_1h ?? 0;
62
72
  const millionths = (usage.tokens_in ?? 0) * price.input +
63
73
  (usage.tokens_out ?? 0) * price.output +
@@ -1 +1 @@
1
- export const PROJECTOR_VERSION = 22;
1
+ export const PROJECTOR_VERSION = 23;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faithfulalabi/agent-lens",
3
- "version": "0.15.2",
3
+ "version": "0.15.3",
4
4
  "description": "Local-first agentic tracing platform: inspect everything your agent did in a session.",
5
5
  "type": "module",
6
6
  "license": "MIT",