Passthrough kept the client's own cache_control markers, which point at pre-normalization offsets. Once normalize/dedupe reshaped system and tools, the breakpoints landed mid-array and the tail was re-cached every request. - Pin the last system block and last tool at ttl 1h (was the client's 5m) - Anchor the last assistant turn at 5m, falling back to the final message so a first turn still gets a breakpoint - Fold mid-conversation system messages into the neighbouring user turn instead of hoisting them into body.system, where the volatile token counters invalidated the prefix on every request - Run the anchoring after every token saver, at the final body Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| concerns | ||
| formats | ||
| request | ||
| response | ||
| schema | ||
| formats.js | ||
| index.js | ||