docs(telemetry): add Anthropic prompt caching spec and conformance tests#13
Merged
Andrew Kent (realark) merged 1 commit intomainfrom Apr 30, 2026
Merged
Conversation
Document how Braintrust SDKs surface Anthropic's prompt caching usage, including the 5m/1h TTL breakdown that drives differing cache-write pricing. Add llm_span conformance fixtures for both the default 5m TTL (no beta header) and the extended 1h TTL (extended-cache-ttl-2025-04-11 beta) so SDK implementations can be validated end-to-end.
9f3e1e7 to
de467c3
Compare
Andrew Kent (realark)
approved these changes
Apr 21, 2026
Member
Author
|
note: Can only be merged after https://github.com/braintrustdata/braintrust/pull/12968 is merged and deployed. |
Collaborator
|
BE work here: https://github.com/braintrustdata/braintrust/pull/13295/ |
Abhijeet Prasad (AbhiPrasad)
added a commit
to braintrustdata/braintrust-sdk-python
that referenced
this pull request
May 1, 2026
Surface Anthropic cache_creation TTL buckets as Braintrust span metrics for 5m and 1h prompt-cache writes while preserving the aggregate cache creation total for legacy cost paths. Add focused VCR-backed coverage for both default 5m caching and the extended 1h beta header. ref braintrustdata/braintrust-spec#13 dependent on braintrustdata/braintrust#12968 being merged
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.
Document how Braintrust SDKs surface Anthropic's prompt caching usage, including the 5m/1h TTL breakdown that drives differing cache-write pricing. Add llm_span conformance fixtures for both the default 5m TTL (no beta header) and the extended 1h TTL (extended-cache-ttl-2025-04-11 beta) so SDK implementations can be validated end-to-end.