fix: Hot-reload pricing table when a newer snapshot lands
PricingService loaded the litellm pricing table from disk once per app launch (a loaded-guard) and never reloaded. The background refresh downloads a fresh snapshot to disk on a 24h TTL, but nothing pulled it back into memory, so a long-running session (the menu bar app can run for weeks) stayed pinned to the snapshot present at launch. A model released mid-session (e.g. opus-4-8) had no pricing entry and every one of its rows priced at $0 — today's cost collapsed to the non-4-8 remainder (observed $0.25 vs a correct ~$13). Add reloadIfFreshChanged(): each refresh cycle, if the on-disk fresh file's mtime differs from the in-memory snapshot's, reload it. Wired into SessionParseCacheV2.refreshFromFilesystem() before pricing rows, so a fresh download takes effect within one cycle (~5 min), no restart. Also resolve all model prices in a single atomic actor hop up front in costSummary() (new prices(for:)) instead of awaiting per row, so a concurrent reload can't swap the table mid-summary and mix old/new prices into one result. Verified end-to-end: with opus-4-8 removed from the on-disk table the running app showed $0.49; swapping the full table back in, it hot-reloaded to the correct total within one cycle without a restart.
X
XueshiQiao committed
f78fd8bb192fee3b571c077d1df9af04f635fb72
Parent: 5b0634a