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); }