Skip to content

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

Open
Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit intomainfrom
abhi-fix-anthropic-ephemeral-cache-to-metadata
Open

fix(anthropic): move ephemeral cache creation fields to metadata#205
Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit intomainfrom
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

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 🎉

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.

1 participant