Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.246 Home All releases olderv2.1.245 v2.1.247newer
Claude Code v2.1.246

Warning when a custom endpoint is not caching your prompts

You'll notice
Useful4 Signal3
API Endpoints Notable

Claude Code now warns in the log when a custom endpoint is throwing away your prompt cache.

What

Claude Code now watches whether prompt caching is actually taking effect. After three turns in a row with 20,000 or more input tokens and essentially no cache being written or read, it logs a warning that a custom endpoint is discarding the cache, which shows up as slower, more expensive turns.

Details
  • Emits api_prompt_cache_coverage with a cache_coverage_loss outcome plus the consecutive-turn count and token counts.
  • A one-time confirmation on the same event fires instead when caching is seen working.
  • The check runs for providers reached through a gateway, and conditionally for the first-party API.
Evidence

sustained uncovered input with a cache breakpoint on the wire through a custom endpoint

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.246 →