AWS has published a guide on using prompt caching with open-weight models on Amazon Bedrock. The post addresses a common pattern in generative AI applications where the same long context is resent with every request, which raises input costs and latency. Prompt caching allows the model to reuse that context instead of reprocessing it each time.

The article walks through two approaches—implicit and explicit caching—accessed through the Chat Completions API. It also applies caching to a practical example: an OpenCode coding agent session.

Why it matters

Resending identical context on every request is inefficient. By reusing cached context, applications can lower input cost and reduce response latency, which is relevant for workloads built on open-weight models hosted on Bedrock.

Who should care

Developers and teams building generative AI applications on Amazon Bedrock, particularly those running coding agents or other tools that rely on repeated long context, will find the implementation details most applicable.