Skip to content

Add configurable Anthropic prompt cache TTL settings - #3825

Open
chnn19 wants to merge 1 commit into
chatboxai:mainfrom
chnn19:feature/anthropic-cache-ttl
Open

Add configurable Anthropic prompt cache TTL settings#3825
chnn19 wants to merge 1 commit into
chatboxai:mainfrom
chnn19:feature/anthropic-cache-ttl

Conversation

@chnn19

@chnn19 chnn19 commented Aug 1, 2026

Copy link
Copy Markdown

Description

This PR adds configurable Anthropic prompt cache TTL settings.

Previously, Chatbox always used the default prompt cache TTL. This change allows users to choose the cache duration for Claude conversations from the session settings.

Changes

  • Add a new Prompt Cache setting for Claude sessions.
  • Support three modes:
    • Auto
    • 5 minutes
    • 1 hour
  • Pass the selected TTL to Anthropic using the cache_control.ttl field.
  • Preserve the existing automatic behavior when Auto is selected.

Additional Notes

The implementation was tested with the Anthropic API using both 5m and 1h TTL values.

No screenshots are included because the UI change is limited to a single additional session setting.

Screenshots

N/A

Contributor Agreement

By submitting this Pull Request, I confirm that I have read and agree to the following terms:

  • I have read and agree with the above statement.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4dabed72-d1cb-40d1-9898-02a5d222f545

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant