aider-1h-ttl
Aider uses 5min TTL by default and works around long pauses with keepalive pings. Wire up the 1h TTL beta instead.
Roo Code's Bedrock provider silently disables caching for custom ARNs. Populate cachableFields to fix.
$ npx -y skills add OnlyTerp/prompt-cache-skills --skill roo-bedrock-custom-arn --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/roo-bedrock-custom-arnContext preview
The summary Claude sees to decide when to auto-load this skill.
Roo Code's Bedrock provider silently disables caching for custom ARNs. Populate cachableFields to fix.
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.
1. Configure Roo with a custom Claude ARN (any ARN not in the declared model list). 2. Enable prompt caching in Roo settings. 3. Capture wire via mitmproxy. 4. Inspect outbound Bedrock Converse API request body:
and last stable message 5. Inspect response `usage`:
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](../../docs/concepts/bedrock.md). Full audit: [audits/roo-code.md](../../audits/roo-code.md).
Drop-in prompt-caching fixes for the LLM agent harness you use. Point your AI coding agent at this repo and it ships the patches.
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.
Ladder-aware Cline Anthropic caching — verify the rolling read/write ladder on the wire, then add the tools breakpoint and tune…
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.