Skip to content

livekit-agents@1.8.7

Latest

Choose a tag to compare

@github-actions github-actions released this 14 Oct 04:29
43ca0f8

Realtime E2E latency

You can now measure realtime replies from the last detected user speech to first assistant playback when you configure local VAD. Read the latency from assistant message metrics:

@session.on("conversation_item_added")
def on_message(event):
    if event.item.type == "message" and event.item.role == "assistant":
        print(event.item.metrics.get("e2e_latency"))

New providers and models

  • Claude Opus 5, Opus 5.5 and Sonnet 5.5: model support through the Anthropic SDK upgrade.

Breaking changes

  • Telemetry: fallback attributes lk.fallback.label and lk.fallback.index move to adapter request spans; update trace queries for the flattened hierarchy.
  • Anthropic: custom SDK HTTP clients must use httpx2, not httpx.
  • OpenTelemetry: replace the removed Events API with LogRecord(event_name=...); custom Logger subclasses must implement enabled().

Behavior changes

  • Dependencies: now requires openai>=3.19,<4, mcp>=2.2,<3, websockets>=17.1,<17.2, and OpenTelemetry >=1.45,<1.46; Anthropic requires >=1.8,<2, and turn detection requires onnxruntime>=1.30,<1.31.
  • TLS: contexts are cached per trust configuration; restart workers after replacing a CA bundle at the same path.
  • Tools: tools still running at interruption timeout now continue asynchronously and deliver deferred results.
  • Google: instruction-free realtime replies are allowed on immutable-context models; unavailable timing is reported as unknown.
  • ElevenLabs: STT client errors now retain their status and fail without retries.

Recording shutdown, VAD resizing, interruption teardown, chat summaries, structured outputs, multilingual sentence splitting, and tool discovery are more reliable.

What's Changed

  • fix(deps): update third party deps by @renovate[bot] in #5489
  • fix(deps): update third party deps (major) by @renovate[bot] in #6268
  • fix(upliftai): declare the python-socketio dependency by @zaidqureshi2 in #7567
  • fix(google): only block generate_reply when instructions passed to immutable-context model by @d42f in #5715
  • flatten fallback/stream adapter spans, name model on attempts by @davidzhao in #7723
  • fix(elevenlabs): fail fast on 4xx errors in STT recognize() by @pradneshfernandez in #7701
  • fix(http_context): build the TLS context once per process, not once per job by @zdurm in #7617
  • fix(ivr): reimplement TfidfLoopDetector with numpy to remove scikit-learn dependency by @Mugunth007 in #6867
  • fix: preserve nullable literal response schemas by @liangzhechen655 in #7715
  • fix: discard resampler history when resetting audio buffer by @liangzhechen655 in #7713
  • soniox: add reduce_silence option to TTS by @razvanvoica in #6798
  • fix(google): report unknown timing for results without word offsets by @15054538509 in #7687
  • fix: measure e2e latency for realtime agents by @chenghao-mou in #7719
  • Only send modern transcriptions to client sdks which can auto back convert modern -> legacy transcriptions internally by @1egoman in #7240
  • fix: reference real tool name in ToolProxyToolset description and errors by @BlueX888 in #7734
  • fix(voice): don't hang or buffer audio when the recorder encoder fails by @ANDROIDHASSAN in #7741
  • fix(vad): clamp cursor when resizing speech buffer by @gudcks0305 in #7566
  • fix(tokenize): split sentences on Arabic, Urdu and Devanagari terminators by @ahmad65saad in #7509
  • fix(interruption): tolerate websocket teardown race on session.close write by @BhaskarKapri07 in #6893
  • fix(telemetry): count a watchdog starved after it woke inside the stall window by @zdurm in #7612
  • fix(llm): keep earlier summaries when summarizing chat context again by @RaphaelFakhri in #7721
  • feat(deepgram): make Flux audio chunk duration configurable by @dnaumenko in #7205
  • feat(llm): report prompt-cache write tokens as cache_creation_tokens by @adrian-cowham in #7710
  • docs: fix broken DeepWiki badge in README by @longcw in #7770
  • fix: split underscore terms in BM25 description and param tokens by @BlueX888 in #7733
  • fix(voice): answer every tool return after ctx.update() by @longcw in #7777
  • fix(voice): release tools still running when an interrupted speech times out by @longcw in #7759
  • ci: draft release notes in the release PR by @longcw in #7779
  • fix: preserve reply_required for invalid tool results by @chenghao-mou in #7434
  • feat(worker): add preload_modules to forkserver preload by @tanish111 in #7761
  • fix: flush buffered tts audio before playback drains by @chenghao-mou in #7692
  • feat(llm): add CacheBreakpoint content marker for OpenAI prompt caching by @adrian-cowham in #7459
  • feat(inference): send prompt cache breakpoints for GPT-5.6 and later by @adrian-cowham in #7461
  • feat(openai): send prompt cache breakpoints for GPT-5.6 and later by @adrian-cowham in #7464
  • feat(voice): end the instructions message with a cache breakpoint each turn by @adrian-cowham in #7475
  • feat(llm): add Instructions(dynamic=...) for per-call text behind a cache breakpoint by @adrian-cowham in #7478
  • feat(openai): send prompt cache breakpoints from the Responses LLM by @adrian-cowham in #7656
  • feat(inference): add openai/gpt-live-transcribe STT by @shawnfeldman in #7479
  • feat(fishaudio): support drama-3 model by @cshape in #7799
  • gemini 4 argon by @tinalenguyen in #7790
  • feat(inference): add language_hint to DeepgramFluxOptions by @adrian-cowham in #7797
  • fix(rime): use model-specific WebSocket endpoints by @naszzz in #7766
  • livekit-agents@1.8.7 by @github-actions[bot] in #7792

New Contributors

Full Changelog: https://github.com/livekit/agents/compare/livekit-agents@1.8.6...livekit-agents@1.8.7