Skip to content

Commit 58540ea

Browse files
committed
feat(bedrock): enable prompt caching toggle for custom ARN and default to ON
1 parent 749026a commit 58540ea

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

webview-ui/src/components/settings/providers/Bedrock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export const Bedrock = ({ apiConfiguration, setApiConfigurationField, selectedMo
198198
{selectedModelInfo?.supportsPromptCache && (
199199
<>
200200
<Checkbox
201-
checked={apiConfiguration?.awsUsePromptCache || false}
201+
checked={apiConfiguration?.awsUsePromptCache ?? true}
202202
onChange={handleInputChange("awsUsePromptCache", noTransform)}>
203203
<div className="flex items-center gap-1">
204204
<span>{t("settings:providers.enablePromptCaching")}</span>

webview-ui/src/components/ui/hooks/useSelectedModel.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,13 @@ function getSelectedModel({
212212
const baseInfo = bedrockModels[id as keyof typeof bedrockModels]
213213

214214
// Special case for custom ARN.
215+
// Custom ARN is treated as an advanced option where users know what they are doing.
216+
// Since custom ARNs often point to newer Claude models that support prompt caching,
217+
// we enable the prompt cache toggle to let users decide.
215218
if (id === "custom-arn") {
216219
return {
217220
id,
218-
info: { maxTokens: 5000, contextWindow: 128_000, supportsPromptCache: false, supportsImages: true },
221+
info: { maxTokens: 5000, contextWindow: 128_000, supportsPromptCache: true, supportsImages: true },
219222
}
220223
}
221224

0 commit comments

Comments
 (0)