# bedrock: Add system-prompt cache anchor on caching-capable models \(\#56474\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/800a79554501f9b0cc8d149ff5580f1eec2f03f0)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 800a79554501f9b0cc8d149ff5580f1eec2f03f0

Requested commit: 800a79554501f9b0cc8d149ff5580f1eec2f03f0

Commit: 800a79554501f9b0cc8d149ff5580f1eec2f03f0

Tree: c6219f970f9fc93ee2bf3ff27fa90187ee19212c

Author: Richard Feldman

Committer: GitHub

## Message

```
bedrock: Add system-prompt cache anchor on caching-capable models (#56474)

The Bedrock Converse API supports placing `CachePoint` blocks inside the
`system` field, but we were sending the system prompt as a single
`SystemContentBlock::Text`, which leaves the system tokens dependent on
whatever message-level breakpoint happens to fall within the 20-block
lookback window.

This widens `bedrock::Request.system` from `Option<String>` to
`Vec<BedrockSystemContentBlock>` and has `into_bedrock` emit
`[Text(system), CachePoint(Default)]` whenever the model supports prompt
caching. The system prompt now anchors its own cache prefix, on top of
the existing tool-list anchor and per-message breakpoint, so a stable
system prompt keeps producing cache hits even when earlier conversation
turns change.

Bedrock does not support automatic caching or the 1-hour TTL, so the
default 5-minute ephemeral cache is the only option for this provider.

Release Notes:

- Improved Bedrock prompt cache utilization by anchoring the system
prompt as its own cache prefix
```

## Parents

- [249f427f10addf9d2644e34f29219f833c761a39](https://git.cafe/gitcafe/zed/commit/249f427f10addf9d2644e34f29219f833c761a39?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/800a79554501f9b0cc8d149ff5580f1eec2f03f0?format=markdown)
