Skip to content

fix(ai): restrict Bedrock cache checkpoints to Claude - #47660

Merged
rekram1-node merged 3 commits into
v2from
bedrock
Sep 6, 2026
Merged

rekram1-node merged 3 commits into
v2from
bedrock

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Sep 6, 2026 •

Copy link
Copy Markdown
Collaborator

Issue for this PR

No linked issue.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Converse requests currently emit explicit cache checkpoints for every model when automatic caching is enabled. Models without checkpoint support can reject those requests.

  • Limit automatic and manual checkpoints to Claude, with a five-minute default. Nova and other model families use implicit caching where available.
  • Recognize new Claude releases by family instead of listing release IDs. Hardcode only legacy support and five-minute-only exceptions; modern models accept one hour when requested.
  • Handle regional/global prefixes and model-bearing ARNs. Opaque profiles omit checkpoints because their underlying model is unknown.

How did you verify your code works?

  • 194 tests passed across the cache policy, Converse, cache defaults and legacy exceptions, recorded cache write/read, and Mantle suites. Coverage includes unlisted future Claude generations and family names.
  • bun typecheck passed in packages/ai.
  • Formatting and diff checks passed. Lint reported no errors and seven existing warnings.

Screenshots / recordings

Not applicable.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@rekram1-node rekram1-node changed the title fix(ai): respect Bedrock model cache support fix(ai): restrict Bedrock cache checkpoints to Claude Sep 6, 2026
@rekram1-node
rekram1-node merged commit a02415a into v2 Sep 6, 2026
8 checks passed
@rekram1-node
rekram1-node deleted the bedrock branch September 6, 2026 22:00
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant