Problem
Tide Pools currently estimates spend using standard API pricing, but users running Anthropic via consumer plans (e.g., claude.ai Max extra usage) see billing that diverges from API-rate estimates.
Result: both numbers can be internally consistent, but operationally confusing.
Goal
Add a calibration layer that can learn effective consumer overage rates from real billing totals and produce a more accurate spend estimate.
Proposed solution
- Keep existing API-rate estimate as baseline (
estimated_charge_api).
- Add optional calibration input (daily/weekly actual charge totals from claude.ai usage/billing).
- Fit effective pricing coefficients by model (plus optional global overhead term).
- Emit a second metric (
estimated_charge_calibrated) with confidence/error bounds.
UX / Output
- API estimate:
$X
- Calibrated estimate:
$Y
- Calibration error:
±Z%
- Last calibration update timestamp
Data model sketch
usage_by_model_per_day (already derivable from session logs)
actual_charge_per_day (user-entered/imported)
- Fitted params:
{model_rates, intercept, confidence}
Acceptance criteria
- Users can supply at least 7 days of actual charge totals.
- Tide Pools reports both API and calibrated estimates.
- Report includes confidence/error band and warns when calibration data is stale.
- Calibration can be disabled (fallback to API estimate only).
Notes
- This should be provider-agnostic where possible, but Anthropic consumer overage is the immediate driver.
- Keep implementation lightweight and transparent (no black-box surprises).
Problem
Tide Pools currently estimates spend using standard API pricing, but users running Anthropic via consumer plans (e.g., claude.ai Max extra usage) see billing that diverges from API-rate estimates.
Result: both numbers can be internally consistent, but operationally confusing.
Goal
Add a calibration layer that can learn effective consumer overage rates from real billing totals and produce a more accurate spend estimate.
Proposed solution
estimated_charge_api).estimated_charge_calibrated) with confidence/error bounds.UX / Output
$X$Y±Z%Data model sketch
usage_by_model_per_day(already derivable from session logs)actual_charge_per_day(user-entered/imported){model_rates, intercept, confidence}Acceptance criteria
Notes