You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1caab9f
Browse filesBrowse the repository at this point in the historyBrowse files
feat(audio): align usage metrics with trace schema 3.2 (#1186)
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
> 🤖 **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
0 commit comments