Skip to content

docs(telemetry): add Anthropic prompt caching spec and conformance tests#13

Merged
Andrew Kent (realark) merged 1 commit intomainfrom
abhi-docs-anthropic-prompt-cache-spec
Apr 30, 2026
Merged

docs(telemetry): add Anthropic prompt caching spec and conformance tests#13
Andrew Kent (realark) merged 1 commit intomainfrom
abhi-docs-anthropic-prompt-cache-spec

Conversation

@AbhiPrasad
Copy link
Copy Markdown
Member

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.

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.
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) force-pushed the abhi-docs-anthropic-prompt-cache-spec branch from 9f3e1e7 to de467c3 Compare April 20, 2026 23:27
@AbhiPrasad
Copy link
Copy Markdown
Member Author

note: Can only be merged after https://github.com/braintrustdata/braintrust/pull/12968 is merged and deployed.

@realark
Copy link
Copy Markdown
Collaborator

@realark Andrew Kent (realark) merged commit dc01775 into main Apr 30, 2026
2 checks passed
@realark Andrew Kent (realark) deleted the abhi-docs-anthropic-prompt-cache-spec branch April 30, 2026 05:23
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
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.

2 participants