rowboat/apps/x/packages/core/docs
Ramnique Singh cda925ad9d feat(core): Anthropic prompt-cache breakpoints in the model registry
Anthropic caching is opt-in, and nothing sent breakpoints: observed
sessions show 0% cache hits on Claude models (~1.27M of 1.36M sampled
input tokens billed at full rate) vs ~82% implicit hits on Gemini. Two
ephemeral breakpoints fix that: the system prompt (whose cache prefix
also covers the tool schemas — both immutable per turn by construction)
and the last message (Anthropic's incremental-conversation pattern).
Conservative simulation on the sampled traffic floors the saving at 44%
with no cross-turn reuse; realistic reuse lands 70-85%.

Applied in the model registry bridge just before streamText, gated by
provider flavor or model id (covers direct Anthropic, OpenRouter, and
the gateways — the installed OpenRouter provider reads the same
providerOptions.anthropic key). Transport-only: nothing is persisted,
message content is untouched, and non-Anthropic requests pass through
byte-identical. Verify with cachedInputTokens on model_call_completed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 21:03:35 +05:30
..
session-design.md docs(x): turn runtime + session layer design specs 2026-07-02 14:20:44 +05:30
turn-runtime-design.md feat(core): Anthropic prompt-cache breakpoints in the model registry 2026-07-07 21:03:35 +05:30