Skip to content

[BUG] Prompt Caching Does not work with AWS Bedrock Custom ARN #11983

@itisjustjeff

Description

@itisjustjeff

Problem (one or two sentences)

Although a checkbox exists for prompt caching and it is selected, caching doesn't work when using a custom ARN. The underlying model works with prompt caching and is enabled for other tools. We can clearly see in logs that caching is not being used by Roo when interacting with our custom ARN.

{
    "inputTokenCount": 22454,
    "cacheReadInputTokenCount": 0,
    "cacheWriteInputTokenCount": 0
}

I believe that there is still something that is overriding the "Enable Prompt Cache" checkbox for custom arn models that disables it regardless of the checkbox.

Context (who is affected and when)

Happens to all users who are using AWS Bedrock with a custom ARN.

Reproduction steps

  1. VS Code version 1.112.0 // RooCode Extension 3.51.1 // AWS Bedrock with enhanced logging (Or other token logging mechanism)
  2. Configure AWS Bedrock in any region, check "Enable prompt caching", select "custom-arn" model, and include the custom ARN
  3. Use Roo for a prompt and monitor cache usage

Expected result

AWS Bedrock uses cache input tokens instead of regular input tokens

Actual result

Only input tokens are used

Variations tried (optional)

Other applications support caching (Claude, LiteLLM, CLI)

App Version

3.51.1

API Provider (optional)

Amazon Bedrock

Model Used (optional)

Sonnet 4.5

Roo Code Task Links (optional)

No response

Relevant logs or errors (optional)

Metadata

Metadata

Assignees

No one assigned

    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