The extraction system prompt (ADDITIVE_EXTRACTION_PROMPT, about 34 KB) is sent as a plain string on every add() with no cache_control, on the Anthropic and Bedrock bindings (Python and TypeScript).
- What to change
- Send the system prompt as a block with cache_control (Anthropic) or a cachePoint (Bedrock Converse).
- Why it matters
- About 8,500 tokens of an unchanging prefix are processed at the full input price on every add call.
- Who reaches this
- only users who configure the Anthropic or Bedrock LLM
- Already reported
- open issue: Anthropic/Bedrock extraction prompt is never prompt-cached https://github.com/mem0ai/mem0/issues/8071
- Estimate
- about 8.5M prompt tokens per 1,000 add calls on Anthropic or Bedrock (estimate)
What the estimate assumes
34,000 characters at about 4 characters per token; average call about 10,000 prompt tokens; only users who pick Anthropic or Bedrock; add calls return within the 5 minute lifetime in a chat app.