Repository navigation
feat(audio): align usage metrics with trace schema 3.2 - #1186
Open
Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit into
Open
Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit into
Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit into
Conversation
> 🤖 **This text was AI-generated.** Audio integrations receive metered duration and token usage in different provider formats. Pipecat can also end an interrupted response before OpenAI Realtime reports its final usage. Emit schema 3.2.0 for voice sessions and record reported usage on the model span that incurred it. ```text session → model operation (llm) metrics.usage_seconds total metered time metrics.usage_standby_seconds standby portion of that total metrics.prompt_cached_audio_tokens ``` Map LiteLLM's seconds and Mistral's prompt_audio_seconds to the shared duration metric. Preserve native usage and observed request and session IDs in integration metadata. Keep the Pipecat model span associated with its response until the provider reports final usage. Refs: https://linear.app/braintrustdata/issue/SDK-974
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch has not been deployed
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.
resolves https://linear.app/braintrustdata/issue/SDK-905/python-livekit-adopt-usage-metrics-from-audio-spec
resolves https://linear.app/braintrustdata/issue/SDK-906/python-pipecat-adopt-usage-metrics-from-audio-spec
Audio integrations receive metered duration and token usage in different provider formats. Pipecat can also end an interrupted response before OpenAI Realtime reports its final usage.
Emit schema 3.2.0 for voice sessions and record reported usage on the model span that incurred it.
Map LiteLLM's seconds and Mistral's prompt_audio_seconds to the shared duration metric. Preserve native usage and observed request and session IDs in integration metadata. Keep the Pipecat model span associated with its response until the provider reports final usage.
Refs: https://linear.app/braintrustdata/issue/SDK-974