Skip to content

feat(anthropic): add prompt cache ttl metrics#344

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit intomainfrom
abhi-feat-anthropic-prompt-cache-metrics
May 1, 2026
Merged

feat(anthropic): add prompt cache ttl metrics#344
Abhijeet Prasad (AbhiPrasad) merged 1 commit intomainfrom
abhi-feat-anthropic-prompt-cache-metrics

Conversation

@AbhiPrasad
Copy link
Copy Markdown
Member

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 https://github.com/braintrustdata/braintrust/pull/12968 being merged

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) force-pushed the abhi-feat-anthropic-prompt-cache-metrics branch from 4accf82 to f2052c0 Compare April 30, 2026 15:36
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) marked this pull request as ready for review April 30, 2026 15:48
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.
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) force-pushed the abhi-feat-anthropic-prompt-cache-metrics branch from f2052c0 to 3a2a877 Compare May 1, 2026 18:59
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) merged commit 8acc31c into main May 1, 2026
82 checks passed
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) deleted the abhi-feat-anthropic-prompt-cache-metrics branch May 1, 2026 21:56
Abhijeet Prasad (AbhiPrasad) added a commit that referenced this pull request May 4, 2026
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