Skip to content

bug: aws bedrock prompt caching doesn't work correctly #11662

Closed

Description

@rgodha24

Description

prompt caching on aws bedrock doesnt work

this makes running opencode thru Opus on AWS Bedrock like 10x more expensive than running it on Anthropic API.

AI diagnosis:

Evidence

Before fix:

Turn Input Cache Read Cache Write
1 ~11k ~13k ~11k
2 ~11k ~13k 0

Plugins

n/a

OpenCode version

1.1.48

Steps to reproduce

use any claude model on aws bedrock in opencode

only the system prompt (e.g. the first ~13k tokens) is read from cache

this means that its like 10x more expensive than running opencode thru official anthropic API

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Feb 1, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. thevinchi commented on Feb 6, 2026

    @thevinchi
    Contributor

    This has been working great, but the same behavior is back when attempting to use Opus 4.6 on bedrock. I assume I should open a new issue?

  3. thevinchi commented on Feb 6, 2026

    @thevinchi
    Contributor

    Nevermind, I had not updated opencode to the latest version in the environment where we were testing Opus 4.6. 🤦‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions