Expand description
Provider cache diagnostics integration (#1311).
Monitor provider-side prompt cache hit rates and alert on regressions. Anthropic offers 90% cost reduction on cache hits; a drop in hit rate is a cost incident. This module provides the monitoring infrastructure.
Structs§
- Cache
Diagnostics - Cache diagnostic snapshot.
Enums§
- Cache
Alert Severity - Alert severity for cache regressions.
Functions§
- check_
alert - Generate a cache alert if hit rate is below thresholds.
- hit_
rate - Current cache hit rate (0.0–1.0), or None if no samples yet.
- record_
hit - Record a cache hit from provider response headers.
- record_
miss - Record a cache miss.
- reset
- Reset counters (for testing).