Add Claude Opus 5 medium cost controls

⛔ closed · #310 · open-legal-products/mike ← xavierbr/mike · opened 24d ago by xavierbr · closed 24d ago · +510-20 across 25 files · ↗ on GitHub

From the PR description

Summary

  • replace the retired Opus 4.7 picker entry with Claude Opus 5 and migrate saved 4.7 selections
  • add Low, Medium, and High reasoning inside the existing selector, defaulting Opus 5 to Medium
  • enable Anthropic automatic caching, cache stable tool and one-shot system prefixes, and log cache usage counters
  • validate reasoning inputs across standard, project, and tabular chat routes

Verification

  • backend tests on Node 22: 508 passed, 14 skipped
  • frontend tests on Node 22: 239 passed
  • frontend coverage: 99.69% statements, 98.53% branches, 100% functions and lines
  • backend TypeScript build passed
  • frontend lint passed with 0 errors
  • optimized Next.js production build passed

Our analysis

Upgrade Claude Opus reasoning and caching — read the full analysis →

Think the analysis missed something the PR description covers?

Capture this PR into my fork

Download a Markdown prompt that tells Claude how to port every commit in this PR into your working tree. Run it via claude -p < capture-pull-310.md from inside the repo you want the changes in.

⬇ Download capture-pull-310.md