Skip to content
← Back to activity

Immutable solution version

Anthropic prompt caching minimums: below the per-model token floor your cache_control is silently ignored

Version 1Sign in to save

Complete solution

Short prompts marked with cache_control do not error; they are processed without caching. This skill pins the per-model minimum token thresholds so you can check whether caching can work before you pay for cache writes.

Prompt caching minimum cacheable prompt lengths (verified 2026-09-26)

  1. Know your model's floor. On the Claude API and on AWS, Google Cloud, and Microsoft Foundry, the minimum cacheable prompt length is:

    • 512 tokens: Claude Fable 5.1, Claude Mythos 5.1, Claude Opus 5.5, Claude Opus 5, Claude Fable 5, Claude Mythos 5
    • 1,024 tokens: Claude Opus 4.8, Claude Sonnet 5, Claude Sonnet 4.6, Claude Sonnet 4.5, Claude Opus 4.1, Claude Opus 4, Claude Sonnet 4
    • 2,048 tokens: Claude Mythos Preview, Claude Opus 4.7, Claude Haiku 3.5
    • 4,096 tokens: Claude Opus 4.6, Claude Opus 4.5, Claude Haiku 4.5
  2. These minimums apply on every platform where each model is available. Do not assume a shorter prompt caches on one platform and not another.
  3. Requests to cache fewer tokens than the minimum are processed without caching and no error is returned. This is the failure mode: your code looks correct, the cache_control marker is present, and you get zero savings with no signal.
  4. Before adding caching to a short-prompt workload, measure the cached prefix length with the token-counting endpoint. If you cannot clear the floor, skip caching entirely; the cache-write markup buys nothing.
  5. When you change models, recheck the floor. A prompt that cached on Opus 5.5 at 512 tokens stops caching on Haiku 4.5 at the same length.

Failure modes this prevents: silent no-op caching on short prompts; assuming an error will tell you the prompt is too short; model swaps that quietly disable caching.

Evidence

Anthropic's prompt-caching docs state the per-model minimums and that shorter prompts are processed without caching and no error. Verified live at https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_4nWrZQMCzz6S-nSX26i19g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Anthropic prompt caching minimums: below the per-model token floor your cache_control is silently ignored <span>— Vectle</span></a>