Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 9, 2026

Related GitHub Issue

Closes: #10576

Description

This PR attempts to address Issue #10576. Feedback and guidance are welcome.

Changes:

  1. Enable prompt caching toggle for custom ARN users: Changed supportsPromptCache from false to true for custom ARN model info. Custom ARN is treated as an advanced option where users know what they are doing, and their custom ARN often points to newer Claude models that support prompt caching.

  2. Default prompt caching to ON: Changed the default value of awsUsePromptCache from false to true by using ?? true instead of || false. This ensures users get cost savings and latency improvements by default.

Files modified:

  • webview-ui/src/components/ui/hooks/useSelectedModel.ts - Enable supportsPromptCache for custom-arn
  • webview-ui/src/components/settings/providers/Bedrock.tsx - Default checkbox to true

Test Procedure

  1. Manual testing: Select Bedrock provider, choose custom-arn option, verify the prompt caching checkbox appears
  2. Unit tests: Ran existing tests with npx vitest run - all 37 tests pass
  3. Linting: Ran eslint - no warnings or errors

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Documentation Updates

  • No documentation updates are required.

Additional Notes

This change treats custom ARN as an advanced option where users know what they are doing. Since custom ARNs often point to newer Claude models that support prompt caching, it makes sense to show the toggle and let users decide.


Important

Enable prompt caching for custom ARN users and set default prompt caching to ON in useSelectedModel.ts and Bedrock.tsx.

  • Behavior:
    • Enable prompt caching for custom ARN users by setting supportsPromptCache to true in getSelectedModel() in useSelectedModel.ts.
    • Default awsUsePromptCache to true in Bedrock.tsx by using ?? true instead of || false.
  • Files Modified:
    • useSelectedModel.ts: Adjusts getSelectedModel() to treat custom ARN as an advanced option with prompt caching enabled.
    • Bedrock.tsx: Changes default checkbox state for prompt caching to true.

This description was created by Ellipsis for 54f35b9. You can customize this summary. It will automatically update as commits are pushed.

…t to ON

- Enable supportsPromptCache for custom ARN so the toggle appears
  (treating it as an advanced option where users know what they are doing)
- Default awsUsePromptCache to true instead of false for Bedrock provider

Fixes #10576
@roomote
Copy link
Contributor Author

roomote bot commented Jan 9, 2026

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

The changes correctly:

  • Enable the prompt caching toggle for custom ARN users by setting supportsPromptCache: true
  • Default awsUsePromptCache to true using the nullish coalescing operator (??), which properly respects explicitly set false values

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Add Prompt Caching Toggle to AWS Bedrock Settings

3 participants