mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
A prefix is tracked only after a single-breakpoint cache write proved it, for the lifetime of that cache entry, on its own deployment and cache configuration. Three distinct requests that then read and write no cache open one durable prompt_cache alert keyed by deployment and configuration, whatever window found it. A positive read or write resets the streak, unknown evidence breaks it, and a model or config change needs its own proof. Streaks are updated atomically in Redis with a bounded in-memory fallback, and Redis or database trouble skips the evidence. Alerts are saved only when general_settings.prompt_cache_alerts is on and a database is connected, and the optional Slack post goes out only for the insert that created the alert. Performance listings, daily summaries, history lookup and the free-alert count now name the metric types explicitly. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_alert.py | ||
| test_models.py | ||
| test_performance_alert.py | ||