Skip to content

Make livekit-local-inference an optional dependency #6819

Description

@ytausch

Feature Type

Would make my life easier

Feature Description

It would be nice if livekit-agents declared livekit-local-inference as an optional dependency, possibly behind a feature like livekit-agents[local-inference].

While VAD and turn detection are likely used by most LiveKit voice-agent projects, some consumers only use lower-level functionality, such as LLM abstractions, provider plugins, or telemetry, and do not need the bundled models.

Rationale: We use automated license checking in our organization, and projects that use livekit-agents must set manual exclusion rules even if they don't use local inference. Also, we don't want to whitelist the model license org-wide (like we do with OSS licenses), because individual projects should acknowledge compliance with it.

Another nice aspect would be smaller environments if local inference isn't actually used.

In addition to adjusting pyproject.toml, the implementation would need to use lazy imports and raise a clear runtime error.

Somewhat related: #6192

Workarounds / Alternatives

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions