usage-tab 1.1.0 → 1.2.0

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/README.md CHANGED
@@ -475,21 +475,21 @@ prevent.
475
475
 
476
476
  Every price carries an `effectiveFrom` (and, when superseded, an
477
477
  `effectiveTo`) date. `calculateCost`'s `at` picks the period active on that
478
- date `claude-sonnet-5`'s real introductory rate is the mandated golden
479
- fixture for this behavior:
478
+ date - `gemini-3.6-flash`'s real promotional rate, whose start and end
479
+ Google publishes, is the golden fixture for this behavior:
480
480
 
481
481
  ```ts
482
482
  import { calculateCost } from 'usage-tab';
483
483
 
484
484
  const usage = { inputTokens: 1_000_000, outputTokens: 1_000_000 };
485
485
 
486
- calculateCost({ model: 'claude-sonnet-5', provider: 'anthropic', usage, at: '2026-08-15' })
486
+ calculateCost({ model: 'gemini-3.6-flash', provider: 'google', usage, at: '2026-11-01' })
487
487
  .totalUsdExact;
488
- // "12.00" the introductory rate ($2.00/$10.00), active through 2026-08-31
488
+ // "4.50" - the promotional rate ($0.75/$3.75), published as running through 2026-12-31
489
489
 
490
- calculateCost({ model: 'claude-sonnet-5', provider: 'anthropic', usage, at: '2026-09-15' })
490
+ calculateCost({ model: 'gemini-3.6-flash', provider: 'google', usage, at: '2027-01-15' })
491
491
  .totalUsdExact;
492
- // "18.00" the standard rate ($3.00/$15.00), effective 2026-09-01
492
+ // "9.00" - the standard rate ($1.50/$7.50), resuming 2027-01-01
493
493
  ```
494
494
 
495
495
  Period boundaries are UTC midnights, so **every ISO `at` string is read as