From 7725a6f01889377c80cbaada962f8bb3da3ea2b7 Mon Sep 17 00:00:00 2001 From: chezsmithy Date: Tue, 9 Sep 2025 08:49:40 -0700 Subject: [PATCH] fix: :ambulance: Fix bedrock conversation prompt caching --- core/llm/llms/Bedrock.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/llm/llms/Bedrock.ts b/core/llm/llms/Bedrock.ts index a0f77c45a..c120acdc5 100644 --- a/core/llm/llms/Bedrock.ts +++ b/core/llm/llms/Bedrock.ts @@ -513,7 +513,7 @@ class Bedrock extends BaseLLM { // The second-to-last because it retrieves potentially already cached contents, // The last one because we want it cached for later retrieval. // See: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html - if (this.cacheBehavior?.cacheConversation) { + if (this.cacheBehavior?.cacheConversation || this.completionOptions.promptCaching) { this._addCachingToLastTwoUserMessages(converted); }