Skip to content

Conversation

@chenghao-mou
Copy link
Member

@chenghao-mou chenghao-mou commented Dec 18, 2025

Summary by CodeRabbit

  • New Features

    • Adaptive interruption detection for voice agents and unified turn-handling configuration; new interruption events/hooks and session usage summary.
  • Improvements

    • Interruption-aware audio recognition with buffering/replay, clearer telemetry (new latency/GenAI/interruption attributes), token-level usage tracking, and enhanced trace/dev logging levels.
    • Reworked inference endpoint resolution and more robust realtime WebSocket lifecycle/connection handling.
  • Chores

    • Project metadata and packaging updates; plugin version bumps to 1.4.0.rc2.

✏️ Tip: You can customize this high-level summary in your review settings.


Open with Devin

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

📝 Walkthrough

Walkthrough

Centralizes turn-handling via TurnHandlingConfig; adds an AdaptiveInterruptionDetector (HTTP/WebSocket) with InterruptionEvent/Error models; wires adaptive interruption through Agent, AgentSession, AgentActivity, AudioRecognition; hardens STT WebSocket lifecycle; adds model-usage collection APIs and numerous pyproject/plugin version bumps.

Changes

Cohort / File(s) Summary
Interruption core
livekit-agents/livekit/agents/inference/interruption.py
New AdaptiveInterruptionDetector, InterruptionEvent/InterruptionDetectionError, InterruptionStreamBase and HTTP/WebSocket stream implementations, cache, audio/frame helpers, probability estimation, event/error emission, tracing/logging.
Inference exports & utils
livekit-agents/livekit/agents/inference/__init__.py, .../inference/_utils.py
Export interruption symbols; add get_default_inference_url() and constants for inference URL selection.
STT WS robustness
livekit-agents/livekit/agents/inference/stt.py
Harden WebSocket lifecycle: defer session.create send, propagate closing_ws flag, improve task cancellation and ws closure handling.
Turn handling config
livekit-agents/livekit/agents/voice/turn.py
Add TurnHandlingConfig, EndpointingConfig, InterruptionConfig, TypedDicts, post-init normalization, and migrate() for legacy params.
Agent & session wiring
livekit-agents/livekit/agents/voice/agent.py, livekit-agents/livekit/agents/voice/agent_session.py
Accept turn_handling, deprecate/migrate legacy turn_detection fields into TurnHandlingConfig, derive internal turn/interruption state, expose interruption_detection and session.usage; deprecate legacy params via decorator.
Activity & recognition
livekit-agents/livekit/agents/voice/agent_activity.py, livekit-agents/livekit/agents/voice/audio_recognition.py
Resolve/instantiate AdaptiveInterruptionDetector, pass to AudioRecognition, add interruption channel/task, recognition hooks (on_interruption), transcript buffering/hold/replay and lifecycle wiring.
Events & types
livekit-agents/livekit/agents/voice/events.py, livekit-agents/livekit/agents/types.py
Import/propagate InterruptionEvent, add event literals user_interruption_detected/user_non_interruption_detected, include InterruptionEvent in AgentEvent union; add pydantic core-schema hook for NotGiven.
Metrics & usage
livekit-agents/livekit/agents/metrics/usage.py, .../usage_collector.py, .../base.py, job.py, report.py, metrics/__init__.py
New model-usage types (LLMModelUsage, TTSModelUsage, STTModelUsage), ModelUsageCollector, deprecate old UsageCollector/UsageSummary, add model_usage to SessionReport and Job session_report wiring; expand metrics payloads with token/session fields.
Logging & telemetry
livekit-agents/livekit/agents/log.py, .../telemetry/traces.py, .../telemetry/trace_types.py
Add TRACE_LEVEL and Logger.trace/dev methods, custom LoggingHandler to map TRACE, switch tracer provider calls, add new trace attributes (e2e latency, interruption attributes).
STT/TTS token tracking & plugin changes
livekit-agents/.../stt.py, tts.py, many livekit-plugins/*/ & pyproject.toml
Add token counters to STT/TTS metrics and plugin-specific adapters; extensive pyproject.toml reorganization and many plugin version bumps to 1.4.0.rc2 (and some rc1), build-system/tooling blocks adjusted.
Examples & small edits
examples/voice_agents/basic_agent.py, examples/*
Example updated to use TurnHandlingConfig and EndCallTool; added typing/return annotations; removed per-example UsageCollector in several examples and log session.usage.
Utilities & deprecation helpers
livekit-agents/livekit/agents/utils/deprecation.py
New deprecate_params decorator to aggregate and warn about deprecated parameters.

Sequence Diagram(s)

sequenceDiagram
    participant Agent as Agent / AgentActivity
    participant Session as AgentSession
    participant Audio as AudioRecognition
    participant Detector as AdaptiveInterruptionDetector
    participant Backend as Inference Backend (HTTP/WS)
    participant Hooks as RecognitionHooks

    Agent->>Session: init(turn_handling=TurnHandlingConfig)
    Session-->>Agent: expose interruption_detection, usage
    Agent->>Detector: resolve/create detector (if enabled)
    Agent->>Audio: init(interruption_detection=Detector)

    loop per audio frame
        Agent->>Audio: push_audio(frame)
        Audio->>Detector: push_frame(frame)
        Detector->>Backend: send frame(s) for inference (HTTP/WS)
        Backend-->>Detector: return probabilities/metadata
        Detector-->>Audio: emit InterruptionEvent (is_interruption/probability)
        Audio->>Hooks: on_interruption(event)
        Hooks-->>Audio: indicate hold/replay or emit user_interruption_detected
        Audio->>Agent: emit user_interruption_detected / user_non_interruption_detected
    end
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

Suggested reviewers

  • tinalenguyen
  • theomonnom

Poem

🐇 I twitch my whiskers at each frame,
I count the pauses, mark the name,
I buffer, beep, and softly say,
"Hold on—your words will flow our way."
A rabbit hops to keep the turn in play.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 19.83% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'AGT-2182: Add inference bargein and examples (#4032)' clearly summarizes the main change—adding inference capabilities with examples—and references the issue number, making it specific and actionable.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 20

🤖 Fix all issues with AI agents
In `@examples/voice_agents/basic_agent.py`:
- Line 98: The code is instantiating a non-existent class
inference.BargeinDetector(); replace that with the exported class
inference.AdaptiveInterruptionDetector() when setting bargein_detector so the
agent uses the correct detector (update the constructor call where
bargein_detector is assigned).

In `@livekit-agents/livekit/agents/inference/interruption.py`:
- Around line 64-68: The class InterruptionEvent has its class-level docstring
placed after the model_config assignment and contains a typo; move the docstring
so it immediately follows the class declaration (before the model_config =
ConfigDict(...) line) and correct "tnterruption" to "interruption" so the
class-level documentation is properly recognized by Pydantic and reads
correctly.
- Around line 1120-1121: The mono-channel branch currently assigns raw bytes
(frame.data) directly into the numpy slice (slice_) which is invalid; change the
assignment to convert the bytes into an int16 numpy array using np.frombuffer
with dtype=np.int16 and count=frame.samples_per_channel before assigning to
slice_. Locate the mono-channel code path that sets slice_[:] = frame.data and
replace it to use np.frombuffer(frame.data, dtype=np.int16,
count=frame.samples_per_channel) so it matches the multi-channel handling.

In `@livekit-agents/livekit/agents/voice/agent_activity.py`:
- Around line 387-392: update_options() updates self._turn_detection and
recalculates self._default_interruption_by_audio_activity_enabled but does not
apply that default to the active flag, so switching to "manual" or
"realtime_llm" can leave audio interruptions enabled; modify update_options() to
detect when self._turn_detection is changed and immediately set
self._interruption_by_audio_activity_enabled =
self._default_interruption_by_audio_activity_enabled (using the existing names
_turn_detection, _default_interruption_by_audio_activity_enabled, and
_interruption_by_audio_activity_enabled) so the runtime interruption behavior
matches the new turn_detection mode.

In `@livekit-agents/livekit/agents/voice/events.py`:
- Line 10: InterruptionEvent.type is using the InterruptionEventType enum which
doesn't match the AgentEvent union discriminator; change InterruptionEvent.type
to explicit Literal types that match the EventTypes discriminator strings
("user_interruption_detected" and "user_non_interruption_detected") (e.g., type:
Literal["user_interruption_detected", "user_non_interruption_detected"] =
"user_interruption_detected" or appropriate default), update any construction
sites that set InterruptionEvent.type to use those literal strings (or convert
the enum to the matching string), and keep the InterruptionEventType enum only
for internal semantics if needed so that AgentEvent
(Field(discriminator="type")) can correctly discriminate instances.

In `@livekit-agents/livekit/agents/voice/room_io/_output.py`:
- Around line 101-103: The code currently increments self._pushed_duration
before awaiting the potentially-failing send, which can overcount if
self._audio_buf.send(f) raises; modify the loop in the method that calls
self._audio_bstream.push(frame.data) so that self._pushed_duration is only
incremented after await self._audio_buf.send(f) succeeds (or increment
optimistically but decrement/rollback in an except block), ensuring updates to
self._pushed_duration occur only on successful enqueue of each f from
_audio_bstream.push.

In `@livekit-agents/livekit/agents/voice/turn.py`:
- Around line 86-88: Fix the typo in the docstring for the parameter
turn_detection in turn.py: change "finifshed" to "finished" in the Args block
describing TurnDetectionMode so the text reads "when the user has finished
speaking." Update the docstring for the function or class that declares the
turn_detection parameter (look for the Args section referencing turn_detection
and TurnDetectionMode) to correct the spelling.
- Around line 59-61: The field declaration for mode should be changed to use the
SkipValidation annotation like TurnHandlingConfig.turn_detection: replace the
plain NotGivenOr[Literal["adaptive","vad",False]] type on the mode field with
Annotated[NotGivenOr[Literal["adaptive","vad",False]], SkipValidation()] while
keeping the default value NOT_GIVEN (and keeping the existing model_config
settings); update the field definition for mode in turn.py to mirror
TurnHandlingConfig.turn_detection so Pydantic skips validation of the custom
NotGiven type.

In `@livekit-agents/pyproject.toml`:
- Around line 63-107: The pyproject dependency entries for fishaudio and minimax
are out of date; update the version constraints for the entries named
"fishaudio" and "minimax" (currently ["livekit-plugins-fishaudio>=1.2.17;
python_version >= '3.10'"] and ["livekit-plugins-minimax-ai>=1.2.15"]) to use
>=1.4.0.rc1 to match the other plugins and their release files, preserving the
existing environment marker for fishaudio; after changing the constraints, run
your dependency resolution (e.g., poetry lock / pip-compile) to ensure the
lockfile is consistent.

In `@livekit-plugins/livekit-plugins-assemblyai/pyproject.toml`:
- Line 25: The dependency requirement uses a prerelease minimum
("livekit-agents>=1.4.0.rc1") which may unintentionally force downstream users
to accept release-candidate behavior; confirm this is intentional and either
replace it with a stable release specifier (e.g., "livekit-agents>=1.4.0" or a
specific stable version) or, if the RC is required for specific fixes, narrow
the pin (e.g., "==1.4.0rc1" or ">=1.4.0rc1,<1.5.0") and add a comment in
pyproject.toml explaining why the prerelease is necessary.

In `@livekit-plugins/livekit-plugins-avatartalk/pyproject.toml`:
- Line 27: Update the dependency specification for livekit-agents to a published
release instead of the non-existent pre-release; replace the current requirement
"livekit-agents>=1.4.0.rc1" in pyproject.toml with "livekit-agents>=1.3.11" (or
the latest published version) so installs succeed; ensure the dependencies line
is updated accordingly and run a local install/test to verify resolution.

In `@livekit-plugins/livekit-plugins-baseten/pyproject.toml`:
- Around line 26-28: Replace the prerelease constraint
"livekit-agents>=1.4.0.rc1" in the dependencies list with a stable minimum
version to avoid requiring pre-releases; for example change it to
"livekit-agents>=1.3.11" or "livekit-agents>=1.3.11,<1.4.0" in pyproject.toml so
pip will not need the --pre flag and standard installs succeed, then update back
to a stable 1.4.0 constraint when that release is available.

In `@livekit-plugins/livekit-plugins-fishaudio/pyproject.toml`:
- Line 26: Replace the unsatisfiable pre-release dependency string
"livekit-agents[codecs]>=1.4.0.rc1" in pyproject.toml with a valid published
version or remove the pre-release constraint; for example change it to
"livekit-agents[codecs]>=1.3.11" (the latest available release) or simply
"livekit-agents[codecs]>=1.3.0" depending on your minimum required features,
then update lock/install to verify resolution.

In `@livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/version.py`:
- Line 15: The module-level variable __version__ lacks a type annotation
required for mypy strict mode; update the __version__ definition to include an
explicit str type hint (i.e., annotate __version__ as type str) so the
declaration reads as a typed assignment using the existing value "1.4.0.rc1".

In `@livekit-plugins/livekit-plugins-minimax/pyproject.toml`:
- Line 26: The dependency line "livekit-agents[codecs]>=1.4.0.rc1" points to a
non-existent PyPI release and will break installs; update that requirement to a
published version (for example "livekit-agents[codecs]>=1.3.11" or pin to
"==1.3.11") or change the constraint to a version range that includes a released
version, ensuring the dependency string is updated in pyproject.toml where
"livekit-agents[codecs]>=1.4.0.rc1" appears.

In `@livekit-plugins/livekit-plugins-mistralai/pyproject.toml`:
- Around line 26-27: Update the broken dependency pins in pyproject: replace the
non-existent "livekit-agents>=1.4.0.rc1" with a released version (e.g.,
"livekit-agents>=1.3.11") and replace "livekit-plugins-openai>=1.2.5" with the
published release (e.g., "livekit-plugins-openai>=1.3.11"); ensure these exact
package names in the dependency list are updated so install/resolution uses
released PyPI versions.

In `@livekit-plugins/livekit-plugins-resemble/pyproject.toml`:
- Line 26: Update the dependency line in pyproject.toml that currently reads
"livekit-agents>=1.4.0.rc1" to use the stable release instead (e.g.,
"livekit-agents==1.3.11") so downstream installers won't reject a pre-release;
alternatively, if you truly need 1.4.0 features, document and gate the
pre-release usage and change it back when the final "1.4.0" is published.

In `@livekit-plugins/livekit-plugins-silero/pyproject.toml`:
- Line 26: Update the dependency specification in pyproject.toml for the
livekit-plugins-silero package: replace the non-existent
"livekit-agents>=1.4.0.rc1" entry with a published version such as
"livekit-agents>=1.3.11" so installs from PyPI succeed; locate the dependency
line in pyproject.toml and change the version constraint accordingly.

In `@livekit-plugins/livekit-plugins-turn-detector/pyproject.toml`:
- Line 26: The dependency entry "livekit-agents>=1.4.0.rc1" in pyproject.toml is
using a non-standard prerelease spec and points to a version not on PyPI; change
the requirement to a published stable release (e.g., "livekit-agents>=1.3.11")
or, if you intend to depend on a prerelease, correct the PEP 440 format to
"livekit-agents>=1.4.0rc1" and confirm that version 1.4.0rc1 will be published
to PyPI before release so installs won't fail.

In `@livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/version.py`:
- Line 15: The package version string assigned to __version__ is not PEP 440
canonical; change the value of the module-level variable __version__ from
"1.4.0.rc1" to the PEP 440–compliant "1.4.0rc1" so packaging tools and version
comparisons use the canonical pre-release format.
♻️ Duplicate comments (7)
livekit-plugins/livekit-plugins-bithuman/pyproject.toml (1)

25-25: Same dependency verification as above.

Please ensure livekit-agents>=1.4.0.rc1 is published and compatible for this plugin as well.

livekit-plugins/livekit-plugins-gradium/pyproject.toml (1)

27-27: Same dependency verification as above.

Please ensure livekit-agents>=1.4.0.rc1 is published and compatible for this plugin as well.

livekit-plugins/livekit-plugins-deepgram/pyproject.toml (1)

25-25: Same codecs extra verification as above.

Please ensure livekit-agents[codecs]>=1.4.0.rc1 is published and compatible.

livekit-plugins/livekit-plugins-openai/pyproject.toml (1)

26-26: Same RC1 availability check as above.

This is the same pre-release bump; please reuse the RC1 publication verification from the silero plugin.

livekit-plugins/livekit-plugins-fal/pyproject.toml (1)

25-25: Same RC1 availability check as above.

This is the same pre-release bump; please reuse the RC1 publication verification from the silero plugin.

livekit-plugins/livekit-plugins-bey/pyproject.toml (1)

25-25: Same RC1 availability check as above.

This is the same pre-release bump; please reuse the RC1 publication verification from the silero plugin.

livekit-plugins/livekit-plugins-nvidia/pyproject.toml (1)

26-26: Same RC1 availability check as above.

This is the same pre-release bump; please reuse the RC1 publication verification from the silero plugin.

🧹 Nitpick comments (12)
livekit-plugins/livekit-plugins-browser/livekit/plugins/browser/version.py (1)

15-15: LGTM!

The version bump to 1.4.0.rc1 is consistent with the PR-wide version update. The format is valid per PEP 440.

Optional nit: The canonical PEP 440 format for release candidates is 1.4.0rc1 (without the dot separator). Both formats work identically with pip, so this is purely a style consideration for consistency with normalized version strings.

livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/version.py (1)

15-15: Note: This version format is consistent across all plugins in the project.

While 1.4.0.rc1 deviates from PEP 440 (which specifies 1.4.0rc1 without the dot), this format is used consistently across all 47 plugin packages in the repository. Changing this file alone would break that consistency.

If aligning with PEP 440 standards is desired, this should be coordinated as a project-wide update rather than per-file. Modern Python packaging tools handle this format transparently, so the practical impact is minimal.

livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py (1)

15-15: Prefer PEP 440 canonical format for version strings.

The version string "1.4.0.rc1" uses a dot separator before the release candidate marker. While PEP 440 permits this format and tools normalize it automatically, the canonical form per PEP 440 is "1.4.0rc1" (without the dot). Consider updating to the canonical format for consistency with PEP 440 best practices, though this is optional as tools handle normalization automatically.

livekit-agents/livekit/agents/voice/audio_recognition.py (1)

446-474: Keep interruption-enabled state in sync when toggling detection.
_interruption_enabled is set only in __init__, so disabling/replacing detection at runtime can leave transcript-holding logic active. Consider recomputing the flag and clearing held state when disabling.

♻️ Suggested adjustment
 def update_interruption_detection(
     self, interruption_detection: inference.AdaptiveInterruptionDetector | None
 ) -> None:
     self._interruption_detection = interruption_detection
+    self._interruption_enabled = interruption_detection is not None and self._vad is not None
     if interruption_detection is not None:
         self._interruption_ch = aio.Chan[
             Union[
                 rtc.AudioFrame,
                 InterruptionStreamBase._AgentSpeechStartedSentinel,
@@
         self._interruption_atask = None
         self._interruption_ch = None
+        self._transcript_buffer.clear()
+        self._ignore_user_transcript_until = NOT_GIVEN
livekit-agents/livekit/agents/voice/agent_session.py (1)

317-318: Avoid relying on NOT_GIVEN truthiness for turn detection.
If NOT_GIVEN is truthy, the sentinel can leak into _turn_detection. Using is_given avoids that edge case and keeps the type stable.

♻️ Suggested change
-        self._turn_detection = turn_handling.turn_detection or None
+        self._turn_detection = (
+            turn_handling.turn_detection
+            if is_given(turn_handling.turn_detection)
+            else None
+        )
livekit-agents/livekit/agents/voice/agent.py (3)

45-55: Consider adding deprecation warnings for deprecated parameters.

The deprecated parameters (turn_detection, allow_interruptions, min_endpointing_delay, max_endpointing_delay) are marked with a comment, but no DeprecationWarning is raised when they are used. This would help users migrate to the new turn_handling parameter.

♻️ Suggested improvement to add deprecation warnings

Consider adding deprecation warnings in the __init__ method after the migration logic:

# After line 72
if is_given(turn_detection) or is_given(allow_interruptions) or is_given(min_endpointing_delay) or is_given(max_endpointing_delay):
    import warnings
    warnings.warn(
        "Parameters 'turn_detection', 'allow_interruptions', 'min_endpointing_delay', "
        "and 'max_endpointing_delay' are deprecated. Use 'turn_handling' instead.",
        DeprecationWarning,
        stacklevel=2,
    )

93-100: Potential inconsistency in parameter precedence.

When turn_handling is provided explicitly, the deprecated parameters (min_endpointing_delay, max_endpointing_delay) are still stored at lines 99-100 from the original function arguments. This could lead to confusion if a user provides both turn_handling and deprecated params, as the deprecated values would be stored even though turn_handling was preferred.

Consider using the values from turn_handling.endpointing_cfg instead:

♻️ Suggested fix
-        self._min_endpointing_delay = min_endpointing_delay
-        self._max_endpointing_delay = max_endpointing_delay
+        # Use values from turn_handling if not provided separately
+        if is_given(turn_handling) and not is_given(min_endpointing_delay):
+            self._min_endpointing_delay = turn_handling.endpointing_cfg.min_delay
+        else:
+            self._min_endpointing_delay = min_endpointing_delay
+        if is_given(turn_handling) and not is_given(max_endpointing_delay):
+            self._max_endpointing_delay = turn_handling.endpointing_cfg.max_delay
+        else:
+            self._max_endpointing_delay = max_endpointing_delay

146-148: Consider adding a docstring for consistency.

The new interruption_detection property lacks a docstring, unlike other properties in this class (e.g., turn_detection, allow_interruptions). Consider adding one for consistency.

📝 Suggested docstring
     `@property`
     def interruption_detection(self) -> NotGivenOr[Literal["adaptive", "vad", False]]:
+        """
+        Retrieves the interruption detection mode for the agent.
+
+        If this property was not set at Agent creation, but an ``AgentSession`` provides
+        an interruption detection mode, the session's mode will be used at runtime instead.
+
+        Returns:
+            NotGivenOr[Literal["adaptive", "vad", False]]: The interruption detection mode.
+        """
         return self._interruption_detection
livekit-agents/livekit/agents/voice/turn.py (1)

11-28: Consider adding validation for delay constraints.

The EndpointingConfig doesn't validate that min_delay <= max_delay. While this may be intentional to allow flexibility, it could lead to unexpected behavior if min_delay > max_delay.

♻️ Suggested validation using Pydantic model_validator
+from pydantic import model_validator
+
 class EndpointingConfig(BaseModel):
     # ... existing docstring ...
 
     min_delay: float = 0.5
     max_delay: float = 3.0
+
+    `@model_validator`(mode='after')
+    def validate_delays(self) -> 'EndpointingConfig':
+        if self.min_delay > self.max_delay:
+            raise ValueError('min_delay must be less than or equal to max_delay')
+        return self
livekit-agents/livekit/agents/inference/interruption.py (3)

232-235: use_proxy parameter is overwritten based on URL, ignoring user input.

The use_proxy parameter from the user is ignored - it's always set to True if using the default LiveKit URL, and False otherwise. This behavior contradicts the docstring which states it "defaults to False".

If this is intentional behavior (auto-detecting proxy mode based on URL), consider:

  1. Removing the use_proxy parameter entirely, or
  2. Updating the docstring to explain the auto-detection behavior, or
  3. Allowing users to override the auto-detected value
♻️ Suggested improvement
-        else:
-            use_proxy = False
+        elif not is_given(use_proxy):
+            use_proxy = False
+        # else: use the user-provided value

And update docstring line 200:

-            use_proxy (bool, optional): Whether to use the inference instead of the hosted API, defaults to False.
+            use_proxy (bool, optional): Whether to use the proxy for inference. Auto-detected based on URL if not specified.

1018-1028: Resource cleanup pattern looks correct but could be simplified.

The cleanup in the finally block cancels both the wait_reconnect_task and the tasks. The pattern of catching CancelledError from tasks_group.exception() is correct to prevent unhandled exceptions.

However, there's a subtle issue: tasks_group is an asyncio.Future (from asyncio.gather), and calling .cancel() on it after .exception() may be redundant if the tasks already completed.

♻️ Consider simplifying cleanup
                 finally:
                     closing_ws = True
                     if ws is not None and not ws.closed:
                         await ws.close()
                         ws = None
                     await aio.gracefully_cancel(*tasks, wait_reconnect_task)
-                    tasks_group.cancel()
-                    try:
-                        tasks_group.exception()
-                    except asyncio.CancelledError:
-                        pass
+                    # tasks_group is already handled via gracefully_cancel(*tasks)

456-457: Accessing private attribute _input_rate of resampler is a widespread pattern.

While accessing _input_rate is accessing a private attribute and generally fragile, this pattern is used consistently throughout the codebase (in at least 7+ files across multiple plugins). Since rtc.AudioResampler does not expose a public API for retrieving the input rate, this appears to be the only way to detect sample rate changes. If the external library adds a public property in the future, this code should be updated to use it.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 988b395 and a64f470.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (118)
  • examples/voice_agents/basic_agent.py
  • livekit-agents/livekit/agents/cli/cli.py
  • livekit-agents/livekit/agents/inference/__init__.py
  • livekit-agents/livekit/agents/inference/interruption.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-agents/livekit/agents/log.py
  • livekit-agents/livekit/agents/telemetry/trace_types.py
  • livekit-agents/livekit/agents/telemetry/traces.py
  • livekit-agents/livekit/agents/types.py
  • livekit-agents/livekit/agents/utils/deprecation.py
  • livekit-agents/livekit/agents/vad.py
  • livekit-agents/livekit/agents/version.py
  • livekit-agents/livekit/agents/voice/agent.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/voice/events.py
  • livekit-agents/livekit/agents/voice/room_io/_output.py
  • livekit-agents/livekit/agents/voice/turn.py
  • livekit-agents/pyproject.toml
  • livekit-plugins/livekit-plugins-anam/livekit/plugins/anam/version.py
  • livekit-plugins/livekit-plugins-anam/pyproject.toml
  • livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic/version.py
  • livekit-plugins/livekit-plugins-anthropic/pyproject.toml
  • livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/version.py
  • livekit-plugins/livekit-plugins-assemblyai/pyproject.toml
  • livekit-plugins/livekit-plugins-avatartalk/livekit/plugins/avatartalk/version.py
  • livekit-plugins/livekit-plugins-avatartalk/pyproject.toml
  • livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/version.py
  • livekit-plugins/livekit-plugins-aws/pyproject.toml
  • livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/version.py
  • livekit-plugins/livekit-plugins-azure/pyproject.toml
  • livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/version.py
  • livekit-plugins/livekit-plugins-baseten/pyproject.toml
  • livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/version.py
  • livekit-plugins/livekit-plugins-bey/pyproject.toml
  • livekit-plugins/livekit-plugins-bithuman/livekit/plugins/bithuman/version.py
  • livekit-plugins/livekit-plugins-bithuman/pyproject.toml
  • livekit-plugins/livekit-plugins-browser/livekit/plugins/browser/version.py
  • livekit-plugins/livekit-plugins-cartesia/livekit/plugins/cartesia/version.py
  • livekit-plugins/livekit-plugins-cartesia/pyproject.toml
  • livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/version.py
  • livekit-plugins/livekit-plugins-clova/pyproject.toml
  • livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/version.py
  • livekit-plugins/livekit-plugins-deepgram/pyproject.toml
  • livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/version.py
  • livekit-plugins/livekit-plugins-elevenlabs/pyproject.toml
  • livekit-plugins/livekit-plugins-fal/livekit/plugins/fal/version.py
  • livekit-plugins/livekit-plugins-fal/pyproject.toml
  • livekit-plugins/livekit-plugins-fireworksai/livekit/plugins/fireworksai/version.py
  • livekit-plugins/livekit-plugins-fireworksai/pyproject.toml
  • livekit-plugins/livekit-plugins-fishaudio/livekit/plugins/fishaudio/version.py
  • livekit-plugins/livekit-plugins-fishaudio/pyproject.toml
  • livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/version.py
  • livekit-plugins/livekit-plugins-gladia/pyproject.toml
  • livekit-plugins/livekit-plugins-google/livekit/plugins/google/version.py
  • livekit-plugins/livekit-plugins-gradium/livekit/plugins/gradium/version.py
  • livekit-plugins/livekit-plugins-gradium/pyproject.toml
  • livekit-plugins/livekit-plugins-groq/livekit/plugins/groq/version.py
  • livekit-plugins/livekit-plugins-groq/pyproject.toml
  • livekit-plugins/livekit-plugins-hedra/livekit/plugins/hedra/version.py
  • livekit-plugins/livekit-plugins-hedra/pyproject.toml
  • livekit-plugins/livekit-plugins-hume/livekit/plugins/hume/version.py
  • livekit-plugins/livekit-plugins-hume/pyproject.toml
  • livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/version.py
  • livekit-plugins/livekit-plugins-inworld/pyproject.toml
  • livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/version.py
  • livekit-plugins/livekit-plugins-langchain/pyproject.toml
  • livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/version.py
  • livekit-plugins/livekit-plugins-liveavatar/pyproject.toml
  • livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py
  • livekit-plugins/livekit-plugins-lmnt/pyproject.toml
  • livekit-plugins/livekit-plugins-minimal/livekit/plugins/minimal/version.py
  • livekit-plugins/livekit-plugins-minimal/pyproject.toml
  • livekit-plugins/livekit-plugins-minimax/livekit/plugins/minimax/version.py
  • livekit-plugins/livekit-plugins-minimax/pyproject.toml
  • livekit-plugins/livekit-plugins-mistralai/livekit/plugins/mistralai/version.py
  • livekit-plugins/livekit-plugins-mistralai/pyproject.toml
  • livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/version.py
  • livekit-plugins/livekit-plugins-neuphonic/pyproject.toml
  • livekit-plugins/livekit-plugins-nltk/livekit/plugins/nltk/version.py
  • livekit-plugins/livekit-plugins-nltk/pyproject.toml
  • livekit-plugins/livekit-plugins-nvidia/livekit/plugins/nvidia/version.py
  • livekit-plugins/livekit-plugins-nvidia/pyproject.toml
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py
  • livekit-plugins/livekit-plugins-openai/pyproject.toml
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/version.py
  • livekit-plugins/livekit-plugins-resemble/pyproject.toml
  • livekit-plugins/livekit-plugins-rime/livekit/plugins/rime/version.py
  • livekit-plugins/livekit-plugins-rime/pyproject.toml
  • livekit-plugins/livekit-plugins-rtzr/livekit/plugins/rtzr/version.py
  • livekit-plugins/livekit-plugins-rtzr/pyproject.toml
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/version.py
  • livekit-plugins/livekit-plugins-sarvam/pyproject.toml
  • livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/version.py
  • livekit-plugins/livekit-plugins-silero/pyproject.toml
  • livekit-plugins/livekit-plugins-simli/livekit/plugins/simli/version.py
  • livekit-plugins/livekit-plugins-simli/pyproject.toml
  • livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallestai/version.py
  • livekit-plugins/livekit-plugins-smallestai/pyproject.toml
  • livekit-plugins/livekit-plugins-soniox/livekit/plugins/soniox/version.py
  • livekit-plugins/livekit-plugins-soniox/pyproject.toml
  • livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/version.py
  • livekit-plugins/livekit-plugins-speechify/pyproject.toml
  • livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/version.py
  • livekit-plugins/livekit-plugins-speechmatics/pyproject.toml
  • livekit-plugins/livekit-plugins-spitch/livekit/plugins/spitch/version.py
  • livekit-plugins/livekit-plugins-spitch/pyproject.toml
  • livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/version.py
  • livekit-plugins/livekit-plugins-tavus/pyproject.toml
  • livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/version.py
  • livekit-plugins/livekit-plugins-turn-detector/pyproject.toml
  • livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/version.py
  • livekit-plugins/livekit-plugins-ultravox/pyproject.toml
  • livekit-plugins/livekit-plugins-upliftai/livekit/plugins/upliftai/version.py
  • livekit-plugins/livekit-plugins-upliftai/pyproject.toml
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/version.py
  • livekit-plugins/livekit-plugins-xai/pyproject.toml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Format code with ruff
Run ruff linter and auto-fix issues
Run mypy type checker in strict mode
Maintain line length of 100 characters maximum
Ensure Python 3.9+ compatibility
Use Google-style docstrings

Files:

  • livekit-plugins/livekit-plugins-google/livekit/plugins/google/version.py
  • livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/version.py
  • livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/version.py
  • livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/version.py
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py
  • livekit-plugins/livekit-plugins-nvidia/livekit/plugins/nvidia/version.py
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/version.py
  • livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/version.py
  • livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/version.py
  • livekit-plugins/livekit-plugins-soniox/livekit/plugins/soniox/version.py
  • livekit-plugins/livekit-plugins-rtzr/livekit/plugins/rtzr/version.py
  • livekit-plugins/livekit-plugins-spitch/livekit/plugins/spitch/version.py
  • livekit-agents/livekit/agents/version.py
  • livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/version.py
  • livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/version.py
  • livekit-plugins/livekit-plugins-upliftai/livekit/plugins/upliftai/version.py
  • livekit-plugins/livekit-plugins-hume/livekit/plugins/hume/version.py
  • livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/version.py
  • livekit-plugins/livekit-plugins-minimax/livekit/plugins/minimax/version.py
  • livekit-plugins/livekit-plugins-simli/livekit/plugins/simli/version.py
  • livekit-plugins/livekit-plugins-bithuman/livekit/plugins/bithuman/version.py
  • livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic/version.py
  • livekit-agents/livekit/agents/telemetry/traces.py
  • livekit-plugins/livekit-plugins-browser/livekit/plugins/browser/version.py
  • livekit-plugins/livekit-plugins-nltk/livekit/plugins/nltk/version.py
  • livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/version.py
  • livekit-plugins/livekit-plugins-fal/livekit/plugins/fal/version.py
  • livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/version.py
  • livekit-plugins/livekit-plugins-avatartalk/livekit/plugins/avatartalk/version.py
  • livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py
  • livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/version.py
  • livekit-agents/livekit/agents/vad.py
  • livekit-plugins/livekit-plugins-groq/livekit/plugins/groq/version.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-plugins/livekit-plugins-fishaudio/livekit/plugins/fishaudio/version.py
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/version.py
  • livekit-plugins/livekit-plugins-hedra/livekit/plugins/hedra/version.py
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/version.py
  • livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/version.py
  • livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/version.py
  • livekit-plugins/livekit-plugins-fireworksai/livekit/plugins/fireworksai/version.py
  • livekit-agents/livekit/agents/telemetry/trace_types.py
  • livekit-agents/livekit/agents/cli/cli.py
  • livekit-plugins/livekit-plugins-anam/livekit/plugins/anam/version.py
  • livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/version.py
  • livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/version.py
  • livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/version.py
  • livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallestai/version.py
  • livekit-agents/livekit/agents/utils/deprecation.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-plugins/livekit-plugins-cartesia/livekit/plugins/cartesia/version.py
  • livekit-agents/livekit/agents/inference/__init__.py
  • livekit-agents/livekit/agents/voice/turn.py
  • livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/version.py
  • livekit-agents/livekit/agents/voice/room_io/_output.py
  • livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/version.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-agents/livekit/agents/log.py
  • livekit-plugins/livekit-plugins-mistralai/livekit/plugins/mistralai/version.py
  • livekit-agents/livekit/agents/types.py
  • livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/version.py
  • livekit-plugins/livekit-plugins-minimal/livekit/plugins/minimal/version.py
  • livekit-agents/livekit/agents/voice/agent.py
  • livekit-agents/livekit/agents/voice/events.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-plugins/livekit-plugins-gradium/livekit/plugins/gradium/version.py
  • livekit-plugins/livekit-plugins-rime/livekit/plugins/rime/version.py
  • examples/voice_agents/basic_agent.py
  • livekit-agents/livekit/agents/inference/interruption.py
🧬 Code graph analysis (12)
livekit-agents/livekit/agents/voice/agent_session.py (2)
livekit-agents/livekit/agents/utils/deprecation.py (1)
  • deprecate_params (11-49)
livekit-agents/livekit/agents/voice/turn.py (4)
  • TurnHandlingConfig (80-205)
  • migrate (133-193)
  • interruption_cfg (196-199)
  • endpointing_cfg (202-205)
livekit-agents/livekit/agents/cli/cli.py (1)
livekit-agents/livekit/agents/voice/io.py (1)
  • on_playback_started (188-189)
livekit-agents/livekit/agents/utils/deprecation.py (1)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/inference/__init__.py (1)
livekit-agents/livekit/agents/inference/interruption.py (4)
  • AdaptiveInterruptionDetector (168-328)
  • InterruptionDetectionError (101-107)
  • InterruptionEvent (64-98)
  • InterruptionEventType (59-61)
livekit-agents/livekit/agents/voice/turn.py (3)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/voice/agent_session.py (1)
  • turn_detection (388-389)
livekit-agents/livekit/agents/voice/agent_activity.py (3)
  • min_endpointing_delay (280-285)
  • max_endpointing_delay (288-293)
  • allow_interruptions (272-277)
livekit-agents/livekit/agents/voice/room_io/_output.py (2)
livekit-agents/livekit/agents/ipc/proc_client.py (1)
  • send (82-83)
livekit-agents/livekit/agents/utils/aio/channel.py (2)
  • send (30-30)
  • send (71-88)
livekit-agents/livekit/agents/voice/agent_activity.py (2)
livekit-agents/livekit/agents/inference/interruption.py (2)
  • AdaptiveInterruptionDetector (168-328)
  • InterruptionEvent (64-98)
livekit-agents/livekit/agents/voice/audio_recognition.py (3)
  • on_start_of_overlap_speech (221-238)
  • on_end_of_overlap_speech (240-260)
  • on_end_of_agent_speech (262-288)
livekit-agents/livekit/agents/log.py (2)
livekit-agents/livekit/agents/llm/tool_context.py (1)
  • message (76-77)
livekit-agents/livekit/agents/telemetry/traces.py (1)
  • _log (359-372)
livekit-agents/livekit/agents/voice/agent.py (1)
livekit-agents/livekit/agents/voice/turn.py (3)
  • TurnHandlingConfig (80-205)
  • migrate (133-193)
  • interruption_cfg (196-199)
livekit-agents/livekit/agents/voice/events.py (1)
livekit-agents/livekit/agents/inference/interruption.py (1)
  • InterruptionEvent (64-98)
livekit-agents/livekit/agents/inference/stt.py (3)
livekit-agents/livekit/agents/utils/aio/task_set.py (1)
  • tasks (30-31)
livekit-agents/livekit/agents/tts/tts.py (1)
  • exception (213-214)
livekit-agents/livekit/agents/_exceptions.py (1)
  • APIConnectionError (84-88)
examples/voice_agents/basic_agent.py (4)
livekit-agents/livekit/agents/voice/agent.py (2)
  • on_enter (228-230)
  • session (657-664)
examples/voice_agents/multi_agent.py (2)
  • on_enter (60-63)
  • on_enter (111-114)
tests/test_agent_session.py (1)
  • on_enter (41-43)
livekit-agents/livekit/agents/voice/agent_session.py (3)
  • userdata (377-381)
  • userdata (384-385)
  • AgentSession (137-1334)

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 16

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
livekit-plugins/livekit-plugins-xai/pyproject.toml (1)

30-51: Fix missing version file and unpublished pre-release dependency.

The Hatch build configuration references livekit/plugins/xai/version.py for version reading, but this file does not exist in the repository—the build will fail. Additionally, the dependency livekit-agents[openai]>=1.4.0.rc1 pins to a pre-release version that is not published on PyPI (latest on PyPI is 1.3.11 as of Jan 14, 2026). Either create the version file with __version__ defined, update the dependency to an available released version, or clarify the dependency source if using an alternative package index.

🤖 Fix all issues with AI agents
In `@livekit-agents/livekit/agents/voice/turn.py`:
- Around line 154-157: The current logic only maps allow_interruptions=False to
interruption_mode=False and leaves allow_interruptions=True as NOT_GIVEN; update
the branching around interruption_mode (the variable) and allow_interruptions so
an explicit True is preserved—either set interruption_mode = "vad" when
allow_interruptions is True (to keep old VAD behavior) or set interruption_mode
= True/another explicit sentinel if that’s the intended semantics; make sure to
use the existing NOT_GIVEN/NotGivenOr[...] types and adjust the check that
currently only tests for False so explicit True is not treated as not-given.

In `@livekit-agents/pyproject.toml`:
- Around line 38-41: The dependency constraint "openai>=1.99.2" in
pyproject.toml is impossible to satisfy (no such release); update the openai
requirement to a valid version available on PyPI (for example change
"openai>=1.99.2" to a concrete, existing version like "openai>=1.86.0" or pin to
"openai==1.86.0") so installations succeed; locate the openai entry in
pyproject.toml and replace the invalid constraint accordingly while leaving the
opentelemetry entries unchanged.

In `@livekit-plugins/livekit-plugins-azure/pyproject.toml`:
- Around line 6-24: The pyproject.toml dependency specifier for livekit-agents
("livekit-agents>=1.4.0.rc1") is invalid because that pre-release doesn't exist
on PyPI; update the dependencies list entry for livekit-agents to a satisfiable
version (e.g., "livekit-agents>=1.3.11") or remove the pre-release pin so the
package will install until an official 1.4.0 release exists—modify the
dependencies array in pyproject.toml accordingly.

In `@livekit-plugins/livekit-plugins-fishaudio/pyproject.toml`:
- Line 5: The pyproject declares requires-python = ">=3.9.0" but the conditional
dependency for fish-audio-sdk is gated on python_version >= '3.10', causing a
mismatch; either raise requires-python to ">=3.10" (and update classifiers) to
reflect the real minimum, or keep ">=3.9.0" and implement graceful handling in
your plugin initialization to detect missing fish-audio-sdk and surface a clear
error or degraded-mode behavior (update any installer/runtime checks in the
module that import/use fish-audio-sdk and add clear messaging).

In `@livekit-plugins/livekit-plugins-langchain/pyproject.toml`:
- Around line 20-22: Replace the non-canonical pre-release dependency spec
"livekit-agents>=1.4.0.rc1" with the PEP 440 canonical form by updating the
requirement to "livekit-agents>=1.4.0rc1" in the dependencies list so tooling
and normalization match the actual PyPI package name.

In `@livekit-plugins/livekit-plugins-liveavatar/pyproject.toml`:
- Around line 6-32: The dependency spec in the pyproject.toml (the dependencies
= ["livekit-agents>=1.4.0.rc1"] entry) is invalid/unresolvable; update it to a
published release by replacing the current spec with a stable published version,
e.g. change the dependency to "livekit-agents>=1.3.11" (or, if you truly need a
pre-release and it becomes available on PyPI, use the PEP 440 canonical form
"livekit-agents>=1.4.0rc1"); ensure the change is applied to the dependencies
list in pyproject.toml.

In `@livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py`:
- Line 15: Update the PEP 440 non-compliant release-candidate version string
assigned to __version__ in version.py (symbol: __version__) by removing the
extra dot before "rc" so it follows the X.Y.ZrcN format (e.g., change
"1.4.0.rc1" to "1.4.0rc1"); apply the same transformation to all other
version.py files in the repo to ensure consistent PEP 440 compliance across the
project.

In `@livekit-plugins/livekit-plugins-lmnt/pyproject.toml`:
- Around line 19-20: The dependency line currently references the unpublished
pre-release "livekit-agents>=1.4.0.rc1" which will break pip installs; update
the dependency in pyproject.toml to a PyPI-available release such as
"livekit-agents>=1.3.11,<2" (or pin to "livekit-agents==1.3.11" if you need
exact reproducibility) so installations resolve successfully; modify the
existing dependency entry "livekit-agents>=1.4.0.rc1" accordingly.
- Around line 27-29: Update the [build-system] requires entry to pin hatchling
to a minimum compatible version so path-based versioning works; change the
requires list to include a constrained version string like "hatchling>=1.4.1"
while leaving build-backend = "hatchling.build" unchanged (locate the
[build-system] section and the requires key in pyproject.toml to apply this
edit).

In `@livekit-plugins/livekit-plugins-minimax/pyproject.toml`:
- Line 3: The package description in pyproject.toml incorrectly references AWS;
update the description field (the "description" entry) to mention MiniMax
instead—e.g., change it to describe this as the LiveKit Agents Plugin for
MiniMax services—so the metadata accurately reflects the plugin’s target.

In `@livekit-plugins/livekit-plugins-nltk/pyproject.toml`:
- Around line 19-20: The dependency string livekit-agents>=1.4.0.rc1 in the
pyproject.toml is referencing a non-existent pre-release; update that dependency
to a published version (for example change livekit-agents>=1.4.0.rc1 to
livekit-agents>=1.3.11,<2 or pin to ==1.3.11) in the dependencies list so the
package can be resolved, or else hold this release until 1.4.0.rc1 is published.

In `@livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py`:
- Line 15: The package version string assigned to __version__ uses a
non-canonical release-candidate format ("1.4.0.rc1"); update the value to the
PEP 440 canonical form by removing the extra dot so __version__ = "1.4.0rc1"
(edit the __version__ assignment in version.py).

In `@livekit-plugins/livekit-plugins-rtzr/pyproject.toml`:
- Around line 28-33: Update the pyproject.toml dependency entry for the
livekit-agents package to remove the prerelease specifier `1.4.0.rc1` and point
to a published version; specifically replace `livekit-agents>=1.4.0.rc1` with a
valid released constraint such as `livekit-agents>=1.3.11` (or
`livekit-agents>=1.4.0` once that version is published) so the dependency can be
resolved by pip.

In `@livekit-plugins/livekit-plugins-simli/pyproject.toml`:
- Around line 20-21: The dependency constraint "livekit-agents>=1.4.0.rc1" is
invalid because that RC isn’t on PyPI; update the dependencies entry in
pyproject.toml (the line containing dependencies =
["livekit-agents>=1.4.0.rc1"]) to a resolvable version such as
"livekit-agents>=1.3.11,<1.4.0" or pin to "livekit-agents==1.3.11" so
installations succeed until the 1.4.0 release/RC is published.

In `@livekit-plugins/livekit-plugins-speechmatics/pyproject.toml`:
- Line 28: Update the dependency version for livekit-agents to use PEP 440
canonical release candidate syntax by replacing "1.4.0.rc1" with "1.4.0rc1" in
the dependencies entry in pyproject.toml (the line containing dependencies =
["livekit-agents>=1.4.0.rc1", ...]); ensure the rest of the specifier (operator
and other packages) remains unchanged.

In `@livekit-plugins/livekit-plugins-spitch/pyproject.toml`:
- Around line 20-21: Replace the non-existent dependency pin
"livekit-agents[codecs]>=1.4.0.rc1" with a valid released constraint such as
"livekit-agents[codecs]>=1.3.11" in the dependencies list, and also pin or add a
tested version range for "spitch" (e.g., "spitch>=X.Y.Z,<A.B.C") to avoid
unexpected breakages; update the dependencies entry that currently contains
"livekit-agents[codecs]>=1.4.0.rc1" and "spitch" accordingly.
♻️ Duplicate comments (16)
livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/version.py (1)

15-15: Use PEP 440-compliant pre-release format (1.4.0rc1).

The version string "1.4.0.rc1" includes a dot separator before the pre-release identifier, which is non-canonical per PEP 440. This can cause version comparison inconsistencies with packaging tools. Use "1.4.0rc1" instead.

Proposed fix
-__version__ = "1.4.0.rc1"
+__version__ = "1.4.0rc1"
livekit-plugins/livekit-plugins-baseten/pyproject.toml (1)

20-25: Pre-release dependency constraint issue already flagged.

The concern about livekit-agents>=1.4.0.rc1 requiring the --pre flag for standard pip installs has been raised in a previous review.

examples/voice_agents/basic_agent.py (1)

98-98: inference.BargeinDetector does not exist - use AdaptiveInterruptionDetector.

The inference module exports AdaptiveInterruptionDetector, not BargeinDetector. This will cause an AttributeError at runtime.

🐛 Proposed fix
-        bargein_detector=inference.BargeinDetector(),
+        bargein_detector=inference.AdaptiveInterruptionDetector(),
livekit-plugins/livekit-plugins-fishaudio/pyproject.toml (1)

22-22: Pre-release dependency livekit-agents[codecs]>=1.4.0.rc1 does not exist on PyPI.

The latest available release is 1.3.11 (uploaded Jan 14, 2026). This dependency will cause installation failures until the 1.4.0 release candidate is published.

If this PR is intended to be merged before the rc1 release, consider using a development dependency pattern or ensuring the release is published first.

livekit-plugins/livekit-plugins-minimax/pyproject.toml (1)

20-23: Dependency version concern already flagged.

The livekit-agents[codecs]>=1.4.0.rc1 version constraint was flagged in a previous review. Ensure this package is published to PyPI before or alongside this plugin release to avoid installation failures.

livekit-plugins/livekit-plugins-silero/pyproject.toml (1)

20-22: Verify the pre-release exists on PyPI before requiring it.

If 1.4.0.rc1 isn’t published, installs will fail; please confirm the release exists or relax the constraint to the latest published version. (Line 21)

Run this to verify the release availability:

#!/bin/bash
# Check if 1.4.0rc1 is published for livekit-agents on PyPI.
python - <<'PY'
import json, urllib.request
data = json.load(urllib.request.urlopen("https://pypi.org/pypi/livekit-agents/json"))
print("1.4.0rc1 published:", "1.4.0rc1" in data.get("releases", {}))
print("Latest:", data["info"]["version"])
PY
livekit-agents/pyproject.toml (1)

76-88: Update version constraints for fishaudio and minimax to match other plugins.

The version constraints for fishaudio (line 76) and minimax (line 88) are still at older versions (>=1.2.17 and >=1.2.15 respectively) while all other plugins have been updated to >=1.4.0.rc1. This inconsistency should be addressed.

Suggested fix
-fishaudio = ["livekit-plugins-fishaudio>=1.2.17; python_version >= '3.10'"]
+fishaudio = ["livekit-plugins-fishaudio>=1.4.0.rc1; python_version >= '3.10'"]
-minimax = ["livekit-plugins-minimax-ai>=1.2.15"]
+minimax = ["livekit-plugins-minimax-ai>=1.4.0.rc1"]
livekit-plugins/livekit-plugins-turn-detector/pyproject.toml (1)

20-25: Verify livekit-agents prerelease availability and spec format.
Line 22 uses livekit-agents>=1.4.0.rc1. Please confirm the prerelease is published before this ships; otherwise installs will fail. Also consider switching to the canonical PEP 440 prerelease form (1.4.0rc1) for tooling compatibility.

♻️ Proposed fix (if prerelease is intended)
-  "livekit-agents>=1.4.0.rc1",
+  "livekit-agents>=1.4.0rc1",

If prerelease is not guaranteed to be published, please pin to the latest stable version instead.

You can verify availability with:

#!/bin/bash
python - <<'PY'
import json, urllib.request
data = json.load(urllib.request.urlopen("https://pypi.org/pypi/livekit-agents/json"))
print("Latest:", data["info"]["version"])
print("Has 1.4.0rc1:", "1.4.0rc1" in data["releases"])
PY
livekit-plugins/livekit-plugins-avatartalk/pyproject.toml (1)

22-23: Confirm livekit-agents 1.4.0.rc1 is published on PyPI.
If that pre-release isn’t published, installs will fail; consider pinning to the latest published version or deferring the bump until the release is available.

#!/bin/bash
# Check whether livekit-agents has the requested pre-release on PyPI.
python - <<'PY'
import json, urllib.request
data = json.load(urllib.request.urlopen("https://pypi.org/pypi/livekit-agents/json"))
versions = set(data.get("releases", {}).keys())
print("Latest PyPI version:", data.get("info", {}).get("version"))
for v in ("1.4.0rc1", "1.4.0.rc1"):
    print(f"{v} present:", v in versions)
PY
livekit-plugins/livekit-plugins-assemblyai/pyproject.toml (1)

20-20: Confirm prerelease dependency is intentional.

livekit-agents>=1.4.0.rc1 will allow prereleases; please confirm that’s intended and documented for downstream users, or switch to a stable minimum once available.

livekit-agents/livekit/agents/inference/interruption.py (2)

64-68: Docstring placement and typo issue.

The class docstring appears after model_config and contains a typo ("tnterruption" → "interruption"). In Pydantic models, the docstring should immediately follow the class declaration.


1119-1122: Use np.frombuffer() for mono channel case to properly convert bytes to numpy array.

Line 1121 assigns frame.data (bytes) directly to a numpy int16 slice, which is inconsistent with the multi-channel case (lines 1116-1119) that correctly uses np.frombuffer(). This will fail or produce incorrect results since bytes cannot be directly assigned to a numpy array slice.

livekit-agents/livekit/agents/voice/events.py (1)

10-10: InterruptionEvent.type is incompatible with AgentEvent discriminator.

The InterruptionEvent.type field uses InterruptionEventType enum with values "interruption" and "overlap_speech_ended", but EventTypes defines "user_interruption_detected" and "user_non_interruption_detected". Since AgentEvent uses Field(discriminator="type"), Pydantic's union discriminator won't correctly identify InterruptionEvent instances.

livekit-agents/livekit/agents/voice/agent_activity.py (1)

376-392: Sync interruption flags and adaptive detector when turn_detection changes.

update_options() updates _turn_detection and the default flag, but leaves the live _interruption_by_audio_activity_enabled unchanged and keeps the adaptive detector (_interruption_detector / interruption_enabled) tied to the old mode. Switching to "manual"/"realtime_llm" can therefore keep audio-activity and adaptive interruption enabled unexpectedly.

🧩 Suggested fix (flag sync)
-            self._turn_detection = turn_detection
-            self._default_interruption_by_audio_activity_enabled = self._turn_detection not in (
-                "manual",
-                "realtime_llm",
-            )
+            self._turn_detection = turn_detection
+            old_default = self._default_interruption_by_audio_activity_enabled
+            self._default_interruption_by_audio_activity_enabled = self._turn_detection not in (
+                "manual",
+                "realtime_llm",
+            )
+            if self._interruption_by_audio_activity_enabled == old_default:
+                self._interruption_by_audio_activity_enabled = (
+                    self._default_interruption_by_audio_activity_enabled
+                )

Additionally, consider re-resolving _interruption_detector / _interruption_detection_enabled here and propagating the new detector to AudioRecognition (via a setter or re-init), so adaptive interruption is disabled in incompatible modes.

livekit-agents/livekit/agents/voice/turn.py (2)

61-62: Add SkipValidation for InterruptionConfig.mode (NotGiven sentinel).

mode uses NotGivenOr with a custom NotGiven sentinel. Without SkipValidation, Pydantic may try to validate the sentinel and reject it, unlike TurnHandlingConfig.turn_detection.

🧩 Suggested fix
-    mode: NotGivenOr[Literal["adaptive", "vad", False]] = NOT_GIVEN
+    mode: Annotated[
+        NotGivenOr[Literal["adaptive", "vad", False]],
+        SkipValidation(),
+    ] = NOT_GIVEN
Pydantic v2: Should fields using a custom NotGiven sentinel be annotated with SkipValidation (as with TurnHandlingConfig.turn_detection)?

86-88: Docstring typo: “finifshed” → “finished”.

📝 Fix typo
-        turn_detection (TurnDetectionMode, optional): Strategy for deciding
-            when the user has finifshed speaking.
+        turn_detection (TurnDetectionMode, optional): Strategy for deciding
+            when the user has finished speaking.
🧹 Nitpick comments (13)
livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/version.py (1)

15-15: Consider using PEP 440 canonical format for release candidates.

The version string "1.4.0.rc1" uses a dot before rc, but PEP 440's canonical form is "1.4.0rc1" (no dot). While pip normalizes both to the same version, using the canonical form avoids inconsistencies in version displays and string comparisons.

Suggested change
-__version__ = "1.4.0.rc1"
+__version__ = "1.4.0rc1"
livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/version.py (1)

15-15: LGTM!

The version bump to 1.4.0.rc1 aligns with the coordinated release across all plugins.

Minor note: PEP 440 normalizes this to 1.4.0rc1 (without the dot before rc). While 1.4.0.rc1 is valid and will work, using the normalized form ensures consistency with how packaging tools interpret it. This is purely optional if you prefer the current format for readability.

livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/version.py (1)

15-15: Consider using PEP 440 normalized version format.

The version "1.4.0.rc1" works but isn't the canonical form per PEP 440. The normalized format is "1.4.0rc1" (without the dot before rc). Packaging tools will normalize it anyway, so this is purely a stylistic consideration.

Given this pattern appears across multiple plugins in this PR, this is likely intentional or can be addressed in a follow-up if desired.

livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/version.py (1)

15-15: Version bump looks good; consider using PEP 440 normalized format.

The version update aligns with the PR-wide bump to 1.4.0.rc1. Note that the canonical PEP 440 format for release candidates is 1.4.0rc1 (without the dot before rc). The current format works but will be normalized by packaging tools, which could cause minor inconsistencies when comparing version strings directly.

Optional: Use PEP 440 normalized format
-__version__ = "1.4.0.rc1"
+__version__ = "1.4.0rc1"
livekit-plugins/livekit-plugins-hume/pyproject.toml (1)

19-27: Consider adding classifiers for Python 3.9 and 3.10.

The requires-python field specifies >=3.9.0, but the classifiers only list Python 3.11 and 3.12. Consider adding the missing versions for consistency:

 classifiers = [
   "Intended Audience :: Developers",
   "Programming Language :: Python :: 3",
   "Programming Language :: Python :: 3 :: Only",
+  "Programming Language :: Python :: 3.9",
+  "Programming Language :: Python :: 3.10",
   "Programming Language :: Python :: 3.11",
   "Programming Language :: Python :: 3.12",
   "Topic :: Multimedia :: Sound/Audio",
   "Topic :: Scientific/Engineering :: Artificial Intelligence",
 ]
livekit-plugins/livekit-plugins-smallestai/pyproject.toml (1)

37-48: Double‑check sdist contents with Hatchling include rules.

If Hatchling treats the include list as a replacement rather than additive, README.md (used by readme = "README.md") could be omitted from the sdist. Please confirm the behavior; if it replaces defaults, consider explicitly adding README to the sdist include list.

♻️ Optional include tweak (if needed)
 [tool.hatch.build.targets.sdist]
-include = ["/livekit"]
+include = ["/livekit", "/README.md"]
livekit-plugins/livekit-plugins-assemblyai/pyproject.toml (1)

38-39: Ensure sdist includes README referenced by project metadata.

With include = ["/livekit"], the sdist may omit README.md (used by project.readme). Please verify the built sdist contains it, and add it if needed.

📦 Suggested adjustment (if README is missing in sdist)
 [tool.hatch.build.targets.sdist]
-include = ["/livekit"]
+include = ["/livekit", "/README.md"]
livekit-plugins/livekit-plugins-anam/pyproject.toml (1)

28-30: Pin hatchling to a minimum version.
The project actively configures [tool.hatch.build.targets.wheel] and [tool.hatch.build.targets.sdist] build targets, which have been available since Hatchling 0.24.0. Pinning a lower bound (e.g., requires = ["hatchling>=0.24.0"]) ensures build reproducibility and prevents drift from unbounded dependency resolution.

livekit-plugins/livekit-plugins-speechify/pyproject.toml (1)

20-21: Consider consistency with other plugins before constraining livekit-agents.
All plugins in this monorepo currently use >=1.4.0.rc1 without upper bounds (e.g., livekit-plugins-anthropic, livekit-plugins-assemblyai). If an upper bound is warranted to prevent breaking changes across minor versions, apply the constraint consistently across all plugins, not just this one.

If constraining is appropriate, verify the version's compatibility window in the main livekit-agents repository and ensure the policy is documented for future releases.

livekit-plugins/livekit-plugins-neuphonic/pyproject.toml (1)

28-39: Verify Hatchling minimum version and sdist contents.
Line 29: consider setting a lower bound for Hatchling that supports this config. Lines 35-39: please verify the sdist still includes README/LICENSE (or other required metadata files) with the current include list.

livekit-plugins/livekit-plugins-gladia/pyproject.toml (1)

34-34: Pin/verify hatchling for dynamic versioning.

With dynamic = ["version"] and the new hatchling backend, please confirm your build tooling uses PEP 517/hatchling and that the version file at livekit/plugins/gladia/version.py is always included in sdists/wheels. Consider pinning a minimum hatchling version that matches your CI/tested baseline for reproducibility.

Also applies to: 41-43, 45-49

livekit-plugins/livekit-plugins-clova/pyproject.toml (1)

28-30: Consider confirming hatchling version expectations.
If CI or release tooling relies on specific hatchling features, a minimum version pin can improve reproducibility and avoid surprises.

livekit-plugins/livekit-plugins-spitch/pyproject.toml (1)

28-39: Confirm Hatch sdist include pattern is correct.

Please verify that include = ["/livekit"] is honored by hatchling; if not, the sdist may omit sources. A safer pattern is typically a relative glob.

Suggested adjustment (if sdist is missing files)
 [tool.hatch.build.targets.sdist]
-include = ["/livekit"]
+include = ["livekit/**"]
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a64f470 and d6ec0cc.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (116)
  • examples/voice_agents/basic_agent.py
  • livekit-agents/livekit/agents/inference/__init__.py
  • livekit-agents/livekit/agents/inference/interruption.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-agents/livekit/agents/log.py
  • livekit-agents/livekit/agents/telemetry/trace_types.py
  • livekit-agents/livekit/agents/telemetry/traces.py
  • livekit-agents/livekit/agents/types.py
  • livekit-agents/livekit/agents/utils/deprecation.py
  • livekit-agents/livekit/agents/vad.py
  • livekit-agents/livekit/agents/version.py
  • livekit-agents/livekit/agents/voice/agent.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/voice/events.py
  • livekit-agents/livekit/agents/voice/turn.py
  • livekit-agents/pyproject.toml
  • livekit-plugins/livekit-plugins-anam/livekit/plugins/anam/version.py
  • livekit-plugins/livekit-plugins-anam/pyproject.toml
  • livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic/version.py
  • livekit-plugins/livekit-plugins-anthropic/pyproject.toml
  • livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/version.py
  • livekit-plugins/livekit-plugins-assemblyai/pyproject.toml
  • livekit-plugins/livekit-plugins-avatartalk/livekit/plugins/avatartalk/version.py
  • livekit-plugins/livekit-plugins-avatartalk/pyproject.toml
  • livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/version.py
  • livekit-plugins/livekit-plugins-aws/pyproject.toml
  • livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/version.py
  • livekit-plugins/livekit-plugins-azure/pyproject.toml
  • livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/version.py
  • livekit-plugins/livekit-plugins-baseten/pyproject.toml
  • livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/version.py
  • livekit-plugins/livekit-plugins-bey/pyproject.toml
  • livekit-plugins/livekit-plugins-bithuman/livekit/plugins/bithuman/version.py
  • livekit-plugins/livekit-plugins-bithuman/pyproject.toml
  • livekit-plugins/livekit-plugins-browser/livekit/plugins/browser/version.py
  • livekit-plugins/livekit-plugins-cartesia/livekit/plugins/cartesia/version.py
  • livekit-plugins/livekit-plugins-cartesia/pyproject.toml
  • livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/version.py
  • livekit-plugins/livekit-plugins-clova/pyproject.toml
  • livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/version.py
  • livekit-plugins/livekit-plugins-deepgram/pyproject.toml
  • livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/version.py
  • livekit-plugins/livekit-plugins-elevenlabs/pyproject.toml
  • livekit-plugins/livekit-plugins-fal/livekit/plugins/fal/version.py
  • livekit-plugins/livekit-plugins-fal/pyproject.toml
  • livekit-plugins/livekit-plugins-fireworksai/livekit/plugins/fireworksai/version.py
  • livekit-plugins/livekit-plugins-fireworksai/pyproject.toml
  • livekit-plugins/livekit-plugins-fishaudio/livekit/plugins/fishaudio/version.py
  • livekit-plugins/livekit-plugins-fishaudio/pyproject.toml
  • livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/version.py
  • livekit-plugins/livekit-plugins-gladia/pyproject.toml
  • livekit-plugins/livekit-plugins-google/livekit/plugins/google/version.py
  • livekit-plugins/livekit-plugins-gradium/livekit/plugins/gradium/version.py
  • livekit-plugins/livekit-plugins-gradium/pyproject.toml
  • livekit-plugins/livekit-plugins-groq/livekit/plugins/groq/version.py
  • livekit-plugins/livekit-plugins-groq/pyproject.toml
  • livekit-plugins/livekit-plugins-hedra/livekit/plugins/hedra/version.py
  • livekit-plugins/livekit-plugins-hedra/pyproject.toml
  • livekit-plugins/livekit-plugins-hume/livekit/plugins/hume/version.py
  • livekit-plugins/livekit-plugins-hume/pyproject.toml
  • livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/version.py
  • livekit-plugins/livekit-plugins-inworld/pyproject.toml
  • livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/version.py
  • livekit-plugins/livekit-plugins-langchain/pyproject.toml
  • livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/version.py
  • livekit-plugins/livekit-plugins-liveavatar/pyproject.toml
  • livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py
  • livekit-plugins/livekit-plugins-lmnt/pyproject.toml
  • livekit-plugins/livekit-plugins-minimal/livekit/plugins/minimal/version.py
  • livekit-plugins/livekit-plugins-minimal/pyproject.toml
  • livekit-plugins/livekit-plugins-minimax/livekit/plugins/minimax/version.py
  • livekit-plugins/livekit-plugins-minimax/pyproject.toml
  • livekit-plugins/livekit-plugins-mistralai/livekit/plugins/mistralai/version.py
  • livekit-plugins/livekit-plugins-mistralai/pyproject.toml
  • livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/version.py
  • livekit-plugins/livekit-plugins-neuphonic/pyproject.toml
  • livekit-plugins/livekit-plugins-nltk/livekit/plugins/nltk/version.py
  • livekit-plugins/livekit-plugins-nltk/pyproject.toml
  • livekit-plugins/livekit-plugins-nvidia/livekit/plugins/nvidia/version.py
  • livekit-plugins/livekit-plugins-nvidia/pyproject.toml
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py
  • livekit-plugins/livekit-plugins-openai/pyproject.toml
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/version.py
  • livekit-plugins/livekit-plugins-resemble/pyproject.toml
  • livekit-plugins/livekit-plugins-rime/livekit/plugins/rime/version.py
  • livekit-plugins/livekit-plugins-rime/pyproject.toml
  • livekit-plugins/livekit-plugins-rtzr/livekit/plugins/rtzr/version.py
  • livekit-plugins/livekit-plugins-rtzr/pyproject.toml
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/version.py
  • livekit-plugins/livekit-plugins-sarvam/pyproject.toml
  • livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/version.py
  • livekit-plugins/livekit-plugins-silero/pyproject.toml
  • livekit-plugins/livekit-plugins-simli/livekit/plugins/simli/version.py
  • livekit-plugins/livekit-plugins-simli/pyproject.toml
  • livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallestai/version.py
  • livekit-plugins/livekit-plugins-smallestai/pyproject.toml
  • livekit-plugins/livekit-plugins-soniox/livekit/plugins/soniox/version.py
  • livekit-plugins/livekit-plugins-soniox/pyproject.toml
  • livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/version.py
  • livekit-plugins/livekit-plugins-speechify/pyproject.toml
  • livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/version.py
  • livekit-plugins/livekit-plugins-speechmatics/pyproject.toml
  • livekit-plugins/livekit-plugins-spitch/livekit/plugins/spitch/version.py
  • livekit-plugins/livekit-plugins-spitch/pyproject.toml
  • livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/version.py
  • livekit-plugins/livekit-plugins-tavus/pyproject.toml
  • livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/version.py
  • livekit-plugins/livekit-plugins-turn-detector/pyproject.toml
  • livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/version.py
  • livekit-plugins/livekit-plugins-ultravox/pyproject.toml
  • livekit-plugins/livekit-plugins-upliftai/livekit/plugins/upliftai/version.py
  • livekit-plugins/livekit-plugins-upliftai/pyproject.toml
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/version.py
  • livekit-plugins/livekit-plugins-xai/pyproject.toml
✅ Files skipped from review due to trivial changes (3)
  • livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/version.py
  • livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/version.py
  • livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/version.py
🚧 Files skipped from review as they are similar to previous changes (41)
  • livekit-plugins/livekit-plugins-elevenlabs/pyproject.toml
  • livekit-agents/livekit/agents/inference/init.py
  • livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic/version.py
  • livekit-plugins/livekit-plugins-simli/livekit/plugins/simli/version.py
  • livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/version.py
  • livekit-plugins/livekit-plugins-fireworksai/livekit/plugins/fireworksai/version.py
  • livekit-plugins/livekit-plugins-mistralai/pyproject.toml
  • livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/version.py
  • livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/version.py
  • livekit-plugins/livekit-plugins-fal/pyproject.toml
  • livekit-agents/livekit/agents/telemetry/trace_types.py
  • livekit-agents/livekit/agents/utils/deprecation.py
  • livekit-plugins/livekit-plugins-resemble/pyproject.toml
  • livekit-plugins/livekit-plugins-rime/livekit/plugins/rime/version.py
  • livekit-plugins/livekit-plugins-upliftai/livekit/plugins/upliftai/version.py
  • livekit-plugins/livekit-plugins-bithuman/pyproject.toml
  • livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/version.py
  • livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/version.py
  • livekit-plugins/livekit-plugins-minimax/livekit/plugins/minimax/version.py
  • livekit-plugins/livekit-plugins-fireworksai/pyproject.toml
  • livekit-plugins/livekit-plugins-google/livekit/plugins/google/version.py
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/version.py
  • livekit-plugins/livekit-plugins-groq/livekit/plugins/groq/version.py
  • livekit-plugins/livekit-plugins-fal/livekit/plugins/fal/version.py
  • livekit-agents/livekit/agents/types.py
  • livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallestai/version.py
  • livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/version.py
  • livekit-agents/livekit/agents/telemetry/traces.py
  • livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/version.py
  • livekit-plugins/livekit-plugins-rtzr/livekit/plugins/rtzr/version.py
  • livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/version.py
  • livekit-plugins/livekit-plugins-avatartalk/livekit/plugins/avatartalk/version.py
  • livekit-plugins/livekit-plugins-cartesia/pyproject.toml
  • livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/version.py
  • livekit-agents/livekit/agents/vad.py
  • livekit-plugins/livekit-plugins-cartesia/livekit/plugins/cartesia/version.py
  • livekit-plugins/livekit-plugins-soniox/livekit/plugins/soniox/version.py
  • livekit-plugins/livekit-plugins-anthropic/pyproject.toml
  • livekit-plugins/livekit-plugins-bithuman/livekit/plugins/bithuman/version.py
  • livekit-plugins/livekit-plugins-sarvam/pyproject.toml
  • livekit-plugins/livekit-plugins-nvidia/pyproject.toml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Format code with ruff
Run ruff linter and auto-fix issues
Run mypy type checker in strict mode
Maintain line length of 100 characters maximum
Ensure Python 3.9+ compatibility
Use Google-style docstrings

Files:

  • livekit-plugins/livekit-plugins-nltk/livekit/plugins/nltk/version.py
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/version.py
  • livekit-agents/livekit/agents/version.py
  • livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/version.py
  • livekit-agents/livekit/agents/log.py
  • livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py
  • livekit-agents/livekit/agents/voice/turn.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-plugins/livekit-plugins-browser/livekit/plugins/browser/version.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-plugins/livekit-plugins-fishaudio/livekit/plugins/fishaudio/version.py
  • livekit-plugins/livekit-plugins-nvidia/livekit/plugins/nvidia/version.py
  • livekit-plugins/livekit-plugins-mistralai/livekit/plugins/mistralai/version.py
  • livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/version.py
  • livekit-plugins/livekit-plugins-gradium/livekit/plugins/gradium/version.py
  • livekit-agents/livekit/agents/voice/agent.py
  • livekit-agents/livekit/agents/voice/events.py
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/version.py
  • livekit-plugins/livekit-plugins-minimal/livekit/plugins/minimal/version.py
  • livekit-plugins/livekit-plugins-spitch/livekit/plugins/spitch/version.py
  • livekit-plugins/livekit-plugins-hume/livekit/plugins/hume/version.py
  • examples/voice_agents/basic_agent.py
  • livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/version.py
  • livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/version.py
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py
  • livekit-plugins/livekit-plugins-hedra/livekit/plugins/hedra/version.py
  • livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/version.py
  • livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/version.py
  • livekit-plugins/livekit-plugins-anam/livekit/plugins/anam/version.py
  • livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/version.py
  • livekit-agents/livekit/agents/inference/interruption.py
🧬 Code graph analysis (8)
livekit-agents/livekit/agents/log.py (2)
livekit-agents/livekit/agents/llm/tool_context.py (1)
  • message (76-77)
livekit-agents/livekit/agents/telemetry/traces.py (1)
  • _log (359-372)
livekit-agents/livekit/agents/voice/turn.py (3)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/voice/agent.py (5)
  • turn_detection (510-520)
  • turn_detection (523-527)
  • min_endpointing_delay (608-618)
  • max_endpointing_delay (621-627)
  • allow_interruptions (595-605)
livekit-agents/livekit/agents/voice/agent_session.py (1)
  • turn_detection (388-389)
livekit-agents/livekit/agents/voice/agent_activity.py (2)
livekit-agents/livekit/agents/inference/interruption.py (2)
  • AdaptiveInterruptionDetector (168-328)
  • InterruptionEvent (64-98)
livekit-agents/livekit/agents/voice/audio_recognition.py (4)
  • on_start_of_overlap_speech (221-238)
  • on_end_of_overlap_speech (240-260)
  • on_end_of_agent_speech (262-288)
  • on_interruption (87-87)
livekit-agents/livekit/agents/voice/agent_session.py (3)
livekit-agents/livekit/agents/utils/deprecation.py (1)
  • deprecate_params (11-49)
livekit-agents/livekit/agents/voice/turn.py (4)
  • TurnHandlingConfig (80-205)
  • migrate (133-193)
  • interruption_cfg (196-199)
  • endpointing_cfg (202-205)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/inference/stt.py (1)
livekit-agents/livekit/agents/_exceptions.py (1)
  • APIConnectionError (84-88)
livekit-agents/livekit/agents/voice/audio_recognition.py (1)
livekit-agents/livekit/agents/inference/interruption.py (14)
  • InterruptionStreamBase (331-525)
  • InterruptionEvent (64-98)
  • AdaptiveInterruptionDetector (168-328)
  • _AgentSpeechStartedSentinel (332-333)
  • _AgentSpeechEndedSentinel (335-336)
  • _OverlapSpeechStartedSentinel (338-345)
  • _OverlapSpeechEndedSentinel (347-348)
  • get (1148-1148)
  • get (1151-1151)
  • get (1153-1154)
  • sample_rate (284-285)
  • InterruptionEventType (59-61)
  • stream (303-312)
  • push_frame (430-464)
livekit-agents/livekit/agents/voice/events.py (1)
livekit-agents/livekit/agents/inference/interruption.py (1)
  • InterruptionEvent (64-98)
examples/voice_agents/basic_agent.py (9)
examples/voice_agents/multi_agent.py (4)
  • on_enter (60-63)
  • on_enter (111-114)
  • prewarm (136-137)
  • entrypoint (144-171)
tests/test_agent_session.py (1)
  • on_enter (41-43)
examples/voice_agents/ultravox_realtime_api.py (1)
  • on_enter (34-37)
livekit-agents/livekit/agents/inference/tts.py (1)
  • prewarm (422-423)
livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/tts.py (1)
  • prewarm (183-184)
livekit-agents/livekit/agents/voice/events.py (2)
  • userdata (61-62)
  • session (49-50)
examples/voice_agents/realtime_with_tts.py (1)
  • entrypoint (48-59)
livekit-agents/livekit/agents/voice/room_io/room_io.py (1)
  • room (197-198)
livekit-agents/livekit/agents/llm/realtime.py (1)
  • session (93-93)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: type-check (3.9)
  • GitHub Check: type-check (3.13)
  • GitHub Check: livekit-plugins-inworld
  • GitHub Check: livekit-plugins-deepgram
  • GitHub Check: unit-tests

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Fix all issues with AI agents
In `@livekit-agents/livekit/agents/inference/interruption.py`:
- Around line 610-624: The HTTP branch emits a non-documented event name
"overlap_speech_ended" so listeners expecting "user_non_interruption_detected"
never receive it; update the HTTP-path emission to emit the documented event by
replacing the call _model.emit("overlap_speech_ended", ev) with
_model.emit("user_non_interruption_detected", ev) (while still sending the
InterruptionEvent via _event_ch.send_nowait(ev)), and keep the existing
overlap_speech_started = False behavior unchanged.
- Around line 692-700: The finally cleanup calls await
aio.utils.cancel_and_wait(*tasks) but aio.utils is not exported; replace that
call with the public API await aio.cancel_and_wait(*tasks) (or use the existing
alias await aio.gracefully_cancel(...) if preferred) in the block where tasks =
[asyncio.create_task(_forward_data()), asyncio.create_task(_send_task())] and
the subsequent finally branch that also closes data_chan so the runtime
AttributeError is avoided.
- Around line 176-232: The constructor for AdaptiveInterruptionDetector
currently reads LIVEKIT_REMOTE_EOT_URL instead of the documented
LIVEKIT_INTERRUPTION_INFERENCE_URL and unconditionally overwrites the use_proxy
parameter; change the env lookup to use LIVEKIT_INTERRUPTION_INFERENCE_URL
(falling back to DEFAULT_BASE_URL as before) when computing lk_base_url, and
modify the logic that sets use_proxy so it only assigns based on lk_base_url
when the incoming use_proxy is NOT_GIVEN (i.e., respect an explicit bool passed
by the caller); update references to lk_base_url, use_proxy, and
NOT_GIVEN/DEFAULT_BASE_URL in __init__ accordingly.

In `@livekit-agents/livekit/agents/voice/agent_session.py`:
- Around line 317-318: The session currently forces the turn_detection sentinel
to None with "self._turn_detection = turn_handling.turn_detection or None",
which destroys the NOT_GIVEN sentinel used by is_given() for fallback logic;
change the assignment in agent_session.py to preserve the original sentinel by
assigning turn_handling.turn_detection directly to self._turn_detection (i.e.,
remove the "or None" conversion) so code that checks
is_given(self._agent.turn_detection) / is_given(self._session._turn_detection)
works correctly; keep other fields like self._interruption_detection unchanged.

In `@livekit-agents/livekit/agents/voice/audio_recognition.py`:
- Around line 446-474: The method update_interruption_detection currently
creates/tears down the detector and channel but leaves
self._interruption_enabled at its constructor value; update it to reflect the
new state by setting self._interruption_enabled = interruption_detection is not
None (or the appropriate boolean expression that also considers VAD if your
logic requires it) whenever update_interruption_detection runs, and likewise
ensure it is toggled to False when you cancel the task;
update_interruption_detection, _interruption_enabled, _interruption_atask, and
_interruption_ch are the symbols to modify.
♻️ Duplicate comments (1)
livekit-plugins/livekit-plugins-minimax/pyproject.toml (1)

20-23: Ensure the livekit-agents rc1 build is actually published before pinning to it.
If 1.4.0rc1 isn’t on PyPI yet, installs will fail; consider pinning to the latest published version or loosening the constraint until the pre-release is available. The dynamic = ["version"] addition looks fine.

Does PyPI list a release for livekit-agents version 1.4.0rc1 (or 1.4.0.rc1)? What is the latest published version?
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d6ec0cc and 5c36a7d.

📒 Files selected for processing (10)
  • examples/voice_agents/basic_agent.py
  • livekit-agents/livekit/agents/inference/__init__.py
  • livekit-agents/livekit/agents/inference/interruption.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/voice/turn.py
  • livekit-agents/pyproject.toml
  • livekit-plugins/livekit-plugins-minimax/pyproject.toml
  • livekit-plugins/livekit-plugins-mistralai/pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (2)
  • livekit-agents/livekit/agents/inference/init.py
  • livekit-plugins/livekit-plugins-mistralai/pyproject.toml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Format code with ruff
Run ruff linter and auto-fix issues
Run mypy type checker in strict mode
Maintain line length of 100 characters maximum
Ensure Python 3.9+ compatibility
Use Google-style docstrings

Files:

  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-agents/livekit/agents/voice/turn.py
  • examples/voice_agents/basic_agent.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/inference/interruption.py
🧬 Code graph analysis (5)
livekit-agents/livekit/agents/voice/agent_activity.py (4)
livekit-agents/livekit/agents/voice/agent_session.py (7)
  • llm (1266-1267)
  • stt (1262-1263)
  • tts (1270-1271)
  • vad (1274-1275)
  • turn_detection (388-389)
  • interruption_detection (1278-1279)
  • emit (372-374)
livekit-agents/livekit/agents/voice/agent.py (7)
  • llm (543-553)
  • stt (530-540)
  • tts (556-566)
  • vad (582-592)
  • turn_detection (510-520)
  • turn_detection (523-527)
  • interruption_detection (147-148)
livekit-agents/livekit/agents/inference/interruption.py (1)
  • AdaptiveInterruptionDetector (162-324)
livekit-agents/livekit/agents/voice/audio_recognition.py (4)
  • on_start_of_overlap_speech (221-238)
  • on_end_of_overlap_speech (240-260)
  • on_end_of_agent_speech (262-288)
  • on_interruption (87-87)
livekit-agents/livekit/agents/voice/agent_session.py (3)
livekit-agents/livekit/agents/utils/deprecation.py (1)
  • deprecate_params (11-49)
livekit-agents/livekit/agents/voice/turn.py (4)
  • TurnHandlingConfig (80-205)
  • migrate (133-193)
  • interruption_cfg (196-199)
  • endpointing_cfg (202-205)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/voice/turn.py (4)
livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/experimental/realtime/events.py (1)
  • BaseModel (23-24)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/voice/agent_session.py (1)
  • turn_detection (388-389)
livekit-agents/livekit/agents/voice/agent.py (5)
  • turn_detection (510-520)
  • turn_detection (523-527)
  • min_endpointing_delay (608-618)
  • max_endpointing_delay (621-627)
  • allow_interruptions (595-605)
examples/voice_agents/basic_agent.py (2)
livekit-agents/livekit/agents/voice/turn.py (1)
  • TurnHandlingConfig (80-205)
livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/multilingual.py (1)
  • MultilingualModel (26-104)
livekit-agents/livekit/agents/inference/interruption.py (5)
livekit-agents/livekit/agents/log.py (1)
  • trace (11-13)
livekit-agents/livekit/agents/_exceptions.py (2)
  • APIError (14-42)
  • APIStatusError (45-81)
livekit-agents/livekit/agents/types.py (2)
  • APIConnectOptions (64-98)
  • _interval_for_retry (90-98)
livekit-agents/livekit/agents/utils/misc.py (2)
  • is_given (25-26)
  • shortuuid (21-22)
livekit-agents/livekit/agents/utils/http_context.py (1)
  • http_session (40-51)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: type-check (3.13)
  • GitHub Check: type-check (3.9)
  • GitHub Check: livekit-plugins-openai
  • GitHub Check: livekit-plugins-cartesia
  • GitHub Check: livekit-plugins-deepgram
  • GitHub Check: unit-tests
🔇 Additional comments (25)
livekit-agents/pyproject.toml (5)

1-22: Metadata reordering looks consistent.

No functional impact; the license/keywords/classifiers updates are coherent.


23-52: Dependency bumps look coherent; please confirm resolution/compatibility.

Given the version updates on Lines 24-51, please re-run your dependency resolution and a quick install/test to confirm availability and compatibility across supported Python versions.


53-58: Project URLs and dynamic versioning look good.

Clean metadata additions with no functional impact.


60-108: Optional plugin RC1 alignment looks good; verify availability.

Since these extras point to RC1 releases, please confirm the packages are published and the extras resolve cleanly.


110-112: Build-system block placement is fine.

No issues with the hatchling configuration.

livekit-plugins/livekit-plugins-minimax/pyproject.toml (4)

2-18: Metadata updates align with the MiniMax plugin branding.
Description, license, keywords, and classifiers look consistent.


25-28: Project URLs look consistent.
No concerns with the updated Website entry.


30-32: Build-system block is correct for hatchling.
Relocation and settings look good.


37-41: Hatch wheel/sdist targets are configured correctly.
No issues spotted in the packaging targets.

examples/voice_agents/basic_agent.py (1)

19-19: LGTM: TurnHandlingConfig-based example is clear and consistent.

The centralized turn_handling usage and updated hooks/readability look solid for the example.

Also applies to: 41-52, 72-109, 116-122

livekit-agents/livekit/agents/voice/agent_activity.py (9)

18-18: Interruption detector initialization looks solid.

State wiring and defaults align with the new interruption flow.

Also applies to: 157-170


259-262: Nice addition: interruption_enabled accessor.

Clean way to expose detector state.


387-392: Turn-detection option update is straightforward.

Default recalculation looks consistent.


601-606: AudioRecognition now receives interruption detection as expected.

Wiring is consistent with the new pipeline.


1137-1156: Overlap/interrupt hooks are consistently emitted.

Nice coverage across realtime and VAD paths.

Also applies to: 1261-1280, 1311-1319


1204-1247: Audio-activity interruption path update looks good.

The pause/interrupt handling reads coherently.


1643-1647: Agent speech lifecycle now drives audio-recognition signals cleanly.

Consistent start/end hooks across TTS/pipeline/false-interruption paths.

Also applies to: 1741-1744, 1849-1853, 2037-2040, 2149-2154, 2183-2188, 2825-2828


2862-2865: Restore helper keeps interruption state centralized.

Good for maintainability.


2872-2913: Compatibility checks in _resolve_interruption_detection look solid.

Gating conditions are clear and well-scoped.

livekit-agents/livekit/agents/voice/turn.py (2)

11-78: Config models are clear and well-scoped.

Defaults and field docs look consistent.


80-205: TurnHandlingConfig + migration helpers look solid.

Normalization and migration paths are clean.

livekit-agents/livekit/agents/voice/agent_session.py (1)

38-62: Deprecation wrapper + TurnHandlingConfig migration are cleanly integrated.

The centralized options derivation reads well.

Also applies to: 138-296, 1277-1279

livekit-agents/livekit/agents/voice/audio_recognition.py (3)

7-20: Interruption-aware surfaces and state are wired in cleanly.

The new hooks/types/state additions look coherent.

Also applies to: 86-107, 147-167


203-393: Interruption lifecycle + transcript buffering flow look coherent.

Nice integration of overlap handling and replay logic.

Also applies to: 584-603, 764-767


408-425: Interruption task plumbing and cleanup look good.

The lifecycle for task start/stop and stream cleanup is solid.

Also applies to: 915-916, 961-995

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
livekit-plugins/livekit-plugins-deepgram/pyproject.toml (1)

38-39: Ensure the sdist include list doesn’t omit README/LICENSE.

Line 38–39 limits sdist contents to /livekit. Since readme = "README.md" is declared, excluding README.md (and LICENSE) can break sdist builds or PyPI metadata. Consider explicitly including them (or removing the include override).

🧩 Suggested adjustment
 [tool.hatch.build.targets.sdist]
-include = ["/livekit"]
+include = ["/livekit", "/README.md", "/LICENSE"]
livekit-plugins/livekit-plugins-assemblyai/pyproject.toml (1)

38-39: Fix sdist include list to package README and LICENSE files.

The include = ["/livekit"] directive replaces Hatchling's default file selection, which means README.md and LICENSE will be excluded from the sdist despite being declared in pyproject.toml metadata. This breaks PyPI rendering (missing README display) and package compliance. Update the include list to:

include = ["/livekit", "README.md", "LICENSE"]
🤖 Fix all issues with AI agents
In `@livekit-agents/livekit/agents/telemetry/traces.py`:
- Around line 100-121: In _TraceLevelLoggingHandler._translate, don't
reconstruct OTelLogRecord (which loses trace/span fields); instead detect
record.levelno == TRACE_LEVEL, set log_record.severity_number =
SeverityNumber.TRACE (and optionally adjust severity_text) on the existing
log_record returned by super()._translate(record), then return that mutated
log_record so trace_id/span_id/trace_flags/event_name and other context are
preserved.

In `@livekit-agents/livekit/agents/voice/audio_recognition.py`:
- Around line 988-994: The finally block currently checks self._interruption_ch
which can be set to None by update_interruption_detection before this block
runs, causing skipped cleanup; change the cleanup to use the local audio_input
channel passed into the task (the same channel used when creating the forwarding
task) — after await aio.cancel_and_wait(forward_task) and await stream.aclose(),
if audio_input is not None drain it with recv_nowait until empty and then close
it, instead of referencing self._interruption_ch; this ensures proper cleanup
even if update_interruption_detection(None) ran earlier.

In `@livekit-plugins/livekit-plugins-aws/pyproject.toml`:
- Around line 19-30: The classifiers array in pyproject.toml is missing the
"Programming Language :: Python :: 3.11" entry; update the classifiers list (the
classifiers = [...] block) to include "Programming Language :: Python :: 3.11"
alongside the existing 3.9, 3.10 and 3.12 entries so the declared
requires-python (>=3.9.0) is accurately reflected.
- Around line 31-36: Replace the invalid dependency string
"livekit-agents>=1.4.0.rc1" in the dependencies list with a valid published
release (e.g., "livekit-agents>=1.3.11"); update the dependencies array entry in
pyproject.toml so the project references an existing PyPI version instead of the
non-existent 1.4.0.rc1 prerelease.

In
`@livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/version.py`:
- Line 15: Update the module-level __version__ constant to use PEP 440 canonical
pre-release formatting by replacing the dotted pre-release string "1.4.0.rc1"
with the canonical form "1.4.0rc1"; locate the __version__ assignment in
version.py and change only the version literal to the canonical form so it
matches the repository's standardized PEP 440 usage.

In `@livekit-plugins/livekit-plugins-fal/pyproject.toml`:
- Around line 20-21: Update the dependencies line in pyproject.toml to use real,
bounded versions: replace the unconstrained "fal_client" with a bounded spec
like "fal_client>=0.11.0,<0.12.0" and change "livekit-agents>=1.4.0.rc1" to a
released constraint such as "livekit-agents>=1.3.11,<1.4.0" so you reference the
published 1.3.11 release and prevent accidental upgrades; modify the
dependencies array entry containing those package names accordingly.

In `@livekit-plugins/livekit-plugins-gladia/pyproject.toml`:
- Around line 30-34: The dependency constraint
"livekit-agents[codecs]>=1.4.0.rc1" in pyproject.toml references a non-existent
pre-release and must be changed to a released version; update that requirement
to a resolvable release such as "livekit-agents[codecs]>=1.3.11" (or the
specific released version you intend to depend on) so the installer can resolve
the package, and ensure the rest of the extras and version operators remain
unchanged.

In `@livekit-plugins/livekit-plugins-ultravox/pyproject.toml`:
- Around line 20-21: The dependency pin for livekit-agents is pointing to a
non-existent pre-release ">=1.4.0.rc1"; update the dependencies entry that
contains "livekit-agents[codecs]>=1.4.0.rc1" to reference a real published
release (for example change the version constraint to ">=1.3.11" or another
stable published version) so the resolver can install the package; keep the
package name "livekit-agents[codecs]" and adjust only the version specifier in
the dependencies list.
♻️ Duplicate comments (15)
livekit-plugins/livekit-plugins-baseten/pyproject.toml (1)

20-24: Prerelease minimum constraint can break default installs.
This was already flagged in a previous review; keep the dependency constraint aligned with your prerelease policy to avoid requiring --pre for standard installs.

livekit-plugins/livekit-plugins-simli/pyproject.toml (1)

20-21: Dependency livekit-agents>=1.4.0.rc1 is not yet available on PyPI.

This issue was previously flagged. The latest published version of livekit-agents on PyPI is 1.3.11. This constraint will cause installation failures until the RC is published. Coordinate publication timing or temporarily pin to an available version.

livekit-plugins/livekit-plugins-resemble/pyproject.toml (1)

20-23: Pre-release dependency concern already flagged.

The livekit-agents>=1.4.0.rc1 pre-release dependency issue was previously raised. The dynamic = ["version"] addition is correct for hatchling-based version resolution.

livekit-plugins/livekit-plugins-langchain/pyproject.toml (1)

19-24: PEP 440 canonical form issue already flagged.

The livekit-agents>=1.4.0.rc1 dependency uses a non-canonical pre-release version format (dot before rc). The canonical PEP 440 form is >=1.4.0rc1. This was already noted in a previous review comment.

livekit-plugins/livekit-plugins-azure/pyproject.toml (1)

20-24: Dependency constraint issue already flagged.

The livekit-agents>=1.4.0.rc1 dependency issue was previously identified—this pre-release version does not exist on PyPI. Please address the prior review comment.

livekit-plugins/livekit-plugins-silero/pyproject.toml (1)

20-26: Dependency livekit-agents>=1.4.0.rc1 not yet published on PyPI.

This concern was already raised in a previous review. The version 1.4.0rc1 for livekit-agents is not currently available on PyPI. This will cause installation failures for users installing from PyPI until the core package is published.

If this is intentional for coordinated release development, consider:

  • Adding a note in the PR description about the release timing
  • Ensuring the core livekit-agents package is published before or simultaneously with this plugin
livekit-plugins/livekit-plugins-minimax/pyproject.toml (1)

21-21: Pre-release version constraint already flagged.

This version constraint was already raised in a previous review. The 1.4.0.rc1 version needs to be published to PyPI before this package can be installed by external consumers. This appears intentional for a coordinated release workflow.

livekit-plugins/livekit-plugins-rtzr/pyproject.toml (1)

28-33: Unpublished prerelease dependency already flagged.

The livekit-agents>=1.4.0.rc1 constraint references a version that doesn't exist on PyPI. The latest release is 1.3.11 (Jan 14, 2026). This will cause installation failures until 1.4.0 is published.

Consider using livekit-agents>=1.3.11 for now, or ensure this PR merges alongside the 1.4.0 release.

livekit-plugins/livekit-plugins-assemblyai/pyproject.toml (1)

20-20: Confirm the prerelease minimum for livekit-agents is intentional and available.

Line 20: A prerelease lower bound can force downstream users onto RC builds or fail installs if the version isn’t published. Please confirm this is intentional and published; if RC-only features are required, consider documenting why or bounding the range (e.g., <1.5.0).

Is livekit-agents version 1.4.0rc1 (or 1.4.0.rc1) published on PyPI, and what is the latest stable release?
livekit-agents/livekit/agents/inference/interruption.py (3)

202-231: Honor documented env var and explicit use_proxy input.
The constructor reads LIVEKIT_REMOTE_EOT_URL (not the documented variable) and overwrites a caller-provided use_proxy, which makes explicit configuration ineffective.

🐛 Proposed fix
-        lk_base_url = (
-            base_url if base_url else os.getenv("LIVEKIT_REMOTE_EOT_URL", DEFAULT_BASE_URL)
-        )
+        lk_base_url = base_url or os.getenv(
+            "LIVEKIT_INTERRUPTION_INFERENCE_URL", DEFAULT_BASE_URL
+        )
@@
-        if lk_base_url == DEFAULT_BASE_URL:
+        if is_given(use_proxy):
+            use_proxy = bool(use_proxy)
+        elif lk_base_url == DEFAULT_BASE_URL:
             lk_api_key = (
@@
             lk_api_secret = (
                 api_secret
                 if api_secret
                 else os.getenv("LIVEKIT_INFERENCE_API_SECRET", os.getenv("LIVEKIT_API_SECRET", ""))
             )
@@
             use_proxy = True
-        else:
+        elif not is_given(use_proxy):
             use_proxy = False

601-624: Emit the documented non‑interruption event.
The HTTP path emits "overlap_speech_ended", which is not part of the public event set.

🐛 Proposed fix
-                        self._model.emit("overlap_speech_ended", ev)
+                        self._model.emit("user_non_interruption_detected", ev)

692-700: Use the public aio cancel helper.
aio.utils is not part of the exposed API; this will raise at runtime.

🐛 Proposed fix
-            await aio.utils.cancel_and_wait(*tasks)
+            await aio.cancel_and_wait(*tasks)
livekit-agents/livekit/agents/voice/agent_activity.py (1)

387-392: Keep the active audio-interruption flag in sync with the new default.

Line 387 updates the default but leaves the active flag unchanged, which can keep audio-activity interruptions enabled after switching to "manual"/"realtime_llm".

🐛 Proposed fix
-            self._turn_detection = turn_detection
-            self._default_interruption_by_audio_activity_enabled = self._turn_detection not in (
-                "manual",
-                "realtime_llm",
-            )
+            self._turn_detection = turn_detection
+            old_default = self._default_interruption_by_audio_activity_enabled
+            self._default_interruption_by_audio_activity_enabled = self._turn_detection not in (
+                "manual",
+                "realtime_llm",
+            )
+            if self._interruption_by_audio_activity_enabled == old_default:
+                self._interruption_by_audio_activity_enabled = (
+                    self._default_interruption_by_audio_activity_enabled
+                )
livekit-agents/livekit/agents/voice/agent_session.py (1)

317-318: Preserve the NOT_GIVEN sentinel for turn_detection.

Line 317 coerces the sentinel via or None, which breaks is_given()-based fallback logic if NOT_GIVEN is falsy.

🐛 Proposed fix
-        self._turn_detection = turn_handling.turn_detection or None
+        self._turn_detection = (
+            turn_handling.turn_detection if is_given(turn_handling.turn_detection) else None
+        )
livekit-agents/livekit/agents/voice/audio_recognition.py (1)

446-473: _interruption_enabled is not updated when toggling detection.

When update_interruption_detection is called, _interruption_enabled retains its constructor value. This leaves guard checks in _should_hold_stt_event, _flush_held_transcripts, and lifecycle methods potentially inconsistent with the actual detector state.

🛠️ Recommended fix
 def update_interruption_detection(
     self, interruption_detection: inference.AdaptiveInterruptionDetector | None
 ) -> None:
     self._interruption_detection = interruption_detection
+    self._interruption_enabled = interruption_detection is not None and self._vad is not None
     if interruption_detection is not None:
🧹 Nitpick comments (7)
livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/version.py (1)

15-15: LGTM!

The version bump to 1.4.0.rc1 for the RC1 release is appropriate and aligns with the coordinated release across other plugins.

Nit (optional): The canonical PEP 440 form for release candidates omits the dot separator: "1.4.0rc1". The current format works fine as packaging tools normalize it, but using the canonical form ensures consistency in version comparisons.

livekit-plugins/livekit-plugins-xai/pyproject.toml (1)

19-29: Consider adding classifiers for Python 3.11 and 3.12.

The requires-python = ">=3.9.0" implies support for Python 3.11, 3.12, and newer, but the classifiers only list 3.9 and 3.10. Consider adding:

   "Programming Language :: Python :: 3.10",
+  "Programming Language :: Python :: 3.11",
+  "Programming Language :: Python :: 3.12",
   "Topic :: Multimedia :: Sound/Audio",

This improves discoverability on PyPI for users filtering by Python version.

livekit-plugins/livekit-plugins-groq/pyproject.toml (1)

18-23: Confirm dependency policy for prerelease floor and unbounded versions.
If the project expects tested minimums or upper bounds, consider pinning/ constraining aiohttp, livekit, and clarifying that >=1.4.0.rc1 is intentional for livekit-agents.

livekit-plugins/livekit-plugins-anthropic/pyproject.toml (1)

9-19: Consider adding classifiers for Python 3.11 and 3.12.

The requires-python = ">=3.9.0" on line 5 indicates support for Python 3.11, 3.12, and potentially 3.13, but these versions are missing from the classifiers. While classifiers are informational (not enforced), they help users on PyPI identify compatible Python versions.

Suggested addition
 classifiers = [
   "Intended Audience :: Developers",
   "License :: OSI Approved :: Apache Software License",
   "Programming Language :: Python :: 3",
   "Programming Language :: Python :: 3 :: Only",
   "Programming Language :: Python :: 3.9",
   "Programming Language :: Python :: 3.10",
+  "Programming Language :: Python :: 3.11",
+  "Programming Language :: Python :: 3.12",
   "Topic :: Multimedia :: Sound/Audio",
   "Topic :: Multimedia :: Video",
   "Topic :: Scientific/Engineering :: Artificial Intelligence",
 ]
livekit-plugins/livekit-plugins-fal/pyproject.toml (1)

35-39: Verify sdist contents when using a narrow include list.

With include = ["/livekit"], please confirm that the sdist still ships README.md and license files (and any other metadata files you expect). If not, explicitly add them to the include list.

♻️ Suggested include expansion (if missing in sdist)
 [tool.hatch.build.targets.sdist]
-include = ["/livekit"]
+include = ["/livekit", "/README.md", "/LICENSE*", "/NOTICE*"]
livekit-plugins/livekit-plugins-mistralai/pyproject.toml (1)

21-24: Confirm the pre‑release floor for livekit‑agents is intentional.
>=1.4.0.rc1 forces consumers onto pre‑release builds and excludes all 1.3.x versions. If that’s not intended, consider a stable-only constraint (e.g., cap <1.4 or a ~= range) instead.

livekit-agents/livekit/agents/voice/audio_recognition.py (1)

391-392: Consider adding closed-channel guard for consistency.

Unlike the lifecycle methods (e.g., lines 216-218) which check self._interruption_ch.closed, push_audio only checks for None. If the channel is closed but not yet set to None, send_nowait could raise an exception.

This may be acceptable if channel closure always coincides with setting to None, but adding a guard would be more defensive:

♻️ Suggested guard
-        if self._interruption_ch is not None:
+        if self._interruption_ch is not None and not self._interruption_ch.closed:
             self._interruption_ch.send_nowait(frame)
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5c36a7d and f3ee3e3.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (116)
  • examples/voice_agents/basic_agent.py
  • livekit-agents/livekit/agents/inference/__init__.py
  • livekit-agents/livekit/agents/inference/interruption.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-agents/livekit/agents/log.py
  • livekit-agents/livekit/agents/telemetry/trace_types.py
  • livekit-agents/livekit/agents/telemetry/traces.py
  • livekit-agents/livekit/agents/types.py
  • livekit-agents/livekit/agents/utils/deprecation.py
  • livekit-agents/livekit/agents/vad.py
  • livekit-agents/livekit/agents/version.py
  • livekit-agents/livekit/agents/voice/agent.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/voice/events.py
  • livekit-agents/livekit/agents/voice/turn.py
  • livekit-agents/pyproject.toml
  • livekit-plugins/livekit-plugins-anam/livekit/plugins/anam/version.py
  • livekit-plugins/livekit-plugins-anam/pyproject.toml
  • livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic/version.py
  • livekit-plugins/livekit-plugins-anthropic/pyproject.toml
  • livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/version.py
  • livekit-plugins/livekit-plugins-assemblyai/pyproject.toml
  • livekit-plugins/livekit-plugins-avatartalk/livekit/plugins/avatartalk/version.py
  • livekit-plugins/livekit-plugins-avatartalk/pyproject.toml
  • livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/version.py
  • livekit-plugins/livekit-plugins-aws/pyproject.toml
  • livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/version.py
  • livekit-plugins/livekit-plugins-azure/pyproject.toml
  • livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/version.py
  • livekit-plugins/livekit-plugins-baseten/pyproject.toml
  • livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/version.py
  • livekit-plugins/livekit-plugins-bey/pyproject.toml
  • livekit-plugins/livekit-plugins-bithuman/livekit/plugins/bithuman/version.py
  • livekit-plugins/livekit-plugins-bithuman/pyproject.toml
  • livekit-plugins/livekit-plugins-browser/livekit/plugins/browser/version.py
  • livekit-plugins/livekit-plugins-cartesia/livekit/plugins/cartesia/version.py
  • livekit-plugins/livekit-plugins-cartesia/pyproject.toml
  • livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/version.py
  • livekit-plugins/livekit-plugins-clova/pyproject.toml
  • livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/version.py
  • livekit-plugins/livekit-plugins-deepgram/pyproject.toml
  • livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/version.py
  • livekit-plugins/livekit-plugins-elevenlabs/pyproject.toml
  • livekit-plugins/livekit-plugins-fal/livekit/plugins/fal/version.py
  • livekit-plugins/livekit-plugins-fal/pyproject.toml
  • livekit-plugins/livekit-plugins-fireworksai/livekit/plugins/fireworksai/version.py
  • livekit-plugins/livekit-plugins-fireworksai/pyproject.toml
  • livekit-plugins/livekit-plugins-fishaudio/livekit/plugins/fishaudio/version.py
  • livekit-plugins/livekit-plugins-fishaudio/pyproject.toml
  • livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/version.py
  • livekit-plugins/livekit-plugins-gladia/pyproject.toml
  • livekit-plugins/livekit-plugins-google/livekit/plugins/google/version.py
  • livekit-plugins/livekit-plugins-gradium/livekit/plugins/gradium/version.py
  • livekit-plugins/livekit-plugins-gradium/pyproject.toml
  • livekit-plugins/livekit-plugins-groq/livekit/plugins/groq/version.py
  • livekit-plugins/livekit-plugins-groq/pyproject.toml
  • livekit-plugins/livekit-plugins-hedra/livekit/plugins/hedra/version.py
  • livekit-plugins/livekit-plugins-hedra/pyproject.toml
  • livekit-plugins/livekit-plugins-hume/livekit/plugins/hume/version.py
  • livekit-plugins/livekit-plugins-hume/pyproject.toml
  • livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/version.py
  • livekit-plugins/livekit-plugins-inworld/pyproject.toml
  • livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/version.py
  • livekit-plugins/livekit-plugins-langchain/pyproject.toml
  • livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/version.py
  • livekit-plugins/livekit-plugins-liveavatar/pyproject.toml
  • livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py
  • livekit-plugins/livekit-plugins-lmnt/pyproject.toml
  • livekit-plugins/livekit-plugins-minimal/livekit/plugins/minimal/version.py
  • livekit-plugins/livekit-plugins-minimal/pyproject.toml
  • livekit-plugins/livekit-plugins-minimax/livekit/plugins/minimax/version.py
  • livekit-plugins/livekit-plugins-minimax/pyproject.toml
  • livekit-plugins/livekit-plugins-mistralai/livekit/plugins/mistralai/version.py
  • livekit-plugins/livekit-plugins-mistralai/pyproject.toml
  • livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/version.py
  • livekit-plugins/livekit-plugins-neuphonic/pyproject.toml
  • livekit-plugins/livekit-plugins-nltk/livekit/plugins/nltk/version.py
  • livekit-plugins/livekit-plugins-nltk/pyproject.toml
  • livekit-plugins/livekit-plugins-nvidia/livekit/plugins/nvidia/version.py
  • livekit-plugins/livekit-plugins-nvidia/pyproject.toml
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py
  • livekit-plugins/livekit-plugins-openai/pyproject.toml
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/version.py
  • livekit-plugins/livekit-plugins-resemble/pyproject.toml
  • livekit-plugins/livekit-plugins-rime/livekit/plugins/rime/version.py
  • livekit-plugins/livekit-plugins-rime/pyproject.toml
  • livekit-plugins/livekit-plugins-rtzr/livekit/plugins/rtzr/version.py
  • livekit-plugins/livekit-plugins-rtzr/pyproject.toml
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/version.py
  • livekit-plugins/livekit-plugins-sarvam/pyproject.toml
  • livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/version.py
  • livekit-plugins/livekit-plugins-silero/pyproject.toml
  • livekit-plugins/livekit-plugins-simli/livekit/plugins/simli/version.py
  • livekit-plugins/livekit-plugins-simli/pyproject.toml
  • livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallestai/version.py
  • livekit-plugins/livekit-plugins-smallestai/pyproject.toml
  • livekit-plugins/livekit-plugins-soniox/livekit/plugins/soniox/version.py
  • livekit-plugins/livekit-plugins-soniox/pyproject.toml
  • livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/version.py
  • livekit-plugins/livekit-plugins-speechify/pyproject.toml
  • livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/version.py
  • livekit-plugins/livekit-plugins-speechmatics/pyproject.toml
  • livekit-plugins/livekit-plugins-spitch/livekit/plugins/spitch/version.py
  • livekit-plugins/livekit-plugins-spitch/pyproject.toml
  • livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/version.py
  • livekit-plugins/livekit-plugins-tavus/pyproject.toml
  • livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/version.py
  • livekit-plugins/livekit-plugins-turn-detector/pyproject.toml
  • livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/version.py
  • livekit-plugins/livekit-plugins-ultravox/pyproject.toml
  • livekit-plugins/livekit-plugins-upliftai/livekit/plugins/upliftai/version.py
  • livekit-plugins/livekit-plugins-upliftai/pyproject.toml
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/version.py
  • livekit-plugins/livekit-plugins-xai/pyproject.toml
✅ Files skipped from review due to trivial changes (1)
  • livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/version.py
🚧 Files skipped from review as they are similar to previous changes (46)
  • livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py
  • livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/version.py
  • livekit-plugins/livekit-plugins-soniox/livekit/plugins/soniox/version.py
  • livekit-plugins/livekit-plugins-fishaudio/pyproject.toml
  • livekit-plugins/livekit-plugins-nvidia/livekit/plugins/nvidia/version.py
  • livekit-plugins/livekit-plugins-hume/livekit/plugins/hume/version.py
  • livekit-plugins/livekit-plugins-speechify/pyproject.toml
  • livekit-plugins/livekit-plugins-rtzr/livekit/plugins/rtzr/version.py
  • livekit-plugins/livekit-plugins-inworld/pyproject.toml
  • livekit-plugins/livekit-plugins-cartesia/livekit/plugins/cartesia/version.py
  • livekit-plugins/livekit-plugins-avatartalk/livekit/plugins/avatartalk/version.py
  • livekit-plugins/livekit-plugins-speechmatics/pyproject.toml
  • livekit-plugins/livekit-plugins-gradium/pyproject.toml
  • livekit-plugins/livekit-plugins-simli/livekit/plugins/simli/version.py
  • livekit-agents/livekit/agents/telemetry/trace_types.py
  • livekit-plugins/livekit-plugins-hedra/pyproject.toml
  • livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/version.py
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py
  • livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/version.py
  • livekit-plugins/livekit-plugins-minimax/livekit/plugins/minimax/version.py
  • livekit-plugins/livekit-plugins-liveavatar/pyproject.toml
  • livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallestai/version.py
  • livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/version.py
  • livekit-plugins/livekit-plugins-nltk/livekit/plugins/nltk/version.py
  • livekit-plugins/livekit-plugins-minimal/livekit/plugins/minimal/version.py
  • livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/version.py
  • livekit-agents/livekit/agents/version.py
  • livekit-plugins/livekit-plugins-turn-detector/pyproject.toml
  • livekit-plugins/livekit-plugins-spitch/livekit/plugins/spitch/version.py
  • livekit-plugins/livekit-plugins-bey/pyproject.toml
  • livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/version.py
  • livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/version.py
  • livekit-plugins/livekit-plugins-browser/livekit/plugins/browser/version.py
  • livekit-plugins/livekit-plugins-nltk/pyproject.toml
  • livekit-plugins/livekit-plugins-fishaudio/livekit/plugins/fishaudio/version.py
  • livekit-plugins/livekit-plugins-tavus/pyproject.toml
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/version.py
  • livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/version.py
  • livekit-plugins/livekit-plugins-lmnt/pyproject.toml
  • livekit-plugins/livekit-plugins-sarvam/pyproject.toml
  • livekit-plugins/livekit-plugins-upliftai/livekit/plugins/upliftai/version.py
  • livekit-plugins/livekit-plugins-gradium/livekit/plugins/gradium/version.py
  • livekit-plugins/livekit-plugins-spitch/pyproject.toml
  • livekit-plugins/livekit-plugins-nvidia/pyproject.toml
  • livekit-plugins/livekit-plugins-mistralai/livekit/plugins/mistralai/version.py
  • livekit-plugins/livekit-plugins-neuphonic/pyproject.toml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Format code with ruff
Run ruff linter and auto-fix issues
Run mypy type checker in strict mode
Maintain line length of 100 characters maximum
Ensure Python 3.9+ compatibility
Use Google-style docstrings

Files:

  • livekit-plugins/livekit-plugins-anam/livekit/plugins/anam/version.py
  • livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/version.py
  • livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/version.py
  • livekit-plugins/livekit-plugins-hedra/livekit/plugins/hedra/version.py
  • livekit-agents/livekit/agents/inference/__init__.py
  • livekit-agents/livekit/agents/log.py
  • livekit-agents/livekit/agents/utils/deprecation.py
  • livekit-agents/livekit/agents/voice/events.py
  • livekit-plugins/livekit-plugins-rime/livekit/plugins/rime/version.py
  • livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/version.py
  • livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/version.py
  • examples/voice_agents/basic_agent.py
  • livekit-plugins/livekit-plugins-fal/livekit/plugins/fal/version.py
  • livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/version.py
  • livekit-agents/livekit/agents/types.py
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/version.py
  • livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/version.py
  • livekit-plugins/livekit-plugins-groq/livekit/plugins/groq/version.py
  • livekit-agents/livekit/agents/vad.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-plugins/livekit-plugins-fireworksai/livekit/plugins/fireworksai/version.py
  • livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic/version.py
  • livekit-agents/livekit/agents/voice/agent.py
  • livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/version.py
  • livekit-agents/livekit/agents/voice/turn.py
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/version.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-plugins/livekit-plugins-google/livekit/plugins/google/version.py
  • livekit-agents/livekit/agents/telemetry/traces.py
  • livekit-plugins/livekit-plugins-bithuman/livekit/plugins/bithuman/version.py
  • livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/version.py
  • livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/version.py
  • livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/version.py
  • livekit-agents/livekit/agents/inference/interruption.py
🧠 Learnings (1)
📚 Learning: 2026-01-16T07:44:56.353Z
Learnt from: CR
Repo: livekit/agents PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T07:44:56.353Z
Learning: Implement Model Interface Pattern for STT, TTS, LLM, and Realtime models with provider-agnostic interfaces, fallback adapters for resilience, and stream adapters for different streaming patterns

Applied to files:

  • livekit-agents/livekit/agents/inference/__init__.py
🧬 Code graph analysis (8)
livekit-agents/livekit/agents/inference/__init__.py (1)
livekit-agents/livekit/agents/inference/interruption.py (3)
  • AdaptiveInterruptionDetector (162-324)
  • InterruptionDetectionError (95-101)
  • InterruptionEvent (57-92)
livekit-agents/livekit/agents/utils/deprecation.py (1)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/voice/events.py (1)
livekit-agents/livekit/agents/inference/interruption.py (1)
  • InterruptionEvent (57-92)
examples/voice_agents/basic_agent.py (2)
livekit-agents/livekit/agents/voice/turn.py (1)
  • TurnHandlingConfig (80-205)
livekit-agents/livekit/agents/voice/agent_session.py (2)
  • AgentSession (137-1334)
  • turn_detection (388-389)
livekit-agents/livekit/agents/voice/agent.py (1)
livekit-agents/livekit/agents/voice/turn.py (2)
  • TurnHandlingConfig (80-205)
  • migrate (133-193)
livekit-agents/livekit/agents/voice/turn.py (3)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/voice/agent_session.py (1)
  • turn_detection (388-389)
livekit-agents/livekit/agents/voice/agent.py (5)
  • turn_detection (510-520)
  • turn_detection (523-527)
  • min_endpointing_delay (608-618)
  • max_endpointing_delay (621-627)
  • allow_interruptions (595-605)
livekit-agents/livekit/agents/voice/agent_session.py (3)
livekit-agents/livekit/agents/utils/deprecation.py (1)
  • deprecate_params (11-49)
livekit-agents/livekit/agents/voice/turn.py (2)
  • TurnHandlingConfig (80-205)
  • migrate (133-193)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/inference/stt.py (3)
livekit-agents/livekit/agents/utils/aio/task_set.py (1)
  • tasks (30-31)
livekit-agents/livekit/agents/tts/tts.py (1)
  • exception (213-214)
livekit-agents/livekit/agents/_exceptions.py (1)
  • APIConnectionError (84-88)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: livekit-plugins-deepgram
  • GitHub Check: unit-tests

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@livekit-agents/livekit/agents/voice/audio_recognition.py`:
- Around line 380-392: In push_audio, guard sending to the interruption channel
(_interruption_ch) so a closed channel doesn't raise and crash the audio
pipeline: check that _interruption_ch is open (or has not been closed) before
calling _interruption_ch.send_nowait(frame), or wrap the send_nowait in a small
try/except that catches the channel-closed exception and silently drops the
frame; update the push_audio function to perform this check/exception handling
alongside existing sends to _stt_ch and _vad_ch.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1aa9812 and 91b0c06.

📒 Files selected for processing (1)
  • livekit-agents/livekit/agents/voice/audio_recognition.py
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Format code with ruff
Run ruff linter and auto-fix issues
Run mypy type checker in strict mode
Maintain line length of 100 characters maximum
Ensure Python 3.9+ compatibility
Use Google-style docstrings

Files:

  • livekit-agents/livekit/agents/voice/audio_recognition.py
🧬 Code graph analysis (1)
livekit-agents/livekit/agents/voice/audio_recognition.py (1)
livekit-agents/livekit/agents/inference/interruption.py (8)
  • InterruptionStreamBase (327-521)
  • InterruptionEvent (57-92)
  • AdaptiveInterruptionDetector (162-324)
  • _AgentSpeechStartedSentinel (328-329)
  • _AgentSpeechEndedSentinel (331-332)
  • _OverlapSpeechStartedSentinel (334-341)
  • _OverlapSpeechEndedSentinel (343-344)
  • stream (299-308)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: livekit-plugins-cartesia
  • GitHub Check: type-check (3.9)
  • GitHub Check: livekit-plugins-deepgram
  • GitHub Check: livekit-plugins-openai
  • GitHub Check: type-check (3.13)
  • GitHub Check: unit-tests
🔇 Additional comments (1)
livekit-agents/livekit/agents/voice/audio_recognition.py (1)

86-96: No action required. The RecognitionHooks Protocol's new on_interruption method has been correctly implemented in AgentActivity, the sole concrete implementation of this protocol in the codebase. All 9 required hook methods are present.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 16

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
livekit-agents/livekit/agents/voice/audio_recognition.py (1)

432-448: Clear interruption buffers when VAD is toggled.

If VAD is disabled and later re-enabled while interruption detection stays on, the existing transcript buffer and ignore window can carry over and replay stale events. Clearing interruption state when VAD flips avoids that edge case.

🛠️ Proposed fix
 def update_vad(self, vad: vad.VAD | None) -> None:
-    self._vad = vad
+    prev_vad = self._vad
+    self._vad = vad
     if vad:
         self._vad_ch = aio.Chan[rtc.AudioFrame]()
         self._vad_atask = asyncio.create_task(
             self._vad_task(vad, self._vad_ch, self._vad_atask)
         )
@@
     self._interruption_enabled = (
         self._interruption_detection is not None and self._vad is not None
     )
+    if (prev_vad is None) != (self._vad is None):
+        # reset interruption handling when VAD toggles
+        self._transcript_buffer.clear()
+        self._ignore_user_transcript_until = NOT_GIVEN
+        self._input_started_at = None
🤖 Fix all issues with AI agents
In `@livekit-plugins/livekit-plugins-avatartalk/pyproject.toml`:
- Around line 1-22: The project metadata is missing the dynamic = ["version"]
declaration required by hatch to read the version from [tool.hatch.version];
update the [project] table by adding dynamic = ["version"] (e.g., alongside
name/description) so hatchling can resolve the package version during build,
ensuring the existing [tool.hatch.version] path is honored.

In `@livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/version.py`:
- Line 15: The __version__ variable currently uses a non-PEP 440 format
("1.4.0.rc1"); update the assignment in version.py to the canonical PEP 440
pre-release form by changing __version__ = "1.4.0.rc1" to __version__ =
"1.4.0rc1" so tools parsing __version__ see the correct semantic version string.

In `@livekit-plugins/livekit-plugins-deepgram/pyproject.toml`:
- Line 20: Update the dependency declaration in pyproject.toml so it references
an existing published livekit-agents version: replace
"livekit-agents[codecs]>=1.4.0.rc1" with a stable release range such as
"livekit-agents[codecs]>=1.3.11" (the resolved token appears in the dependencies
line currently: dependencies = ["livekit-agents[codecs]>=1.4.0.rc1",
"numpy>=1.26"]); ensure the modified dependency string matches the existing
format and that installation succeeds against PyPI.

In `@livekit-plugins/livekit-plugins-fireworksai/pyproject.toml`:
- Around line 1-8: The [project] table is missing the PEP 621 declaration that
the package version is dynamic; add dynamic = ["version"] to the [project]
section so it aligns with the existing [tool.hatch.version] configuration—locate
the [project] block in pyproject.toml and insert dynamic = ["version"] as a key
in that table.

In `@livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/version.py`:
- Line 15: Update the module-level __version__ string to comply with PEP 440
canonical pre-release formatting: change the value of __version__ in version.py
from "1.4.0.rc1" to "1.4.0rc1" so the package uses the correct pre-release token
format.

In `@livekit-plugins/livekit-plugins-gradium/pyproject.toml`:
- Around line 1-24: The pyproject.toml's [project] table is missing the required
dynamic = ["version"] declaration needed for Hatchling to read the version from
the [tool.hatch.version] path; add dynamic = ["version"] into the [project]
section (near existing keys like name, description, requires-python) so Hatch
can load the version dynamically as configured in [tool.hatch.version].

In `@livekit-plugins/livekit-plugins-groq/pyproject.toml`:
- Around line 1-16: The pyproject.toml [project] section is missing a dynamic
declaration for version, so add dynamic = ["version"] inside the [project] table
(alongside name/description/requires-python/etc.) so Hatchling/PEP 621 can
source the version from your tool configuration; update the [project] block to
include the dynamic key referencing "version".

In `@livekit-plugins/livekit-plugins-hedra/pyproject.toml`:
- Line 18: The pyproject.toml dependency line currently pins
"livekit-agents>=1.4.0.rc1" which is not available on PyPI; update the
dependencies entry (the dependencies field in pyproject.toml) to a published
version range such as "livekit-agents>=1.3.11,<1.4.0" or a fixed published
version like "livekit-agents==1.3.11" to avoid installation failures, then run a
quick install/test to verify resolution.

In `@livekit-plugins/livekit-plugins-hume/pyproject.toml`:
- Around line 1-31: The pyproject is missing the dynamic version declaration so
Hatch won't pick up the version from the [tool.hatch.version] config; add
dynamic = ["version"] to the [project] table (so that the existing
[tool.hatch.version] path is used) ensuring the project metadata reads the
version at build time.

In `@livekit-plugins/livekit-plugins-minimal/pyproject.toml`:
- Around line 1-6: The project metadata in pyproject.toml is missing a version
declaration, breaking PEP 621; restore metadata by either adding dynamic =
["version"] back into the [project] table or by adding a static version =
"x.y.z" entry under [project] (update the value as appropriate). Locate the
[project] block in pyproject.toml and add the chosen key (dynamic or version) so
the project metadata validates.

In `@livekit-plugins/livekit-plugins-resemble/pyproject.toml`:
- Around line 1-22: The [project] table is missing dynamic = ["version"], so
hatch won't pick up the version defined by [tool.hatch.version]; add dynamic =
["version"] back into the [project] section so hatch reads the version from the
referenced file (livekit/plugins/resemble/version.py) and resolves the
[tool.hatch.version] entry correctly.

In `@livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/version.py`:
- Line 15: The __version__ assignment uses a non-canonical PEP 440 pre-release
format; update the __version__ variable in version.py (the __version__
definition) to use the canonical form by removing the dot before the pre-release
identifier, i.e., change "1.4.0.rc1" to "1.4.0rc1" so the package version
conforms to PEP 440.

In `@livekit-plugins/livekit-plugins-sarvam/pyproject.toml`:
- Around line 1-6: The [project] table in pyproject.toml is missing version
metadata; add either a static version field (version = "0.1.0" or appropriate)
or declare dynamic = ["version"] and ensure your build backend provides it
(e.g., via setuptools_scm) so hatchling can produce valid metadata; update the
[project] table to include one of these entries (modify the existing [project]
block in pyproject.toml).
- Line 20: The dependency line in pyproject.toml specifies a non-existent
release "livekit-agents[codecs]>=1.4.0.rc1"; update that requirement to a valid
published version (for example change "livekit-agents[codecs]>=1.4.0.rc1" to
"livekit-agents[codecs]>=1.3.11") so the package resolver can find the package,
ensuring the dependency string remains the same format (including the [codecs]
extra) and keeping "numpy>=1.26" unchanged.

In
`@livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/version.py`:
- Line 15: The __version__ string in version.py is using a non-PEP440 RC format
("1.4.0.rc1"); update the __version__ assignment (the __version__ variable in
the module) to use the canonical PEP 440 release candidate form ("1.4.0rc1"),
and apply the same change to any other version.py files in the PR that use the
dotted "rc" form so all packages follow PEP 440.

In `@livekit-plugins/livekit-plugins-spitch/pyproject.toml`:
- Around line 1-6: The [project] table is missing the required dynamic
declaration for hatchling versioning; add dynamic = ["version"] to the [project]
section so hatchling can populate the version from the [tool.hatch.version]
configuration referenced later, ensuring the package is built with a proper
version.
♻️ Duplicate comments (20)
livekit-plugins/livekit-plugins-baseten/pyproject.toml (1)

20-24: Pre-release dependency constraint will break standard pip installs.

The constraint livekit-agents>=1.4.0.rc1 requires a pre-release version, but pip does not install pre-releases by default. Users running pip install livekit-plugins-baseten will encounter version resolution failures since the current stable release (1.3.11) is below this threshold.

Either:

  1. Wait for stable 1.4.0 release before publishing this package version, or
  2. Temporarily use a stable minimum version (e.g., livekit-agents>=1.3.11) during development
livekit-plugins/livekit-plugins-liveavatar/pyproject.toml (1)

20-20: Pre-release version specifier uses non-canonical PEP 440 format.

The version 1.4.0.rc1 should be 1.4.0rc1 (without the dot before rc) per PEP 440 canonical form. This issue was already flagged in a previous review along with the concern that this pre-release may not yet be published on PyPI.

livekit-plugins/livekit-plugins-lmnt/pyproject.toml (2)

26-28: Pin a minimum hatchling version for path-based versioning.
Since [tool.hatch.version] uses a path source, set a minimum hatchling version to avoid build-time surprises.

♻️ Proposed update
[build-system]
-requires = ["hatchling"]
+requires = ["hatchling>=1.4.1"]
 build-backend = "hatchling.build"
What is the minimum hatchling version that supports [tool.hatch.version] path-based versioning?

19-19: Potential install failure if 1.4.0.rc1 isn’t published to PyPI.
If the RC isn’t on PyPI, pip installs will fail for this plugin. Consider keeping a published lower bound (e.g., the last GA release) until the RC is available, or explicitly allow pre-release handling in your distribution strategy.

Is livekit-agents 1.4.0rc1 (or 1.4.0-rc1) published on PyPI? What is the latest published version?
livekit-plugins/livekit-plugins-simli/pyproject.toml (1)

20-20: Dependency livekit-agents>=1.4.0.rc1 may not be resolvable.

This issue was previously flagged. The specified RC version does not appear to be published on PyPI yet, which will prevent installation. Ensure the RC is published before merging, or update to an available version.

livekit-plugins/livekit-plugins-langchain/pyproject.toml (1)

22-22: Use the canonical PEP 440 pre-release form.

The spec >=1.4.0.rc1 still uses the non-canonical form with a dot separator. PEP 440 normalizes this to 1.4.0rc1 (no dot before rc).

🔧 Suggested fix
-  "livekit-agents>=1.4.0.rc1",
+  "livekit-agents>=1.4.0rc1",
livekit-plugins/livekit-plugins-aws/pyproject.toml (2)

19-30: Missing Python 3.11 classifier.

The classifiers list Python 3.9, 3.10, and 3.12, but Python 3.11 is missing. Since requires-python = ">=3.9.0" includes 3.11, this appears to be an oversight.

Proposed fix
   "Programming Language :: Python :: 3.10",
+  "Programming Language :: Python :: 3.11",
   "Programming Language :: Python :: 3.12",

31-35: Dependency on unreleased livekit-agents version.

The livekit-agents>=1.4.0.rc1 version does not currently exist on PyPI. This appears intentional as part of a coordinated release (the PR is bumping multiple packages to 1.4.0.rc1 together). Ensure that livekit-agents 1.4.0.rc1 is published before or alongside this plugin release.

livekit-plugins/livekit-plugins-spitch/pyproject.toml (1)

20-20: Invalid PEP 440 version specifier and non-existent release.

Two issues with this dependency:

  1. The version 1.4.0.rc1 uses incorrect PEP 440 syntax—release candidates should not have a dot before rc. The correct format is 1.4.0rc1.

  2. As noted in a previous review, livekit-agents 1.4.0rc1 is not yet published on PyPI.

Additionally, spitch remains unpinned which could cause unexpected breakages.

🐛 Proposed fix (once 1.4.0rc1 is published)
-dependencies = ["livekit-agents[codecs]>=1.4.0.rc1", "spitch"]
+dependencies = ["livekit-agents[codecs]>=1.4.0rc1", "spitch"]
livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py (1)

15-15: PEP 440 canonical form issue already flagged.

The version format issue (1.4.0.rc11.4.0rc1) was already noted in a previous review on this file.

livekit-plugins/livekit-plugins-resemble/pyproject.toml (1)

21-21: Pre-release dependency issue already flagged.

The livekit-agents>=1.4.0.rc1 dependency concern has been raised in a previous review. Pre-release versions are not installed by default, which may cause installation issues for downstream users.

livekit-plugins/livekit-plugins-minimax/pyproject.toml (1)

21-21: Verify livekit-agents[codecs]>=1.4.0.rc1 exists on PyPI.
If that pre-release hasn’t been published, installs will fail; please confirm the latest published version and adjust the constraint accordingly.

Does a PyPI release for livekit-agents 1.4.0rc1 (or 1.4.0.rc1) exist, and what is the latest published version?
livekit-plugins/livekit-plugins-silero/pyproject.toml (1)

20-24: Verify the livekit-agents pre‑release exists before pinning.
If 1.4.0rc1 isn’t published, installs will fail. Confirm availability on January 22, 2026 and adjust to the latest published version if needed.

🔧 Suggested fallback if 1.4.0rc1 is unavailable
-  "livekit-agents>=1.4.0.rc1",
+  "livekit-agents>=1.3.11",
#!/bin/bash
# Check PyPI availability for livekit-agents versions
python - <<'PY'
import json, urllib.request
pkg = "livekit-agents"
data = json.load(urllib.request.urlopen(f"https://pypi.org/pypi/{pkg}/json"))
print("Latest version:", data["info"]["version"])
print("Has 1.4.0rc1:", "1.4.0rc1" in data.get("releases", {}))
PY
livekit-plugins/livekit-plugins-turn-detector/pyproject.toml (1)

21-25: Validate the livekit-agents prerelease spec and publication status.
1.4.0.rc1 is not the canonical PEP 440 form (1.4.0rc1), and prereleases must be published before release to avoid install failures. Consider normalizing the spec or pinning to a published release.

🔧 Suggested normalization (if prerelease is intended)
-  "livekit-agents>=1.4.0.rc1",
+  "livekit-agents>=1.4.0rc1",
#!/bin/bash
# Verify PyPI availability and accepted version strings for livekit-agents.
python - <<'PY'
import json, urllib.request
data = json.load(urllib.request.urlopen("https://pypi.org/pypi/livekit-agents/json"))
versions = sorted(data["releases"].keys())
print("latest:", data["info"]["version"])
print("has 1.4.0rc1:", "1.4.0rc1" in versions)
print("has 1.4.0.rc1:", "1.4.0.rc1" in versions)
PY
livekit-plugins/livekit-plugins-ultravox/pyproject.toml (1)

20-20: Pin to a published livekit-agents release (rc1 not found).
PyPI currently lists 1.3.11 as the latest release (uploaded Jan 14, 2026), and GitHub releases show 1.3.10 as the latest tag; no 1.4.0.rc1 is published. If this is meant to resolve from PyPI, installs will fail. Consider pinning to an existing release (e.g., >=1.3.11) or ensure the rc1 is published on your package index. (pypi.org)

🛠️ Proposed fix
-dependencies = ["livekit-agents[codecs]>=1.4.0.rc1"]
+dependencies = ["livekit-agents[codecs]>=1.3.11"]
livekit-plugins/livekit-plugins-rtzr/pyproject.toml (1)

28-31: Verify prerelease dependency is actually published.
If livekit-agents>=1.4.0.rc1 isn’t on PyPI, installs will fail. Please confirm availability and adjust if needed (e.g., to the latest published stable).

#!/bin/bash
# Check PyPI for livekit-agents releases (no repo access required).
python - <<'PY'
import json, urllib.request
data = json.load(urllib.request.urlopen("https://pypi.org/pypi/livekit-agents/json"))
print("latest:", data["info"]["version"])
print("has 1.4.0rc1:", "1.4.0rc1" in data.get("releases", {}))
PY
livekit-agents/livekit/agents/voice/agent_session.py (1)

317-318: Preserve NOT_GIVEN for turn_detection fallback.
or None collapses the sentinel and breaks is_given()-based fallback logic in AgentActivity.

🐛 Proposed fix
-        self._turn_detection = turn_handling.turn_detection or None
+        self._turn_detection = (
+            turn_handling.turn_detection if is_given(turn_handling.turn_detection) else None
+        )
livekit-agents/livekit/agents/voice/agent_activity.py (1)

387-392: Sync active interruption-by-audio-activity flag when turn_detection changes.
Recomputing the default alone can leave the active flag stale after a mode switch.

🐛 Proposed fix
-            self._default_interruption_by_audio_activity_enabled = self._turn_detection not in (
-                "manual",
-                "realtime_llm",
-            )
+            old_default = self._default_interruption_by_audio_activity_enabled
+            self._default_interruption_by_audio_activity_enabled = self._turn_detection not in (
+                "manual",
+                "realtime_llm",
+            )
+            if self._interruption_by_audio_activity_enabled == old_default:
+                self._interruption_by_audio_activity_enabled = (
+                    self._default_interruption_by_audio_activity_enabled
+                )
livekit-plugins/livekit-plugins-fishaudio/pyproject.toml (2)

22-22: Verify the pre-release dependency is published.
Please confirm that livekit-agents publishes a version matching >=1.4.0.rc1; otherwise clean installs will fail. If you rely on a private index, document that requirement.

#!/bin/bash
python - <<'PY'
import json, urllib.request
data = json.load(urllib.request.urlopen("https://pypi.org/pypi/livekit-agents/json"))
print("latest:", data["info"].get("version"))
print("has 1.4.0rc1:", "1.4.0rc1" in data.get("releases", {}))
print("has 1.4.0.rc1:", "1.4.0.rc1" in data.get("releases", {}))
PY

5-5: Align declared Python support with the dependency gate.
fish-audio-sdk only installs on Python ≥ 3.10, while the project still advertises 3.9. If 3.9 isn’t truly supported, bump requires-python (and drop the 3.9 classifier). If it is supported, ensure a clear degraded-mode path when the dependency is absent.

💡 If 3.9 isn’t supported, align metadata and deps
-requires-python = ">=3.9.0"
+requires-python = ">=3.10"

-  "Programming Language :: Python :: 3.9",
   "Programming Language :: Python :: 3.10",

-  "fish-audio-sdk; python_version >= '3.10'",
+  "fish-audio-sdk",

Verification script (confirm the upstream Python requirement for fish-audio-sdk):

#!/bin/bash
python - <<'PY'
import json, urllib.request
data = json.load(urllib.request.urlopen("https://pypi.org/pypi/fish-audio-sdk/json"))
print("requires_python:", data["info"].get("requires_python"))
PY

Also applies to: 14-15, 21-21

🧹 Nitpick comments (2)
livekit-plugins/livekit-plugins-gladia/pyproject.toml (1)

18-28: Consider adding missing Python version classifiers.

The classifiers only list Python 3.9 and 3.10, but requires-python = ">=3.9.0" allows 3.11, 3.12, and 3.13. The main livekit-agents package explicitly supports up to Python 3.13. Consider adding the missing classifiers for completeness.

♻️ Suggested addition
   "Programming Language :: Python :: 3.9",
   "Programming Language :: Python :: 3.10",
+  "Programming Language :: Python :: 3.11",
+  "Programming Language :: Python :: 3.12",
+  "Programming Language :: Python :: 3.13",
   "Topic :: Multimedia :: Sound/Audio",
livekit-agents/livekit/agents/voice/turn.py (1)

195-205: Consider simplifying property accessors.

Since model_post_init already normalizes dict fields to config objects, the isinstance(self.interruption, dict) check in interruption_cfg and endpointing_cfg properties may be unnecessary. However, the defensive approach is acceptable for robustness.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 190824b and cb6c257.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (116)
  • examples/voice_agents/basic_agent.py
  • livekit-agents/livekit/agents/inference/__init__.py
  • livekit-agents/livekit/agents/inference/interruption.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-agents/livekit/agents/log.py
  • livekit-agents/livekit/agents/telemetry/trace_types.py
  • livekit-agents/livekit/agents/telemetry/traces.py
  • livekit-agents/livekit/agents/types.py
  • livekit-agents/livekit/agents/utils/deprecation.py
  • livekit-agents/livekit/agents/vad.py
  • livekit-agents/livekit/agents/version.py
  • livekit-agents/livekit/agents/voice/agent.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/voice/events.py
  • livekit-agents/livekit/agents/voice/turn.py
  • livekit-agents/pyproject.toml
  • livekit-plugins/livekit-plugins-anam/livekit/plugins/anam/version.py
  • livekit-plugins/livekit-plugins-anam/pyproject.toml
  • livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic/version.py
  • livekit-plugins/livekit-plugins-anthropic/pyproject.toml
  • livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/version.py
  • livekit-plugins/livekit-plugins-assemblyai/pyproject.toml
  • livekit-plugins/livekit-plugins-avatartalk/livekit/plugins/avatartalk/version.py
  • livekit-plugins/livekit-plugins-avatartalk/pyproject.toml
  • livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/version.py
  • livekit-plugins/livekit-plugins-aws/pyproject.toml
  • livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/version.py
  • livekit-plugins/livekit-plugins-azure/pyproject.toml
  • livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/version.py
  • livekit-plugins/livekit-plugins-baseten/pyproject.toml
  • livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/version.py
  • livekit-plugins/livekit-plugins-bey/pyproject.toml
  • livekit-plugins/livekit-plugins-bithuman/livekit/plugins/bithuman/version.py
  • livekit-plugins/livekit-plugins-bithuman/pyproject.toml
  • livekit-plugins/livekit-plugins-browser/livekit/plugins/browser/version.py
  • livekit-plugins/livekit-plugins-cartesia/livekit/plugins/cartesia/version.py
  • livekit-plugins/livekit-plugins-cartesia/pyproject.toml
  • livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/version.py
  • livekit-plugins/livekit-plugins-clova/pyproject.toml
  • livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/version.py
  • livekit-plugins/livekit-plugins-deepgram/pyproject.toml
  • livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/version.py
  • livekit-plugins/livekit-plugins-elevenlabs/pyproject.toml
  • livekit-plugins/livekit-plugins-fal/livekit/plugins/fal/version.py
  • livekit-plugins/livekit-plugins-fal/pyproject.toml
  • livekit-plugins/livekit-plugins-fireworksai/livekit/plugins/fireworksai/version.py
  • livekit-plugins/livekit-plugins-fireworksai/pyproject.toml
  • livekit-plugins/livekit-plugins-fishaudio/livekit/plugins/fishaudio/version.py
  • livekit-plugins/livekit-plugins-fishaudio/pyproject.toml
  • livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/version.py
  • livekit-plugins/livekit-plugins-gladia/pyproject.toml
  • livekit-plugins/livekit-plugins-google/livekit/plugins/google/version.py
  • livekit-plugins/livekit-plugins-gradium/livekit/plugins/gradium/version.py
  • livekit-plugins/livekit-plugins-gradium/pyproject.toml
  • livekit-plugins/livekit-plugins-groq/livekit/plugins/groq/version.py
  • livekit-plugins/livekit-plugins-groq/pyproject.toml
  • livekit-plugins/livekit-plugins-hedra/livekit/plugins/hedra/version.py
  • livekit-plugins/livekit-plugins-hedra/pyproject.toml
  • livekit-plugins/livekit-plugins-hume/livekit/plugins/hume/version.py
  • livekit-plugins/livekit-plugins-hume/pyproject.toml
  • livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/version.py
  • livekit-plugins/livekit-plugins-inworld/pyproject.toml
  • livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/version.py
  • livekit-plugins/livekit-plugins-langchain/pyproject.toml
  • livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/version.py
  • livekit-plugins/livekit-plugins-liveavatar/pyproject.toml
  • livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py
  • livekit-plugins/livekit-plugins-lmnt/pyproject.toml
  • livekit-plugins/livekit-plugins-minimal/livekit/plugins/minimal/version.py
  • livekit-plugins/livekit-plugins-minimal/pyproject.toml
  • livekit-plugins/livekit-plugins-minimax/livekit/plugins/minimax/version.py
  • livekit-plugins/livekit-plugins-minimax/pyproject.toml
  • livekit-plugins/livekit-plugins-mistralai/livekit/plugins/mistralai/version.py
  • livekit-plugins/livekit-plugins-mistralai/pyproject.toml
  • livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/version.py
  • livekit-plugins/livekit-plugins-neuphonic/pyproject.toml
  • livekit-plugins/livekit-plugins-nltk/livekit/plugins/nltk/version.py
  • livekit-plugins/livekit-plugins-nltk/pyproject.toml
  • livekit-plugins/livekit-plugins-nvidia/livekit/plugins/nvidia/version.py
  • livekit-plugins/livekit-plugins-nvidia/pyproject.toml
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py
  • livekit-plugins/livekit-plugins-openai/pyproject.toml
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/version.py
  • livekit-plugins/livekit-plugins-resemble/pyproject.toml
  • livekit-plugins/livekit-plugins-rime/livekit/plugins/rime/version.py
  • livekit-plugins/livekit-plugins-rime/pyproject.toml
  • livekit-plugins/livekit-plugins-rtzr/livekit/plugins/rtzr/version.py
  • livekit-plugins/livekit-plugins-rtzr/pyproject.toml
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/version.py
  • livekit-plugins/livekit-plugins-sarvam/pyproject.toml
  • livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/version.py
  • livekit-plugins/livekit-plugins-silero/pyproject.toml
  • livekit-plugins/livekit-plugins-simli/livekit/plugins/simli/version.py
  • livekit-plugins/livekit-plugins-simli/pyproject.toml
  • livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallestai/version.py
  • livekit-plugins/livekit-plugins-smallestai/pyproject.toml
  • livekit-plugins/livekit-plugins-soniox/livekit/plugins/soniox/version.py
  • livekit-plugins/livekit-plugins-soniox/pyproject.toml
  • livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/version.py
  • livekit-plugins/livekit-plugins-speechify/pyproject.toml
  • livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/version.py
  • livekit-plugins/livekit-plugins-speechmatics/pyproject.toml
  • livekit-plugins/livekit-plugins-spitch/livekit/plugins/spitch/version.py
  • livekit-plugins/livekit-plugins-spitch/pyproject.toml
  • livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/version.py
  • livekit-plugins/livekit-plugins-tavus/pyproject.toml
  • livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/version.py
  • livekit-plugins/livekit-plugins-turn-detector/pyproject.toml
  • livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/version.py
  • livekit-plugins/livekit-plugins-ultravox/pyproject.toml
  • livekit-plugins/livekit-plugins-upliftai/livekit/plugins/upliftai/version.py
  • livekit-plugins/livekit-plugins-upliftai/pyproject.toml
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/version.py
  • livekit-plugins/livekit-plugins-xai/pyproject.toml
✅ Files skipped from review due to trivial changes (2)
  • livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/version.py
  • livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallestai/version.py
🚧 Files skipped from review as they are similar to previous changes (47)
  • livekit-plugins/livekit-plugins-fal/livekit/plugins/fal/version.py
  • livekit-plugins/livekit-plugins-mistralai/livekit/plugins/mistralai/version.py
  • livekit-plugins/livekit-plugins-simli/livekit/plugins/simli/version.py
  • livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/version.py
  • livekit-plugins/livekit-plugins-avatartalk/livekit/plugins/avatartalk/version.py
  • livekit-plugins/livekit-plugins-rime/livekit/plugins/rime/version.py
  • livekit-plugins/livekit-plugins-hedra/livekit/plugins/hedra/version.py
  • livekit-plugins/livekit-plugins-cartesia/livekit/plugins/cartesia/version.py
  • livekit-agents/livekit/agents/telemetry/trace_types.py
  • livekit-agents/livekit/agents/version.py
  • livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/version.py
  • livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/version.py
  • livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/version.py
  • livekit-agents/livekit/agents/telemetry/traces.py
  • livekit-plugins/livekit-plugins-bithuman/pyproject.toml
  • livekit-plugins/livekit-plugins-anam/livekit/plugins/anam/version.py
  • livekit-plugins/livekit-plugins-azure/pyproject.toml
  • livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/version.py
  • livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py
  • livekit-plugins/livekit-plugins-bey/pyproject.toml
  • livekit-plugins/livekit-plugins-fal/pyproject.toml
  • livekit-plugins/livekit-plugins-speechify/pyproject.toml
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/version.py
  • livekit-plugins/livekit-plugins-bithuman/livekit/plugins/bithuman/version.py
  • livekit-plugins/livekit-plugins-neuphonic/pyproject.toml
  • livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/version.py
  • livekit-plugins/livekit-plugins-anthropic/pyproject.toml
  • livekit-plugins/livekit-plugins-nvidia/livekit/plugins/nvidia/version.py
  • livekit-plugins/livekit-plugins-nltk/pyproject.toml
  • livekit-plugins/livekit-plugins-minimax/livekit/plugins/minimax/version.py
  • livekit-plugins/livekit-plugins-tavus/pyproject.toml
  • livekit-plugins/livekit-plugins-google/livekit/plugins/google/version.py
  • livekit-plugins/livekit-plugins-smallestai/pyproject.toml
  • livekit-plugins/livekit-plugins-speechmatics/pyproject.toml
  • livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/version.py
  • livekit-plugins/livekit-plugins-soniox/pyproject.toml
  • livekit-plugins/livekit-plugins-spitch/livekit/plugins/spitch/version.py
  • livekit-agents/livekit/agents/inference/init.py
  • livekit-plugins/livekit-plugins-rime/pyproject.toml
  • livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/version.py
  • livekit-plugins/livekit-plugins-minimal/livekit/plugins/minimal/version.py
  • livekit-plugins/livekit-plugins-groq/livekit/plugins/groq/version.py
  • livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/version.py
  • livekit-plugins/livekit-plugins-anam/pyproject.toml
  • livekit-plugins/livekit-plugins-nvidia/pyproject.toml
  • livekit-plugins/livekit-plugins-upliftai/livekit/plugins/upliftai/version.py
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/version.py
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Format code with ruff
Run ruff linter and auto-fix issues
Run mypy type checker in strict mode
Maintain line length of 100 characters maximum
Ensure Python 3.9+ compatibility
Use Google-style docstrings

Files:

  • livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/version.py
  • livekit-agents/livekit/agents/vad.py
  • livekit-plugins/livekit-plugins-fireworksai/livekit/plugins/fireworksai/version.py
  • livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/version.py
  • livekit-agents/livekit/agents/utils/deprecation.py
  • livekit-plugins/livekit-plugins-browser/livekit/plugins/browser/version.py
  • livekit-agents/livekit/agents/log.py
  • livekit-plugins/livekit-plugins-soniox/livekit/plugins/soniox/version.py
  • livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic/version.py
  • livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/version.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/version.py
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py
  • examples/voice_agents/basic_agent.py
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/version.py
  • livekit-agents/livekit/agents/voice/agent.py
  • livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/version.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-plugins/livekit-plugins-rtzr/livekit/plugins/rtzr/version.py
  • livekit-plugins/livekit-plugins-hume/livekit/plugins/hume/version.py
  • livekit-agents/livekit/agents/types.py
  • livekit-plugins/livekit-plugins-nltk/livekit/plugins/nltk/version.py
  • livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/version.py
  • livekit-agents/livekit/agents/voice/turn.py
  • livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/version.py
  • livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/version.py
  • livekit-agents/livekit/agents/voice/events.py
  • livekit-plugins/livekit-plugins-gradium/livekit/plugins/gradium/version.py
  • livekit-plugins/livekit-plugins-fishaudio/livekit/plugins/fishaudio/version.py
  • livekit-agents/livekit/agents/inference/interruption.py
  • livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/version.py
🧠 Learnings (4)
📚 Learning: 2026-01-22T03:28:16.289Z
Learnt from: longcw
Repo: livekit/agents PR: 4563
File: livekit-agents/livekit/agents/beta/tools/end_call.py:65-65
Timestamp: 2026-01-22T03:28:16.289Z
Learning: In code paths that check capabilities or behavior of the LLM processing the current interaction, prefer using the activity's LLM obtained via ctx.session.current_agent._get_activity_or_raise().llm instead of ctx.session.llm. The session-level LLM may be a fallback and not reflect the actual agent handling the interaction. Use the activity LLM to determine capabilities and to make capability checks or feature toggles relevant to the current processing agent.

Applied to files:

  • livekit-agents/livekit/agents/vad.py
  • livekit-agents/livekit/agents/utils/deprecation.py
  • livekit-agents/livekit/agents/log.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/voice/agent.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-agents/livekit/agents/types.py
  • livekit-agents/livekit/agents/voice/turn.py
  • livekit-agents/livekit/agents/voice/events.py
  • livekit-agents/livekit/agents/inference/interruption.py
📚 Learning: 2026-01-16T07:44:56.353Z
Learnt from: CR
Repo: livekit/agents PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T07:44:56.353Z
Learning: Applies to **/*.py : Ensure Python 3.9+ compatibility

Applied to files:

  • livekit-plugins/livekit-plugins-fishaudio/pyproject.toml
  • livekit-plugins/livekit-plugins-aws/pyproject.toml
  • livekit-plugins/livekit-plugins-gladia/pyproject.toml
📚 Learning: 2026-01-19T23:21:47.799Z
Learnt from: vishal-seshagiri-infinitusai
Repo: livekit/agents PR: 4559
File: livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/responses/llm.py:122-123
Timestamp: 2026-01-19T23:21:47.799Z
Learning: Note from PR `#4559`: response_format was added as a passthrough to the OpenAI Responses API in livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/responses/llm.py, but this is scoped only to the Google provider and not for OpenAI. Reviewers should ensure that this passthrough behavior is gated by the provider (Google) and that OpenAI paths do not inadvertently reuse the same passthrough. Consider adding explicit provider checks, and update tests to verify that only the Google provider uses this passthrough while the OpenAI provider ignores it.

Applied to files:

  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py
📚 Learning: 2026-01-22T03:28:16.289Z
Learnt from: longcw
Repo: livekit/agents PR: 4563
File: livekit-agents/livekit/agents/beta/tools/end_call.py:65-65
Timestamp: 2026-01-22T03:28:16.289Z
Learning: In the livekit-agents voice framework, `ctx.session.llm` returns the session-level LLM, but `ctx.session.current_agent._get_activity_or_raise().llm` returns the actual LLM being used by the current agent (which may be the agent's own LLM or the session's LLM as fallback). Use the activity's LLM when you need to check capabilities of the LLM actually processing the current interaction.

Applied to files:

  • examples/voice_agents/basic_agent.py
🧬 Code graph analysis (9)
livekit-agents/livekit/agents/utils/deprecation.py (1)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/log.py (2)
livekit-agents/livekit/agents/llm/tool_context.py (1)
  • message (76-77)
livekit-agents/livekit/agents/telemetry/traces.py (1)
  • _log (351-364)
livekit-agents/livekit/agents/inference/stt.py (1)
livekit-agents/livekit/agents/_exceptions.py (1)
  • APIConnectionError (84-88)
livekit-agents/livekit/agents/voice/audio_recognition.py (3)
livekit-agents/livekit/agents/inference/interruption.py (10)
  • InterruptionStreamBase (327-521)
  • InterruptionEvent (57-92)
  • AdaptiveInterruptionDetector (162-324)
  • _AgentSpeechStartedSentinel (328-329)
  • _AgentSpeechEndedSentinel (331-332)
  • _OverlapSpeechStartedSentinel (334-341)
  • _OverlapSpeechEndedSentinel (343-344)
  • sample_rate (280-281)
  • stream (299-308)
  • push_frame (426-460)
livekit-agents/livekit/agents/stt/stt.py (4)
  • SpeechEvent (70-74)
  • SpeechEventType (32-49)
  • stream (222-230)
  • push_frame (385-408)
livekit-agents/livekit/agents/utils/aio/channel.py (10)
  • Chan (49-178)
  • closed (152-153)
  • send_nowait (32-32)
  • send_nowait (90-98)
  • empty (168-169)
  • recv_nowait (40-40)
  • recv_nowait (121-131)
  • close (34-34)
  • close (42-42)
  • close (133-146)
examples/voice_agents/basic_agent.py (2)
livekit-agents/livekit/agents/voice/turn.py (1)
  • TurnHandlingConfig (80-205)
livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/multilingual.py (1)
  • MultilingualModel (26-104)
livekit-agents/livekit/agents/voice/agent.py (2)
livekit-agents/livekit/agents/voice/turn.py (3)
  • TurnHandlingConfig (80-205)
  • migrate (133-193)
  • interruption_cfg (196-199)
livekit-agents/livekit/agents/voice/agent_session.py (3)
  • turn_detection (388-389)
  • interruption_detection (1278-1279)
  • vad (1274-1275)
livekit-agents/livekit/agents/voice/agent_session.py (2)
livekit-agents/livekit/agents/utils/deprecation.py (1)
  • deprecate_params (11-49)
livekit-agents/livekit/agents/voice/turn.py (4)
  • TurnHandlingConfig (80-205)
  • migrate (133-193)
  • interruption_cfg (196-199)
  • endpointing_cfg (202-205)
livekit-agents/livekit/agents/voice/turn.py (4)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/voice/agent_session.py (1)
  • turn_detection (388-389)
livekit-agents/livekit/agents/voice/agent.py (5)
  • turn_detection (510-520)
  • turn_detection (523-527)
  • min_endpointing_delay (608-618)
  • max_endpointing_delay (621-627)
  • allow_interruptions (595-605)
livekit-agents/livekit/agents/voice/agent_activity.py (3)
  • min_endpointing_delay (280-285)
  • max_endpointing_delay (288-293)
  • allow_interruptions (272-277)
livekit-agents/livekit/agents/voice/events.py (1)
livekit-agents/livekit/agents/inference/interruption.py (1)
  • InterruptionEvent (57-92)

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

# limitations under the License.

__version__ = "1.3.12"
__version__ = "1.4.0.rc1"
Copy link
Contributor

@coderabbitai coderabbitai bot Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Apply the PEP 440 canonical format fix here as well.

Same fix: 1.4.0rc1 instead of 1.4.0.rc1.

🤖 Prompt for AI Agents
In `@livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/version.py` at line
15, The __version__ variable currently uses a non-PEP 440 format ("1.4.0.rc1");
update the assignment in version.py to the canonical PEP 440 pre-release form by
changing __version__ = "1.4.0.rc1" to __version__ = "1.4.0rc1" so tools parsing
__version__ see the correct semantic version string.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please ignore this type of issues.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chenghao-mou, understood! I'll skip version format suggestions like this in the future.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Fix all issues with AI agents
In `@livekit-plugins/livekit-plugins-bithuman/pyproject.toml`:
- Around line 19-20: The dependency constraint for livekit-agents is invalid
(livekit-agents>=1.4.0.rc1) and will fail resolution; update the dependencies
array in pyproject.toml to reference an existing release—e.g., replace
"livekit-agents>=1.4.0.rc1" with "livekit-agents>=1.3.11" (or another published
version) in the dependencies line so installation succeeds.

In `@livekit-plugins/livekit-plugins-cartesia/pyproject.toml`:
- Line 20: Update the dependency line in pyproject.toml that currently reads
"livekit-agents>=1.4.0.rc1" to reference an existing PyPI release (for example
"livekit-agents>=1.3.11") so installs won't fail; locate the dependencies entry
in the pyproject.toml for the livekit-plugins-cartesia package and replace the
version specifier for livekit-agents accordingly, or revert to the previous
working constraint until 1.4.0.rc1 is published.

In `@livekit-plugins/livekit-plugins-google/pyproject.toml`:
- Around line 18-25: Remove the incorrect Python 3.9 classifier from the
classifiers array in pyproject.toml: delete the "Programming Language :: Python
:: 3.9" entry so the classifiers align with the requires-python constraint
(requires-python >=3.10) and the package's dependency/usage requirements; update
the classifiers list to only include supported versions (e.g., Python :: 3,
Python :: 3 :: Only, Python :: 3.10) to keep metadata consistent.

In `@livekit-plugins/livekit-plugins-gradium/pyproject.toml`:
- Around line 20-25: Update the dependency spec for livekit-agents in the
dependencies list by replacing the non-canonical "livekit-agents>=1.4.0.rc1"
entry with the canonical PEP 440 format "livekit-agents>=1.4.0rc1" so the
package resolver matches the published PyPI version; locate the entry in the
dependencies array and edit the string accordingly.

In `@livekit-plugins/livekit-plugins-minimal/pyproject.toml`:
- Line 20: Update the dependency entry for livekit-agents in pyproject.toml to a
released PyPI version; replace "livekit-agents>=1.4.0.rc1" with a valid release
such as "livekit-agents==1.3.11" (or use a range like
"livekit-agents>=1.3.11,<1.4.0") so installs succeed.

In `@livekit-plugins/livekit-plugins-xai/pyproject.toml`:
- Line 31: The dependency string "livekit-agents[openai]>=1.4.0.rc1" references
a pre-release that isn't on PyPI; update the requirement in pyproject.toml to a
published version (for example change to "livekit-agents[openai]>=1.3.11" or pin
to "livekit-agents[openai]==1.3.11"), or alternately wait until the 1.4.0rc1 is
published and then keep the original spec.
♻️ Duplicate comments (19)
livekit-plugins/livekit-plugins-deepgram/pyproject.toml (1)

20-20: Dependency version livekit-agents[codecs]>=1.4.0.rc1 may not resolve.

This concern was already raised in a previous review. Per that investigation, version 1.4.0.rc1 was not available on PyPI (latest was 1.3.11 as of Jan 14, 2026). If this is an internal/pre-release dependency intended for coordinated publishing, please confirm the release plan; otherwise, update to an existing version.

livekit-plugins/livekit-plugins-lmnt/pyproject.toml (2)

19-20: Pre-release dependency constraint already flagged.

The livekit-agents>=1.4.0.rc1 dependency concern was raised in a previous review. This pre-release version may not be available on PyPI for standard installations until formally released.


25-29: Build-system hatchling version constraint already flagged.

The suggestion to pin hatchling>=1.4.1 for path-based versioning compatibility was raised in a previous review. The current requires = ["hatchling"] lacks a minimum version constraint.

livekit-plugins/livekit-plugins-speechmatics/pyproject.toml (1)

28-28: Use PEP 440 canonical version format for release candidates.

The version specifier 1.4.0.rc1 includes a dot before rc, which is non-canonical per PEP 440. The standard format is 1.4.0rc1 (without the dot).

Suggested fix
-dependencies = ["livekit-agents>=1.4.0.rc1", "speechmatics-rt>=0.5.0"]
+dependencies = ["livekit-agents>=1.4.0rc1", "speechmatics-rt>=0.5.0"]
livekit-plugins/livekit-plugins-resemble/pyproject.toml (1)

21-21: Pre-release dependency constraint.

The dependency livekit-agents>=1.4.0.rc1 uses a pre-release version. This was already flagged in a previous review comment.

livekit-plugins/livekit-plugins-sarvam/pyproject.toml (1)

31-31: Verify that livekit-agents[codecs]>=1.4.0.rc1 exists on PyPI (Line 31).

This was flagged previously; if the rc is not published, the dependency will be unresolvable. Consider pinning to the latest published release once verified.

Is version 1.4.0.rc1 of livekit-agents published on PyPI? What is the latest released version?
livekit-plugins/livekit-plugins-langchain/pyproject.toml (1)

20-22: Use canonical PEP 440 pre-release form for Line 22.

The spec uses 1.4.0.rc1; PEP 440 canonicalizes this to 1.4.0rc1, which avoids tooling inconsistencies. (This was raised previously; re-flagging because it still appears in the current file.)

🔧 Suggested diff
-  "livekit-agents>=1.4.0.rc1",
+  "livekit-agents>=1.4.0rc1",
PEP 440 canonical pre-release form rc vs .rc
livekit-plugins/livekit-plugins-hedra/pyproject.toml (1)

29-30: Dependency version availability concern already raised.

The previous review comment already flagged that livekit-agents>=1.4.0.rc1 may not be available on PyPI. Ensure this plugin is published after (or concurrently with) the livekit-agents 1.4.0rc1 release to avoid installation failures.

livekit-plugins/livekit-plugins-silero/pyproject.toml (1)

20-25: Dependency livekit-agents>=1.4.0.rc1 does not exist on PyPI.

This issue was already flagged in a previous review. The version 1.4.0rc1 is not published for livekit-agents on PyPI. If this is a coordinated release where all packages will be published together, ensure the publishing order accounts for this dependency or use a valid fallback version for intermediate testing.

livekit-plugins/livekit-plugins-aws/pyproject.toml (2)

19-27: Add Python 3.11 classifier to match requires-python.

The classifiers still skip Python 3.11 even though requires-python = ">=3.9.0" includes it.

Proposed fix
   "Programming Language :: Python :: 3.10",
+  "Programming Language :: Python :: 3.11",
   "Programming Language :: Python :: 3.12",

32-35: Verify livekit-agents>=1.4.0.rc1 is published; installs may fail if not.

If the prerelease isn’t on PyPI yet, this dependency will break fresh installs.

Is livekit-agents version 1.4.0.rc1 published on PyPI? What is the latest published version?
Possible fix (after verification)
-  "livekit-agents>=1.4.0.rc1",
+  "livekit-agents>=<latest-published-version>",
livekit-plugins/livekit-plugins-liveavatar/pyproject.toml (1)

31-31: Non-canonical PEP 440 pre-release version format.

The version specifier 1.4.0.rc1 should be 1.4.0rc1 (without the dot before rc) per PEP 440 canonical form. This was already flagged in a previous review.

livekit-plugins/livekit-plugins-simli/pyproject.toml (1)

20-20: Non-standard version specifier format per PEP 440.

The version 1.4.0.rc1 uses a dot separator before the pre-release segment. PEP 440 specifies that pre-release versions should use the format 1.4.0rc1 (no dot). While pip may normalize this, using the canonical format avoids ambiguity and ensures consistent resolution across tools.

Additionally, as noted in prior review, this RC version is not yet published on PyPI—ensure coordinated release timing.

,

Suggested fix
-dependencies = ["livekit-agents>=1.4.0.rc1"]
+dependencies = ["livekit-agents>=1.4.0rc1"]
livekit-plugins/livekit-plugins-baseten/pyproject.toml (1)

20-24: Avoid a pre-release minimum for livekit-agents to prevent pip resolution failures.

Using >=1.4.0.rc1 makes standard installs fail unless users pass --pre. Please switch to the latest stable (non‑pre‑release) lower bound and optionally cap <1.4.0 until 1.4.0 is released.

🔧 Suggested change (adjust version after verifying latest stable)
-  "livekit-agents>=1.4.0.rc1",
+  "livekit-agents>=1.3.11,<1.4.0",
What is the latest stable (non‑pre‑release) version of livekit-agents on PyPI?
livekit-plugins/livekit-plugins-gladia/pyproject.toml (1)

29-33: Pre-release dependency constraint on livekit-agents[codecs]>=1.4.0.rc1.

This constraint references a pre-release version that isn't currently published on PyPI. Since this PR is part of a coordinated v1.4.0 release across the monorepo, this is likely intentional for development purposes.

Ensure the release workflow publishes livekit-agents 1.4.0.rc1 before or alongside this plugin, or users attempting to install this plugin from PyPI will encounter a resolution failure.

livekit-plugins/livekit-plugins-fal/pyproject.toml (1)

20-21: Pin and bound dependency versions (and verify the RC exists).
fal_client is unbounded and livekit-agents>=1.4.0.rc1 may not be published, which can break installs. Please verify the latest published versions on PyPI and set lower+upper bounds.

🧩 Example (adjust to latest published versions)
-dependencies = ["fal_client", "livekit-agents>=1.4.0.rc1"]
+dependencies = [
+  "fal_client>=0.11.0,<0.12.0",
+  "livekit-agents>=1.3.11,<1.4.0",
+]
What are the latest published PyPI versions of fal_client and livekit-agents, and does livekit-agents 1.4.0.rc1 exist on PyPI?
livekit-plugins/livekit-plugins-azure/pyproject.toml (1)

20-23: Confirm the pre‑release floor is intentional.

PyPI’s release history shows 1.4.0rc1 as a pre‑release (Dec 23, 2025) and 1.3.12 as the latest stable (Jan 21, 2026). (pypi.org)
livekit-agents>=1.4.0.rc1 forces installs onto the pre‑release (or later) and excludes 1.3.12. If you want stable‑only installs until 1.4.0 final, consider a lower stable floor. (pypi.org)

♻️ Possible stable-only floor (if intended)
-  "livekit-agents>=1.4.0.rc1",
+  "livekit-agents>=1.3.12",
livekit-plugins/livekit-plugins-turn-detector/pyproject.toml (1)

20-26: Non-standard PEP 440 prerelease format for livekit-agents dependency.

The version specifier 1.4.0.rc1 (with a dot before rc) is non-standard. PEP 440 specifies prerelease versions as 1.4.0rc1 (no dot). While pip may normalize this, it can cause issues with other tooling and is inconsistent with Python packaging conventions.

Additionally, ensure 1.4.0rc1 is published to PyPI before this package is released.

The transformers upper bound with the explanatory comment about the 4.57.2 bug is good practice.

Suggested fix
 dependencies = [
   "jinja2",
-  "livekit-agents>=1.4.0.rc1",
+  "livekit-agents>=1.4.0rc1",
   "numpy>=1.26",
   "onnxruntime>=1.18",
   "transformers>=4.47.1,<=4.57.1",  # transformers 4.57.2 has a bug with local_files_only=True
 ]
livekit-plugins/livekit-plugins-minimal/pyproject.toml (1)

21-21: Dynamic versioning restored.

Thanks for re-adding dynamic version metadata.

🧹 Nitpick comments (8)
livekit-plugins/livekit-plugins-tavus/pyproject.toml (1)

9-19: Consider adding classifiers for Python 3.11 and 3.12.

The requires-python = ">=3.9.0" permits Python 3.11 and 3.12, but the classifiers only list 3.9 and 3.10. Adding the missing version classifiers would improve discoverability on PyPI.

📦 Suggested classifiers
 classifiers = [
   "Intended Audience :: Developers",
   "License :: OSI Approved :: Apache Software License",
   "Programming Language :: Python :: 3",
   "Programming Language :: Python :: 3 :: Only",
   "Programming Language :: Python :: 3.9",
   "Programming Language :: Python :: 3.10",
+  "Programming Language :: Python :: 3.11",
+  "Programming Language :: Python :: 3.12",
   "Topic :: Multimedia :: Sound/Audio",
   "Topic :: Multimedia :: Video",
   "Topic :: Scientific/Engineering :: Artificial Intelligence",
 ]
livekit-plugins/livekit-plugins-rime/pyproject.toml (1)

9-17: Consider adding missing Python version classifiers.

The requires-python field specifies >=3.9.0, but classifiers only list Python 3.11 and 3.12. For completeness, consider adding classifiers for Python 3.9 and 3.10.

Suggested addition
 classifiers = [
   "Intended Audience :: Developers",
   "Programming Language :: Python :: 3",
   "Programming Language :: Python :: 3 :: Only",
+  "Programming Language :: Python :: 3.9",
+  "Programming Language :: Python :: 3.10",
   "Programming Language :: Python :: 3.11",
   "Programming Language :: Python :: 3.12",
   "Topic :: Multimedia :: Sound/Audio",
   "Topic :: Scientific/Engineering :: Artificial Intelligence",
 ]
livekit-plugins/livekit-plugins-gladia/pyproject.toml (1)

18-28: Classifiers are incomplete for the declared Python version range.

The requires-python = ">=3.9.0" constraint implies support for Python 3.11, 3.12, and 3.13, but the classifiers only list 3.9 and 3.10. Consider adding the missing classifiers for completeness.

📝 Suggested classifier additions
 classifiers = [
   "Intended Audience :: Developers",
   "License :: OSI Approved :: Apache Software License",
   "Programming Language :: Python :: 3",
   "Programming Language :: Python :: 3 :: Only",
   "Programming Language :: Python :: 3.9",
   "Programming Language :: Python :: 3.10",
+  "Programming Language :: Python :: 3.11",
+  "Programming Language :: Python :: 3.12",
+  "Programming Language :: Python :: 3.13",
   "Topic :: Multimedia :: Sound/Audio",
   "Topic :: Multimedia :: Video",
   "Topic :: Scientific/Engineering :: Artificial Intelligence",
 ]
livekit-plugins/livekit-plugins-simplismart/pyproject.toml (1)

17-27: Consider adding classifiers for Python 3.11+.

The classifiers list Python 3.9 and 3.10, but since the project supports >=3.9.0, you may want to add classifiers for Python 3.11, 3.12, and 3.13 as well for completeness.

Suggested addition
   "Programming Language :: Python :: 3.9",
   "Programming Language :: Python :: 3.10",
+  "Programming Language :: Python :: 3.11",
+  "Programming Language :: Python :: 3.12",
+  "Programming Language :: Python :: 3.13",
   "Topic :: Multimedia :: Sound/Audio",
livekit-plugins/livekit-plugins-mistralai/pyproject.toml (1)

20-24: Consider using PEP 440 canonical version format for the pre-release specifier.

The version 1.4.0.rc1 uses a dot separator before rc, but PEP 440 canonical form is 1.4.0rc1 (no dot). While pip normalizes both forms, using the canonical format improves consistency across tooling.

♻️ Suggested change
 dependencies = [
-  "livekit-agents>=1.4.0.rc1",
+  "livekit-agents>=1.4.0rc1",
   "mistralai>=1.9.11",
 ]
livekit-plugins/livekit-plugins-nvidia/pyproject.toml (2)

6-24: Validate the RC dependency and add a tested lower bound for nvidia‑riva‑client.

livekit-agents>=1.4.0.rc1 opts into a pre-release; please confirm that RC is published and intended for downstream installs. Also consider adding a minimum version for nvidia-riva-client to avoid unexpected API breaks.


29-33: Pin a minimum hatchling version to avoid build drift.

With requires = ["hatchling"] unbounded, older hatchling releases could be selected in some environments and lack the features your config relies on. Recommend setting a tested minimum (match CI/tooling).

livekit-agents/pyproject.toml (1)

24-51: Consider adding an upper bound for protobuf.
protobuf>=3 is unbounded and will accept future major versions that may not be validated against this package. Cap it to the supported major range (e.g., <5) to align with the pattern used for other core dependencies like pydantic>=2.0,<3 and livekit-protocol>=1.1,<2.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb6c257 and 10889f2.

📒 Files selected for processing (52)
  • livekit-agents/pyproject.toml
  • livekit-plugins/livekit-plugins-anam/pyproject.toml
  • livekit-plugins/livekit-plugins-anthropic/pyproject.toml
  • livekit-plugins/livekit-plugins-assemblyai/pyproject.toml
  • livekit-plugins/livekit-plugins-asyncai/pyproject.toml
  • livekit-plugins/livekit-plugins-avatartalk/pyproject.toml
  • livekit-plugins/livekit-plugins-aws/pyproject.toml
  • livekit-plugins/livekit-plugins-azure/pyproject.toml
  • livekit-plugins/livekit-plugins-baseten/pyproject.toml
  • livekit-plugins/livekit-plugins-bey/pyproject.toml
  • livekit-plugins/livekit-plugins-bithuman/pyproject.toml
  • livekit-plugins/livekit-plugins-cartesia/pyproject.toml
  • livekit-plugins/livekit-plugins-clova/pyproject.toml
  • livekit-plugins/livekit-plugins-deepgram/pyproject.toml
  • livekit-plugins/livekit-plugins-elevenlabs/pyproject.toml
  • livekit-plugins/livekit-plugins-fal/pyproject.toml
  • livekit-plugins/livekit-plugins-fireworksai/pyproject.toml
  • livekit-plugins/livekit-plugins-fishaudio/pyproject.toml
  • livekit-plugins/livekit-plugins-gladia/pyproject.toml
  • livekit-plugins/livekit-plugins-google/pyproject.toml
  • livekit-plugins/livekit-plugins-gradium/pyproject.toml
  • livekit-plugins/livekit-plugins-groq/pyproject.toml
  • livekit-plugins/livekit-plugins-hedra/pyproject.toml
  • livekit-plugins/livekit-plugins-hume/pyproject.toml
  • livekit-plugins/livekit-plugins-inworld/pyproject.toml
  • livekit-plugins/livekit-plugins-langchain/pyproject.toml
  • livekit-plugins/livekit-plugins-lemonslice/pyproject.toml
  • livekit-plugins/livekit-plugins-liveavatar/pyproject.toml
  • livekit-plugins/livekit-plugins-lmnt/pyproject.toml
  • livekit-plugins/livekit-plugins-minimal/pyproject.toml
  • livekit-plugins/livekit-plugins-mistralai/pyproject.toml
  • livekit-plugins/livekit-plugins-neuphonic/pyproject.toml
  • livekit-plugins/livekit-plugins-nltk/pyproject.toml
  • livekit-plugins/livekit-plugins-nvidia/pyproject.toml
  • livekit-plugins/livekit-plugins-openai/pyproject.toml
  • livekit-plugins/livekit-plugins-resemble/pyproject.toml
  • livekit-plugins/livekit-plugins-rime/pyproject.toml
  • livekit-plugins/livekit-plugins-rtzr/pyproject.toml
  • livekit-plugins/livekit-plugins-sarvam/pyproject.toml
  • livekit-plugins/livekit-plugins-silero/pyproject.toml
  • livekit-plugins/livekit-plugins-simli/pyproject.toml
  • livekit-plugins/livekit-plugins-simplismart/pyproject.toml
  • livekit-plugins/livekit-plugins-smallestai/pyproject.toml
  • livekit-plugins/livekit-plugins-soniox/pyproject.toml
  • livekit-plugins/livekit-plugins-speechify/pyproject.toml
  • livekit-plugins/livekit-plugins-speechmatics/pyproject.toml
  • livekit-plugins/livekit-plugins-spitch/pyproject.toml
  • livekit-plugins/livekit-plugins-tavus/pyproject.toml
  • livekit-plugins/livekit-plugins-turn-detector/pyproject.toml
  • livekit-plugins/livekit-plugins-ultravox/pyproject.toml
  • livekit-plugins/livekit-plugins-upliftai/pyproject.toml
  • livekit-plugins/livekit-plugins-xai/pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (12)
  • livekit-plugins/livekit-plugins-rtzr/pyproject.toml
  • livekit-plugins/livekit-plugins-anam/pyproject.toml
  • livekit-plugins/livekit-plugins-hume/pyproject.toml
  • livekit-plugins/livekit-plugins-neuphonic/pyproject.toml
  • livekit-plugins/livekit-plugins-spitch/pyproject.toml
  • livekit-plugins/livekit-plugins-fishaudio/pyproject.toml
  • livekit-plugins/livekit-plugins-anthropic/pyproject.toml
  • livekit-plugins/livekit-plugins-upliftai/pyproject.toml
  • livekit-plugins/livekit-plugins-nltk/pyproject.toml
  • livekit-plugins/livekit-plugins-ultravox/pyproject.toml
  • livekit-plugins/livekit-plugins-elevenlabs/pyproject.toml
  • livekit-plugins/livekit-plugins-bey/pyproject.toml
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-16T07:44:56.353Z
Learnt from: CR
Repo: livekit/agents PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T07:44:56.353Z
Learning: Applies to **/*.py : Ensure Python 3.9+ compatibility

Applied to files:

  • livekit-plugins/livekit-plugins-aws/pyproject.toml
  • livekit-plugins/livekit-plugins-gladia/pyproject.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: type-check (3.13)
  • GitHub Check: type-check (3.9)
  • GitHub Check: livekit-plugins-openai
  • GitHub Check: livekit-plugins-cartesia
  • GitHub Check: livekit-plugins-deepgram
  • GitHub Check: unit-tests
🔇 Additional comments (80)
livekit-plugins/livekit-plugins-deepgram/pyproject.toml (1)

1-39: Packaging updates look good.

The manifest changes are well-structured:

  • SPDX license identifier (Apache-2.0) is the modern standard.
  • Dynamic versioning via tool.hatch.version is correctly configured.
  • Build targets for wheel and sdist are properly scoped to the livekit namespace package.
livekit-plugins/livekit-plugins-fireworksai/pyproject.toml (2)

20-21: LGTM! Dependency update and dynamic versioning correctly configured.

The dynamic = ["version"] declaration (line 21) properly resolves the previous PEP 621 compliance issue. The dependency bump to livekit-agents>=1.4.0.rc1 aligns with the PR-wide version update, and the hatch version configuration at [tool.hatch.version] is correctly set up to source the version from version.py.


28-30: Build system configuration is correct.

The [build-system] section is properly configured with hatchling as the build backend, which is consistent with the dynamic versioning setup and the broader PR pattern of standardizing build configurations across plugins.

livekit-plugins/livekit-plugins-openai/pyproject.toml (3)

6-24: LGTM — metadata/dependency updates are clean and PEP 621-compliant.


26-29: LGTM — project URLs are a helpful addition.


34-36: LGTM — build-system block is correct as-is.

livekit-plugins/livekit-plugins-lmnt/pyproject.toml (1)

6-18: LGTM on metadata formatting.

The license, authors, keywords, and classifiers changes are standard formatting improvements aligning with SPDX identifiers and consistent metadata structure across the plugin ecosystem.

livekit-plugins/livekit-plugins-smallestai/pyproject.toml (4)

6-17: LGTM!

The license field uses the modern SPDX identifier format, and the keywords are well-organized in alphabetical order with relevant terms for the plugin.


18-19: LGTM!

The dependency version bump to 1.4.0.rc1 aligns with the PR-wide version update, and dynamic versioning is properly configured with the version path defined in [tool.hatch.version].


24-28: LGTM!

The Website URL addition and build-system configuration with hatchling are correctly specified.


33-37: LGTM!

The hatch build targets for wheel and sdist are properly configured for the namespace package structure.

livekit-plugins/livekit-plugins-speechmatics/pyproject.toml (2)

6-16: LGTM!

The license field using SPDX identifier format and the keywords reformatted to a sorted multi-line array improve readability and follow best practices.


36-47: LGTM!

The build-system configuration using hatchling is correctly structured, and the hatch version path, wheel packages, and sdist include directives are properly configured for the project layout.

livekit-plugins/livekit-plugins-assemblyai/pyproject.toml (2)

1-21: LGTM on project metadata and modernized configuration.

The project metadata is well-structured with:

  • SPDX license identifier format (Apache-2.0) aligning with PEP 639 recommendations
  • Alphabetically sorted keywords for consistency
  • Properly declared dynamic versioning

28-39: LGTM on build system configuration.

The hatchling build configuration is correctly set up:

  • Version sourced dynamically from livekit/plugins/assemblyai/version.py
  • Wheel and sdist targets properly configured with the livekit namespace package
livekit-plugins/livekit-plugins-resemble/pyproject.toml (2)

1-23: The dynamic = ["version"] issue from the previous review has been addressed.

The [project] section now correctly includes dynamic = ["version"] at line 23, which allows hatchling to read the version from livekit/plugins/resemble/version.py as configured in [tool.hatch.version].


30-41: Build configuration is properly structured.

The [build-system] block and hatch tool configurations are correctly placed and configured. The version path, wheel packages, and sdist include directives are all appropriate.

livekit-plugins/livekit-plugins-tavus/pyproject.toml (1)

1-39: LGTM on the overall pyproject.toml modernization.

The changes correctly:

  • Use the SPDX license identifier format (Apache-2.0)
  • Relocate the [build-system] block and standardize on hatchling
  • Add dynamic versioning via dynamic = ["version"]
  • Configure proper namespace package handling for wheel/sdist targets
  • Bump the livekit-agents dependency to >=1.4.0.rc1 as part of the coordinated RC release
livekit-plugins/livekit-plugins-lemonslice/pyproject.toml (5)

6-6: LGTM - License format updated to SPDX identifier.

Using the SPDX identifier format (Apache-2.0) aligns with PEP 639 standards for license declarations.


8-19: LGTM - Keywords reformatted and alphabetically sorted.

The multi-line format improves readability and the alphabetical ordering aids maintainability.


31-32: Dependency uses release candidate version.

The dependency constraint is set to livekit-agents>=1.4.0.rc1. Using a release candidate as a minimum version in a published package means users installing this plugin will require at least the RC version of livekit-agents.

This appears intentional as part of the coordinated 1.4.0.rc1 release cycle across the plugin ecosystem. Ensure this package is only published to PyPI when livekit-agents 1.4.0.rc1 (or later) is also available.


39-41: LGTM - Build system configuration is standard.

The hatchling build backend is correctly configured.


46-50: LGTM - Build targets correctly configured for namespace package.

The wheel and sdist configurations properly reference the livekit namespace package directory, which is the standard pattern for LiveKit plugins.

livekit-plugins/livekit-plugins-hedra/pyproject.toml (4)

6-17: LGTM!

Good use of the SPDX license identifier format and the multi-line keyword list improves readability.


18-28: LGTM!

Classifiers are properly formatted and appropriate for this package.


32-39: LGTM!

Project URLs and build system configuration are properly set up.


41-48: LGTM!

Hatch build targets are correctly configured for namespace packaging under the livekit namespace.

livekit-plugins/livekit-plugins-silero/pyproject.toml (2)

6-18: LGTM! Metadata reformatting is consistent.

The license format, keywords reordering, and classifiers reformatting are clean and follow standard pyproject.toml conventions.


26-47: LGTM! Build configuration changes are well-structured.

The relocation of [build-system] to the bottom, the dynamic = ["version"] declaration, and the hatch build targets configuration align with the broader PR pattern and follow hatchling conventions.

livekit-plugins/livekit-plugins-speechify/pyproject.toml (4)

1-21: LGTM!

The metadata section updates are well-structured:

  • SPDX license identifier follows modern PEP 639 conventions.
  • Keywords are alphabetically sorted for consistency.
  • Dependency bump to >=1.4.0.rc1 aligns with the coordinated release strategy.
  • Dynamic versioning with hatch path reference is the standard pattern.

23-26: LGTM!

Project URLs are correctly configured with consistent formatting.


28-30: LGTM!

Build-system placement after [project] aligns with the repo-wide standardization effort.


32-39: LGTM!

Hatch configuration is correct for the namespace package structure:

  • Version path correctly points to the plugin's version module.
  • Wheel and sdist targets properly include the livekit namespace package root.
livekit-plugins/livekit-plugins-liveavatar/pyproject.toml (3)

6-19: LGTM!

The SPDX license identifier format and multi-line keywords improve readability and follow modern pyproject.toml conventions.


39-41: LGTM!

Standard hatchling build system configuration.


46-47: LGTM!

The wheel build target configuration correctly specifies the livekit namespace package, which is consistent with the plugin's package structure.

livekit-plugins/livekit-plugins-simli/pyproject.toml (2)

23-30: LGTM!

The project URLs and build-system configuration are standard and correctly structured for a hatchling-based project.


32-39: LGTM!

The hatch build configuration is correctly set up for dynamic versioning and proper namespace package distribution.

livekit-plugins/livekit-plugins-rime/pyproject.toml (3)

18-19: LGTM!

The dependency update to >=1.4.0.rc1 aligns with the PR's version bump, and dynamic versioning is properly configured with the hatch version path.


26-28: LGTM!

Standard hatchling build system configuration.


30-37: LGTM!

Hatch configuration is properly set up with version path, wheel packages, and sdist includes following the standard pattern for LiveKit plugins.

livekit-plugins/livekit-plugins-asyncai/pyproject.toml (3)

6-21: LGTM!

The configuration updates look correct:

  • License uses the modern SPDX identifier format (PEP 639).
  • Keywords are consistently alphabetized.
  • The >=1.4.0.rc1 specifier will correctly accept both the release candidate and future stable releases per PEP 440 versioning.
  • Dynamic versioning is properly configured.

23-30: LGTM!

The URLs and build-system configuration are correct. While placing [build-system] at the bottom is less common than at the top, TOML doesn't enforce section ordering, so this is functionally equivalent and acceptable if consistent across plugins.


32-39: LGTM!

The hatch build configuration is correctly set up:

  • Dynamic version sourced from the appropriate version.py file.
  • Wheel and sdist targets properly include the livekit namespace package.
livekit-plugins/livekit-plugins-gladia/pyproject.toml (1)

6-6: LGTM on metadata and build system changes.

The SPDX license identifier format (Apache-2.0), alphabetically sorted keywords, dynamic = ["version"] declaration, and relocated [build-system] block all align with the broader PR's standardization effort across modules.

Also applies to: 8-17, 34-34, 41-43

livekit-plugins/livekit-plugins-soniox/pyproject.toml (3)

6-27: LGTM on metadata and dependency updates.

The SPDX license identifier format, alphabetically sorted keywords, and dynamic versioning are all aligned with modern Python packaging best practices. The dependency bump to >=1.4.0.rc1 is consistent with the coordinated v1.4.0 release preparation across the plugins.


29-36: LGTM on build system configuration.

The [build-system] placement after [project.urls] and use of hatchling is consistent with hatch-based project conventions.


38-45: LGTM on hatch build configuration.

The build targets are properly configured for the namespace package structure (livekit.plugins.soniox), with version sourced dynamically from the version module.

livekit-plugins/livekit-plugins-simplismart/pyproject.toml (4)

6-16: LGTM!

License uses the modern SPDX identifier format, and keywords are well-organized and relevant to the plugin's functionality.


28-29: LGTM!

Dependencies are appropriately constrained, and dynamic versioning aligns with the PR's coordinated version bump to 1.4.0.rc1 across plugins.


31-38: LGTM!

Build system configuration using hatchling is standard and well-structured.


40-47: LGTM!

Hatch build configuration correctly sets up the namespace package structure and version path, consistent with the packaging strategy used across other plugins in this PR.

livekit-plugins/livekit-plugins-mistralai/pyproject.toml (2)

26-33: LGTM!

Project URLs and build-system configuration are correctly defined.


35-42: LGTM!

Hatch versioning and build target configurations are correctly set up for the namespace package structure.

livekit-plugins/livekit-plugins-groq/pyproject.toml (3)

23-23: LGTM! dynamic = ["version"] added correctly.

This properly declares the version as dynamically sourced, enabling Hatchling to read it from the path specified in [tool.hatch.version]. This resolves the PEP 621 compliance concern from the previous review.


37-41: LGTM! Build targets correctly configured.

The wheel and sdist build targets are properly configured to include the livekit namespace package, which is the standard pattern for LiveKit plugins.


18-22: Update RC dependency constraint when final release is ready.

The dependency livekit-agents[codecs, openai]>=1.4.0.rc1 uses a release candidate version. This pattern is consistent across all plugins in the repository as part of coordinated RC testing, but the constraint should be updated to the stable version (e.g., >=1.4.0) when the final release is prepared. This will need to be synchronized across all plugins in the monorepo at the same time.

livekit-plugins/livekit-plugins-fal/pyproject.toml (4)

6-18: Metadata normalization looks good.
No concerns with the license/keywords/classifiers adjustments.


23-27: Project URLs update is fine.
No issues with the URL adjustments.


28-30: Build-system block looks correct.
No concerns with the hatchling configuration.


35-39: Build targets configuration looks good.
No issues with wheel/sdist targets.

livekit-plugins/livekit-plugins-gradium/pyproject.toml (1)

32-37: LGTM! Build configuration and dynamic versioning properly configured.

The dynamic = ["version"] declaration is now present (line 25), and the [tool.hatch.version] path at line 37 correctly references the version file. This addresses the previous review concern about the missing dynamic version declaration.

livekit-plugins/livekit-plugins-avatartalk/pyproject.toml (2)

6-23: Metadata block looks consistent with the repo’s style updates.


28-32: No additional review notes for this formatting-only block.

livekit-plugins/livekit-plugins-inworld/pyproject.toml (1)

40-41: Review comment is incorrect — the current configuration properly includes all required metadata files.

Hatchling automatically includes declared readme and license files in the sdist regardless of the include directive. Since the project declares readme = "README.md" (line 4) and license = "Apache-2.0" (line 6), both will be included. Additionally, pyproject.toml is always forced-included by Hatchling. The include = ["/livekit"] directive does not create a strict whitelist that would exclude these files—that behavior would require using only-include instead.

Likely an incorrect or invalid review comment.

livekit-plugins/livekit-plugins-nvidia/pyproject.toml (1)

38-42: Packaging include targets look consistent.

Wheel packaging of livekit and sdist include of /livekit should keep the version module present.

livekit-plugins/livekit-plugins-bithuman/pyproject.toml (1)

37-38: No action needed. Hatchling always includes README and license files in sdists regardless of explicit include filters—they cannot be excluded. The include = ["/livekit"] configuration is correct and will not omit README.md or license files.

Likely an incorrect or invalid review comment.

livekit-plugins/livekit-plugins-azure/pyproject.toml (2)

6-18: Metadata/classifier refresh looks good.

No concerns with these metadata updates.


24-33: Build-system and dynamic version placement look consistent.

No issues with the hatch configuration or URL adjustment.

livekit-plugins/livekit-plugins-turn-detector/pyproject.toml (3)

6-6: LGTM!

The metadata reorganization (license format, keywords reordering, and classifiers formatting) aligns with the PR-wide standardization effort across plugin manifests.

Also applies to: 8-8, 10-18


27-27: LGTM!

The dynamic = ["version"] declaration and build-system configuration using hatchling are standard and consistent with the rest of the repository.

Also applies to: 34-36


38-45: LGTM!

The hatch version path and build target configurations are properly set up for both wheel and sdist distributions.

livekit-plugins/livekit-plugins-minimal/pyproject.toml (2)

6-19: Metadata updates look consistent.

No concerns with the reordered keywords/classifiers and related metadata.


26-39: Build-system and hatch targets look good.

The build-system block relocation and hatch targets appear consistent.

livekit-plugins/livekit-plugins-xai/pyproject.toml (2)

6-29: No review notes for the metadata reformatting.

Also applies to: 33-33, 38-38


40-51: No action needed—Hatch automatically includes README and pyproject.toml regardless of the include directive.

The include = ["/livekit"] pattern is supplementary and does not override Hatch's default behavior:

  • README.md is included via [project] metadata
  • pyproject.toml is always included automatically
  • This configuration is consistent across other plugins (openai, anthropic, azure) with no issues

Likely an incorrect or invalid review comment.

livekit-agents/pyproject.toml (4)

6-21: Metadata refresh looks good.


53-58: Dynamic versioning + URLs look good.


61-108: No additional notes on the optional-dependencies list.


110-112: No further feedback on the build-system block.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines 19 to 20
dependencies = ["bithuman>=0.5.25", "livekit-agents>=1.4.0.rc1"]
dynamic = ["version"]
Copy link
Contributor

@coderabbitai coderabbitai bot Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

livekit-agents PyPI versions 1.4.0

💡 Result:

No — PyPI does not have livekit-agents v1.4.0. The latest published release on PyPI is 1.3.11 (uploaded Jan 14, 2026). [1]

Sources:

  • livekit-agents on PyPI (release files / release history). [1]

Fix invalid dependency version: livekit-agents 1.4.0.rc1 does not exist on PyPI.

The constraint livekit-agents>=1.4.0.rc1 specifies a version that is not published. The latest released version of livekit-agents on PyPI is 1.3.11 (as of January 14, 2026). This dependency will fail to resolve during installation. Update to an existing version, either livekit-agents>=1.3.11 for the latest stable or livekit-agents>=1.4.0.rc1 only if 1.4.0.rc1 will be published before this plugin release.

🤖 Prompt for AI Agents
In `@livekit-plugins/livekit-plugins-bithuman/pyproject.toml` around lines 19 -
20, The dependency constraint for livekit-agents is invalid
(livekit-agents>=1.4.0.rc1) and will fail resolution; update the dependencies
array in pyproject.toml to reference an existing release—e.g., replace
"livekit-agents>=1.4.0.rc1" with "livekit-agents>=1.3.11" (or another published
version) in the dependencies line so installation succeeds.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please ignore this as it is published at https://pypi.org/project/livekit-agents/1.4.0rc1/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🌐 Web query:

livekit-agents 1.4.0rc1 PyPI

💡 Result:

I couldn't find a PyPI release named livekit-agents 1.4.0rc1. The livekit-agents PyPI page lists 1.3.11 (uploaded Jan 14, 2026) as the latest release. [1]

Would you like me to watch for a 1.4.0rc1 release or check other indexes/GitHub releases? [1]


🏁 Script executed:

#!/bin/bash
# Check if the PyPI URL provided by the user is valid
curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/project/livekit-agents/1.4.0rc1/"

Length of output: 3


@chenghao-mou, you're absolutely right—my apologies for the confusion! I've verified that livekit-agents version 1.4.0rc1 does exist on PyPI at the URL you provided.

The dependency livekit-agents>=1.4.0.rc1 is valid and will resolve correctly. Per PEP 440, Python normalizes version strings, so 1.4.0.rc1 (with dots) and 1.4.0rc1 (without) refer to the same version. My initial search didn't account for this normalization.

Thank you for the correction! 🐰

    /)/)
   (._.)
   />🔍 Verified!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🤖 Fix all issues with AI agents
In `@livekit-agents/pyproject.toml`:
- Line 76: Update the version constraints for the two plugin dependencies in
pyproject.toml: change the fishaudio dependency entry (fishaudio =
["livekit-plugins-fishaudio>=1.4.0.rc1; python_version >= '3.10'"]) to use
>=1.4.0.rc2 and likewise change the minimax dependency entry (minimax =
["livekit-plugins-minimax-ai>=1.4.0.rc1"]) to >=1.4.0.rc2 so both match the
actual released versions (version.py) and remain consistent with other plugins.
- Line 88: Update the two plugin dependency entries in pyproject.toml: change
the minimax requirement (the minimax = ["livekit-plugins-minimax-ai>=1.4.0.rc1"]
entry) and the fishaudio requirement (the fishaudio =
["livekit-plugins-fishaudio>=1.4.0.rc1"] entry) to use >=1.4.0.rc2 so they match
the actual plugin versions and the rest of the plugin constraints.

In `@livekit-plugins/livekit-plugins-elevenlabs/pyproject.toml`:
- Line 28: The dependency line dependencies =
["livekit-agents[codecs]>=1.4.0.rc2"] pins a pre-release (rc) which will be
installed by users; confirm this is intentional or change it to a stable
constraint. If pre-release is not desired, replace the constraint with a
stable-compatible range (for example use a previous stable baseline like
"livekit-agents[codecs]>=1.3,<1.4" or wait and change to ">=1.4.0" once a stable
1.4.0 is published); alternatively, if you do intend to require the RC, make the
requirement explicit/locked (e.g., pin to "==1.4.0rc2") and add a comment
explaining the rationale. Ensure you update the dependencies entry (the
dependencies = ["livekit-agents[codecs]>=1.4.0.rc2"] line) accordingly.

In `@livekit-plugins/livekit-plugins-hedra/pyproject.toml`:
- Line 29: Update the dependency version specifier in the pyproject.toml
dependencies entry: replace the non-canonical PEP 440 string "1.4.0.rc2" with
the canonical "1.4.0rc2" in the dependencies array (the dependencies =
["livekit-agents>=1.4.0.rc2"] line) so the project uses the PEP 440-compliant
version syntax.

In `@livekit-plugins/livekit-plugins-lemonslice/pyproject.toml`:
- Around line 31-32: The dependency specifier `livekit-agents>=1.4.0.rc2` in
pyproject.toml is using a non-canonical prerelease format; update the dependency
string `livekit-agents>=1.4.0.rc2` to the PEP 440 normalized form
`livekit-agents>=1.4.0rc2` so the package resolver matches the PyPI published
version.

In `@livekit-plugins/livekit-plugins-nvidia/pyproject.toml`:
- Around line 20-23: The dependency constraint for livekit-agents in
pyproject.toml ("livekit-agents>=1.4.0.rc2") is not available on PyPI; update
the dependency line to use the latest published version (change
"livekit-agents>=1.4.0.rc2" to "livekit-agents>=1.3.12") so installations won't
fail, leaving the other dependency ("nvidia-riva-client") unchanged.

In `@livekit-plugins/livekit-plugins-smallestai/pyproject.toml`:
- Around line 18-19: The dependency pin "livekit-agents[codecs]>=1.4.0.rc2" is
invalid because 1.4.0.rc2 does not exist on PyPI; update the dependency string
in pyproject.toml to a published version (e.g. change
"livekit-agents[codecs]>=1.4.0.rc2" to "livekit-agents[codecs]>=1.4.0rc1" or to
the latest stable "livekit-agents[codecs]>=1.3.12") so installations succeed.

In `@livekit-plugins/livekit-plugins-speechify/pyproject.toml`:
- Around line 20-21: The dependency declaration in pyproject.toml references a
non-published pre-release ("livekit-agents[codecs]>=1.4.0.rc2") which will break
installs; update the dependencies entry to a published version (for example
"livekit-agents[codecs]>=1.3.12") or to a valid released range, keeping the
dynamic = ["version"] line unchanged so packaging works; locate the dependencies
key in livekit-plugins-speechify's pyproject.toml and replace the version
specifier for livekit-agents[codecs] accordingly.
♻️ Duplicate comments (19)
livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/version.py (1)

15-15: Use PEP 440 canonical pre-release format.

"1.4.0.rc2" should be "1.4.0rc2" to keep tooling and metadata canonical.

🔧 Proposed fix
-__version__ = "1.4.0.rc2"
+__version__ = "1.4.0rc2"
livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/version.py (1)

15-15: Use canonical PEP 440 pre-release format (1.4.0rc2).

This repeats a prior note: dotted pre-release is accepted but non-canonical. Consider normalizing for consistency.

♻️ Suggested change
-__version__ = "1.4.0.rc2"
+__version__ = "1.4.0rc2"
PEP 440 canonical pre-release format for "rc" versions (e.g., 1.4.0rc2 vs 1.4.0.rc2)
livekit-plugins/livekit-plugins-liveavatar/pyproject.toml (1)

31-31: Pre-release version format is still non-canonical per PEP 440.

The version spec 1.4.0.rc2 should be 1.4.0rc2 (without the dot before rc). The canonical PEP 440 pre-release format omits the dot separator.

-dependencies = ["livekit-agents>=1.4.0.rc2"]
+dependencies = ["livekit-agents>=1.4.0rc2"]

,

livekit-plugins/livekit-plugins-langchain/pyproject.toml (1)

20-22: Use PEP 440 canonical pre-release form for livekit-agents (Line 22).

The requirement uses a non-canonical 1.4.0.rc2 format. PEP 440 canonicalizes this to 1.4.0rc2. Using the canonical form avoids tooling inconsistencies.

🔧 Suggested change
-  "livekit-agents>=1.4.0.rc2",
+  "livekit-agents>=1.4.0rc2",
PEP 440 canonical pre-release version format "rc" (dot vs no dot)
livekit-agents 1.4.0rc2 PyPI release/version string
livekit-plugins/livekit-plugins-baseten/pyproject.toml (1)

20-24: Avoid pre-release minimum constraint for livekit-agents.

livekit-agents>=1.4.0.rc2 forces a pre-release, which pip won’t install by default—standard installs will fail unless --pre is used. Prefer a stable minimum and update to 1.4.0 once it’s released.

✅ Suggested change (replace with latest stable)
-  "livekit-agents>=1.4.0.rc2",
+  "livekit-agents>=1.3.11,<1.4.0",
What is the latest stable release of livekit-agents on PyPI, and has 1.4.0 (non-rc) been published?
livekit-plugins/livekit-plugins-cartesia/pyproject.toml (1)

20-20: Confirm livekit-agents 1.4.0.rc2 is actually published on PyPI.

If the pre-release isn’t available yet, installs will fail; please verify availability and adjust the constraint if needed.

Is livekit-agents 1.4.0rc2 published on PyPI, and what is the latest released version?
livekit-plugins/livekit-plugins-fishaudio/pyproject.toml (1)

5-5: Python version mismatch still exists.

The requires-python = ">=3.9.0" conflicts with fish-audio-sdk; python_version >= '3.10'. On Python 3.9, the plugin installs but will be non-functional due to the missing core dependency.

Also applies to: 20-23

livekit-plugins/livekit-plugins-ultravox/pyproject.toml (1)

20-21: Verify that livekit-agents version 1.4.0.rc2 is published or will be published before this plugin.

The latest published version of livekit-agents on PyPI is 1.3.12 (uploaded Jan 21, 2026). The pre-release version 1.4.0.rc2 does not appear to be published yet. If this plugin is released before the core dependency, users will encounter resolution failures during installation.

Ensure that the livekit-agents>=1.4.0.rc2 release is published to PyPI before or simultaneously with this plugin release, or adjust the version constraint for interim compatibility.

#!/bin/bash
# Check if livekit-agents 1.4.0.rc2 exists on PyPI
curl -s "https://pypi.org/pypi/livekit-agents/json" | jq -r '.releases | keys[]' | grep -E "1\.4\.0" || echo "No 1.4.0 releases found"
livekit-plugins/livekit-plugins-fal/pyproject.toml (1)

20-20: Confirm livekit-agents>=1.4.0.rc2 is published and add bounds for fal_client.

If 1.4.0.rc2 isn’t available on PyPI, installs will fail; and an unbounded fal_client can pull breaking releases. Please verify availability and then add an upper bound for stability.

PyPI livekit-agents 1.4.0.rc2 availability
PyPI fal_client latest version and release history
livekit-plugins/livekit-plugins-bithuman/pyproject.toml (1)

19-20: Verify livekit-agents>=1.4.0.rc2 is published and resolvable.

Please confirm that this pre-release exists on PyPI and resolves correctly for consumers; otherwise installs will fail.

Confirm whether livekit-agents version 1.4.0rc2 is published on PyPI and whether the specifier ">=1.4.0.rc2" resolves via pip.
livekit-plugins/livekit-plugins-aws/pyproject.toml (2)

19-26: Add Python 3.11 classifier to match supported versions.
Line 24-26 advertises 3.9/3.10/3.12 but omits 3.11 while requires-python includes it.

Proposed fix
   "Programming Language :: Python :: 3.10",
+  "Programming Language :: Python :: 3.11",
   "Programming Language :: Python :: 3.12",

32-34: Verify livekit-agents>=1.4.0.rc2 is published.
If this prerelease isn’t available on PyPI, installs will fail. Please confirm and adjust to a published version if needed.

Is the package version "livekit-agents 1.4.0.rc2" published on PyPI? If not, what is the latest available version?
livekit-plugins/livekit-plugins-gradium/pyproject.toml (1)

21-23: Use canonical PEP 440 RC format (1.4.0rc2).
Line 23 uses 1.4.0.rc2; the canonical prerelease format drops the dot, which avoids resolver quirks and better matches PyPI releases.

🐛 Proposed fix
-  "livekit-agents>=1.4.0.rc2",
+  "livekit-agents>=1.4.0rc2",
What is the canonical PEP 440 format for release candidates, and how is livekit-agents 1.4.0rc2 listed on PyPI?
livekit-plugins/livekit-plugins-deepgram/pyproject.toml (1)

20-21: Previous version concern addressed.

The dependency has been updated from >=1.4.0.rc1 to >=1.4.0.rc2, addressing the earlier concern about version availability.

livekit-agents/pyproject.toml (1)

38-41: OpenAI and OpenTelemetry dependencies verified.

Per previous review discussion, openai>=1.99.2 is confirmed available on PyPI. The OpenTelemetry packages at ~=1.39.0 are also valid.

livekit-plugins/livekit-plugins-azure/pyproject.toml (1)

20-23: Dependency livekit-agents>=1.4.0.rc2 remains unavailable on PyPI.

This issue was flagged in a previous review for version 1.4.0.rc1. The constraint has been updated to 1.4.0.rc2, but this version also does not exist on PyPI. The latest available version is 1.3.12 (uploaded Jan 21, 2026). Update to livekit-agents>=1.3.12 or coordinate release timing.

livekit-plugins/livekit-plugins-sarvam/pyproject.toml (1)

31-32: Dependency livekit-agents[codecs]>=1.4.0.rc2 remains unavailable on PyPI.

This issue was flagged in a previous review for version 1.4.0.rc1. The constraint has been updated to 1.4.0.rc2, but this version also does not exist on PyPI. The latest available version is 1.3.12 (uploaded Jan 21, 2026).

livekit-plugins/livekit-plugins-lmnt/pyproject.toml (2)

19-20: Dependency livekit-agents>=1.4.0.rc2 remains unavailable on PyPI.

This issue was flagged in a previous review for version 1.4.0.rc1. The constraint has been updated to 1.4.0.rc2, but this version also does not exist on PyPI. The latest available version is 1.3.12 (uploaded Jan 21, 2026).


27-29: Hatchling minimum version pinning still not addressed.

A previous review suggested pinning hatchling>=1.4.1 for path-based versioning compatibility. This has not been applied.

🧹 Nitpick comments (3)
livekit-plugins/livekit-plugins-tavus/pyproject.toml (1)

20-21: Consider using canonical PEP 440 version format.

The version specifier 1.4.0.rc2 uses a dot before rc. Per PEP 440, the canonical form for release candidates is 1.4.0rc2 (no dot). While pip normalizes this, using the canonical form ensures consistency across tooling.

Suggested fix
-dependencies = ["livekit-agents>=1.4.0.rc2"]
+dependencies = ["livekit-agents>=1.4.0rc2"]
livekit-plugins/livekit-plugins-nvidia/pyproject.toml (1)

31-33: Consider pinning hatchling to a minimum version.

The project uses path-based versioning via [tool.hatch.version]. Pinning hatchling>=1.4.1 in the build-system requires ensures compatibility with path-based version sources.

♻️ Proposed fix
 [build-system]
-requires = ["hatchling"]
+requires = ["hatchling>=1.4.1"]
 build-backend = "hatchling.build"
livekit-plugins/livekit-plugins-speechify/pyproject.toml (1)

28-30: Consider pinning hatchling to a minimum version.

♻️ Proposed fix
 [build-system]
-requires = ["hatchling"]
+requires = ["hatchling>=1.4.1"]
 build-backend = "hatchling.build"
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ebeb515 and 6e89c7b.

📒 Files selected for processing (106)
  • livekit-agents/livekit/agents/version.py
  • livekit-agents/pyproject.toml
  • livekit-plugins/livekit-plugins-anam/livekit/plugins/anam/version.py
  • livekit-plugins/livekit-plugins-anam/pyproject.toml
  • livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic/version.py
  • livekit-plugins/livekit-plugins-anthropic/pyproject.toml
  • livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/version.py
  • livekit-plugins/livekit-plugins-assemblyai/pyproject.toml
  • livekit-plugins/livekit-plugins-asyncai/livekit/plugins/asyncai/version.py
  • livekit-plugins/livekit-plugins-asyncai/pyproject.toml
  • livekit-plugins/livekit-plugins-avatartalk/livekit/plugins/avatartalk/version.py
  • livekit-plugins/livekit-plugins-avatartalk/pyproject.toml
  • livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/version.py
  • livekit-plugins/livekit-plugins-aws/pyproject.toml
  • livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/version.py
  • livekit-plugins/livekit-plugins-azure/pyproject.toml
  • livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/version.py
  • livekit-plugins/livekit-plugins-baseten/pyproject.toml
  • livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/version.py
  • livekit-plugins/livekit-plugins-bey/pyproject.toml
  • livekit-plugins/livekit-plugins-bithuman/livekit/plugins/bithuman/version.py
  • livekit-plugins/livekit-plugins-bithuman/pyproject.toml
  • livekit-plugins/livekit-plugins-browser/livekit/plugins/browser/version.py
  • livekit-plugins/livekit-plugins-cartesia/livekit/plugins/cartesia/version.py
  • livekit-plugins/livekit-plugins-cartesia/pyproject.toml
  • livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/version.py
  • livekit-plugins/livekit-plugins-clova/pyproject.toml
  • livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/version.py
  • livekit-plugins/livekit-plugins-deepgram/pyproject.toml
  • livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/version.py
  • livekit-plugins/livekit-plugins-elevenlabs/pyproject.toml
  • livekit-plugins/livekit-plugins-fal/livekit/plugins/fal/version.py
  • livekit-plugins/livekit-plugins-fal/pyproject.toml
  • livekit-plugins/livekit-plugins-fireworksai/livekit/plugins/fireworksai/version.py
  • livekit-plugins/livekit-plugins-fireworksai/pyproject.toml
  • livekit-plugins/livekit-plugins-fishaudio/livekit/plugins/fishaudio/version.py
  • livekit-plugins/livekit-plugins-fishaudio/pyproject.toml
  • livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/version.py
  • livekit-plugins/livekit-plugins-gladia/pyproject.toml
  • livekit-plugins/livekit-plugins-google/livekit/plugins/google/version.py
  • livekit-plugins/livekit-plugins-gradium/livekit/plugins/gradium/version.py
  • livekit-plugins/livekit-plugins-gradium/pyproject.toml
  • livekit-plugins/livekit-plugins-groq/livekit/plugins/groq/version.py
  • livekit-plugins/livekit-plugins-groq/pyproject.toml
  • livekit-plugins/livekit-plugins-hedra/livekit/plugins/hedra/version.py
  • livekit-plugins/livekit-plugins-hedra/pyproject.toml
  • livekit-plugins/livekit-plugins-hume/livekit/plugins/hume/version.py
  • livekit-plugins/livekit-plugins-hume/pyproject.toml
  • livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/version.py
  • livekit-plugins/livekit-plugins-inworld/pyproject.toml
  • livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/version.py
  • livekit-plugins/livekit-plugins-langchain/pyproject.toml
  • livekit-plugins/livekit-plugins-lemonslice/livekit/plugins/lemonslice/version.py
  • livekit-plugins/livekit-plugins-lemonslice/pyproject.toml
  • livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/version.py
  • livekit-plugins/livekit-plugins-liveavatar/pyproject.toml
  • livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py
  • livekit-plugins/livekit-plugins-lmnt/pyproject.toml
  • livekit-plugins/livekit-plugins-minimal/livekit/plugins/minimal/version.py
  • livekit-plugins/livekit-plugins-minimal/pyproject.toml
  • livekit-plugins/livekit-plugins-minimax/livekit/plugins/minimax/version.py
  • livekit-plugins/livekit-plugins-minimax/pyproject.toml
  • livekit-plugins/livekit-plugins-mistralai/livekit/plugins/mistralai/version.py
  • livekit-plugins/livekit-plugins-mistralai/pyproject.toml
  • livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/version.py
  • livekit-plugins/livekit-plugins-neuphonic/pyproject.toml
  • livekit-plugins/livekit-plugins-nltk/livekit/plugins/nltk/version.py
  • livekit-plugins/livekit-plugins-nltk/pyproject.toml
  • livekit-plugins/livekit-plugins-nvidia/livekit/plugins/nvidia/version.py
  • livekit-plugins/livekit-plugins-nvidia/pyproject.toml
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py
  • livekit-plugins/livekit-plugins-openai/pyproject.toml
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/version.py
  • livekit-plugins/livekit-plugins-resemble/pyproject.toml
  • livekit-plugins/livekit-plugins-rime/livekit/plugins/rime/version.py
  • livekit-plugins/livekit-plugins-rime/pyproject.toml
  • livekit-plugins/livekit-plugins-rtzr/livekit/plugins/rtzr/version.py
  • livekit-plugins/livekit-plugins-rtzr/pyproject.toml
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/version.py
  • livekit-plugins/livekit-plugins-sarvam/pyproject.toml
  • livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/version.py
  • livekit-plugins/livekit-plugins-silero/pyproject.toml
  • livekit-plugins/livekit-plugins-simli/livekit/plugins/simli/version.py
  • livekit-plugins/livekit-plugins-simli/pyproject.toml
  • livekit-plugins/livekit-plugins-simplismart/livekit/plugins/simplismart/version.py
  • livekit-plugins/livekit-plugins-simplismart/pyproject.toml
  • livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallestai/version.py
  • livekit-plugins/livekit-plugins-smallestai/pyproject.toml
  • livekit-plugins/livekit-plugins-soniox/livekit/plugins/soniox/version.py
  • livekit-plugins/livekit-plugins-soniox/pyproject.toml
  • livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/version.py
  • livekit-plugins/livekit-plugins-speechify/pyproject.toml
  • livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/version.py
  • livekit-plugins/livekit-plugins-speechmatics/pyproject.toml
  • livekit-plugins/livekit-plugins-spitch/livekit/plugins/spitch/version.py
  • livekit-plugins/livekit-plugins-spitch/pyproject.toml
  • livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/version.py
  • livekit-plugins/livekit-plugins-tavus/pyproject.toml
  • livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/version.py
  • livekit-plugins/livekit-plugins-turn-detector/pyproject.toml
  • livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/version.py
  • livekit-plugins/livekit-plugins-ultravox/pyproject.toml
  • livekit-plugins/livekit-plugins-upliftai/livekit/plugins/upliftai/version.py
  • livekit-plugins/livekit-plugins-upliftai/pyproject.toml
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/version.py
  • livekit-plugins/livekit-plugins-xai/pyproject.toml
✅ Files skipped from review due to trivial changes (1)
  • livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/version.py
🚧 Files skipped from review as they are similar to previous changes (44)
  • livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/version.py
  • livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/version.py
  • livekit-plugins/livekit-plugins-spitch/livekit/plugins/spitch/version.py
  • livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/version.py
  • livekit-plugins/livekit-plugins-rtzr/livekit/plugins/rtzr/version.py
  • livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/version.py
  • livekit-plugins/livekit-plugins-resemble/pyproject.toml
  • livekit-plugins/livekit-plugins-silero/pyproject.toml
  • livekit-plugins/livekit-plugins-hume/pyproject.toml
  • livekit-plugins/livekit-plugins-hedra/livekit/plugins/hedra/version.py
  • livekit-plugins/livekit-plugins-soniox/livekit/plugins/soniox/version.py
  • livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/version.py
  • livekit-plugins/livekit-plugins-anam/livekit/plugins/anam/version.py
  • livekit-plugins/livekit-plugins-avatartalk/livekit/plugins/avatartalk/version.py
  • livekit-plugins/livekit-plugins-hume/livekit/plugins/hume/version.py
  • livekit-plugins/livekit-plugins-inworld/pyproject.toml
  • livekit-plugins/livekit-plugins-bithuman/livekit/plugins/bithuman/version.py
  • livekit-plugins/livekit-plugins-nltk/pyproject.toml
  • livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/version.py
  • livekit-plugins/livekit-plugins-mistralai/pyproject.toml
  • livekit-plugins/livekit-plugins-minimax/pyproject.toml
  • livekit-plugins/livekit-plugins-google/livekit/plugins/google/version.py
  • livekit-plugins/livekit-plugins-groq/livekit/plugins/groq/version.py
  • livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/version.py
  • livekit-plugins/livekit-plugins-simli/pyproject.toml
  • livekit-plugins/livekit-plugins-fishaudio/livekit/plugins/fishaudio/version.py
  • livekit-plugins/livekit-plugins-xai/pyproject.toml
  • livekit-plugins/livekit-plugins-anthropic/pyproject.toml
  • livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/version.py
  • livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/version.py
  • livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py
  • livekit-plugins/livekit-plugins-gladia/pyproject.toml
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/version.py
  • livekit-plugins/livekit-plugins-upliftai/livekit/plugins/upliftai/version.py
  • livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/version.py
  • livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/version.py
  • livekit-plugins/livekit-plugins-fireworksai/pyproject.toml
  • livekit-plugins/livekit-plugins-nltk/livekit/plugins/nltk/version.py
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/version.py
  • livekit-plugins/livekit-plugins-browser/livekit/plugins/browser/version.py
  • livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/version.py
  • livekit-plugins/livekit-plugins-rime/livekit/plugins/rime/version.py
  • livekit-plugins/livekit-plugins-assemblyai/pyproject.toml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Format code with ruff
Run ruff linter and auto-fix issues
Run mypy type checker in strict mode
Maintain line length of 100 characters maximum
Ensure Python 3.9+ compatibility
Use Google-style docstrings

Files:

  • livekit-plugins/livekit-plugins-fal/livekit/plugins/fal/version.py
  • livekit-plugins/livekit-plugins-asyncai/livekit/plugins/asyncai/version.py
  • livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallestai/version.py
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/version.py
  • livekit-agents/livekit/agents/version.py
  • livekit-plugins/livekit-plugins-cartesia/livekit/plugins/cartesia/version.py
  • livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/version.py
  • livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic/version.py
  • livekit-plugins/livekit-plugins-mistralai/livekit/plugins/mistralai/version.py
  • livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/version.py
  • livekit-plugins/livekit-plugins-minimax/livekit/plugins/minimax/version.py
  • livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/version.py
  • livekit-plugins/livekit-plugins-simli/livekit/plugins/simli/version.py
  • livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/version.py
  • livekit-plugins/livekit-plugins-fireworksai/livekit/plugins/fireworksai/version.py
  • livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/version.py
  • livekit-plugins/livekit-plugins-minimal/livekit/plugins/minimal/version.py
  • livekit-plugins/livekit-plugins-simplismart/livekit/plugins/simplismart/version.py
  • livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/version.py
  • livekit-plugins/livekit-plugins-lemonslice/livekit/plugins/lemonslice/version.py
  • livekit-plugins/livekit-plugins-gradium/livekit/plugins/gradium/version.py
  • livekit-plugins/livekit-plugins-nvidia/livekit/plugins/nvidia/version.py
🧠 Learnings (2)
📚 Learning: 2026-01-22T03:28:16.289Z
Learnt from: longcw
Repo: livekit/agents PR: 4563
File: livekit-agents/livekit/agents/beta/tools/end_call.py:65-65
Timestamp: 2026-01-22T03:28:16.289Z
Learning: In code paths that check capabilities or behavior of the LLM processing the current interaction, prefer using the activity's LLM obtained via ctx.session.current_agent._get_activity_or_raise().llm instead of ctx.session.llm. The session-level LLM may be a fallback and not reflect the actual agent handling the interaction. Use the activity LLM to determine capabilities and to make capability checks or feature toggles relevant to the current processing agent.

Applied to files:

  • livekit-agents/livekit/agents/version.py
📚 Learning: 2026-01-16T07:44:56.353Z
Learnt from: CR
Repo: livekit/agents PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T07:44:56.353Z
Learning: Applies to **/*.py : Ensure Python 3.9+ compatibility

Applied to files:

  • livekit-plugins/livekit-plugins-fishaudio/pyproject.toml
  • livekit-plugins/livekit-plugins-aws/pyproject.toml
🔇 Additional comments (90)
livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/version.py (1)

15-15: Version bump looks good.

Consistent with the stated release candidate update.

livekit-plugins/livekit-plugins-lemonslice/livekit/plugins/lemonslice/version.py (1)

15-15: Version bump looks good.

Pre-release suffix is clear and consistent with the PR’s versioning intent.

livekit-plugins/livekit-plugins-fireworksai/livekit/plugins/fireworksai/version.py (1)

15-15: Version bump looks good.

No functional changes here; the updated version constant is consistent with the PR’s intent.

livekit-plugins/livekit-plugins-asyncai/livekit/plugins/asyncai/version.py (1)

15-15: LGTM — version string update is consistent.
No functional impact observed.

livekit-plugins/livekit-plugins-simli/livekit/plugins/simli/version.py (1)

15-15: LGTM — version bump is clear and isolated.

livekit-plugins/livekit-plugins-mistralai/livekit/plugins/mistralai/version.py (1)

16-16: Version bump looks good.

Straightforward metadata update for the RC2 release.

livekit-plugins/livekit-plugins-minimal/livekit/plugins/minimal/version.py (1)

15-15: Version bump looks good.
Clear update to the release candidate version constant; no concerns.

livekit-agents/livekit/agents/version.py (1)

15-15: Version bump looks good.
Clean, isolated update to the exported version constant.

livekit-plugins/livekit-plugins-nvidia/livekit/plugins/nvidia/version.py (1)

15-15: Version bump looks good.
No concerns with this change.

livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/version.py (1)

15-15: LGTM!

The version bump to 1.4.0.rc2 follows PEP 440 versioning conventions and aligns with the broader PR-wide version update pattern.

livekit-plugins/livekit-plugins-minimax/livekit/plugins/minimax/version.py (1)

15-15: LGTM!

The version bump to 1.4.0.rc2 aligns with the broader release cycle changes across the repository. The version format follows PEP 440 pre-release conventions.

livekit-plugins/livekit-plugins-bey/pyproject.toml (1)

1-39: LGTM!

The packaging configuration updates look correct:

  • License uses proper SPDX identifier format
  • Dynamic versioning is correctly configured with hatch
  • Build targets are appropriate for the namespace package structure
  • Dependency bump to >=1.4.0.rc2 aligns with the coordinated v1.4.0 release across plugins
livekit-plugins/livekit-plugins-liveavatar/pyproject.toml (1)

1-50: Structural changes align with PR-wide patterns.

The reformatting (multi-line keywords, classifiers), build-system relocation, dynamic versioning, and wheel/sdist target additions are consistent with changes across other plugins in this PR.

livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic/version.py (1)

15-15: LGTM — version bump looks consistent.

livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallestai/version.py (1)

15-15: LGTM!

The version bump to 1.4.0.rc2 is consistent with the release candidate updates across other plugins in this PR.

livekit-plugins/livekit-plugins-fal/livekit/plugins/fal/version.py (1)

15-15: LGTM!

Version bump to 1.4.0.rc2 is consistent with the broader release candidate update across the plugin ecosystem.

livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/version.py (1)

15-15: LGTM!

Version bump to 1.4.0.rc2 is consistent with the coordinated release cycle across the plugin ecosystem.

livekit-plugins/livekit-plugins-cartesia/livekit/plugins/cartesia/version.py (1)

15-15: LGTM!

The version bump to 1.4.0.rc2 aligns with the coordinated release candidate version updates across the plugins in this PR.

livekit-plugins/livekit-plugins-neuphonic/pyproject.toml (4)

1-21: LGTM!

Project metadata is well-structured:

  • License uses correct SPDX identifier format ("Apache-2.0")
  • Keywords are alphabetically sorted for consistency
  • Classifiers are properly formatted
  • Dependency constraint and dynamic version declaration are correctly specified

23-27: LGTM!

Project URLs section is properly formatted with documentation, source, and website links.


28-30: LGTM!

Build system correctly configured with hatchling as the backend.


32-39: LGTM!

Hatch configuration is properly set up:

  • Dynamic version sourced from the correct path
  • Wheel and sdist targets correctly configured for the namespace package structure
livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/version.py (1)

15-15: Version bump looks good.

The update to 1.4.0.rc2 aligns with the coordinated release across other plugins in this PR.

Minor note: PEP 440 canonical form for release candidates is 1.4.0rc2 (without the dot before rc). Most tools normalize this automatically, so it's not a blocker, but worth keeping in mind for consistency with Python packaging standards.

livekit-plugins/livekit-plugins-upliftai/pyproject.toml (4)

6-18: LGTM!

The license field now uses the SPDX identifier format (Apache-2.0), which is the recommended approach for pyproject.toml. The keywords reformatting improves readability.


30-31: Verify: Release candidate version as minimum dependency constraint.

The dependency constraint >=1.4.0.rc2 uses a release candidate as the lower bound. While this works during the coordinated release cycle, ensure this is updated to >=1.4.0 (stable) before the final release of this plugin to avoid requiring pre-release versions in production.


33-40: LGTM!

The project URLs and build-system configuration are correctly defined. Using hatchling as the build backend is consistent with the other plugins in this ecosystem.


42-49: LGTM!

The hatch tooling configuration is correctly set up for this namespace package. The version path, wheel packages, and sdist include paths are consistent with the plugin's structure.

livekit-plugins/livekit-plugins-rime/pyproject.toml (4)

6-6: LGTM!

Using the SPDX license identifier string format aligns with PEP 639 recommendations.


8-17: LGTM!

Alphabetically sorted keywords and consistently formatted classifiers improve maintainability.


18-19: LGTM!

The dependency on livekit-agents[codecs]>=1.4.0.rc2 aligns with the PR's goal of updating plugins for v1.4.0 features. The >= constraint appropriately allows the final release once available. Dynamic versioning via hatch is correctly configured with the version path at line 31.


26-37: LGTM!

The build-system configuration with hatchling is properly set up. The wheel and sdist targets correctly include the livekit namespace package structure.

livekit-plugins/livekit-plugins-simplismart/livekit/plugins/simplismart/version.py (1)

15-15: Update RC version to align with standardized version across plugins.

This plugin is set to 1.3.12.rc1 while the vast majority of other plugins use 1.4.0.rc2. Only lemonslice also uses 1.3.12.rc1. Please confirm whether this intentional version separation is correct or if simplismart should be updated to 1.4.0.rc2 to match the broader versioning scheme used across the plugin ecosystem.

livekit-plugins/livekit-plugins-tavus/pyproject.toml (3)

6-19: LGTM!

The license format using SPDX identifier, keywords, and classifiers are all properly formatted and follow PyPI packaging standards.


28-30: LGTM!

Build system configuration with hatchling is standard and correctly placed.


32-39: LGTM!

Hatch version path and build targets are properly configured for the namespace package structure.

livekit-plugins/livekit-plugins-groq/pyproject.toml (3)

23-23: LGTM! The dynamic = ["version"] declaration is now properly added.

This correctly addresses the PEP 621 compliance requirement for Hatchling to source the version from [tool.hatch.version].


30-41: LGTM! Build system configuration is well-structured.

The relocated [build-system] block and added build targets for wheel and sdist follow Hatchling best practices and are consistent with the PR-wide metadata reorganization.


21-21: The intentional use of the 1.4.0.rc2 release candidate version is confirmed. Analysis shows that 51 out of 54 plugins in the repository use this same RC version, indicating a coordinated and deliberate release strategy rather than an accidental override. This is a standard practice when all plugins in an ecosystem are being synchronized to a pre-release version of the core library.

livekit-plugins/livekit-plugins-fishaudio/pyproject.toml (5)

1-19: Project metadata formatting looks good.

The SPDX license identifier format ("Apache-2.0") and classifier formatting updates follow modern pyproject.toml conventions.


24-29: LGTM!

Dynamic versioning and project URLs are properly configured.


31-33: LGTM!

Standard hatchling build system configuration.


35-42: LGTM!

Hatch version and build target configurations are properly set up for the livekit namespace package.


22-22: The livekit-agents 1.4.0rc2 version exists on PyPI and is resolvable. The pre-release version update from rc1 to rc2 is valid and the dependency can be safely used.

livekit-plugins/livekit-plugins-spitch/pyproject.toml (3)

20-21: Verify dependency version availability before release.

The latest published version of livekit-agents on PyPI is 1.3.12. The specified livekit-agents[codecs]>=1.4.0.rc2 does not yet exist on PyPI.

Since this is a monorepo and v1.4.0 appears to be a coordinated release, ensure the livekit-agents package is published before or alongside this plugin. Otherwise, installation will fail.

The spitch dependency remains unpinned—consider adding a version constraint to prevent unexpected breakages from upstream changes.

Additionally, note that 1.4.0.rc2 uses non-standard PEP 440 notation (the dot before rc). The canonical form is 1.4.0rc2. While pip often normalizes this, using the standard format avoids potential issues.

[duplicate_comment, request_verification]


28-30: LGTM!

The [build-system] section is correctly configured for hatchling with requires = ["hatchling"] and build-backend = "hatchling.build".


32-39: LGTM!

The hatch version and build target configurations are properly set up:

  • Version sourced from livekit/plugins/spitch/version.py
  • Wheel and sdist targets correctly include the livekit package

With dynamic = ["version"] now added to the [project] section, the dynamic versioning will work as expected.

livekit-plugins/livekit-plugins-ultravox/pyproject.toml (3)

28-30: LGTM!

The build-system configuration using hatchling is standard and correctly specified.


32-39: LGTM!

The hatch configuration for dynamic versioning and build targets is correctly structured for the namespace package pattern.


41-42: LGTM!

The mypy configuration with the Pydantic plugin is appropriate for type checking Pydantic models.

livekit-plugins/livekit-plugins-hedra/pyproject.toml (1)

1-48: Packaging reorganization looks good.

The reformatted keywords, classifiers, SPDX license identifier (Apache-2.0), relocated build-system block, and explicit wheel/sdist packaging targets align with the broader project-wide packaging standardization mentioned in related plugin changes.

livekit-plugins/livekit-plugins-bithuman/pyproject.toml (3)

6-18: Metadata updates look consistent.

No concerns with the updated license, keywords, and classifiers.


25-29: Build-system block placement and website update look fine.

No issues with the updated URL or the relocated build-system section.


34-38: Packaging targets look OK.

The wheel/sdist configuration appears consistent with the package layout.

livekit-plugins/livekit-plugins-smallestai/pyproject.toml (3)

6-17: Metadata refresh looks good.

License and keyword updates are clear and consistent with project metadata.


24-28: Build-system relocation is fine.

No issues with the block move or formatting changes.


33-37: No action needed; the sdist include pattern is correct.

The leading / in include = ["/livekit"] anchors the pattern to the project root, not to an absolute filesystem path. Per Hatchling's Git-style glob semantics, this pattern correctly includes all files under the livekit directory in the sdist. The current configuration follows recommended practices and will not omit package content.

Likely an incorrect or invalid review comment.

livekit-plugins/livekit-plugins-gradium/livekit/plugins/gradium/version.py (1)

15-15: LGTM—straightforward version bump.
No issues spotted.

livekit-plugins/livekit-plugins-gradium/pyproject.toml (3)

6-18: Metadata updates look consistent.
No concerns with the keyword/classifier adjustments.


25-25: Good addition of dynamic versioning.
This aligns with Hatch’s version-from-file setup.


30-34: Build-system block looks correct.
No issues with the Hatchling config placement.

livekit-plugins/livekit-plugins-asyncai/pyproject.toml (5)

6-19: LGTM for project metadata/classifiers.
These updates look consistent and aligned with the package’s scope.


23-27: LGTM for the Website URL addition.
Nice to have a canonical website link in project metadata.


28-31: LGTM for the build-system block.
Hatchling config looks correct.


35-39: LGTM for hatch build targets.
The wheel/sdist targets look consistent with packaging only the livekit package.


20-21: Confirm the prerelease dependency is intentional.

livekit-agents>=1.4.0.rc2 is published on PyPI (Jan 23, 2026) as a pre-release. However, the latest stable release is 1.3.12 (Jan 21, 2026), and 1.4.0 stable has not yet been released. Verify that requiring this pre-release version—rather than the current stable baseline—is the intended choice for this plugin.

livekit-plugins/livekit-plugins-lemonslice/pyproject.toml (4)

6-29: Metadata list formatting looks good.

The multiline keywords and classifiers read cleanly and are easy to scan.


37-41: Build-system block relocation is fine.

No issues with placing [build-system] after [project.urls].


46-47: Wheel target configuration looks good.

Explicitly setting packages = ["livekit"] is clear and consistent.


50-50: sdist include rule looks OK.

include = ["/livekit"] is consistent with the package layout.

livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/version.py (1)

15-15: Version bump looks good.

livekit-plugins/livekit-plugins-rtzr/pyproject.toml (1)

40-51: LGTM on the packaging metadata adjustments.

livekit-plugins/livekit-plugins-minimal/pyproject.toml (1)

20-31: LGTM — metadata and build configuration look consistent.

livekit-plugins/livekit-plugins-turn-detector/pyproject.toml (1)

34-45: LGTM on the packaging block updates.

livekit-plugins/livekit-plugins-speechmatics/pyproject.toml (1)

36-47: LGTM on the metadata/build updates.

livekit-plugins/livekit-plugins-avatartalk/pyproject.toml (1)

22-22: No action needed. The livekit-agents 1.4.0rc2 pre-release is published on PyPI (as of Jan 23, 2026) and is available for installation.

livekit-plugins/livekit-plugins-simplismart/pyproject.toml (1)

1-47: LGTM!

The pyproject.toml restructuring is consistent with the broader repository-wide reorganization. The dependency bump to livekit-agents[codecs]>=1.4.0.rc2, dynamic versioning, and hatch build targets are properly configured.

livekit-plugins/livekit-plugins-clova/pyproject.toml (1)

1-39: LGTM!

The configuration changes align with the coordinated version bump and build tooling standardization across the plugin ecosystem.

livekit-plugins/livekit-plugins-anam/pyproject.toml (1)

1-39: LGTM!

Build configuration and dependency updates are consistent with the repository-wide migration pattern.

livekit-agents/pyproject.toml (2)

61-108: Optional plugin dependencies consistently updated to >=1.4.0.rc2.

The bulk of the optional plugin dependencies have been properly updated to the new rc2 version constraint, with the noted exceptions of fishaudio and minimax which remain at rc1.


27-27: The certifi version 2025.6.15 is valid and exists on PyPI.

Version 2025.6.15 has been released (June 15, 2025) and is currently available on PyPI. The latest version is 2026.1.4. Specifying certifi>=2025.6.15 as a minimum version is reasonable and appropriate.

livekit-plugins/livekit-plugins-openai/pyproject.toml (2)

1-45: LGTM!

The pyproject.toml restructuring follows the consistent pattern across the plugin ecosystem with proper dynamic versioning, relocated build system, and hatch build targets.


20-23: Dependencies are correctly specified and available.

Both livekit-agents[codecs, images]>=1.4.0.rc2 and openai[realtime]>=1.107.2 are available on PyPI. The constraint versions exist, and the >= operators allow newer versions as the ecosystem evolves.

livekit-plugins/livekit-plugins-nvidia/pyproject.toml (1)

6-19: Metadata and build configuration changes look good.

The license format update, keywords reordering, classifiers formatting, dynamic versioning, and wheel/sdist build targets are consistent with the repository-wide normalization pattern.

Also applies to: 24-24, 26-29, 35-42

livekit-plugins/livekit-plugins-azure/pyproject.toml (1)

6-19: Metadata, build configuration, and azure-cognitiveservices-speech dependency look good.

The formatting and structural changes align with the repository-wide normalization. The azure-cognitiveservices-speech>=1.43.0 constraint is valid.

Also applies to: 24-24, 26-42

livekit-plugins/livekit-plugins-speechify/pyproject.toml (1)

6-19: Metadata and build configuration changes look good.

Also applies to: 23-27, 32-39

livekit-plugins/livekit-plugins-sarvam/pyproject.toml (1)

6-30: Metadata, build configuration, and dynamic versioning look good.

The dynamic = ["version"] has been correctly added, addressing the previous review feedback. Keywords, classifiers, and build targets are properly configured.

Also applies to: 34-50

livekit-plugins/livekit-plugins-lmnt/pyproject.toml (1)

6-18: Metadata and build configuration changes look good.

The dynamic versioning, keywords, classifiers, and build targets are properly configured.

Also applies to: 22-26, 31-38

livekit-plugins/livekit-plugins-soniox/pyproject.toml (3)

32-37: LGTM — URLs and build-system block look consistent.


41-45: No action needed. Hatchling's sdist builder automatically includes files referenced in project metadata (readme and license fields) regardless of include patterns. Since this pyproject.toml defines readme = "README.md", the README will be included in the sdist as a guaranteed always-included file. The include = ["/livekit"] pattern works correctly for selecting the package directory without risk of excluding metadata files.

Likely an incorrect or invalid review comment.


6-27: Confirm intent to depend on pre‑release 1.4.0rc2.

Version 1.4.0rc2 is published on PyPI, but stable releases (1.3.12) are available. Pre-release dependencies should be intentional to avoid unexpected breaking changes for consumers.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = ["livekit-agents>=1.3.12"]
dependencies = ["livekit-agents>=1.4.0.rc2"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if livekit-agents 1.4.0rc2 exists on PyPI
echo "Checking PyPI for livekit-agents versions..."
curl -s https://pypi.org/pypi/livekit-agents/json | jq -r '.releases | keys[]' | grep -E '^1\.4\.0' || echo "No 1.4.0.x versions found"

echo ""
echo "Latest version:"
curl -s https://pypi.org/pypi/livekit-agents/json | jq -r '.info.version'

Repository: livekit/agents

Length of output: 144


Use canonical PEP 440 format for the version specifier.

Version 1.4.0.rc2 is available on PyPI. Change it to 1.4.0rc2 (remove the dot before rc) to follow the canonical PEP 440 format for consistency with standard Python versioning conventions.

🤖 Prompt for AI Agents
In `@livekit-plugins/livekit-plugins-hedra/pyproject.toml` at line 29, Update the
dependency version specifier in the pyproject.toml dependencies entry: replace
the non-canonical PEP 440 string "1.4.0.rc2" with the canonical "1.4.0rc2" in
the dependencies array (the dependencies = ["livekit-agents>=1.4.0.rc2"] line)
so the project uses the PEP 440-compliant version syntax.

Comment on lines +31 to +32
dependencies = ["livekit-agents>=1.4.0.rc2"]
dynamic = ["version"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

livekit-agents 1.4.0 rc2 prerelease version PyPI

💡 Result:

livekit-agents 1.4.0rc2 is published on PyPI as a pre-release, dated Jan 23, 2026. The latest stable (non-pre) release shown is 1.3.12 (Jan 21, 2026). [1]

Install the rc directly:

pip install "livekit-agents==1.4.0rc2"

Or, if you’re using a version range and want pip to consider pre-releases:

pip install --pre livekit-agents

Sources: [1]


Update prerelease version specifier to match PyPI canonical format.

At line 31, change livekit-agents>=1.4.0.rc2 to livekit-agents>=1.4.0rc2. The published version on PyPI uses the PEP 440 normalized format without the dot between version and prerelease identifier.

Diff
-dependencies = ["livekit-agents>=1.4.0.rc2"]
+dependencies = ["livekit-agents>=1.4.0rc2"]
🤖 Prompt for AI Agents
In `@livekit-plugins/livekit-plugins-lemonslice/pyproject.toml` around lines 31 -
32, The dependency specifier `livekit-agents>=1.4.0.rc2` in pyproject.toml is
using a non-canonical prerelease format; update the dependency string
`livekit-agents>=1.4.0.rc2` to the PEP 440 normalized form
`livekit-agents>=1.4.0rc2` so the package resolver matches the PyPI published
version.

Comment on lines 20 to 23
dependencies = [
"livekit-agents>=1.3.12",
"nvidia-riva-client",
"livekit-agents>=1.4.0.rc2",
"nvidia-riva-client",
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Dependency livekit-agents>=1.4.0.rc2 is not published on PyPI.

livekit-agents version 1.3.12 was uploaded on Jan 21, 2026, making it the latest available version. The constraint >=1.4.0.rc2 cannot be satisfied and will cause installation to fail. Update to livekit-agents>=1.3.12 or wait for the 1.4.0 release.

🛠️ Proposed fix
 dependencies = [
-  "livekit-agents>=1.4.0.rc2",
+  "livekit-agents>=1.3.12",
   "nvidia-riva-client",
 ]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
dependencies = [
"livekit-agents>=1.3.12",
"nvidia-riva-client",
"livekit-agents>=1.4.0.rc2",
"nvidia-riva-client",
]
dependencies = [
"livekit-agents>=1.3.12",
"nvidia-riva-client",
]
🤖 Prompt for AI Agents
In `@livekit-plugins/livekit-plugins-nvidia/pyproject.toml` around lines 20 - 23,
The dependency constraint for livekit-agents in pyproject.toml
("livekit-agents>=1.4.0.rc2") is not available on PyPI; update the dependency
line to use the latest published version (change "livekit-agents>=1.4.0.rc2" to
"livekit-agents>=1.3.12") so installations won't fail, leaving the other
dependency ("nvidia-riva-client") unchanged.

Comment on lines +18 to +19
dependencies = ["livekit-agents[codecs]>=1.4.0.rc2", "numpy>=1.26"]
dynamic = ["version"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

livekit-agents 1.4.0.rc2 PyPI release

💡 Result:

livekit-agents 1.4.0rc2 is not published on PyPI (it does not appear in the project’s Release history). As of Jan 23, 2026, PyPI shows the latest releases as 1.3.12 (released Jan 21, 2026) and the latest pre-release as 1.4.0rc1 (released Dec 23, 2025). (pypi.org)

Citations:


Fix the dependency version: 1.4.0.rc2 does not exist on PyPI.

livekit-agents>=1.4.0.rc2 references a non-existent version and will fail installation. PyPI shows the latest pre-release as 1.4.0rc1 (Dec 23, 2025) and latest stable as 1.3.12 (Jan 21, 2026). Correct the constraint to use an available version (likely >=1.4.0rc1).

🤖 Prompt for AI Agents
In `@livekit-plugins/livekit-plugins-smallestai/pyproject.toml` around lines 18 -
19, The dependency pin "livekit-agents[codecs]>=1.4.0.rc2" is invalid because
1.4.0.rc2 does not exist on PyPI; update the dependency string in pyproject.toml
to a published version (e.g. change "livekit-agents[codecs]>=1.4.0.rc2" to
"livekit-agents[codecs]>=1.4.0rc1" or to the latest stable
"livekit-agents[codecs]>=1.3.12") so installations succeed.

Comment on lines +20 to +21
dependencies = ["livekit-agents[codecs]>=1.4.0.rc2"]
dynamic = ["version"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Dependency livekit-agents[codecs]>=1.4.0.rc2 is not published on PyPI.

The latest available livekit-agents version on PyPI is 1.3.12 (uploaded Jan 21, 2026). The 1.4.0.rc2 pre-release does not exist and will cause installation failures.

🛠️ Proposed fix
-dependencies = ["livekit-agents[codecs]>=1.4.0.rc2"]
+dependencies = ["livekit-agents[codecs]>=1.3.12"]
🤖 Prompt for AI Agents
In `@livekit-plugins/livekit-plugins-speechify/pyproject.toml` around lines 20 -
21, The dependency declaration in pyproject.toml references a non-published
pre-release ("livekit-agents[codecs]>=1.4.0.rc2") which will break installs;
update the dependencies entry to a published version (for example
"livekit-agents[codecs]>=1.3.12") or to a valid released range, keeping the
dynamic = ["version"] line unchanged so packaging works; locate the dependencies
key in livekit-plugins-speechify's pyproject.toml and replace the version
specifier for livekit-agents[codecs] accordingly.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
livekit-agents/livekit/agents/inference/stt.py (1)

481-518: Fix InvalidStateError when calling .exception() on cancelled gather.

Calling tasks_group.exception() on a cancelled-but-unawaited gather raises asyncio.InvalidStateError, which isn't caught by the except asyncio.CancelledError block. This allows the exception to escape the finally block and break the stream. Instead, await the gather with return_exceptions=True to safely drain it.

Proposed fix
-                    tasks_group.cancel()
-                    try:
-                        tasks_group.exception()  # retrieve the exception
-                    except asyncio.CancelledError:
-                        pass
+                    tasks_group.cancel()
+                    await asyncio.gather(tasks_group, return_exceptions=True)
🤖 Fix all issues with AI agents
In `@livekit-agents/livekit/agents/inference/interruption.py`:
- Around line 450-451: The code currently reads the private attribute
self._resampler._input_rate to validate incoming frame sample rates; instead,
add a public instance variable (e.g., self._resampler_input_rate initialized in
__init__) and set it when you construct AudioResampler in push_frame (or the
equivalent method), then replace checks against self._resampler._input_rate with
comparisons to self._resampler_input_rate and raise the same ValueError if they
differ; also ensure the variable is cleared if the resampler is torn down.
- Around line 200-229: When base_url != DEFAULT_BASE_URL (i.e., use_proxy ==
False) the code currently leaves lk_api_key and lk_api_secret as empty strings
which later get used by create_access_token; enforce the same credential
validation for custom endpoints by checking lk_api_key and lk_api_secret after
they're set and raising a clear ValueError if either is missing (mentioning
api_key/api_secret must be provided when using a custom base_url), referencing
variables/functions lk_base_url, DEFAULT_BASE_URL, lk_api_key, lk_api_secret,
use_proxy, base_url, api_key, api_secret, and create_access_token to locate
where to add the check.

In `@livekit-agents/pyproject.toml`:
- Around line 24-106: The project lockfile (uv.lock) is out of sync with
pyproject.toml: new extras like the many livekit-plugins (e.g.,
livekit-plugins-openai>=1.4.0.rc2, livekit-plugins-anthropic>=1.4.0.rc2, etc.)
and updated constraints (openai>=1.99.2, opentelemetry-*~=1.39.0) were added to
pyproject.toml but not reflected in uv.lock; regenerate the lock by running the
uv tool (uv lock) to refresh uv.lock so it matches the dependencies declared in
pyproject.toml (ensure the optional-dependencies entries such as the
livekit-plugins-* groups and core entries are present in the regenerated
lockfile).
- Around line 6-21: The package classifiers in pyproject.toml declare support
for "Programming Language :: Python :: 3.10" and "Programming Language :: Python
:: 3.11" but the CI type-check matrix does not include those interpreters;
either add 3.10 and 3.11 to the CI type-check matrix (the workflow job that runs
type-checks/ruff) so those versions are exercised, or remove the "Programming
Language :: Python :: 3.10" and "Programming Language :: Python :: 3.11" entries
from the classifiers array in pyproject.toml to reflect current test coverage;
update the relevant CI workflow (type-check matrix) or the classifiers array
accordingly so declared classifiers match actual tested Python versions.

In `@livekit-plugins/livekit-plugins-asyncai/pyproject.toml`:
- Around line 6-21: In pyproject.toml update the dependencies entry to (1) pin
or bound aiohttp (e.g., add a sensible range like "aiohttp>=3.8,<4" instead of
leaving it unbounded) and (2) relax the livekit-agents constraint to allow the
latest stable series (for example change "livekit-agents>=1.4.0.rc2" to a stable
range such as "livekit-agents>=1.3.6,<2" or "~=1.3.12"); if the prerelease
1.4.0rc2 is actually required, add an explicit inline comment next to the
"livekit-agents" dependency explaining why the pre-release is needed and
coordinate other plugins to match. Ensure you edit the dependencies array (the
"dependencies" key) and update the exact strings "aiohttp" and
"livekit-agents>=1.4.0.rc2".

In `@livekit-plugins/livekit-plugins-tavus/pyproject.toml`:
- Around line 20-21: Update the dependency declaration in pyproject.toml to
avoid pinning a pre-release: replace the dependencies entry currently specifying
"livekit-agents>=1.4.0.rc2" with a stable constraint such as
"livekit-agents>=1.3.12" (or, if you truly require the rc, add a
comment/documentation explaining why the pre-release is needed); edit the
dependencies = ["livekit-agents>=1.4.0.rc2"] line accordingly so the package
resolves to the latest stable release instead of an rc.
♻️ Duplicate comments (25)
livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/version.py (1)

15-15: Add a type annotation for __version__ (mypy strict).

This still lacks a module-level type annotation required by strict mypy.

🔧 Suggested change
-__version__ = "1.4.0.rc2"
+__version__: str = "1.4.0.rc2"
livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/version.py (1)

15-15: Use PEP 440 canonical form for release candidate version.

The version 1.4.0.rc2 should be 1.4.0rc2 per PEP 440. The canonical form for release candidates is X.YrcN without a dot before rc.

Suggested fix
-__version__ = "1.4.0.rc2"
+__version__ = "1.4.0rc2"
livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py (1)

15-15: PEP 440 release candidate format issue persists.

The version string 1.4.0.rc2 still uses a dot before "rc", which violates PEP 440 specification. The correct format is 1.4.0rc2 (no dot separator).

🔧 Suggested fix
-__version__ = "1.4.0.rc2"
+__version__ = "1.4.0rc2"
livekit-plugins/livekit-plugins-baseten/pyproject.toml (1)

20-24: Pre-release version constraint will break standard pip installs.

The dependency livekit-agents>=1.4.0.rc2 requires a pre-release, but pip does not install pre-releases by default. Users running pip install livekit-plugins-baseten will get version resolution errors since the current stable release is below this threshold and pip rejects pre-releases without the --pre flag.

This constraint should use a stable version once 1.4.0 is released, or this package should only be published alongside the stable 1.4.0 release of livekit-agents.

,

livekit-plugins/livekit-plugins-assemblyai/pyproject.toml (1)

20-21: Confirm prerelease minimum is intentional.

This still sets a prerelease (rc2) as the minimum. If the RC is required, consider tightening the range (e.g., >=1.4.0rc2,<1.5.0) and adding a short comment explaining why; otherwise prefer the latest stable once available.

Check PyPI for the latest stable livekit-agents release and whether 1.4.0rc2 is still the intended minimum dependency for plugins.
livekit-plugins/livekit-plugins-liveavatar/pyproject.toml (1)

31-31: Non-canonical PEP 440 pre-release version format.

The version specifier >=1.4.0.rc2 uses a dot before rc, which is non-canonical per PEP 440. The canonical form is 1.4.0rc2 (without the dot). While pip may normalize this, using the canonical form ensures consistent behavior across tools.

-dependencies = ["livekit-agents>=1.4.0.rc2"]
+dependencies = ["livekit-agents>=1.4.0rc2"]

,

livekit-plugins/livekit-plugins-speechify/pyproject.toml (1)

20-21: Pre-release dependency issue already flagged.

The livekit-agents[codecs]>=1.4.0.rc2 dependency references a pre-release version that may not be available on PyPI. This concern was raised in a previous review.

livekit-plugins/livekit-plugins-cartesia/pyproject.toml (1)

20-21: Pre-release dependency livekit-agents>=1.4.0.rc2 may not exist on PyPI.

This is the same concern raised in the previous review for rc1. The dependency has been updated to rc2, but the underlying issue remains: if 1.4.0.rc2 is not yet published to PyPI, installation will fail. Ensure this plugin is released in coordination with livekit-agents 1.4.0.rc2, or update to an existing version for independent testing.

The dynamic = ["version"] addition for hatch-based versioning is correct.

#!/bin/bash
# Check if livekit-agents 1.4.0.rc2 exists on PyPI
curl -s https://pypi.org/pypi/livekit-agents/json | jq -r '.releases | keys[]' | grep -E "1\.4\.0" || echo "No 1.4.0 releases found"
echo "---"
echo "Latest version:"
curl -s https://pypi.org/pypi/livekit-agents/json | jq -r '.info.version'
livekit-plugins/livekit-plugins-lemonslice/pyproject.toml (1)

31-31: Use canonical PEP 440 prerelease format on Line 31.

1.4.0.rc2 should be normalized to 1.4.0rc2 to match PyPI’s canonical prerelease format and avoid resolver mismatches.

✅ Proposed fix
-dependencies = ["livekit-agents>=1.4.0.rc2"]
+dependencies = ["livekit-agents>=1.4.0rc2"]
What is the canonical PyPI version string for the livekit-agents 1.4.0 rc2 prerelease (PEP 440 format)?
livekit-plugins/livekit-plugins-xai/pyproject.toml (1)

31-31: Confirm 1.4.0rc2 is published and correctly spelled before release.

If 1.4.0rc2 isn’t on your package index, installs will fail because this constraint excludes all 1.3.x. Also confirm the exact pre-release tag used by the publisher (e.g., 1.4.0rc2 vs 1.4.0.rc2) and align the requirement accordingly.

Is "livekit-agents" version 1.4.0rc2 published on PyPI (or the intended package index), and what is the latest available version? Please confirm the exact version string used by the published artifact.
livekit-plugins/livekit-plugins-lmnt/pyproject.toml (2)

19-20: Pre-release dependency may cause installation failures for end users.

The dependency livekit-agents>=1.4.0.rc2 references a release candidate that may not be available on PyPI. If this plugin is intended for public consumption before the 1.4.0 stable release, users will encounter dependency resolution failures.

If this is intentional for coordinated pre-release testing, consider documenting the installation requirements (e.g., pip install --pre).

#!/bin/bash
# Check if livekit-agents 1.4.0.rc2 is available on PyPI
curl -s "https://pypi.org/pypi/livekit-agents/json" | jq -r '.releases | keys[]' | grep -E "1\.4\.0" || echo "No 1.4.0 versions found on PyPI"

27-29: Pin hatchling to a minimum version for path-based versioning compatibility.

The build system uses hatchling without a version constraint, but the project relies on path-based versioning ([tool.hatch.version] with path). Older hatchling versions may not support this feature reliably.

🔧 Suggested fix
 [build-system]
-requires = ["hatchling"]
+requires = ["hatchling>=1.4.1"]
 build-backend = "hatchling.build"
livekit-plugins/livekit-plugins-ultravox/pyproject.toml (1)

20-20: Dependency version 1.4.0.rc2 does not exist on PyPI.

The latest available version of livekit-agents on PyPI is 1.3.12. The pre-release version 1.4.0.rc2 specified in this constraint has not been published, which will cause installation failures.

If this PR is intended to be merged before the 1.4.0 release is published, consider temporarily using >=1.3.12 or coordinate the release timing.

,

livekit-plugins/livekit-plugins-mistralai/pyproject.toml (1)

20-22: Confirm the pre-release dependency is published and intended.

livekit-agents>=1.4.0.rc2 will allow installing a pre-release. If rc2 isn’t published (or pre-release use isn’t intended), installs can fail or unexpectedly pull RC builds. Please verify the availability and intent for both dependencies.

Does PyPI list livekit-agents 1.4.0rc2 and mistralai 1.9.11? Is livekit-agents 1.4.0rc2 intended for production use?
livekit-plugins/livekit-plugins-fal/pyproject.toml (1)

20-20: Consider adding version bounds to fal_client to prevent unexpected breakage.

The fal_client dependency is unconstrained. The latest version is 0.11.0, released January 5, 2026. Without an upper bound (e.g., fal_client>=0.11.0,<1.0), a major version release with breaking changes could cause runtime failures.

The livekit-agents>=1.4.0.rc2 pre-release constraint appears intentional for this monorepo's coordinated release cycle.

🔧 Suggested change
-dependencies = ["fal_client", "livekit-agents>=1.4.0.rc2"]
+dependencies = ["fal_client>=0.11.0,<1.0", "livekit-agents>=1.4.0.rc2"]

,

livekit-plugins/livekit-plugins-minimax/pyproject.toml (1)

20-22: Verify livekit-agents 1.4.0.rc2 is actually published on PyPI (and installable).
If the pre-release isn’t available, installs will fail; this mirrors an earlier issue with rc1. Please confirm the release exists and is fetchable for your packaging toolchain. Line 21.

#!/bin/bash
# Check whether 1.4.0rc2 exists on PyPI for livekit-agents
python - <<'PY'
import json, urllib.request
pkg = "livekit-agents"
ver = "1.4.0rc2"
data = json.load(urllib.request.urlopen(f"https://pypi.org/pypi/{pkg}/json"))
print("Latest:", data["info"]["version"])
print("Has 1.4.0rc2:", ver in data["releases"])
if ver in data["releases"]:
    print("Files:", [f["filename"] for f in data["releases"][ver]])
PY
livekit-plugins/livekit-plugins-gladia/pyproject.toml (1)

29-33: Pre-release dependency on livekit-agents[codecs]>=1.4.0.rc2.

The previous review flagged rc1; this is now rc2 but remains a pre-release that may not yet exist on PyPI. Given this is a monorepo and the PR targets v1.4.0 features, this is likely intentional for coordinated release. Ensure rc2 is published to PyPI before or alongside this plugin release.

livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/version.py (1)

15-15: Use canonical PEP 440 pre-release format.
This avoids normalization surprises and keeps version strings consistent (1.4.0rc2 rather than 1.4.0.rc2).

♻️ Proposed change
-__version__ = "1.4.0.rc2"
+__version__ = "1.4.0rc2"
PEP 440 canonical pre-release format rc (e.g., 1.4.0rc2 vs 1.4.0.rc2)
livekit-plugins/livekit-plugins-bithuman/pyproject.toml (1)

19-19: Please verify livekit-agents 1.4.0rc2 is published on PyPI.
If it isn’t available yet, this constraint will fail resolution.

livekit-agents 1.4.0rc2 PyPI
livekit-plugins/livekit-plugins-azure/pyproject.toml (1)

21-22: Please verify livekit-agents 1.4.0rc2 is published on PyPI.
If it isn’t available yet, this constraint will fail resolution.

livekit-agents 1.4.0rc2 PyPI
livekit-plugins/livekit-plugins-sarvam/pyproject.toml (1)

31-31: Please verify livekit-agents 1.4.0rc2 (with extras) is published on PyPI.
If it isn’t available yet, this constraint will fail resolution.

livekit-agents 1.4.0rc2 PyPI
livekit-plugins/livekit-plugins-nltk/pyproject.toml (1)

19-19: Verify the livekit-agents pre-release exists on PyPI (Line 19).

If 1.4.0.rc2 isn’t published, dependency resolution will fail for end users. Please confirm the version exists or pin to a published version before release.

#!/bin/bash
# Check whether livekit-agents 1.4.0.rc2 is published on PyPI
python3 - <<'PY'
import json, urllib.request, sys
url = "https://pypi.org/pypi/livekit-agents/json"
data = json.loads(urllib.request.urlopen(url, timeout=10).read().decode())
version = "1.4.0.rc2"
if version in data.get("releases", {}):
    print(f"OK: {version} is published on PyPI.")
else:
    print(f"NOT FOUND: {version} is not on PyPI.")
    print(f"Latest version on PyPI: {data['info']['version']}")
PY
livekit-plugins/livekit-plugins-resemble/pyproject.toml (1)

21-23: Prefer a stable livekit-agents version unless RC is required.
livekit-agents>=1.4.0.rc2 (Line 21) excludes all 1.3.x releases, so installs will require a pre-release until 1.4.0 final ships. If RC is required, please document/gate that expectation; otherwise, consider a stable range.

🔧 Suggested change (replace version with latest stable)
-  "livekit-agents>=1.4.0.rc2",
+  "livekit-agents>=1.3.11,<1.4.0",
What is the latest stable (non‑pre‑release) version of livekit-agents on PyPI, and has 1.4.0 final been released?
livekit-agents/livekit/agents/voice/agent_activity.py (1)

387-391: Active interruption flag not synced when turn_detection changes.

When update_options() changes turn_detection, only _default_interruption_by_audio_activity_enabled is updated, but _interruption_by_audio_activity_enabled remains unchanged. If the mode switches to "manual" or "realtime_llm" outside of an active speech cycle, audio-activity-based interruptions may remain enabled until the next _restore_interruption_by_audio_activity() call.

Consider syncing the active flag when it matches the old default:

Suggested fix
             self._turn_detection = turn_detection
+            old_default = self._default_interruption_by_audio_activity_enabled
             self._default_interruption_by_audio_activity_enabled = self._turn_detection not in (
                 "manual",
                 "realtime_llm",
             )
+            # Sync active flag if it was at the previous default
+            if self._interruption_by_audio_activity_enabled == old_default:
+                self._interruption_by_audio_activity_enabled = (
+                    self._default_interruption_by_audio_activity_enabled
+                )
livekit-plugins/livekit-plugins-aws/pyproject.toml (1)

19-26: Add the Python 3.11 classifier entry.

The classifiers still omit Python 3.11 even though requires-python = ">=3.9.0" includes it.

✅ Proposed fix
   "Programming Language :: Python :: 3.10",
+  "Programming Language :: Python :: 3.11",
   "Programming Language :: Python :: 3.12",
🧹 Nitpick comments (9)
livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/version.py (1)

15-15: Consider using PEP 440 canonical version format.

The version string "1.4.0.rc2" uses a dot before rc, which is non-canonical per PEP 440. The normalized form is "1.4.0rc2" (no dot before the pre-release segment). While packaging tools will normalize this, using the canonical form avoids potential inconsistencies in version comparisons.

Suggested fix
-__version__ = "1.4.0.rc2"
+__version__ = "1.4.0rc2"
livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/version.py (1)

15-15: Consider using PEP 440 canonical format for release candidate.

The canonical PEP 440 format for release candidates is 1.4.0rc2 (no dot before rc). While packaging tools may normalize 1.4.0.rc2, using the canonical form ensures consistent version ordering and comparison.

Suggested change
-__version__ = "1.4.0.rc2"
+__version__ = "1.4.0rc2"
livekit-plugins/livekit-plugins-nvidia/pyproject.toml (1)

20-23: Consider pinning nvidia-riva-client version for reproducibility.

The nvidia-riva-client dependency is unpinned, which may cause installation inconsistencies across environments if a breaking change is released. Consider adding a minimum version constraint (e.g., nvidia-riva-client>=X.Y.Z) to ensure predictable behavior.

livekit-plugins/livekit-plugins-anam/pyproject.toml (1)

20-20: Pre-release dependency version format.

The version constraint >=1.4.0.rc2 is valid, though PEP 440 normalizes 1.4.0.rc2 to 1.4.0rc2 (without the dot before rc). This is acceptable and will work correctly with pip, but for consistency you may want to use the canonical form >=1.4.0rc2.

Given this is part of a coordinated RC2 release cycle across the monorepo, this is a minor consideration.

livekit-plugins/livekit-plugins-gladia/pyproject.toml (1)

18-28: Consider adding Python 3.11+ classifiers for completeness.

The requires-python = ">=3.9.0" constraint allows Python 3.11, 3.12, and 3.13, but classifiers only list 3.9 and 3.10. Adding the missing version classifiers improves discoverability on PyPI.

♻️ Suggested classifiers
   "Programming Language :: Python :: 3.9",
   "Programming Language :: Python :: 3.10",
+  "Programming Language :: Python :: 3.11",
+  "Programming Language :: Python :: 3.12",
+  "Programming Language :: Python :: 3.13",
livekit-agents/livekit/agents/voice/turn.py (1)

195-205: Properties recreate config objects on each access.

The interruption_cfg and endpointing_cfg properties create new config objects from dicts on every call. While model_post_init normalizes these once at construction, if someone passes a dict directly and then accesses these properties multiple times, they'll get different object instances.

This is a minor inefficiency that likely won't matter in practice, but worth noting if these properties are called frequently.

Optional: Cache normalized configs in model_post_init

The current model_post_init already normalizes dicts to config objects, so these property checks for isinstance(..., dict) should never be true after construction. You could simplify the properties:

     `@property`
     def interruption_cfg(self) -> InterruptionConfig:
-        if isinstance(self.interruption, dict):
-            return InterruptionConfig(**self.interruption)
-        return self.interruption
+        return self.interruption  # type: ignore[return-value]

     `@property`
     def endpointing_cfg(self) -> EndpointingConfig:
-        if isinstance(self.endpointing, dict):
-            return EndpointingConfig(**self.endpointing)
-        return self.endpointing
+        return self.endpointing  # type: ignore[return-value]

The # type: ignore is needed because the field type includes the dict variant, but after model_post_init it's always the config class.

livekit-agents/livekit/agents/voice/audio_recognition.py (1)

240-261: Avoid setting is_interruption=false when span attributes are inaccessible.

The ReadableSpan check at line 251 verifies attribute access, but if the span is a regular Span (line 257-258), set_attribute is called unconditionally. This could overwrite a previously-set true value if another code path set it after the initial check.

Consider consolidating the logic:

💡 Suggested improvement
     def on_end_of_overlap_speech(self, user_speaking_span: trace.Span | None = None) -> None:
         """End interruption inference when agent is speaking and overlap speech ends."""
         if (
             not self._interruption_enabled
             or not self._interruption_ch
             or self._interruption_ch.closed
         ):
             return
 
-        # Only set is_interruption=false if not already set (avoid overwriting true from interruption detection)
-        if user_speaking_span and user_speaking_span.is_recording():
-            if isinstance(user_speaking_span, ReadableSpan):
-                if (
-                    user_speaking_span.attributes
-                    and user_speaking_span.attributes.get(trace_types.ATTR_IS_INTERRUPTION) is None
-                ):
-                    user_speaking_span.set_attribute(trace_types.ATTR_IS_INTERRUPTION, "false")
-            else:
-                user_speaking_span.set_attribute(trace_types.ATTR_IS_INTERRUPTION, "false")
+        # Only set is_interruption=false if not already set
+        if user_speaking_span and user_speaking_span.is_recording():
+            should_set = True
+            if isinstance(user_speaking_span, ReadableSpan) and user_speaking_span.attributes:
+                should_set = user_speaking_span.attributes.get(trace_types.ATTR_IS_INTERRUPTION) is None
+            if should_set:
+                user_speaking_span.set_attribute(trace_types.ATTR_IS_INTERRUPTION, "false")
 
         self._interruption_ch.send_nowait(InterruptionStreamBase._OverlapSpeechEndedSentinel())
livekit-agents/livekit/agents/voice/agent_activity.py (1)

2872-2912: Consider consolidating detector instantiation.

The AdaptiveInterruptionDetector() is instantiated identically in three separate branches (lines 2896, 2900, 2902). This can be simplified:

Suggested refactor
         if is_given(self._agent.interruption_detection):
             if self._agent.interruption_detection in {False, "vad"}:
                 return None
-            detector = inference.AdaptiveInterruptionDetector()
         elif is_given(self._session.interruption_detection):
             if self._session.interruption_detection in {False, "vad"}:
                 return None
-            detector = inference.AdaptiveInterruptionDetector()
-        else:
-            detector = inference.AdaptiveInterruptionDetector()
+
+        detector = inference.AdaptiveInterruptionDetector()

         detector.on(
             "user_interruption_detected",
livekit-plugins/livekit-plugins-rime/pyproject.toml (1)

36-37: Remove the leading slash from the Hatch sdist include pattern.

In Hatch, the leading "/" anchors the pattern to the project root (Git-style glob semantics). While "/livekit" will match the root-level livekit/ directory, the leading slash is unnecessary. Since patterns already target the project root by default, removing it improves clarity without changing behavior.

♻️ Proposed change
 [tool.hatch.build.targets.sdist]
-include = ["/livekit"]
+include = ["livekit"]
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e89c7b and 5e8c192.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (123)
  • examples/voice_agents/basic_agent.py
  • livekit-agents/livekit/agents/inference/__init__.py
  • livekit-agents/livekit/agents/inference/interruption.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-agents/livekit/agents/log.py
  • livekit-agents/livekit/agents/telemetry/trace_types.py
  • livekit-agents/livekit/agents/telemetry/traces.py
  • livekit-agents/livekit/agents/types.py
  • livekit-agents/livekit/agents/utils/deprecation.py
  • livekit-agents/livekit/agents/vad.py
  • livekit-agents/livekit/agents/version.py
  • livekit-agents/livekit/agents/voice/agent.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/voice/events.py
  • livekit-agents/livekit/agents/voice/turn.py
  • livekit-agents/pyproject.toml
  • livekit-plugins/livekit-plugins-anam/livekit/plugins/anam/version.py
  • livekit-plugins/livekit-plugins-anam/pyproject.toml
  • livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic/version.py
  • livekit-plugins/livekit-plugins-anthropic/pyproject.toml
  • livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/version.py
  • livekit-plugins/livekit-plugins-assemblyai/pyproject.toml
  • livekit-plugins/livekit-plugins-asyncai/livekit/plugins/asyncai/version.py
  • livekit-plugins/livekit-plugins-asyncai/pyproject.toml
  • livekit-plugins/livekit-plugins-avatartalk/livekit/plugins/avatartalk/version.py
  • livekit-plugins/livekit-plugins-avatartalk/pyproject.toml
  • livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/version.py
  • livekit-plugins/livekit-plugins-aws/pyproject.toml
  • livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/version.py
  • livekit-plugins/livekit-plugins-azure/pyproject.toml
  • livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/version.py
  • livekit-plugins/livekit-plugins-baseten/pyproject.toml
  • livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/version.py
  • livekit-plugins/livekit-plugins-bey/pyproject.toml
  • livekit-plugins/livekit-plugins-bithuman/livekit/plugins/bithuman/version.py
  • livekit-plugins/livekit-plugins-bithuman/pyproject.toml
  • livekit-plugins/livekit-plugins-browser/livekit/plugins/browser/version.py
  • livekit-plugins/livekit-plugins-cartesia/livekit/plugins/cartesia/version.py
  • livekit-plugins/livekit-plugins-cartesia/pyproject.toml
  • livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/version.py
  • livekit-plugins/livekit-plugins-clova/pyproject.toml
  • livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/version.py
  • livekit-plugins/livekit-plugins-deepgram/pyproject.toml
  • livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/version.py
  • livekit-plugins/livekit-plugins-elevenlabs/pyproject.toml
  • livekit-plugins/livekit-plugins-fal/livekit/plugins/fal/version.py
  • livekit-plugins/livekit-plugins-fal/pyproject.toml
  • livekit-plugins/livekit-plugins-fireworksai/livekit/plugins/fireworksai/version.py
  • livekit-plugins/livekit-plugins-fireworksai/pyproject.toml
  • livekit-plugins/livekit-plugins-fishaudio/livekit/plugins/fishaudio/version.py
  • livekit-plugins/livekit-plugins-fishaudio/pyproject.toml
  • livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/version.py
  • livekit-plugins/livekit-plugins-gladia/pyproject.toml
  • livekit-plugins/livekit-plugins-google/livekit/plugins/google/version.py
  • livekit-plugins/livekit-plugins-google/pyproject.toml
  • livekit-plugins/livekit-plugins-gradium/livekit/plugins/gradium/version.py
  • livekit-plugins/livekit-plugins-gradium/pyproject.toml
  • livekit-plugins/livekit-plugins-groq/livekit/plugins/groq/version.py
  • livekit-plugins/livekit-plugins-groq/pyproject.toml
  • livekit-plugins/livekit-plugins-hedra/livekit/plugins/hedra/version.py
  • livekit-plugins/livekit-plugins-hedra/pyproject.toml
  • livekit-plugins/livekit-plugins-hume/livekit/plugins/hume/version.py
  • livekit-plugins/livekit-plugins-hume/pyproject.toml
  • livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/version.py
  • livekit-plugins/livekit-plugins-inworld/pyproject.toml
  • livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/version.py
  • livekit-plugins/livekit-plugins-langchain/pyproject.toml
  • livekit-plugins/livekit-plugins-lemonslice/livekit/plugins/lemonslice/version.py
  • livekit-plugins/livekit-plugins-lemonslice/pyproject.toml
  • livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/version.py
  • livekit-plugins/livekit-plugins-liveavatar/pyproject.toml
  • livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py
  • livekit-plugins/livekit-plugins-lmnt/pyproject.toml
  • livekit-plugins/livekit-plugins-minimal/livekit/plugins/minimal/version.py
  • livekit-plugins/livekit-plugins-minimal/pyproject.toml
  • livekit-plugins/livekit-plugins-minimax/livekit/plugins/minimax/version.py
  • livekit-plugins/livekit-plugins-minimax/pyproject.toml
  • livekit-plugins/livekit-plugins-mistralai/livekit/plugins/mistralai/version.py
  • livekit-plugins/livekit-plugins-mistralai/pyproject.toml
  • livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/version.py
  • livekit-plugins/livekit-plugins-neuphonic/pyproject.toml
  • livekit-plugins/livekit-plugins-nltk/livekit/plugins/nltk/version.py
  • livekit-plugins/livekit-plugins-nltk/pyproject.toml
  • livekit-plugins/livekit-plugins-nvidia/livekit/plugins/nvidia/version.py
  • livekit-plugins/livekit-plugins-nvidia/pyproject.toml
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py
  • livekit-plugins/livekit-plugins-openai/pyproject.toml
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/version.py
  • livekit-plugins/livekit-plugins-resemble/pyproject.toml
  • livekit-plugins/livekit-plugins-rime/livekit/plugins/rime/version.py
  • livekit-plugins/livekit-plugins-rime/pyproject.toml
  • livekit-plugins/livekit-plugins-rtzr/livekit/plugins/rtzr/version.py
  • livekit-plugins/livekit-plugins-rtzr/pyproject.toml
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/version.py
  • livekit-plugins/livekit-plugins-sarvam/pyproject.toml
  • livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/version.py
  • livekit-plugins/livekit-plugins-silero/pyproject.toml
  • livekit-plugins/livekit-plugins-simli/livekit/plugins/simli/version.py
  • livekit-plugins/livekit-plugins-simli/pyproject.toml
  • livekit-plugins/livekit-plugins-simplismart/livekit/plugins/simplismart/version.py
  • livekit-plugins/livekit-plugins-simplismart/pyproject.toml
  • livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallestai/version.py
  • livekit-plugins/livekit-plugins-smallestai/pyproject.toml
  • livekit-plugins/livekit-plugins-soniox/livekit/plugins/soniox/version.py
  • livekit-plugins/livekit-plugins-soniox/pyproject.toml
  • livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/version.py
  • livekit-plugins/livekit-plugins-speechify/pyproject.toml
  • livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/version.py
  • livekit-plugins/livekit-plugins-speechmatics/pyproject.toml
  • livekit-plugins/livekit-plugins-spitch/livekit/plugins/spitch/version.py
  • livekit-plugins/livekit-plugins-spitch/pyproject.toml
  • livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/version.py
  • livekit-plugins/livekit-plugins-tavus/pyproject.toml
  • livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/version.py
  • livekit-plugins/livekit-plugins-turn-detector/pyproject.toml
  • livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/version.py
  • livekit-plugins/livekit-plugins-ultravox/pyproject.toml
  • livekit-plugins/livekit-plugins-upliftai/livekit/plugins/upliftai/version.py
  • livekit-plugins/livekit-plugins-upliftai/pyproject.toml
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/version.py
  • livekit-plugins/livekit-plugins-xai/pyproject.toml
✅ Files skipped from review due to trivial changes (1)
  • livekit-plugins/livekit-plugins-fal/livekit/plugins/fal/version.py
🚧 Files skipped from review as they are similar to previous changes (51)
  • livekit-plugins/livekit-plugins-anam/livekit/plugins/anam/version.py
  • livekit-plugins/livekit-plugins-langchain/livekit/plugins/langchain/version.py
  • livekit-plugins/livekit-plugins-hedra/pyproject.toml
  • livekit-plugins/livekit-plugins-bey/livekit/plugins/bey/version.py
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/version.py
  • livekit-plugins/livekit-plugins-simplismart/pyproject.toml
  • livekit-plugins/livekit-plugins-silero/pyproject.toml
  • livekit-agents/livekit/agents/version.py
  • livekit-plugins/livekit-plugins-soniox/livekit/plugins/soniox/version.py
  • livekit-plugins/livekit-plugins-liveavatar/livekit/plugins/liveavatar/version.py
  • livekit-plugins/livekit-plugins-simplismart/livekit/plugins/simplismart/version.py
  • livekit-plugins/livekit-plugins-spitch/livekit/plugins/spitch/version.py
  • livekit-plugins/livekit-plugins-groq/pyproject.toml
  • livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/version.py
  • livekit-plugins/livekit-plugins-minimal/pyproject.toml
  • livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic/version.py
  • livekit-plugins/livekit-plugins-asyncai/livekit/plugins/asyncai/version.py
  • livekit-plugins/livekit-plugins-fishaudio/livekit/plugins/fishaudio/version.py
  • livekit-plugins/livekit-plugins-langchain/pyproject.toml
  • livekit-plugins/livekit-plugins-fishaudio/pyproject.toml
  • livekit-plugins/livekit-plugins-rtzr/livekit/plugins/rtzr/version.py
  • livekit-plugins/livekit-plugins-mistralai/livekit/plugins/mistralai/version.py
  • livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/version.py
  • livekit-agents/livekit/agents/voice/events.py
  • livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallestai/version.py
  • livekit-plugins/livekit-plugins-minimal/livekit/plugins/minimal/version.py
  • livekit-plugins/livekit-plugins-turn-detector/pyproject.toml
  • livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/version.py
  • livekit-plugins/livekit-plugins-simli/pyproject.toml
  • livekit-agents/livekit/agents/vad.py
  • livekit-plugins/livekit-plugins-clova/pyproject.toml
  • livekit-plugins/livekit-plugins-lemonslice/livekit/plugins/lemonslice/version.py
  • livekit-plugins/livekit-plugins-hume/livekit/plugins/hume/version.py
  • livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/version.py
  • livekit-plugins/livekit-plugins-elevenlabs/pyproject.toml
  • livekit-plugins/livekit-plugins-gradium/pyproject.toml
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/version.py
  • livekit-plugins/livekit-plugins-rtzr/pyproject.toml
  • livekit-plugins/livekit-plugins-browser/livekit/plugins/browser/version.py
  • livekit-plugins/livekit-plugins-upliftai/livekit/plugins/upliftai/version.py
  • livekit-plugins/livekit-plugins-fireworksai/livekit/plugins/fireworksai/version.py
  • livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/version.py
  • livekit-plugins/livekit-plugins-google/pyproject.toml
  • livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/version.py
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/version.py
  • livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/version.py
  • livekit-plugins/livekit-plugins-hume/pyproject.toml
  • livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/version.py
  • livekit-plugins/livekit-plugins-google/livekit/plugins/google/version.py
  • livekit-plugins/livekit-plugins-bey/pyproject.toml
  • livekit-plugins/livekit-plugins-spitch/pyproject.toml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Format code with ruff
Run ruff linter and auto-fix issues
Run mypy type checker in strict mode
Maintain line length of 100 characters maximum
Ensure Python 3.9+ compatibility
Use Google-style docstrings

Files:

  • livekit-plugins/livekit-plugins-speechify/livekit/plugins/speechify/version.py
  • livekit-agents/livekit/agents/telemetry/traces.py
  • livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/version.py
  • livekit-plugins/livekit-plugins-gradium/livekit/plugins/gradium/version.py
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/version.py
  • livekit-plugins/livekit-plugins-groq/livekit/plugins/groq/version.py
  • livekit-agents/livekit/agents/utils/deprecation.py
  • livekit-plugins/livekit-plugins-nvidia/livekit/plugins/nvidia/version.py
  • livekit-plugins/livekit-plugins-avatartalk/livekit/plugins/avatartalk/version.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-plugins/livekit-plugins-hedra/livekit/plugins/hedra/version.py
  • livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/version.py
  • livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/version.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-plugins/livekit-plugins-baseten/livekit/plugins/baseten/version.py
  • livekit-plugins/livekit-plugins-bithuman/livekit/plugins/bithuman/version.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-plugins/livekit-plugins-rime/livekit/plugins/rime/version.py
  • livekit-agents/livekit/agents/inference/__init__.py
  • livekit-plugins/livekit-plugins-simli/livekit/plugins/simli/version.py
  • livekit-plugins/livekit-plugins-cartesia/livekit/plugins/cartesia/version.py
  • livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/version.py
  • livekit-agents/livekit/agents/inference/interruption.py
  • livekit-agents/livekit/agents/voice/agent.py
  • livekit-agents/livekit/agents/telemetry/trace_types.py
  • livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/version.py
  • livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/version.py
  • livekit-plugins/livekit-plugins-nltk/livekit/plugins/nltk/version.py
  • examples/voice_agents/basic_agent.py
  • livekit-agents/livekit/agents/types.py
  • livekit-plugins/livekit-plugins-minimax/livekit/plugins/minimax/version.py
  • livekit-agents/livekit/agents/voice/turn.py
  • livekit-plugins/livekit-plugins-lmnt/livekit/plugins/lmnt/version.py
  • livekit-agents/livekit/agents/log.py
🧠 Learnings (4)
📚 Learning: 2026-01-22T03:28:16.289Z
Learnt from: longcw
Repo: livekit/agents PR: 4563
File: livekit-agents/livekit/agents/beta/tools/end_call.py:65-65
Timestamp: 2026-01-22T03:28:16.289Z
Learning: In code paths that check capabilities or behavior of the LLM processing the current interaction, prefer using the activity's LLM obtained via ctx.session.current_agent._get_activity_or_raise().llm instead of ctx.session.llm. The session-level LLM may be a fallback and not reflect the actual agent handling the interaction. Use the activity LLM to determine capabilities and to make capability checks or feature toggles relevant to the current processing agent.

Applied to files:

  • livekit-agents/livekit/agents/telemetry/traces.py
  • livekit-agents/livekit/agents/utils/deprecation.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-agents/livekit/agents/inference/__init__.py
  • livekit-agents/livekit/agents/inference/interruption.py
  • livekit-agents/livekit/agents/voice/agent.py
  • livekit-agents/livekit/agents/telemetry/trace_types.py
  • livekit-agents/livekit/agents/types.py
  • livekit-agents/livekit/agents/voice/turn.py
  • livekit-agents/livekit/agents/log.py
📚 Learning: 2026-01-16T07:44:56.353Z
Learnt from: CR
Repo: livekit/agents PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T07:44:56.353Z
Learning: Implement Model Interface Pattern for STT, TTS, LLM, and Realtime models with provider-agnostic interfaces, fallback adapters for resilience, and stream adapters for different streaming patterns

Applied to files:

  • livekit-agents/livekit/agents/inference/__init__.py
📚 Learning: 2026-01-16T07:44:56.353Z
Learnt from: CR
Repo: livekit/agents PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T07:44:56.353Z
Learning: Applies to **/*.py : Ensure Python 3.9+ compatibility

Applied to files:

  • livekit-plugins/livekit-plugins-gladia/pyproject.toml
  • livekit-plugins/livekit-plugins-aws/pyproject.toml
📚 Learning: 2026-01-22T03:28:24.967Z
Learnt from: longcw
Repo: livekit/agents PR: 4563
File: livekit-agents/livekit/agents/beta/tools/end_call.py:65-65
Timestamp: 2026-01-22T03:28:24.967Z
Learning: In the livekit-agents voice framework, `ctx.session.llm` returns the session-level LLM, but `ctx.session.current_agent._get_activity_or_raise().llm` returns the actual LLM being used by the current agent (which may be the agent's own LLM or the session's LLM as fallback). Use the activity's LLM when you need to check capabilities of the LLM actually processing the current interaction.

Applied to files:

  • examples/voice_agents/basic_agent.py
🧬 Code graph analysis (8)
livekit-agents/livekit/agents/utils/deprecation.py (1)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/inference/stt.py (3)
livekit-agents/livekit/agents/utils/aio/task_set.py (1)
  • tasks (30-31)
livekit-agents/livekit/agents/tts/tts.py (1)
  • exception (213-214)
livekit-agents/livekit/agents/_exceptions.py (1)
  • APIConnectionError (84-88)
livekit-agents/livekit/agents/voice/audio_recognition.py (1)
livekit-agents/livekit/agents/inference/interruption.py (11)
  • InterruptionStreamBase (325-519)
  • InterruptionEvent (57-92)
  • AdaptiveInterruptionDetector (162-322)
  • _AgentSpeechStartedSentinel (326-327)
  • _AgentSpeechEndedSentinel (329-330)
  • _OverlapSpeechStartedSentinel (332-339)
  • _OverlapSpeechEndedSentinel (341-342)
  • sample_rate (278-279)
  • stream (297-306)
  • push_frame (424-458)
  • aclose (471-475)
livekit-agents/livekit/agents/voice/agent_session.py (3)
livekit-agents/livekit/agents/utils/deprecation.py (1)
  • deprecate_params (11-49)
livekit-agents/livekit/agents/voice/turn.py (4)
  • TurnHandlingConfig (80-205)
  • migrate (133-193)
  • interruption_cfg (196-199)
  • endpointing_cfg (202-205)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/voice/agent_activity.py (4)
livekit-agents/livekit/agents/voice/agent_session.py (6)
  • llm (1266-1267)
  • stt (1262-1263)
  • tts (1270-1271)
  • vad (1274-1275)
  • turn_detection (388-389)
  • emit (372-374)
livekit-agents/livekit/agents/voice/agent.py (6)
  • llm (543-553)
  • stt (530-540)
  • tts (556-566)
  • vad (582-592)
  • turn_detection (510-520)
  • turn_detection (523-527)
livekit-agents/livekit/agents/inference/interruption.py (1)
  • AdaptiveInterruptionDetector (162-322)
livekit-agents/livekit/agents/voice/audio_recognition.py (3)
  • on_start_of_overlap_speech (221-238)
  • on_end_of_overlap_speech (240-260)
  • on_end_of_agent_speech (262-288)
livekit-agents/livekit/agents/voice/agent.py (2)
livekit-agents/livekit/agents/voice/turn.py (3)
  • TurnHandlingConfig (80-205)
  • migrate (133-193)
  • interruption_cfg (196-199)
livekit-agents/livekit/agents/voice/speech_handle.py (3)
  • allow_interruptions (87-88)
  • allow_interruptions (91-109)
  • id (65-66)
examples/voice_agents/basic_agent.py (2)
livekit-agents/livekit/agents/voice/turn.py (1)
  • TurnHandlingConfig (80-205)
livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector/multilingual.py (1)
  • MultilingualModel (26-104)
livekit-agents/livekit/agents/voice/turn.py (4)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/voice/agent_session.py (1)
  • turn_detection (388-389)
livekit-agents/livekit/agents/voice/agent.py (4)
  • turn_detection (510-520)
  • turn_detection (523-527)
  • min_endpointing_delay (608-618)
  • max_endpointing_delay (621-627)
livekit-agents/livekit/agents/voice/agent_activity.py (2)
  • min_endpointing_delay (280-285)
  • max_endpointing_delay (288-293)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: livekit-plugins-deepgram
  • GitHub Check: unit-tests
  • GitHub Check: type-check (3.9)
  • GitHub Check: type-check (3.13)

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines 200 to 229
lk_base_url = (
base_url if base_url else os.getenv("LIVEKIT_REMOTE_EOT_URL", DEFAULT_BASE_URL)
)
lk_api_key: str = api_key if api_key else ""
lk_api_secret: str = api_secret if api_secret else ""
# use LiveKit credentials if using the default base URL (inference)
if lk_base_url == DEFAULT_BASE_URL:
lk_api_key = (
api_key
if api_key
else os.getenv("LIVEKIT_INFERENCE_API_KEY", os.getenv("LIVEKIT_API_KEY", ""))
)
if not lk_api_key:
raise ValueError(
"api_key is required, either as argument or set LIVEKIT_API_KEY environmental variable"
)

lk_api_secret = (
api_secret
if api_secret
else os.getenv("LIVEKIT_INFERENCE_API_SECRET", os.getenv("LIVEKIT_API_SECRET", ""))
)
if not lk_api_secret:
raise ValueError(
"api_secret is required, either as argument or set LIVEKIT_API_SECRET environmental variable"
)

use_proxy = True
else:
use_proxy = False
Copy link
Contributor

@coderabbitai coderabbitai bot Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# First, let's find and read the file to understand the context
git ls-files | grep -E "interruption\.py$"

Repository: livekit/agents

Length of output: 113


🏁 Script executed:

#!/bin/bash
# Get the file size to determine if we can read it entirely
wc -l livekit-agents/livekit/agents/inference/interruption.py

Repository: livekit/agents

Length of output: 118


🏁 Script executed:

#!/bin/bash
# Read the specific lines mentioned in the review (200-229 for context)
sed -n '195,235p' livekit-agents/livekit/agents/inference/interruption.py

Repository: livekit/agents

Length of output: 1687


🏁 Script executed:

#!/bin/bash
# Read around line 710 to see how credentials are used
sed -n '700,720p' livekit-agents/livekit/agents/inference/interruption.py

Repository: livekit/agents

Length of output: 1053


🏁 Script executed:

#!/bin/bash
# Search for how use_proxy is used throughout the file
rg -n "use_proxy" livekit-agents/livekit/agents/inference/interruption.py -B 2 -A 2

Repository: livekit/agents

Length of output: 1080


🏁 Script executed:

#!/bin/bash
# Search for documentation or comments about custom endpoints, base_url, authentication
rg -n "base_url|custom|endpoint|DEFAULT_BASE_URL" livekit-agents/livekit/agents/inference/interruption.py -B 1 -A 1 | head -50

Repository: livekit/agents

Length of output: 2097


🏁 Script executed:

#!/bin/bash
# Read the __init__ method docstring and comments
sed -n '167,200p' livekit-agents/livekit/agents/inference/interruption.py

Repository: livekit/agents

Length of output: 2285


🏁 Script executed:

#!/bin/bash
# Search for create_access_token implementation
rg -n "def create_access_token" --type py -A 5

Repository: livekit/agents

Length of output: 655


🏁 Script executed:

#!/bin/bash
# Check if there are any comments or documentation about custom endpoints requiring auth
rg -n "custom|endpoint|auth" livekit-agents/livekit/agents/inference/interruption.py -i

Repository: livekit/agents

Length of output: 283


🏁 Script executed:

#!/bin/bash
# Look at the entire __init__ method to understand the complete flow
sed -n '167,245p' livekit-agents/livekit/agents/inference/interruption.py

Repository: livekit/agents

Length of output: 4136


🏁 Script executed:

#!/bin/bash
# Search for tests or examples showing custom endpoint usage
rg -n "AdaptiveInterruptionDetector" --type py -A 3 | grep -E "base_url|custom" -B 2 -A 2 | head -30

Repository: livekit/agents

Length of output: 40


🏁 Script executed:

#!/bin/bash
# Look for README or documentation files
find . -name "README*" -o -name "*.md" | head -20

Repository: livekit/agents

Length of output: 735


🏁 Script executed:

#!/bin/bash
# Check create_access_token behavior with empty strings
sed -n '1,20p' livekit-agents/livekit/agents/inference/_utils.py

Repository: livekit/agents

Length of output: 493


🏁 Script executed:

#!/bin/bash
# Let's check if there are any comments or patterns showing whether custom endpoints are expected to work without credentials
rg -n "custom|self-hosted|endpoint" livekit-agents/livekit/agents/inference/ -i --type py

Repository: livekit/agents

Length of output: 148


🏁 Script executed:

#!/bin/bash
# Check if there's any handling or fallback for empty credentials in the AccessToken class usage
rg -n "api.AccessToken" --type py -B 2 -A 2

Repository: livekit/agents

Length of output: 10080


🏁 Script executed:

#!/bin/bash
# Look for any integration tests or examples that show custom endpoint usage
find . -path "*/test*" -name "*interruption*" -o -path "*/examples*" -name "*interruption*" | head -10

Repository: livekit/agents

Length of output: 40


Document or validate API key requirements for custom base URLs.

When base_url differs from DEFAULT_BASE_URL, the code allows api_key and api_secret to remain empty strings. However, both HTTP (line 710) and WebSocket (line 1047) endpoints include these in the Authorization header via create_access_token(). This creates inconsistent behavior:

  • Default URL (use_proxy=True): credentials are required and validated
  • Custom URL (use_proxy=False): credentials default to empty with no validation

If custom endpoints require authentication, users will encounter runtime errors with no guidance. If they don't require auth, the undocumented behavior is confusing. Either add validation for custom endpoints too, or document that explicit credentials are required when using custom endpoints.

🤖 Prompt for AI Agents
In `@livekit-agents/livekit/agents/inference/interruption.py` around lines 200 -
229, When base_url != DEFAULT_BASE_URL (i.e., use_proxy == False) the code
currently leaves lk_api_key and lk_api_secret as empty strings which later get
used by create_access_token; enforce the same credential validation for custom
endpoints by checking lk_api_key and lk_api_secret after they're set and raising
a clear ValueError if either is missing (mentioning api_key/api_secret must be
provided when using a custom base_url), referencing variables/functions
lk_base_url, DEFAULT_BASE_URL, lk_api_key, lk_api_secret, use_proxy, base_url,
api_key, api_secret, and create_access_token to locate where to add the check.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is expected for custom url, no auth required.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chenghao-mou, thank you for clarifying! I understand now that custom endpoints are intentionally designed to work without authentication, and the empty credential handling is the expected behavior. I appreciate you explaining the design intent.

Comment on lines +450 to +451
elif self._resampler._input_rate != frame.sample_rate:
raise ValueError("the sample rate of the input frames must be consistent")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Find AudioResampler class definition and input_rate references
find . -type f -name "*.py" | xargs rg -n "class AudioResampler" -A 10

Repository: livekit/agents

Length of output: 42


🏁 Script executed:

# Search for input_rate usage and definition in the codebase
rg -n "input_rate" --type py | head -30

Repository: livekit/agents

Length of output: 3690


🏁 Script executed:

# Check the specific file and lines in question
sed -n '445,460p' livekit-agents/livekit/agents/inference/interruption.py

Repository: livekit/agents

Length of output: 680


🏁 Script executed:

# Look for rtc module imports and AudioResampler usage
rg -n "AudioResampler|from rtc|import.*rtc" livekit-agents/livekit/agents/inference/interruption.py

Repository: livekit/agents

Length of output: 267


🏁 Script executed:

# Check setup.py or requirements files to understand livekit version
find . -type f \( -name "setup.py" -o -name "pyproject.toml" -o -name "requirements*.txt" \) | xargs grep -l "livekit" | head -5

Repository: livekit/agents

Length of output: 272


🏁 Script executed:

# Look for any comments or documentation about AudioResampler
rg -n "AudioResampler" --type py -B 2 -A 2 livekit-agents/livekit/agents/inference/interruption.py

Repository: livekit/agents

Length of output: 807


🏁 Script executed:

# Check if there are any alternative ways to access input rate in the codebase
rg -n "\.input_rate\|\.get_input_rate\|\.get_.*rate" --type py | grep -i audio | head -20

Repository: livekit/agents

Length of output: 40


🏁 Script executed:

# Look at how AudioResampler is used throughout to understand the pattern
rg -n "rtc\.AudioResampler\(" --type py -A 3 | head -40

Repository: livekit/agents

Length of output: 4194


🏁 Script executed:

# Check livekit version in pyproject.toml
cat livekit-agents/pyproject.toml | grep -A 5 -B 5 "livekit"

Repository: livekit/agents

Length of output: 3921


🏁 Script executed:

# Check if there's any documentation or comments about accessing resampler state
rg -n "_input_rate\|_output_rate" --type py | head -30

Repository: livekit/agents

Length of output: 40


🌐 Web query:

livekit-python AudioResampler public API documentation input_rate

💡 Result:

In the LiveKit Python SDK, AudioResampler’s constructor takes an input_rate: int parameter, documented as:

  • input_rate (int): “The sample rate of the input audio data (in Hz).” (docs.livekit.io)

Public API signature:

  • AudioResampler(input_rate: int, output_rate: int, *, num_channels: int = 1, quality: AudioResamplerQuality = AudioResamplerQuality.MEDIUM) (docs.livekit.io)

Citations:


Track resampler input rate locally instead of accessing private _input_rate attribute.

Line 450 accesses self._resampler._input_rate to verify sample rate consistency. The AudioResampler class from livekit (v1.0.23) does not expose a public property for retrieving the input rate of an existing instance, but this can be tracked locally. Store the input rate in an instance variable when creating the resampler instead of relying on the private _input_rate attribute:

Example fix
# Add to __init__
self._resampler_input_rate: int | None = None

# Update push_frame logic
if self._sample_rate != frame.sample_rate:
    if not self._resampler:
        self._resampler = rtc.AudioResampler(
            input_rate=frame.sample_rate,
            output_rate=self._sample_rate,
            num_channels=1,
            quality=rtc.AudioResamplerQuality.LOW,
        )
        self._resampler_input_rate = frame.sample_rate
    elif self._resampler_input_rate != frame.sample_rate:
        raise ValueError("the sample rate of the input frames must be consistent")
🤖 Prompt for AI Agents
In `@livekit-agents/livekit/agents/inference/interruption.py` around lines 450 -
451, The code currently reads the private attribute self._resampler._input_rate
to validate incoming frame sample rates; instead, add a public instance variable
(e.g., self._resampler_input_rate initialized in __init__) and set it when you
construct AudioResampler in push_frame (or the equivalent method), then replace
checks against self._resampler._input_rate with comparisons to
self._resampler_input_rate and raise the same ValueError if they differ; also
ensure the variable is cleared if the resampler is torn down.

Comment on lines +6 to +21
license = "Apache-2.0"
authors = [{ name = "LiveKit", email = "hello@livekit.io" }]
keywords = ["webrtc", "realtime", "audio", "video", "livekit", "agents", "AI"]
keywords = ["AI", "agents", "audio", "livekit", "realtime", "video", "webrtc"]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Video",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Video",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for CI configuration files and Python version declarations
find . -type f \( -name "*.yml" -o -name "*.yaml" \) -path "*/.github/*" | head -20

Repository: livekit/agents

Length of output: 403


🏁 Script executed:

#!/bin/bash
# Search for Python version specifications in CI files
rg -n "python-version|3\.9|3\.10|3\.11|3\.12|3\.13" --type yaml -g '*.yml' -g '*.yaml' | head -50

Repository: livekit/agents

Length of output: 40


🏁 Script executed:

#!/bin/bash
# Check for any pyproject.toml or setup.py that declares Python version requirements
rg -A 2 -B 2 "python" pyproject.toml | head -40

Repository: livekit/agents

Length of output: 144


🏁 Script executed:

#!/bin/bash
# Look for tox.ini, noxfile, or other test configuration files
git ls-files | grep -E "(tox\.ini|noxfile|\.testing|test.*config)" | head -10

Repository: livekit/agents

Length of output: 78


🏁 Script executed:

#!/bin/bash
# Directly examine the test workflow to find Python versions
cat .github/workflows/tests.yml

Repository: livekit/agents

Length of output: 5748


🏁 Script executed:

#!/bin/bash
# Also check ci.yml for Python version matrix
cat .github/workflows/ci.yml

Repository: livekit/agents

Length of output: 2004


Add Python 3.10 and 3.11 to the type-check matrix, or remove them from classifiers.

The pyproject.toml declares support for Python 3.9–3.13, but CI coverage is incomplete:

  • Python 3.9: tested (ruff, type-check)
  • Python 3.10: not tested
  • Python 3.11: not tested
  • Python 3.12: tested (unit-tests only)
  • Python 3.13: tested (type-check only)

Either expand the type-check matrix to include 3.10 and 3.11, or remove those versions from classifiers to match actual test coverage.

🤖 Prompt for AI Agents
In `@livekit-agents/pyproject.toml` around lines 6 - 21, The package classifiers
in pyproject.toml declare support for "Programming Language :: Python :: 3.10"
and "Programming Language :: Python :: 3.11" but the CI type-check matrix does
not include those interpreters; either add 3.10 and 3.11 to the CI type-check
matrix (the workflow job that runs type-checks/ruff) so those versions are
exercised, or remove the "Programming Language :: Python :: 3.10" and
"Programming Language :: Python :: 3.11" entries from the classifiers array in
pyproject.toml to reflect current test coverage; update the relevant CI workflow
(type-check matrix) or the classifiers array accordingly so declared classifiers
match actual tested Python versions.

Comment on lines +6 to +21
license = "Apache-2.0"
authors = [{ name = "LiveKit", email = "hello@livekit.io" }]
keywords = ["webrtc", "realtime", "audio", "video", "livekit"]
keywords = ["audio", "livekit", "realtime", "video", "webrtc"]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Video",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3 :: Only",
]
dependencies = [
"livekit-agents>=1.3.12",
"aiohttp"
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Video",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = ["aiohttp", "livekit-agents>=1.4.0.rc2"]
dynamic = ["version"]
Copy link
Contributor

@coderabbitai coderabbitai bot Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

aiohttp latest stable release version 2024 2025

💡 Result:

  • Latest stable release in 2024: aiohttp 3.11.11 (released Dec 18, 2024) [1]
  • Latest stable release in 2025: aiohttp 3.13.2 (released Oct 28, 2025) [2]

(For reference, the current stable as of Jan 3, 2026 is 3.13.3.) [3][4]

Sources: [1] [2] [3] [4]


🌐 Web query:

livekit-agents PyPI latest releases version 1.4.0.rc2

💡 Result:

  • Latest stable release on PyPI: livekit-agents 1.3.12 (released Jan 21, 2026) [1]
  • Latest pre-release on PyPI: livekit-agents 1.4.0rc2 (released Jan 23, 2026) [1] (also shown on piwheels) [2]

Install the pre-release:

pip install --pre livekit-agents==1.4.0rc2

Sources: [1] [2]


🏁 Script executed:

# Check the current state of the pyproject.toml file
find . -name "pyproject.toml" -path "*livekit-plugins-asyncai*" | head -5

Repository: livekit/agents

Length of output: 114


🏁 Script executed:

# Check if other plugins have similar prerelease dependencies
find . -name "pyproject.toml" -path "*livekit-plugins*" -exec grep -l "livekit-agents" {} \;

Repository: livekit/agents

Length of output: 3021


🏁 Script executed:

# Look for any documentation or comments explaining the prerelease policy
find . -name "README*" -o -name "*.md" | xargs grep -l "prerelease\|rc\|release candidate" 2>/dev/null | head -5

Repository: livekit/agents

Length of output: 141


🏁 Script executed:

# Check dependency versions in a few other plugins
for file in ./livekit-plugins/livekit-plugins-openai/pyproject.toml ./livekit-plugins/livekit-plugins-google/pyproject.toml ./livekit-plugins/livekit-plugins-deepgram/pyproject.toml; do
  echo "=== $file ===";
  grep "livekit-agents" "$file" || echo "not found";
done

Repository: livekit/agents

Length of output: 395


🏁 Script executed:

# Check if there's any version constraint documentation in README or AGENTS.md
cat ./README.md | grep -A 10 -B 5 "version\|release\|prerelease" | head -40

Repository: livekit/agents

Length of output: 40


Unbounded aiohttp and inconsistent prerelease dependency require fixes.

The aiohttp dependency is unpinned, which risks unexpected breaking changes. More critically, livekit-agents>=1.4.0.rc2 forces a pre-release version (released Jan 23, 2026) when a stable release 1.3.12 is available. This creates a dependency conflict with other plugins in the same repository—for example, livekit-plugins-google allows livekit-agents >= 1.3.6, meaning installing both asyncai and google together would be forced to use the pre-release instead of the stable version.

If 1.4.0rc2 is intentionally required for feature/compatibility reasons, document it in a comment and ensure all dependent plugins align. Otherwise, relax the constraint to allow stable releases:

Suggested fixes
-dependencies = ["aiohttp", "livekit-agents>=1.4.0.rc2"]
+dependencies = ["aiohttp>=3.9,<4", "livekit-agents>=1.3.6"]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
license = "Apache-2.0"
authors = [{ name = "LiveKit", email = "hello@livekit.io" }]
keywords = ["webrtc", "realtime", "audio", "video", "livekit"]
keywords = ["audio", "livekit", "realtime", "video", "webrtc"]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Video",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3 :: Only",
]
dependencies = [
"livekit-agents>=1.3.12",
"aiohttp"
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Video",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = ["aiohttp", "livekit-agents>=1.4.0.rc2"]
dynamic = ["version"]
license = "Apache-2.0"
authors = [{ name = "LiveKit", email = "hello@livekit.io" }]
keywords = ["audio", "livekit", "realtime", "video", "webrtc"]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Video",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = ["aiohttp>=3.9,<4", "livekit-agents>=1.3.6"]
dynamic = ["version"]
🤖 Prompt for AI Agents
In `@livekit-plugins/livekit-plugins-asyncai/pyproject.toml` around lines 6 - 21,
In pyproject.toml update the dependencies entry to (1) pin or bound aiohttp
(e.g., add a sensible range like "aiohttp>=3.8,<4" instead of leaving it
unbounded) and (2) relax the livekit-agents constraint to allow the latest
stable series (for example change "livekit-agents>=1.4.0.rc2" to a stable range
such as "livekit-agents>=1.3.6,<2" or "~=1.3.12"); if the prerelease 1.4.0rc2 is
actually required, add an explicit inline comment next to the "livekit-agents"
dependency explaining why the pre-release is needed and coordinate other plugins
to match. Ensure you edit the dependencies array (the "dependencies" key) and
update the exact strings "aiohttp" and "livekit-agents>=1.4.0.rc2".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with many version related issues you have raised in this PR, this is expected.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chenghao-mou, understood! Thank you for clarifying. Since this is a coordinated version bump to 1.4.0.rc2 across the codebase as part of this PR's scope, the pre-release dependency constraints make sense. I'll note that the version-related comments throughout this PR are expected behavior for the release candidate rollout.

Comment on lines +20 to +21
dependencies = ["livekit-agents>=1.4.0.rc2"]
dynamic = ["version"]
Copy link
Contributor

@coderabbitai coderabbitai bot Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

livekit-agents PyPI latest stable version 1.4.0 release notes

💡 Result:

  • Latest stable livekit-agents on PyPI: 1.3.12 (released Jan 21, 2026). [1]
  • About “1.4.0”: there is no stable 1.4.0 on PyPI yet—only pre-releases (1.4.0rc1 on Dec 23, 2025, and 1.4.0rc2 on Jan 23, 2026). [1], [2]
  • Release notes for stable 1.4.0: not available yet, because stable 1.4.0 hasn’t been released on PyPI. [1]

Sources:
[1] livekit-agents PyPI project page + release history (shows 1.3.12 stable; 1.4.0rc1/rc2 pre-releases) (pypi.org)
[2] livekit-agents 1.4.0rc2 PyPI page (explicitly labels stable version as 1.3.12) (pypi.org)

Citations:


Use the stable livekit-agents version instead of the pre-release.

livekit-agents>=1.4.0.rc2 forces a pre-release dependency; the latest stable version is 1.3.12 (released Jan 21, 2026). Version 1.4.0 has not yet been released to PyPI—only pre-releases (1.4.0rc2 as of Jan 23, 2026) exist. Update to livekit-agents>=1.3.12 unless the pre-release is specifically required, in which case document the rationale.

🤖 Prompt for AI Agents
In `@livekit-plugins/livekit-plugins-tavus/pyproject.toml` around lines 20 - 21,
Update the dependency declaration in pyproject.toml to avoid pinning a
pre-release: replace the dependencies entry currently specifying
"livekit-agents>=1.4.0.rc2" with a stable constraint such as
"livekit-agents>=1.3.12" (or, if you truly require the rc, add a
comment/documentation explaining why the pre-release is needed); edit the
dependencies = ["livekit-agents>=1.4.0.rc2"] line accordingly so the package
resolves to the latest stable release instead of an rc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dear rabbit, you are on a RC branch, this is expected.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chenghao-mou, you're absolutely right—I apologize for the confusion! Since this is an RC branch preparing the 1.4.0 release, using >=1.4.0.rc2 for the livekit-agents dependency across all plugins is the correct and expected approach. Thank you for the clarification.

chenghao-mou and others added 4 commits January 26, 2026 09:56
Co-authored-by: Chenghao Mou <chenghao.mou@livekit.io>
Co-authored-by: Théo Monnom <theo.monnom@outlook.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
livekit-agents/livekit/agents/metrics/usage_collector.py (1)

33-70: Fix deprecation message module path.

The warnings mention metrics.model_usage, but the public module is metrics.usage (per the new exports). This is user-facing guidance, so it should be accurate.

🛠️ Suggested fix
-            "UsageSummary is deprecated. Use LLMModelUsage, TTSModelUsage, "
-            "or STTModelUsage from metrics.model_usage instead.",
+            "UsageSummary is deprecated. Use LLMModelUsage, TTSModelUsage, "
+            "or STTModelUsage from metrics.usage instead.",
-            "UsageCollector is deprecated. Use ModelUsageCollector from "
-            "metrics.model_usage instead.",
+            "UsageCollector is deprecated. Use ModelUsageCollector from "
+            "metrics.usage instead.",
🤖 Fix all issues with AI agents
In `@livekit-agents/livekit/agents/telemetry/traces.py`:
- Around line 49-57: Add Google-style docstrings for the _DynamicTracer class
and its methods: add a class-level docstring describing the purpose of
_DynamicTracer (a lightweight wrapper to hold a dynamic OpenTelemetry
TracerProvider and provide a tracer), then add method docstrings for __init__
(document parameters instrumenting_module_name and initial tracer provider
behavior, and the attributes _tracer_provider, _tracer,
_instrumenting_module_name) and for set_provider (document parameter
tracer_provider, its effect of updating _tracer_provider and _tracer via
trace_api.get_tracer, and any return value/side effects). Ensure the docstrings
follow Google style (Args, Returns, Attributes where appropriate) and reference
the attributes _tracer_provider and _tracer in the class or method docstrings.

In `@livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/tts.py`:
- Around line 302-307: In the speech SSE handling inside the TTS code (where
event_type == "speech.audio.delta"), remove the unnecessary check for the
"delta" field and only read the Base64 payload from the "audio" key: replace the
current audio_b64 assignment (which uses event.get("delta", "") or
event.get("audio", "")) with a single lookup of event.get("audio", "") so that
the audio decoding and output_emitter.push still operate on the correct field
(variables: event_type, audio_b64, output_emitter.push).

In
`@livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/realtime/realtime_model.py`:
- Around line 129-137: The session duration uses wall-clock time which can go
backwards; switch both assignments to monotonic time: set
self._session_connected_at = time.monotonic() in _run_ws and compute
session_duration = time.monotonic() - self._session_connected_at in aclose (keep
the existing guard on self._session_connected_at), so the RealtimeModelMetrics
uses a non-decreasing elapsed value; update any related doc/comments referencing
time.time() to time.monotonic() as well.
- Around line 133-149: The aclose method currently builds a RealtimeModelMetrics
and calls self.emit before awaiting super().aclose(); wrap the metrics
construction and self.emit call in a try/finally block so that await
super().aclose() always runs even if Metadata creation or self.emit raises.
Specifically, inside async def aclose(self) check self._session_connected_at as
before, then in a try: construct RealtimeModelMetrics (using
RealtimeModelMetrics.InputTokenDetails/OutputTokenDetails and
Metadata(model_name=self._xai_model.model,
model_provider=self._xai_model.provider)) and call
self.emit("metrics_collected", metrics); finally: await super().aclose() to
guarantee cleanup.
🧹 Nitpick comments (4)
livekit-agents/livekit/agents/tts/tts.py (1)

444-447: Reset token counters after emitting streaming metrics to avoid carryover.
If multiple segments are sent in one stream (still possible though deprecated), tokens can leak into later metrics unless reset.

♻️ Suggested patch
             self._tts.emit("metrics_collected", metrics)

             audio_duration = 0.0
             ttfb = -1.0
             request_id = ""
             self._started_time = 0
+            self._input_tokens = 0
+            self._output_tokens = 0

Also applies to: 545-569

livekit-agents/livekit/agents/metrics/usage.py (1)

10-15: Minor: __repr__ will always include the type field.

The condition v != 0 and v != 0.0 won't filter out the type field (e.g., "llm_usage"), so it will always appear in the repr output. This may be intentional for clarity, but if you want truly concise output, consider excluding string fields that match known discriminator values.

♻️ Optional: Exclude type discriminator from repr
 class _BaseModelUsage(BaseModel):
     def __repr__(self) -> str:
         # skip zeros for concise display
-        fields = {k: v for k, v in self.model_dump().items() if v != 0 and v != 0.0}
+        fields = {
+            k: v for k, v in self.model_dump().items()
+            if v != 0 and v != 0.0 and k != "type"
+        }
         fields_str = ", ".join(f"{k}={v!r}" for k, v in fields.items())
         return f"{self.__class__.__name__}({fields_str})"
livekit-agents/livekit/agents/voice/report.py (1)

65-70: Preserve explicit empty usage lists in report serialization.

Right now, model_usage=[] serializes to None due to the truthiness guard. Consider always calling _usage_to_dict() so an explicit empty list stays [].

♻️ Suggested change
-            "usage": self._usage_to_dict() if self.model_usage else None,
+            "usage": self._usage_to_dict(),
livekit-agents/livekit/agents/metrics/usage_collector.py (1)

65-72: Avoid double deprecation warnings when constructing UsageCollector.

Instantiating UsageCollector warns, then it creates UsageSummary which warns again. Consider suppressing the inner warning to avoid duplicate noise.

♻️ Example suppression
     def __init__(self) -> None:
         warnings.warn(
             "UsageCollector is deprecated. Use ModelUsageCollector from "
             "metrics.usage instead.",
             DeprecationWarning,
             stacklevel=2,
         )
-        self._summary = UsageSummary()
+        with warnings.catch_warnings():
+            warnings.simplefilter("ignore", DeprecationWarning)
+            self._summary = UsageSummary()
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 244bcae and df860f1.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (30)
  • examples/bank-ivr/ivr_navigator_agent.py
  • examples/bank-ivr/ivr_system_agent.py
  • examples/dtmf/basic_dtmf_agent.py
  • examples/survey/survey_agent.py
  • examples/voice_agents/basic_agent.py
  • examples/voice_agents/multi_agent.py
  • examples/voice_agents/zapier_mcp_integration.py
  • livekit-agents/livekit/agents/__init__.py
  • livekit-agents/livekit/agents/inference/_utils.py
  • livekit-agents/livekit/agents/inference/interruption.py
  • livekit-agents/livekit/agents/inference/llm.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-agents/livekit/agents/inference/tts.py
  • livekit-agents/livekit/agents/job.py
  • livekit-agents/livekit/agents/metrics/__init__.py
  • livekit-agents/livekit/agents/metrics/base.py
  • livekit-agents/livekit/agents/metrics/usage.py
  • livekit-agents/livekit/agents/metrics/usage_collector.py
  • livekit-agents/livekit/agents/stt/stt.py
  • livekit-agents/livekit/agents/telemetry/trace_types.py
  • livekit-agents/livekit/agents/telemetry/traces.py
  • livekit-agents/livekit/agents/tts/tts.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/voice/generation.py
  • livekit-agents/livekit/agents/voice/report.py
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/stt.py
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/tts.py
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/realtime/realtime_model.py
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Format code with ruff
Run ruff linter and auto-fix issues
Run mypy type checker in strict mode
Maintain line length of 100 characters maximum
Ensure Python 3.9+ compatibility
Use Google-style docstrings

Files:

  • livekit-agents/livekit/agents/stt/stt.py
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/stt.py
  • examples/voice_agents/multi_agent.py
  • livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/realtime/realtime_model.py
  • livekit-agents/livekit/agents/__init__.py
  • livekit-agents/livekit/agents/job.py
  • livekit-agents/livekit/agents/voice/report.py
  • livekit-agents/livekit/agents/telemetry/traces.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-agents/livekit/agents/tts/tts.py
  • examples/bank-ivr/ivr_navigator_agent.py
  • livekit-agents/livekit/agents/metrics/__init__.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-agents/livekit/agents/inference/_utils.py
  • livekit-agents/livekit/agents/telemetry/trace_types.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/voice/generation.py
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/tts.py
  • examples/bank-ivr/ivr_system_agent.py
  • livekit-agents/livekit/agents/inference/llm.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • examples/survey/survey_agent.py
  • examples/dtmf/basic_dtmf_agent.py
  • examples/voice_agents/zapier_mcp_integration.py
  • livekit-agents/livekit/agents/metrics/usage.py
  • livekit-agents/livekit/agents/inference/tts.py
  • livekit-agents/livekit/agents/metrics/usage_collector.py
  • livekit-agents/livekit/agents/inference/interruption.py
  • examples/voice_agents/basic_agent.py
  • livekit-agents/livekit/agents/metrics/base.py
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: livekit/agents PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T07:44:56.353Z
Learning: Implement Model Interface Pattern for STT, TTS, LLM, and Realtime models with provider-agnostic interfaces, fallback adapters for resilience, and stream adapters for different streaming patterns
📚 Learning: 2026-01-22T03:28:16.289Z
Learnt from: longcw
Repo: livekit/agents PR: 4563
File: livekit-agents/livekit/agents/beta/tools/end_call.py:65-65
Timestamp: 2026-01-22T03:28:16.289Z
Learning: In code paths that check capabilities or behavior of the LLM processing the current interaction, prefer using the activity's LLM obtained via ctx.session.current_agent._get_activity_or_raise().llm instead of ctx.session.llm. The session-level LLM may be a fallback and not reflect the actual agent handling the interaction. Use the activity LLM to determine capabilities and to make capability checks or feature toggles relevant to the current processing agent.

Applied to files:

  • livekit-agents/livekit/agents/stt/stt.py
  • livekit-agents/livekit/agents/__init__.py
  • livekit-agents/livekit/agents/job.py
  • livekit-agents/livekit/agents/voice/report.py
  • livekit-agents/livekit/agents/telemetry/traces.py
  • livekit-agents/livekit/agents/inference/stt.py
  • livekit-agents/livekit/agents/tts/tts.py
  • livekit-agents/livekit/agents/metrics/__init__.py
  • livekit-agents/livekit/agents/voice/agent_session.py
  • livekit-agents/livekit/agents/inference/_utils.py
  • livekit-agents/livekit/agents/telemetry/trace_types.py
  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/voice/generation.py
  • livekit-agents/livekit/agents/inference/llm.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-agents/livekit/agents/metrics/usage.py
  • livekit-agents/livekit/agents/inference/tts.py
  • livekit-agents/livekit/agents/metrics/usage_collector.py
  • livekit-agents/livekit/agents/inference/interruption.py
  • livekit-agents/livekit/agents/metrics/base.py
📚 Learning: 2026-01-19T23:21:47.799Z
Learnt from: vishal-seshagiri-infinitusai
Repo: livekit/agents PR: 4559
File: livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/responses/llm.py:122-123
Timestamp: 2026-01-19T23:21:47.799Z
Learning: Note from PR `#4559`: response_format was added as a passthrough to the OpenAI Responses API in livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/responses/llm.py, but this is scoped only to the Google provider and not for OpenAI. Reviewers should ensure that this passthrough behavior is gated by the provider (Google) and that OpenAI paths do not inadvertently reuse the same passthrough. Consider adding explicit provider checks, and update tests to verify that only the Google provider uses this passthrough while the OpenAI provider ignores it.

Applied to files:

  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/stt.py
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/tts.py
📚 Learning: 2026-01-16T07:44:56.353Z
Learnt from: CR
Repo: livekit/agents PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T07:44:56.353Z
Learning: Implement Model Interface Pattern for STT, TTS, LLM, and Realtime models with provider-agnostic interfaces, fallback adapters for resilience, and stream adapters for different streaming patterns

Applied to files:

  • livekit-agents/livekit/agents/voice/generation.py
📚 Learning: 2026-01-22T03:28:24.967Z
Learnt from: longcw
Repo: livekit/agents PR: 4563
File: livekit-agents/livekit/agents/beta/tools/end_call.py:65-65
Timestamp: 2026-01-22T03:28:24.967Z
Learning: In the livekit-agents voice framework, `ctx.session.llm` returns the session-level LLM, but `ctx.session.current_agent._get_activity_or_raise().llm` returns the actual LLM being used by the current agent (which may be the agent's own LLM or the session's LLM as fallback). Use the activity's LLM when you need to check capabilities of the LLM actually processing the current interaction.

Applied to files:

  • examples/voice_agents/basic_agent.py
🧬 Code graph analysis (23)
livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/stt.py (1)
livekit-agents/livekit/agents/stt/stt.py (3)
  • SpeechEvent (72-76)
  • SpeechEventType (32-49)
  • RecognitionUsage (65-68)
examples/voice_agents/multi_agent.py (2)
livekit-agents/livekit/agents/voice/agent.py (1)
  • session (657-664)
livekit-agents/livekit/agents/voice/agent_session.py (1)
  • usage (452-454)
livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/realtime/realtime_model.py (1)
livekit-agents/livekit/agents/metrics/base.py (4)
  • RealtimeModelMetrics (100-144)
  • Metadata (8-10)
  • InputTokenDetails (106-111)
  • OutputTokenDetails (113-117)
livekit-agents/livekit/agents/__init__.py (1)
livekit-agents/livekit/agents/voice/turn.py (1)
  • TurnHandlingConfig (80-187)
livekit-agents/livekit/agents/job.py (1)
livekit-agents/livekit/agents/voice/agent_session.py (1)
  • usage (452-454)
livekit-agents/livekit/agents/voice/report.py (1)
livekit-agents/livekit/agents/telemetry/http_server.py (1)
  • metrics (18-35)
livekit-agents/livekit/agents/telemetry/traces.py (1)
livekit-agents/livekit/agents/log.py (1)
  • trace (11-13)
livekit-agents/livekit/agents/inference/stt.py (1)
livekit-agents/livekit/agents/inference/_utils.py (1)
  • get_default_inference_url (12-28)
examples/bank-ivr/ivr_navigator_agent.py (1)
livekit-agents/livekit/agents/voice/agent_session.py (1)
  • usage (452-454)
livekit-agents/livekit/agents/metrics/__init__.py (1)
livekit-agents/livekit/agents/metrics/usage.py (4)
  • LLMModelUsage (18-52)
  • ModelUsageCollector (95-197)
  • STTModelUsage (74-88)
  • TTSModelUsage (55-71)
livekit-agents/livekit/agents/voice/agent_session.py (4)
livekit-agents/livekit/agents/utils/deprecation.py (1)
  • deprecate_params (11-49)
livekit-agents/livekit/agents/voice/events.py (1)
  • MetricsCollectedEvent (145-148)
livekit-agents/livekit/agents/voice/turn.py (4)
  • TurnHandlingConfig (80-187)
  • migrate (121-175)
  • interruption_cfg (178-181)
  • endpointing_cfg (184-187)
livekit-agents/livekit/agents/metrics/usage_collector.py (1)
  • collect (77-116)
livekit-agents/livekit/agents/inference/_utils.py (1)
livekit-agents/livekit/agents/job.py (1)
  • api (289-297)
livekit-agents/livekit/agents/voice/audio_recognition.py (1)
livekit-agents/livekit/agents/inference/interruption.py (11)
  • InterruptionStreamBase (332-526)
  • InterruptionEvent (61-96)
  • AdaptiveInterruptionDetector (166-329)
  • _AgentSpeechStartedSentinel (333-334)
  • _AgentSpeechEndedSentinel (336-337)
  • _OverlapSpeechStartedSentinel (339-346)
  • _OverlapSpeechEndedSentinel (348-349)
  • sample_rate (285-286)
  • stream (304-313)
  • push_frame (431-465)
  • aclose (478-482)
livekit-agents/livekit/agents/voice/generation.py (1)
livekit-agents/livekit/agents/llm/llm.py (2)
  • model (99-108)
  • provider (111-120)
examples/bank-ivr/ivr_system_agent.py (1)
livekit-agents/livekit/agents/voice/agent_session.py (1)
  • usage (452-454)
livekit-agents/livekit/agents/inference/llm.py (1)
livekit-agents/livekit/agents/inference/_utils.py (2)
  • create_access_token (31-39)
  • get_default_inference_url (12-28)
livekit-agents/livekit/agents/voice/agent_activity.py (2)
livekit-agents/livekit/agents/inference/interruption.py (1)
  • AdaptiveInterruptionDetector (166-329)
livekit-agents/livekit/agents/voice/audio_recognition.py (5)
  • model (54-55)
  • provider (58-59)
  • on_start_of_overlap_speech (225-242)
  • on_end_of_overlap_speech (244-264)
  • on_interruption (87-87)
examples/survey/survey_agent.py (1)
livekit-agents/livekit/agents/voice/agent_session.py (1)
  • usage (452-454)
examples/dtmf/basic_dtmf_agent.py (1)
livekit-agents/livekit/agents/voice/agent_session.py (1)
  • usage (452-454)
livekit-agents/livekit/agents/metrics/usage.py (2)
livekit-agents/livekit/agents/metrics/base.py (4)
  • LLMMetrics (13-27)
  • RealtimeModelMetrics (100-144)
  • STTMetrics (30-45)
  • TTSMetrics (48-66)
livekit-agents/livekit/agents/metrics/usage_collector.py (1)
  • collect (77-116)
livekit-agents/livekit/agents/inference/tts.py (2)
livekit-agents/livekit/agents/inference/_utils.py (1)
  • get_default_inference_url (12-28)
livekit-agents/livekit/agents/utils/misc.py (1)
  • is_given (25-26)
livekit-agents/livekit/agents/inference/interruption.py (2)
livekit-agents/livekit/agents/_exceptions.py (2)
  • APIError (14-42)
  • APIStatusError (45-81)
livekit-agents/livekit/agents/inference/_utils.py (1)
  • create_access_token (31-39)
examples/voice_agents/basic_agent.py (3)
livekit-agents/livekit/agents/voice/turn.py (1)
  • TurnHandlingConfig (80-187)
livekit-agents/livekit/agents/beta/tools/end_call.py (1)
  • EndCallTool (28-132)
livekit-agents/livekit/agents/voice/agent.py (4)
  • tools (125-131)
  • session (657-664)
  • turn_detection (510-520)
  • turn_detection (523-527)
🔇 Additional comments (75)
examples/survey/survey_agent.py (1)

349-350: LGTM! Clean simplification using the built-in session property.

Using session.usage directly is cleaner than maintaining a separate UsageCollector. The AgentSession.usage property internally handles the collection and flattening.

examples/bank-ivr/ivr_system_agent.py (1)

653-653: No issue found. AgentSession.usage is defined as a @property decorator, so session.usage correctly accesses the property and returns an AgentSessionUsage object. The logging statement is correct.

Likely an incorrect or invalid review comment.

livekit-agents/livekit/agents/tts/tts.py (4)

174-186: LGTM — token counters initialized for non‑streaming streams.
Simple and clear initialization; aligns with the new metrics fields.


218-220: LGTM — token usage setter is straightforward.
No concerns with the simple assignment-based setter.


242-249: LGTM — metrics payload now includes token usage.
Looks consistent with existing metrics emission.


435-441: LGTM — token counters initialized for streaming streams.
Consistent with non‑streaming path.

livekit-agents/livekit/agents/stt/stt.py (2)

64-68: LGTM!

The addition of input_tokens and output_tokens fields with default values of 0 is a clean extension that maintains backward compatibility while enabling token-based billing support for STT providers that use this model.


376-377: LGTM!

The metrics emission correctly propagates the new token fields from recognition_usage to STTMetrics, aligning with the expanded metrics structure in base.py.

examples/dtmf/basic_dtmf_agent.py (1)

149-150: LGTM!

The migration from a separate UsageCollector to session.usage aligns with the centralized usage tracking approach introduced in this PR. The session.usage property (returning AgentSessionUsage) provides a cleaner API for accessing per-session usage summaries.

examples/voice_agents/multi_agent.py (1)

159-160: LGTM!

Consistent with other examples in this PR, the migration to session.usage provides a cleaner, centralized usage tracking approach.

livekit-agents/livekit/agents/metrics/base.py (4)

39-42: LGTM!

The new token fields with clear docstrings support token-based billing for STT providers. Default values of 0 ensure backward compatibility.


57-62: LGTM!

The addition of input_tokens and output_tokens with descriptive docstrings supports token-based TTS billing while preserving the existing characters_count field for character-based billing models.


101-117: LGTM!

Adding default values to all token fields in the nested detail classes improves flexibility. The deprecation comment for image_tokens in OutputTokenDetails provides helpful context.


119-138: LGTM!

The new session_duration field appropriately supports session-based billing models. Default values across all fields improve initialization flexibility. The sentinel value of -1 for ttft clearly indicates when no audio token was sent.

livekit-agents/livekit/agents/metrics/usage.py (5)

18-53: LGTM!

The LLMModelUsage model comprehensively captures all token-related metrics including cached tokens, multimodal token breakdowns, and session duration for session-based billing. The docstrings are clear and helpful.


55-89: LGTM!

Both TTSModelUsage and STTModelUsage models appropriately capture their respective billing metrics (tokens, characters, audio duration) with clear documentation.


95-136: LGTM!

The ModelUsageCollector initialization and helper methods are well-structured. The __call__ delegation to collect() provides a convenient callable interface. The _extract_provider_model helper safely handles missing metadata.


138-189: LGTM!

The collect() method correctly routes metrics by type and accumulates all relevant fields. The logic mirrors the existing usage_collector.py implementation while organizing data by provider/model combination. The conditional handling of cached_tokens_details is appropriately guarded.


191-197: LGTM!

The flatten() method returns deep copies of usage records, preventing external mutation of internal state. This is a good defensive practice.

livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/stt.py (1)

594-609: Approved. The token usage extraction from the OpenAI Realtime API transcription completion event is implemented correctly. The code safely handles missing or incomplete usage data with appropriate defaults, and the field extraction aligns with the API's response structure.

livekit-agents/livekit/agents/metrics/__init__.py (1)

10-35: LGTM: public usage re-exports are clean and consistent.

examples/voice_agents/zapier_mcp_integration.py (1)

64-67: LGTM: metrics logging still wired correctly.

livekit-agents/livekit/agents/inference/interruption.py (6)

61-107: LGTM: event and error models are well-structured.


108-160: LGTM: options and cache entry helpers are clear and cohesive.


166-330: LGTM: detector initialization and stream selection look solid.


529-708: LGTM: HTTP stream pipeline and caching are thoughtfully structured.


752-1082: LGTM: WebSocket stream lifecycle and reconnection logic look robust.


1084-1232: LGTM: utility helpers are concise and reusable.

livekit-agents/livekit/agents/__init__.py (1)

95-202: LGTM: TurnHandlingConfig export is clean and discoverable.

livekit-agents/livekit/agents/job.py (1)

266-278: Good: session report now includes per‑model usage.
Keeps reporting aligned with the new usage plumbing.

livekit-agents/livekit/agents/inference/tts.py (1)

270-279: LGTM: centralized default inference URL resolution.
Using the shared helper keeps TTS consistent with other inference clients.

examples/bank-ivr/ivr_navigator_agent.py (1)

116-118: LGTM: usage logging now reads from session.usage.
Simplifies the example while staying aligned with the new usage API.

livekit-agents/livekit/agents/inference/llm.py (1)

118-121: Good: base URL now respects the shared inference URL helper.
Keeps LLM client behavior consistent with other inference components.

livekit-agents/livekit/agents/telemetry/traces.py (3)

375-387: Good: session report log now includes non‑zero model usage.
Keeps log payloads concise while surfacing the important usage metrics.


333-342: Good: proto chat items now preserve original field names. Helps keep exported payloads stable for downstream consumers by using snake_case field identifiers from the .proto definition instead of the proto3 JSON convention (lowerCamelCase).


101-114: Nice: TRACE level now maps to OTel TRACE severity via a custom handler.
This preserves intended severity semantics for TRACE logs in exports. The custom handler correctly overrides _translate to map TRACE_LEVEL (5) to SeverityNumber.TRACE (1), since OTel's default std_to_otel() would otherwise map any log level < 10 to UNSPECIFIED.

livekit-agents/livekit/agents/inference/_utils.py (1)

8-28: LGTM: default inference URL selection is now centralized.
Clear priority order and staging detection keeps behavior predictable.

livekit-agents/livekit/agents/voice/generation.py (4)

63-70: LGTM: Model/provider parameters properly threaded through LLM inference.

The optional model and provider parameters are correctly added and passed to the internal task. This enables proper telemetry attribution for GenAI operations.


102-114: LGTM: Conditional span attribute setting is correct.

The attributes dictionary approach is clean, and only setting model/provider when provided avoids polluting spans with empty or default values.


185-187: LGTM: TTFT metric recording.

The time-to-first-token is correctly recorded on the span only when available.


238-269: LGTM: TTS span attributes and TTFB recording.

The TTS inference path correctly mirrors the LLM pattern, setting model/provider attributes on the span and recording TTFB when available.

livekit-agents/livekit/agents/inference/stt.py (3)

27-27: LGTM: Centralized URL resolution.

Using get_default_inference_url() aligns with the broader PR pattern of centralizing inference URL resolution based on environment variables and LiveKit URL configuration.


500-513: LGTM: WebSocket lifecycle management is robust.

The closing_ws flag correctly coordinates shutdown between send/recv tasks and prevents spurious errors during intentional disconnection. The dual finally blocks ensure the WebSocket is properly closed in all code paths.


565-572: LGTM: Session initialization error handling.

Properly closes the WebSocket connection if the session.create message fails to send, preventing resource leaks.

livekit-agents/livekit/agents/telemetry/trace_types.py (3)

32-32: LGTM: TTFT attribute constant.

Follows existing naming pattern for response metrics.


62-69: LGTM: Latency and GenAI provider attributes.

ATTR_E2E_LATENCY follows the LiveKit namespace pattern, and ATTR_GEN_AI_PROVIDER_NAME correctly follows the OpenTelemetry GenAI semantic conventions.


96-102: LGTM: Adaptive interruption telemetry attributes.

The new interruption-related attributes provide comprehensive observability for the adaptive interruption detection feature.

livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/tts.py (4)

47-48: LGTM: Audio stream model differentiation.

Using a set for model lookup is efficient and clearly documents which models use the character-based billing (audio stream) format.


190-197: LGTM: Model-based stream type selection.

Clean branching logic that selects the appropriate streaming implementation based on the model's billing format.


309-318: LGTM: Token usage extraction from SSE done event.

Correctly extracts and records token usage metrics when available, enabling cost tracking for token-based billing models.


322-328: LGTM: Consistent error handling.

The exception handling mirrors the AudioChunkedStream implementation, providing consistent error reporting across both streaming modes.

examples/voice_agents/basic_agent.py (2)

98-108: LGTM: TurnHandlingConfig usage in example.

The example demonstrates the new TurnHandlingConfig API cleanly, showing how to configure turn detection and interruption handling in a structured way.


118-119: LGTM: Usage logging via session.usage property.

The example demonstrates accessing the new session.usage property for tracking model consumption.

livekit-agents/livekit/agents/voice/agent_session.py (6)

136-139: LGTM: AgentSessionUsage dataclass.

Clean data structure for exposing model usage summaries per session.


145-158: LGTM: Deprecation decorator for legacy parameters.

Clear migration guidance via deprecation warnings pointing users to TurnHandlingConfig.


269-284: LGTM: Turn handling migration logic.

Correctly prioritizes the new turn_handling parameter while providing backward compatibility via TurnHandlingConfig.migrate().


385-387: LGTM: Metrics collection integration.

Cleanly hooks into the event emission to collect metrics into the usage collector.


451-454: LGTM: Usage property exposes session metrics.

The usage property provides a clean API for accessing aggregated model usage per session.


1296-1298: LGTM: Interruption detection property.

Exposes the interruption detection mode for external inspection.

livekit-agents/livekit/agents/voice/audio_recognition.py (8)

86-171: LGTM: interruption hook + state wiring looks consistent.
The new hook and interruption state fields are initialized coherently and keep VAD dependency explicit.


204-293: LGTM: interruption lifecycle hooks are clean and well-guarded.
Guarded sentinel forwarding and agent/overlap state tracking look safe and cohesive.


294-382: LGTM: buffering/flush logic is well-contained.
Clearing before replay avoids re-entrancy and the hold predicates are straightforward.


384-397: LGTM: audio forwarding to interruption channel is consistent with STT/VAD.
The input-start timestamping aligns with the later timestamp reconciliation logic.


450-485: LGTM: interruption enablement toggles are centralized and clear.
Updating _interruption_enabled alongside detector lifecycle improves correctness.


596-616: LGTM: interruption-aware STT event gating is well-scoped.
Holding and flushing rules preserve ordering while allowing usage events through.


974-1011: LGTM: interruption task cleanup is robust.
Forward task cancellation and channel draining ensure a clean teardown.


1022-1030: LGTM: STT model/provider telemetry enrichment.
Span attributes are attached in a lightweight and safe way.

livekit-agents/livekit/agents/voice/agent_activity.py (8)

157-171: LGTM: interruption detector defaults are wired cleanly.
The detector resolution and default flags align with the turn-detection guardrails.


259-262: LGTM: exposing interruption_enabled keeps consumer code tidy.
Simple and clear read-only surface.


600-611: LGTM: interruption detector + STT metadata propagated into AudioRecognition.
Good to see model/provider details flow into recognition for telemetry.


1136-1158: LGTM: overlap-speech hooks are integrated consistently.
User state transitions and interruption cues are coordinated cleanly across VAD and realtime inputs.

Also applies to: 1258-1282


1313-1321: LGTM: interruption event handling aligns with transcript ignore windowing.
Using overlap start time when available is the right choice.


1641-1649: LGTM: agent-speech end hook is invoked consistently after pipeline completion.
Restoring interruption-by-audio-activity here keeps behavior predictable.


2105-2109: LGTM: e2e latency attribution is accurate and well-scoped.
Nice addition to span attributes for downstream observability.


2872-2922: LGTM: interruption detector resolution and session events are clean.
Compatibility guards plus event forwarding make the behavior explicit.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +49 to 57
self._tracer_provider: trace_api.TracerProvider = trace_api.get_tracer_provider()
self._tracer = trace_api.get_tracer(instrumenting_module_name)

def set_provider(self, tracer_provider: trace_api.TracerProvider) -> None:
self._tracer_provider = tracer_provider
self._tracer = trace.get_tracer(
self._tracer = trace_api.get_tracer(
self._instrumenting_module_name,
tracer_provider=self._tracer_provider,
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat livekit-agents/livekit/agents/telemetry/traces.py

Repository: livekit/agents

Length of output: 17892


🌐 Web query:

OpenTelemetry Python 1.39 trace.get_tracer_provider get_tracer API reference documentation

💡 Result:

API reference (OpenTelemetry Python 1.39.x):

  • opentelemetry.trace.get_tracer_provider() → returns the current global TracerProvider. In the API it’s documented under the opentelemetry.trace module; the implementation details are visible in the module source. [1][2]
  • opentelemetry.trace.get_tracer(name, version=None, tracer_provider=None, schema_url=None, attributes=None) → convenience wrapper that calls TracerProvider.get_tracer(...) (uses the current global provider when tracer_provider is omitted). [1]
  • TracerProvider.get_tracer(...) → the provider method that actually creates/returns a Tracer for the given instrumentation scope. [2]

Docs/pages:

https://opentelemetry-python.readthedocs.io/en/latest/_modules/opentelemetry/trace.html
https://opentelemetry-python-kinvolk.readthedocs.io/en/latest/api/trace.html

OpenTelemetry Python v1.39.0 was released Dec 3, 2025 (with v1.39.1 on Dec 11, 2025). [3]

Sources: [1] https://opentelemetry-python.readthedocs.io/en/latest/_modules/opentelemetry/trace.html, [2] https://opentelemetry-python-kinvolk.readthedocs.io/en/latest/api/trace.html, [3] https://github.com/open-telemetry/opentelemetry-python/releases


Add Google-style docstrings to _DynamicTracer class and its methods.

The OpenTelemetry usage is correct—get_tracer_provider() and get_tracer() with the optional tracer_provider parameter properly enable dynamic provider switching. However, the _DynamicTracer class and its __init__ and set_provider methods lack docstrings, which violates the project's coding guideline requiring Google-style docstrings.

🤖 Prompt for AI Agents
In `@livekit-agents/livekit/agents/telemetry/traces.py` around lines 49 - 57, Add
Google-style docstrings for the _DynamicTracer class and its methods: add a
class-level docstring describing the purpose of _DynamicTracer (a lightweight
wrapper to hold a dynamic OpenTelemetry TracerProvider and provide a tracer),
then add method docstrings for __init__ (document parameters
instrumenting_module_name and initial tracer provider behavior, and the
attributes _tracer_provider, _tracer, _instrumenting_module_name) and for
set_provider (document parameter tracer_provider, its effect of updating
_tracer_provider and _tracer via trace_api.get_tracer, and any return value/side
effects). Ensure the docstrings follow Google style (Args, Returns, Attributes
where appropriate) and reference the attributes _tracer_provider and _tracer in
the class or method docstrings.

Comment on lines +302 to +307
if event_type == "speech.audio.delta":
# Decode base64 audio and push to emitter
audio_b64 = event.get("delta", "") or event.get("audio", "")
if audio_b64:
audio_data = base64.b64decode(audio_b64)
output_emitter.push(audio_data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

OpenAI TTS SSE stream event format speech.audio.delta field name

💡 Result:

In OpenAI’s TTS SSE streaming format, each audio chunk is sent as an SSE data: line containing JSON with:

  • type: "speech.audio.delta"
  • audio: the Base64-encoded audio chunk (this is the field name you want)

Example:

data: {"type":"speech.audio.delta","audio":"<base64-audio-chunk>"}

The stream ends with:

data: {"type":"speech.audio.done","usage":{...}}

[1], [2]


🏁 Script executed:

# Read the full context of the function containing lines 302-307
cd "livekit-plugins/livekit-plugins-openai" && cat -n livekit/plugins/openai/tts.py | sed -n '280,320p'

Repository: livekit/agents

Length of output: 2125


Remove the unnecessary "delta" field check; OpenAI's TTS SSE format uses only "audio" for the Base64-encoded chunk.

According to OpenAI's official documentation, the speech.audio.delta event structure uses the field name "audio" (not "delta"). Line 304 should be simplified to only check the correct field name.

Current code (line 304)
audio_b64 = event.get("delta", "") or event.get("audio", "")

The fallback pattern suggests handling API variations that don't exist in the official specification. Simplify to:

audio_b64 = event.get("audio", "")
🤖 Prompt for AI Agents
In `@livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/tts.py` around
lines 302 - 307, In the speech SSE handling inside the TTS code (where
event_type == "speech.audio.delta"), remove the unnecessary check for the
"delta" field and only read the Base64 payload from the "audio" key: replace the
current audio_b64 assignment (which uses event.get("delta", "") or
event.get("audio", "")) with a single lookup of event.get("audio", "") so that
the audio decoding and output_emitter.push still operate on the correct field
(variables: event_type, audio_b64, output_emitter.push).

Comment on lines +129 to +137
async def _run_ws(self, ws_conn: aiohttp.ClientWebSocketResponse) -> None:
self._session_connected_at = time.time()
await super()._run_ws(ws_conn)

async def aclose(self) -> None:
# emit session duration metrics before closing (for xAI's per-minute billing)
if self._session_connected_at > 0:
session_duration = time.time() - self._session_connected_at
metrics = RealtimeModelMetrics(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Python time.monotonic vs time.time for measuring elapsed time duration

💡 Result:

For measuring elapsed duration, prefer time.monotonic() (or time.perf_counter() for benchmarking), and avoid time.time().

  • time.monotonic(): reads a monotonic clock that cannot go backwards and is not affected by system clock updates (manual clock changes, NTP step adjustments). Its absolute “start point” is undefined, so you should only use differences between two calls. [1][2]
  • time.time(): returns wall-clock time since the Unix epoch. It can jump forward/backward if the system clock is adjusted, so elapsed-time calculations can be wrong (even negative). [1]

Typical pattern:

import time

start = time.monotonic()
# ... work ...
elapsed = time.monotonic() - start

If you need to inspect what guarantees your platform provides, use:

  • time.get_clock_info("monotonic") and time.get_clock_info("time") (shows monotonic, adjustable, resolution). [1]

Sources: Python docs for time.monotonic() / time.time() and get_clock_info, plus PEP 418 rationale for using a monotonic clock for timeouts/durations. [1][2]


Use monotonic time for session duration.

Line 130 computes elapsed time using time.time(). System clock adjustments (manual changes, NTP step adjustments) can cause wall-clock time to jump forward or backward, skewing elapsed-time calculations or even making them negative. Use time.monotonic() instead, which cannot go backwards and is unaffected by system clock updates.

🔧 Proposed fix
 async def _run_ws(self, ws_conn: aiohttp.ClientWebSocketResponse) -> None:
-    self._session_connected_at = time.time()
+    self._session_connected_at = time.monotonic()
     await super()._run_ws(ws_conn)

 async def aclose(self) -> None:
     # emit session duration metrics before closing (for xAI's per-minute billing)
     if self._session_connected_at > 0:
-        session_duration = time.time() - self._session_connected_at
+        session_duration = time.monotonic() - self._session_connected_at
         metrics = RealtimeModelMetrics(
             timestamp=time.time(),
             request_id="session_close",
             session_duration=session_duration,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
async def _run_ws(self, ws_conn: aiohttp.ClientWebSocketResponse) -> None:
self._session_connected_at = time.time()
await super()._run_ws(ws_conn)
async def aclose(self) -> None:
# emit session duration metrics before closing (for xAI's per-minute billing)
if self._session_connected_at > 0:
session_duration = time.time() - self._session_connected_at
metrics = RealtimeModelMetrics(
async def _run_ws(self, ws_conn: aiohttp.ClientWebSocketResponse) -> None:
self._session_connected_at = time.monotonic()
await super()._run_ws(ws_conn)
async def aclose(self) -> None:
# emit session duration metrics before closing (for xAI's per-minute billing)
if self._session_connected_at > 0:
session_duration = time.monotonic() - self._session_connected_at
metrics = RealtimeModelMetrics(
🤖 Prompt for AI Agents
In
`@livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/realtime/realtime_model.py`
around lines 129 - 137, The session duration uses wall-clock time which can go
backwards; switch both assignments to monotonic time: set
self._session_connected_at = time.monotonic() in _run_ws and compute
session_duration = time.monotonic() - self._session_connected_at in aclose (keep
the existing guard on self._session_connected_at), so the RealtimeModelMetrics
uses a non-decreasing elapsed value; update any related doc/comments referencing
time.time() to time.monotonic() as well.

Comment on lines +133 to +149
async def aclose(self) -> None:
# emit session duration metrics before closing (for xAI's per-minute billing)
if self._session_connected_at > 0:
session_duration = time.time() - self._session_connected_at
metrics = RealtimeModelMetrics(
timestamp=time.time(),
request_id="session_close",
session_duration=session_duration,
input_token_details=RealtimeModelMetrics.InputTokenDetails(),
output_token_details=RealtimeModelMetrics.OutputTokenDetails(),
metadata=Metadata(
model_name=self._xai_model.model,
model_provider=self._xai_model.provider,
),
)
self.emit("metrics_collected", metrics)
await super().aclose()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find the file and understand the RealtimeModel class structure
find . -type f -name "realtime_model.py" | grep xai

# Get context about the aclose method and surrounding code
rg -n "class RealtimeModel" --type=py -A 20

Repository: livekit/agents

Length of output: 22445


🏁 Script executed:

#!/bin/bash
# Search for _xai_model definition and provider attribute usage
rg -n "_xai_model" --type=py -B 2 -A 2 | head -100

# Search for provider attribute/property on xai_model
rg -n "\.provider" --type=py | grep -i xai | head -50

Repository: livekit/agents

Length of output: 1637


🏁 Script executed:

#!/bin/bash
# Check the metadata construction and emit method
rg -n "class Metadata" --type=py -A 10
rg -n "def emit" --type=py -A 5 | head -80

Repository: livekit/agents

Length of output: 3417


🏁 Script executed:

#!/bin/bash
# Check the openai.realtime.RealtimeModel base class and its aclose implementation
# Since it's from an external package, search for how it's used in the codebase

find . -type f -name "*.py" -path "*/openai/*" | head -10

# Look for imports of openai.realtime.RealtimeModel
rg -n "from.*openai.*realtime.*import" --type=py | head -20

# Check if there are any try/finally patterns in aclose methods elsewhere
rg -n "async def aclose" --type=py -A 15 | head -100

Repository: livekit/agents

Length of output: 13259


🏁 Script executed:

#!/bin/bash
# Check the xAI plugin imports to understand the parent class better
head -50 ./livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/realtime/realtime_model.py

Repository: livekit/agents

Length of output: 1273


🏁 Script executed:

#!/bin/bash
# Check if provider is a property in xAI's parent openai.realtime.RealtimeModel
# by examining how the openai plugin implements it

rg -n "class RealtimeModel" ./livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/realtime/realtime_model.py -A 50 | grep -A 50 "def provider"

# Also check if there are other implementations using try/finally for aclose
rg -n "try:" --type=py -A 10 | grep -B 5 "finally:" | grep -B 10 "aclose" | head -40

Repository: livekit/agents

Length of output: 1840


🏁 Script executed:

#!/bin/bash
# Check the openai.realtime.RealtimeModel base class from external package
# by looking at how _xai_model is actually typed and used

cat ./livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/realtime/realtime_model.py | head -150 | tail -80

Repository: livekit/agents

Length of output: 3298


🏁 Script executed:

#!/bin/bash
# Check the openai RealtimeSession aclose implementation to see if it's critical
rg -n "class RealtimeSession" ./livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/realtime/realtime_model.py -A 200 | grep -A 30 "async def aclose"

# Check if Metadata or emit can raise exceptions
rg -n "def emit" ./livekit-agents/livekit/agents/llm/realtime.py -A 10
rg -n "class Metadata" ./livekit-agents/livekit/agents/metrics/base.py -A 15

Repository: livekit/agents

Length of output: 474


Ensure session cleanup always runs; provider access is safe.

While self._xai_model.provider is safe (the base RealtimeModel class guarantees a provider property returning a string), wrap the metrics emission in try/finally to ensure super().aclose() executes even if Metadata construction or emit() raises an exception. Resource cleanup in async context managers is critical.

🔒 Suggested fix
 async def aclose(self) -> None:
+    try:
+        # emit session duration metrics before closing (for xAI's per-minute billing)
+        if self._session_connected_at > 0:
+            session_duration = time.time() - self._session_connected_at
+            metrics = RealtimeModelMetrics(
+                timestamp=time.time(),
+                request_id="session_close",
+                session_duration=session_duration,
+                input_token_details=RealtimeModelMetrics.InputTokenDetails(),
+                output_token_details=RealtimeModelMetrics.OutputTokenDetails(),
+                metadata=Metadata(
+                    model_name=self._xai_model.model,
+                    model_provider=self._xai_model.provider,
+                ),
+            )
+            self.emit("metrics_collected", metrics)
+    finally:
+        await super().aclose()
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
async def aclose(self) -> None:
# emit session duration metrics before closing (for xAI's per-minute billing)
if self._session_connected_at > 0:
session_duration = time.time() - self._session_connected_at
metrics = RealtimeModelMetrics(
timestamp=time.time(),
request_id="session_close",
session_duration=session_duration,
input_token_details=RealtimeModelMetrics.InputTokenDetails(),
output_token_details=RealtimeModelMetrics.OutputTokenDetails(),
metadata=Metadata(
model_name=self._xai_model.model,
model_provider=self._xai_model.provider,
),
)
self.emit("metrics_collected", metrics)
await super().aclose()
async def aclose(self) -> None:
try:
# emit session duration metrics before closing (for xAI's per-minute billing)
if self._session_connected_at > 0:
session_duration = time.time() - self._session_connected_at
metrics = RealtimeModelMetrics(
timestamp=time.time(),
request_id="session_close",
session_duration=session_duration,
input_token_details=RealtimeModelMetrics.InputTokenDetails(),
output_token_details=RealtimeModelMetrics.OutputTokenDetails(),
metadata=Metadata(
model_name=self._xai_model.model,
model_provider=self._xai_model.provider,
),
)
self.emit("metrics_collected", metrics)
finally:
await super().aclose()
🤖 Prompt for AI Agents
In
`@livekit-plugins/livekit-plugins-xai/livekit/plugins/xai/realtime/realtime_model.py`
around lines 133 - 149, The aclose method currently builds a
RealtimeModelMetrics and calls self.emit before awaiting super().aclose(); wrap
the metrics construction and self.emit call in a try/finally block so that await
super().aclose() always runs even if Metadata creation or self.emit raises.
Specifically, inside async def aclose(self) check self._session_connected_at as
before, then in a try: construct RealtimeModelMetrics (using
RealtimeModelMetrics.InputTokenDetails/OutputTokenDetails and
Metadata(model_name=self._xai_model.model,
model_provider=self._xai_model.provider)) and call
self.emit("metrics_collected", metrics); finally: await super().aclose() to
guarantee cleanup.

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 14 additional flags.

Open in Devin Review

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.

4 participants