The Bedrock binding sends the system prompt as a plain text block with no cachePoint (bedrock.py:334).
The entity-extraction system prompt is rendered once per run (operate.py:4655/4668) and is the same for every chunk and every gleaning call, about 1.5k tokens. AWS says Claude models on Bedrock do not cache requests without a checkpoint, and the repo's own Bedrock sample model is anthropic.claude-haiku-4-5 (env.example:1914). The Anthropic binding has the same gap (anthropic.py:208) and is already tracked (#4464, open PR #4729).
- What to change
- Add an opt-in cache_system_prompt argument that appends {"cachePoint": {"type": "default"}} after the system text block, as #4729 does for Anthropic.
- Why it matters
- Every extraction call pays full input price for the same ~1.5k-token prefix. Claude Haiku 4.5 has a 4,096-token minimum, so the system prompt alone will not cache there; models with a 512 or 1,024 minimum will.
- How often it happens
- The code shows the problem; how often it happens is assumed. To measure it: How many extraction calls the deployment sends to a Bedrock Claude model with a 512 or 1,024 token cache minimum.
- Estimate
- about 1.5M uncached prompt tokens per 1,000 extraction calls (about 42% of an average call); a cache read bills about a tenth of that on models where the prefix is long enough
What the estimate assumes
system prompt about 1.5k tokens (the maintainers' own tiktoken estimate in #4464), chunk 1,200 tokens, one gleaning call per chunk; Bedrock Claude model whose minimum is at or below 1,024 tokens