feat(bedrock): enable prompt caching toggle for custom ARN and default to ON

This commit is contained in:
Roo Code 2026-01-13 17:25:50 +00:00
parent 06039400cd
commit 62214b3bfa
2 changed files with 5 additions and 2 deletions

View file

@ -198,7 +198,7 @@ export const Bedrock = ({ apiConfiguration, setApiConfigurationField, selectedMo
{selectedModelInfo?.supportsPromptCache && (
<>
<Checkbox
checked={apiConfiguration?.awsUsePromptCache || false}
checked={apiConfiguration?.awsUsePromptCache ?? true}
onChange={handleInputChange("awsUsePromptCache", noTransform)}>
<div className="flex items-center gap-1">
<span>{t("settings:providers.enablePromptCaching")}</span>

View file

@ -213,10 +213,13 @@ function getSelectedModel({
const baseInfo = bedrockModels[id as keyof typeof bedrockModels]
// Special case for custom ARN.
// Custom ARN is treated as an advanced option where users know what they are doing.
// Since custom ARNs often point to newer Claude models that support prompt caching,
// we enable the prompt cache toggle to let users decide.
if (id === "custom-arn") {
return {
id,
info: { maxTokens: 5000, contextWindow: 128_000, supportsPromptCache: false, supportsImages: true },
info: { maxTokens: 5000, contextWindow: 128_000, supportsPromptCache: true, supportsImages: true },
}
}