onlyterp/prompt-cache-skills/roo-bedrock-custom-arn

Claude Code and agent skill by onlyterp/prompt-cache-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Roo Code's Bedrock provider silently disables caching for custom ARNs. Populate cachableFields to fix.

Install

npx vskill@latest install onlyterp/prompt-cache-skills/roo-bedrock-custom-arn

SKILL.md

Roo Code: Bedrock custom ARN caching (#11983)

Target

src/api/providers/bedrock.ts → guessModelInfoFromId() in RooCodeInc/Roo-Code.

Tracked upstream as issue #11983; PR #11984 proposes a fix but status uncertain at audit time.

Symptom

When a user configures Bedrock with a custom ARN instead of one of Roo's hardcoded model IDs, guessModelInfoFromId() returns { supportsPromptCache: true } but omits cachableFields. Downstream the Bedrock provider checks for cachableFields and skips caching entirely when empty. Net effect: silent 0% cache hit on custom ARNs.

Users hit this when:

  • Routing through a Bedrock-hosted Claude model with non-standard ARN
  • Using cross-region inference profiles
  • Provisioned throughput ARNs

Fix

diff
--- a/src/api/providers/bedrock.ts
+++ b/src/api/providers/bedrock.ts
@@ guessModelInfoFromId(modelId: string)
if (/* claude pattern match */) {
- return { supportsPromptCache: true }
+ return {
+ supportsPromptCache: true,
+ cachableFields: ["system", "messages", "tools"],
+ }
}

Apply this to every branch in guessModelInfoFromId() that returns supportsPromptCache: true without populating cachableFields.

If PR #11984 is already merged at apply time, verify the fix matches this shape and skip the diff.

Verify

  1. Configure Roo with a custom Claude ARN (any ARN not in the

declared model list).

  1. Enable prompt caching in Roo settings.
  2. Capture wire via mitmproxy.
  3. Inspect outbound Bedrock Converse API request body:
  • Before fix: no cachePoint markers anywhere in the request
  • After fix: cachePoint: { type: "default" } blocks on system

and last stable message

  1. Inspect response usage:
  • cacheWriteInputTokenCount > 0 on cold turn
  • cacheReadInputTokenCount > 0 on warm turn

Background

Bedrock's Converse API uses a different field name (cachePoint) than direct Anthropic (cache_control). Roo handles the translation correctly for declared models but the custom-ARN detection path is incomplete.

See docs/concepts/bedrock.md. Full audit: audits/roo-code.md.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
114
Repository forks
9
7-day trend score
24

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/onlyterp/prompt-cache-skills/roo-bedrock-custom-arn/badge)](https://verified-skill.com/skills/onlyterp/prompt-cache-skills/roo-bedrock-custom-arn)

Something wrong with this skill or its page? Tell us.