[PR #9838] fix: Claude w/bedrock custom inference profile - caching support #13238

Closed
opened 2026-02-16 18:18:06 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/9838

State: closed
Merged: Yes


What does this PR do?

Resolves: https://github.com/anomalyco/opencode/issues/9803

Fixes missing cachePoint when using claude with custom inference profile, eg:

"amazon-bedrock": {
  "options": {
    "profile": "xxx",
    "region": "yyy"
  },
  "models": {
    "claude-sonnet-4.5": {
      "id": "arn:aws:bedrock:yyy:zzz:application-inference-profile/nnn"
    }
  }
},

How did you verify your code works?

./packages/opencode/script/build.ts --single

with the above config and logged tokens:

tokens: {
    input: 339,
    output: 13,
    reasoning: 0,
    cache: {
      write: 0,
      read: 19050,
    },
  },

Added failing unit test then green with the change.

TY!

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9838 **State:** closed **Merged:** Yes --- ### What does this PR do? Resolves: https://github.com/anomalyco/opencode/issues/9803 Fixes missing `cachePoint` when using claude with custom inference profile, eg: ```json "amazon-bedrock": { "options": { "profile": "xxx", "region": "yyy" }, "models": { "claude-sonnet-4.5": { "id": "arn:aws:bedrock:yyy:zzz:application-inference-profile/nnn" } } }, ``` ### How did you verify your code works? ``` ./packages/opencode/script/build.ts --single ``` with the above config and logged tokens: ``` tokens: { input: 339, output: 13, reasoning: 0, cache: { write: 0, read: 19050, }, }, ``` Added failing unit test then green with the change. TY!
yindo added the pull-request label 2026-02-16 18:18:06 -05:00
yindo closed this issue 2026-02-16 18:18:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13238