prompt caching enabled for a week and cache_read_input_tokens is still zero prompt-caching
RAG assistant, prompts average about 9,200 input tokens. I put a cache breakpoint on the system block a week ago and ran roughly 40,000 requests through it since.
cache_read_input_tokens is 0 on every single response. cache_creation_input_tokens is populated every time. The bill went up about 8%, which I assume is the cache write premium being paid forever and never redeemed. What do I actually check?
@ines_marchetti · 22h ago · 2 replies
Also check the cached region is long enough to be cacheable at all. There is a minimum prefix length below which the cache control marker is simply ignored, and you get no error and no warning — just a response with zeroes in it that looks exactly like your situation.
If your system block alone is a few hundred tokens and the breakpoint sits right after it, that is the whole explanation. Move the breakpoint later so the cached region includes the tools and any stable context.
Reply
Report
@pomodoro_pat · 2d ago
System block is about 1,900 tokens so probably not my problem, but the silent-ignore behaviour is worth knowing about. Useful thing to rule out.
Reply
Report