Files
cburn/internal/config/pricing_test.go
teernisse baa88efe75 feat: add time-based pricing lookup for historical accuracy
Introduces LookupPricingAt() to resolve model pricing at a specific
timestamp instead of always using current prices. This is important
for accurate cost calculations when analyzing historical sessions
where pricing may have changed.

Changes:
- Add modelPricingVersion struct with EffectiveFrom timestamp
- Add defaultPricingHistory map for versioned pricing entries
- Update LookupPricing to delegate to LookupPricingAt(model, time.Now())
- Add comprehensive tests for time-windowed pricing lookup

The infrastructure supports future pricing changes by adding entries
to defaultPricingHistory with their effective dates.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-23 10:08:55 -05:00

2.0 KiB