kober-basket/dsh-cachescope
Shows how much prompt cache a model call actually used, then explains what changed in the logical input when a cache read drops.
Puts provider-reported cache-token usage beside a local diff of the DSH input, so a cache miss becomes diagnosable instead of mysterious. The arithmetic it shows is current uncached = previous uncached + change in prompt - change in cache read - change in cache write, and the input tree classifies each region as stable prefix, first local difference, downstream, or no baseline. It also reports call TTFT with median and P95, retries, purpose and optional local cost estimates. Equally careful about what it does not mean: the ratio is the adapter's normalized figure rather than the provider console's aggregate, the colours are a comparison against the previous call rather than proof the provider used a region as a cache key, and output tokens enter neither side of the ratio.
Install
dsh plugin --profile web add @kober-basket/dsh-cachescopeThe npm line, then dsh web and open http://127.0.0.1:3080/cachescope. Read the privacy note before the install: the published bundle overrides the schema default and ships captureInput: full, so it can hold the latest 12 complete logical inputs in the DSH process, up to 2,000,000 UTF-8 JSON bytes each. If you do not need whole-input inspection, mount the row with captureInput: metadata instead and restart DSH — the profile's own patch stays authoritative over the bundle's override.
Compatibility
Mounts on the llm/stream seam and serves a desktop dashboard, so it needs the Web profile; it registers no model-visible tool and does not modify requests. The comparison baseline is in-process, which is why the first observed call in a session shows no adjacent diff, and why the input tree is the DSH logical input captured before provider serialization rather than the wire payload. Cache Read also stays unreported when the adapter does not carry that usage field — the README is explicit that a missing field is not treated as zero.
Details
- Repo: kober-basket/dsh-cachescope
- Category: Usage & Billing
- Stars: 2
- Version: 0.1.2 (npm)
Alternatives
helloxkk/dsh-scope · LemCAE/dsh-balance · igormel81/dsh-chat-cost