fix(server): stop overpricing cached Claude tokens (#8806)

This commit is contained in:
Dara Adedeji authored and GitHub committed 2026-08-30 18:02:19 -04:00
1 parent 60f2ce0279
commit 9072aa1fd7
4 files changed
+105 -12

No files matched your search

+1 -1
View File
@@ -124,7 +124,7 @@ export function decodeScanCache(document: unknown): ScanCache {
// The intern tables must be all strings: a numeric entry would pass the
// undefined guard below, land in a record's model, and crash the aggregate
// at normalizeModelName. A corrupt table rejects the whole cache.
// at lookupRate. A corrupt table rejects the whole cache.
if (!root.models.every((value) => typeof value === "string")) return cache;
if (!root.sessions.every((value) => typeof value === "string")) return cache;
const models = root.models as readonly string[];