mirror of
https://github.com/teamchong/pxpipe.git
synced 2026-07-22 02:02:51 +02:00
ff8a05e30c
A fresh same-session prior within the TTL is no longer sufficient to price the text counterfactual warm: deriveBaselineWarmth now also requires the static-prefix hash (system_sha8) to match. When opencode rotates the system prompt / tool docs mid-session, the cacheable prefix changes, so a text-only client would hit a new provider cache key too — pricing it warm against a cold actual fabricated a huge phantom "loss" (the dashboard's 800%-worse report). cr>0 still rescues a genuine warm read with no in-memory prior. Wired through update(), replay(), and aggregateSessions via system_sha8. Also surface losses honestly in the recent table (Saved/lost: negative deltas in red instead of hidden as "—") and clarify headings as billing-equivalent input tokens. Docs updated to match.