Merged
Conversation
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on March 5. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements prompt caching support to reduce LLM API costs by adding cache_breakpoint=True to system messages that are reused across multiple requests.
Changes:
- Added
cache_breakpoint=Trueto system messages in evidence gathering, query processing, and agent operations - Updated dependency
fhaviaryfrom version 0.27 to 0.33 to support the cache_breakpoint feature - Enhanced test coverage with assertions to verify prompt caching behavior for Anthropic models
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/paperqa/core.py | Added cache_breakpoint to system messages in evidence-gathering function |
| src/paperqa/docs.py | Added cache_breakpoint to reusable system message in query operations |
| src/paperqa/agents/main.py | Added cache_breakpoint to agent system prompt that's reused on every turn |
| pyproject.toml | Updated fhaviary dependency to v0.33 for cache_breakpoint support |
| tests/test_paperqa.py | Extended Anthropic test with caching assertions and padding to meet minimum token requirements |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sidnarayanan
approved these changes
Feb 19, 2026
Collaborator
sidnarayanan
left a comment
There was a problem hiding this comment.
Approving, but I haven't looked at why CI is failing
This reverts commit 5d9fdde.
sidnarayanan
approved these changes
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds
cache_breakpointthroughout the code basecache_control_injection_pointsto LiteLLM Router so we can get some caching and save money