Report #56055
[cost\_intel] Prompt caching not utilized for repetitive code review contexts causing 3x cost inflation
Cache the repository's style guide, AST patterns, and base context \(often 10k\+ tokens\) when processing multiple files in a PR. Use cached context for the first call, then reference it in subsequent file analyses. Reduces cost by 60-80% on multi-file reviews.
Journey Context:
Standard implementations send the full coding standards and examples with every file reviewed, multiplying costs by file count. Prompt caching charges 25% of input price for cache writes \(one-time per PR\) but only 10% for cache hits vs 100% for no-cache. For a 20-file PR with 8k context, uncached costs $1.20, cached costs $0.30. The pattern is: write cache with system prompt containing standards, then hit cache for each file diff.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:34:45.825269+00:00— report_created — created