Skip to content

fix(anthropic): move ephemeral cache creation fields to metadata#205

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
abhi-fix-anthropic-ephemeral-cache-to-metadata
Apr 7, 2026
Merged

fix(anthropic): move ephemeral cache creation fields to metadata#205
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
abhi-fix-anthropic-ephemeral-cache-to-metadata

Conversation

@AbhiPrasad
Copy link
Copy Markdown
Member

The ephemeral cache creation breakdown fields
(ephemeral_5m_input_tokens, ephemeral_1h_input_tokens) were being
recorded as metrics, which required adding them to the standard
metrics allowlists. Move them to span metadata instead, since they
are informational breakdowns of the already-tracked
prompt_cache_creation_tokens metric.

The ephemeral cache creation breakdown fields
(ephemeral_5m_input_tokens, ephemeral_1h_input_tokens) were being
recorded as metrics, which required adding them to the standard
metrics allowlists. Move them to span metadata instead, since they
are informational breakdowns of the already-tracked
prompt_cache_creation_tokens metric.

This fixes the CI failure in test_standard_metrics_crawl where the
integration tests reject unrecognized standard metric names.
@starfolkai
Copy link
Copy Markdown
Contributor

starfolkai Bot commented Apr 4, 2026

Drop into this review session: sfk devbox connect pr-205-braintrust-sdk-python-2404 --attach

No serious bugs or issues found 🎉

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) merged commit 7906cc2 into main Apr 7, 2026
29 checks passed
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) deleted the abhi-fix-anthropic-ephemeral-cache-to-metadata branch April 7, 2026 13:33
Abhijeet Prasad (AbhiPrasad) added a commit that referenced this pull request Apr 7, 2026
The ephemeral cache creation breakdown fields
(ephemeral_5m_input_tokens, ephemeral_1h_input_tokens) were being
recorded as metrics, which required adding them to the standard
metrics allowlists. Move them to span metadata instead, since they
are informational breakdowns of the already-tracked
prompt_cache_creation_tokens metric.

This fixes the CI failure in test_standard_metrics_crawl where the
integration tests reject unrecognized standard metric names.
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