Skip to content

Commit b1ffd22

Browse files
authored
add cache point support for user and tool messages in bedrock (#5891)
1 parent 590dbfc commit b1ffd22

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/tender-walls-act.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@effect/ai-amazon-bedrock": patch
3+
---
4+
5+
fix cache point support for user and tool messages

packages/ai/amazon-bedrock/src/AmazonBedrockLanguageModel.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,10 @@ const prepareMessages: (options: LanguageModel.ProviderOptions) => Effect.Effect
406406
break
407407
}
408408
}
409+
410+
if (getCachePoint(message)) {
411+
content.push(BEDROCK_CACHE_POINT)
412+
}
409413
}
410414

411415
messages.push({ role: "user", content })

0 commit comments

Comments
 (0)