busy-lunch-15701
03/24/2026, 5:39 AMLLMModelUsage, TTSModelUsage, STTModelUsage
on which event does these usage class emittedtall-airline-16756
03/24/2026, 5:39 AMtall-airline-16756
03/24/2026, 5:40 AMLLMModelUsage, TTSModelUsage, and STTModelUsage classes.
• These usage classes are included in the payload of the MetricsCollected event.
• Event name: MetricsCollected
• Payload type: MetricsCollectedEvent (contains llm_usage, tts_usage, stt_usage / LLMModelUsage, TTSModelUsage, STTModelUsage)
• When it’s emitted: during an AgentSession’s Running phase — periodically after model inference or when a processing stage completes (for example, after an LLM response, TTS generation, or STT transcription completes).
If you’d like, I can:
• Show a short code snippet for subscribing to MetricsCollected in your SDK (Node.js or Python).
• Explain the specific fields included in each usage class (TTFT, token counts, audio duration, etc.).
Which would you prefer?
Sources: Agents (Node.js) | livekit/livekit_composite | DeepWiki | Deepgram STT | LiveKit Documentation | Agent session | LiveKit Documentation | LLM Metrics | LiveKit Documentation, with interactive elementsbusy-lunch-15701
03/24/2026, 5:40 AMMetricsCollected is deprecatingtall-airline-16756
03/24/2026, 5:41 AMMetricsCollected is deprecating and your earlier question about which event emits LLMModelUsage, TTSModelUsage, and STTModelUsage.
Quick summary of what I can confirm:
• Those usage classes were included in the MetricsCollected payload (MetricsCollectedEvent) and emitted during an AgentSession’s Running phase after model inference.
• I do not have a confirmed replacement event or an official migration path in the sources I can access.
To help you effectively, could you tell me one or both of the following:
• Where you saw the deprecation notice (SDK/CLI output, a documentation page, or a compiler/runtime warning)? If it’s a docs page, a link or the exact wording would help.
• Which SDK and version are you using (Node.js or Python, and the package version)?
With that info I can:
• Check whether a replacement event or new pattern is available for reporting LLMModelUsage, TTSModelUsage, and STTModelUsage.
• Suggest a short-term workaround (for example, capturing usage directly at the model-call sites) if MetricsCollected is removed and no direct replacement exists.
• Provide a code snippet for your SDK to help collect usage until we identify the new pattern.
Which SDK/version and where you saw the deprecation message?
Sources: LLM Metrics | LiveKit Documentation | STT Metrics | LiveKit Documentation | TTS Metrics | LiveKit Documentation | Build a multilingual voice agent that automatically switches languages | Li... | Agents (Python) | livekit/livekit_composite | DeepWiki, with interactive elements