@askalf/dario 5.5.35 → 5.5.37

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 (2) hide show
  1. package/dist/analytics.js +12 -8
  2. package/package.json +1 -1
package/dist/analytics.js CHANGED
@@ -126,13 +126,16 @@ const PRICING = {
126
126
  'claude-opus-4-7': { input: 5, output: 25, cacheRead: 0.5, cacheCreate: 6.25 },
127
127
  // Opus 4.6 is $5/$25 (same as 4.7/4.8), not the old $15/$75 Opus-4.1 rate.
128
128
  'claude-opus-4-6': { input: 5, output: 25, cacheRead: 0.5, cacheCreate: 6.25 },
129
- // Sonnet 5 standard $3/$15; launch intro $2/$10 through 2026-08-31, then
130
- // standard. Cache rates follow Anthropic's usual 0.1x-read / 1.25x-write of
131
- // input. Date-modeled below (was a flat display estimate before).
132
- 'claude-sonnet-5': {
133
- input: 3, output: 15, cacheRead: 0.3, cacheCreate: 3.75,
134
- intro: { input: 2, output: 10, cacheRead: 0.2, cacheCreate: 2.5, until: '2026-08-31' },
135
- },
129
+ // Sonnet 5 is $2/$10 PERMANENTLY. This shipped as "introductory pricing
130
+ // through 2026-08-31, then $3/$15", and was modeled here as a dated cutover.
131
+ // Anthropic has since cancelled that increase and made $2/$10 the standard
132
+ // price, so the cutover must NOT stay: on 2026-09-01 it would have silently
133
+ // started pricing every Sonnet 5 record 50% high, with no error and nothing
134
+ // in the output to suggest the number had moved.
135
+ //
136
+ // Left as a flat rate rather than an `intro` whose `until` sits far in the
137
+ // future — a date nobody is watching is exactly what caused this.
138
+ 'claude-sonnet-5': { input: 2, output: 10, cacheRead: 0.2, cacheCreate: 2.5 },
136
139
  'claude-sonnet-4-6': { input: 3, output: 15, cacheRead: 0.3, cacheCreate: 3.75 },
137
140
  'claude-haiku-4-5': { input: 0.8, output: 4, cacheRead: 0.08, cacheCreate: 1 },
138
141
  };
@@ -155,7 +158,8 @@ export function pricingRateFor(model, atMs) {
155
158
  }
156
159
  function estimateCost(record) {
157
160
  // Price each record at the rate effective at ITS OWN timestamp, so a window
158
- // that spans a pricing cutover (e.g. Sonnet 5's intro ending 2026-08-31)
161
+ // that spans a pricing cutover (no model currently has one — Sonnet 5's
162
+ // scheduled increase was cancelled and its $2/$10 made permanent)
159
163
  // estimates each side correctly rather than repricing history at today's rate.
160
164
  const p = pricingRateFor(record.model, record.timestamp);
161
165
  return ((record.inputTokens * p.input) +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askalf/dario",
3
- "version": "5.5.35",
3
+ "version": "5.5.37",
4
4
  "description": "Use your Claude Pro/Max subscription in any tool — Cursor, Cline, Aider, the Agent SDK, your scripts — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint.",
5
5
  "type": "module",
6
6
  "bin": {