Skip to content

feat(audio): align usage metrics with trace schema 3.2 - #1186

Open
Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit into
mainfrom
abhi/align-audio-integrations-e5f3279e
Open

Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit into
mainfrom
abhi/align-audio-integrations-e5f3279e

Conversation

@AbhiPrasad

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

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.

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

> 🤖 **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
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T20:25:09.923497Z d54d1eb PR opened
ℹ️ About Codex in GitHub

Your 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

No deployments
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