一键导入
roo-bedrock-custom-arn
Roo Code's Bedrock provider silently disables caching for custom ARNs. Populate cachableFields to fix.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Roo Code's Bedrock provider silently disables caching for custom ARNs. Populate cachableFields to fix.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Aider uses 5min TTL by default and works around long pauses with keepalive pings. Wire up the 1h TTL beta instead.
Aider's --cache-prompts is off by default. Flip it on for supported models.
Stop Cline from burning a cache breakpoint on the volatile current user message every turn.
Cline OpenAI native provider sends no prompt_cache_key. Add a stable per-task key so cached_tokens stops being zero.
Cline's system prompt includes a timestamp that may be recomputed per request, invalidating the system-prompt cache.
Continue's prompt caching is opt-in via config and off by default. Flip the default to systemAndTools.
| name | roo-bedrock-custom-arn |
| description | Roo Code's Bedrock provider silently disables caching for custom ARNs. Populate cachableFields to fix. |
| target_harness | Roo Code |
| target_repo | RooCodeInc/Roo-Code |
| target_files | ["src/api/providers/bedrock.ts"] |
| target_commit | main @ v3.54.0 |
| estimated_savings | Enables Bedrock prompt caching for custom ARN setups (currently 0%) |
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.
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:
--- 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.
cachePoint markers anywhere in the requestcachePoint: { type: "default" } blocks on system
and last stable messageusage:
cacheWriteInputTokenCount > 0 on cold turncacheReadInputTokenCount > 0 on warm turnBedrock'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.