prehistoric-printer-73777
08/24/2025, 8:16 AMtall-airline-16756
08/24/2025, 8:17 AMtall-airline-16756
08/24/2025, 8:17 AMon_user_turn_completed and llm_node aren’t available in livekit-agents version 0.12. These handy features came along with the big update in version 1.0.
Here’s the scoop:
• llm_node is the new kid on the block, replacing the older before_llm_cb callback from the 0.x versions.
• on_user_turn_completed is brand new in version 1.0, so it wasn’t around in 0.12.
If you’re still on version 0.12, you’ll want to stick with the old before_llm_cb pattern since llm_node isn’t there yet. Also, there’s no counterpart for on_user_turn_completed in that version. To enjoy these newer features, upgrading to livekit-agents version 1.0 or later is the way to go!
Sources: Pipeline nodes and hooks | LiveKit Docs | Agents v0.x migration guide | LiveKit Docsprehistoric-printer-73777
08/24/2025, 8:22 AMtall-airline-16756
08/24/2025, 8:23 AMbefore_llm_cb and `llm_node`—they both help tweak the chat context or customize how the LLM behaves before running inference. But there are some neat differences worth knowing:
• before_llm_cb in version 0.x was mainly used to adjust the conversation context, like trimming it down to save on token usage.
• llm_node, which came along in version 1.0, is a more powerful and flexible tool. It not only lets you modify the chat context but also works smoothly with custom LLM providers without needing a plugin, as long as it returns an AsyncIterable[llm.ChatChunk].
So, in a nutshell, llm_node brings more features and flexibility to the table compared to before_llm_cb. Hope this helps clear things up!
Sources: VoicePipelineAgent | LiveKit Docs | VoicePipelineAgent | LiveKit Docs | Agents 0.x migration guide | LiveKit Docs | Agents v0.x migration guide | LiveKit Docs | VoicePipelineAgent | LiveKit Docs