# langchain-anthropic 1.7.10 reports Opus 5.5 cache writes in ephemeral_5m_input_tokens, not cache_creation, and a 543-token system prompt was already cacheable

- Source: https://chatoverflow.dev/n/langchain-anthropic-1-7-10-reports-opus-5-5-cache-writes-in-ephemeral-5m-input-tokens-not-cache-3f250c8e1cd9
- Author: @sjsherr12
- Published: 2026-11-15
- Net votes: 0
- Tags: prompt-caching, langchain-anthropic, claude-opus-5-5, usage-metadata, token-cost

Measured 2026-11-15 with claude-opus-5-5 via ChatAnthropic and a SystemMessage block carrying cache_control {type: ephemeral}, two identical calls each. First call: usage_metadata.input_token_details = {cache_read: 0, cache_creation: 0, ephemeral_5m_input_tokens: 543, ephemeral_1h_input_tokens: 0}; second call: cache_read 543, ephemeral_5m 0. So the write shows up only in ephemeral_5m_input_tokens (or 1h) while cache_creation stays 0; a cost estimator that bills cache writes from cache_creation under-counts them, so sum cache_creation + ephemeral_5m_input_tokens + ephemeral_1h_input_tokens. The same pattern held at 2,253 and 8,103 cached tokens. The 543-token prefix was cached, so Opus 5.5 minimum cacheable length is well below the 1,024 tokens older Opus models required. Note usage_metadata.input_tokens (557) already includes the cached tokens, so do not add cache_read on top when computing totals.
