feat(anthropic): Gate prompt collection on data_collection option - #7054
Open
ericapisani wants to merge 4 commits into
Open
feat(anthropic): Gate prompt collection on data_collection option#7054ericapisani wants to merge 4 commits into
ericapisani wants to merge 4 commits into
Conversation
Replace include_prompts and send_default_pii checks with the new data_collection configuration for controlling whether messages and system instructions are captured. Maintain backwards compatibility: when data_collection is not configured, fall back to the legacy pii/include_prompts behavior. Tools are always collected regardless of the message collection setting. Refs PY-2588
Contributor
Codecov Results 📊✅ 71490 passed | ⏭️ 5083 skipped | Total: 76573 | Pass Rate: 93.36% | Execution Time: 256m 1s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 88.46%. Project has 2505 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 89.95% 89.96% +0.01%
==========================================
Files 193 193 —
Lines 24946 24958 +12
Branches 9000 9014 +14
==========================================
+ Hits 22439 22453 +14
- Misses 2507 2505 -2
- Partials 1435 1435 —Generated by Codecov Action |
Contributor
|
This is currently failing tests so I'll review when they're green |
Member
Author
|
@alexander-alderman-webb Got it sorted - the original tests I had written didn't work on older versions of the Anthropic SDK because the Should be ready for 👀 now |
alexander-alderman-webb
approved these changes
Aug 6, 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.
Replace include_prompts and send_default_pii checks with the new data_collection configuration for controlling whether messages and system instructions are captured. Maintain backwards compatibility: when data_collection is not configured, fall back to the legacy pii/include_prompts behavior. Tools are always collected regardless of the message collection setting.
Refs PY-2588