Skip to content

feat/sarvam-llm-openai-compatible-integration#5069

Open
dhruvladia-sarvam wants to merge 4 commits intolivekit:mainfrom
dhruvladia-sarvam:feat/sarvam-llm-openai-compatible-integration
Open

feat/sarvam-llm-openai-compatible-integration#5069
dhruvladia-sarvam wants to merge 4 commits intolivekit:mainfrom
dhruvladia-sarvam:feat/sarvam-llm-openai-compatible-integration

Conversation

@dhruvladia-sarvam
Copy link
Contributor

Summary

  • Add Sarvam LLM integration under the Sarvam plugin as a dedicated llm module, with model support for sarvam-30b and sarvam-105b.
  • Add OpenAI-compatible factory support via openai.LLM.with_sarvam(...) so Sarvam can be used like other OpenAI-compatible providers.

Why

  • Enables first-class Sarvam LLM usage in both:
    • livekit.plugins.sarvam.LLM(...)
    • livekit.plugins.openai.LLM.with_sarvam(...)
  • Keeps integration aligned with existing LiveKit OpenAI-compatible provider patterns.

Files changed

  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/llm/__init__.py
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/llm/client.py
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/llm/models.py
  • livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/__init__.py
  • livekit-plugins/livekit-plugins-sarvam/pyproject.toml
  • livekit-plugins/livekit-plugins-sarvam/README.md
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/llm.py
  • livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/models.py

Validation / testing performed

  • Import and integration smoke checks:
    • from livekit.plugins import sarvam, openai
    • openai.LLM.with_sarvam(...) availability and usage
  • Functional checks across both models (sarvam-30b, sarvam-105b) for:
    • basic generation
    • tool calling (tool_choice: none, auto, required)
    • parameter pass-through (temperature, top_p, reasoning_effort, seed, stop, n, frequency_penalty, presence_penalty, max_tokens, wiki_grounding)
  • Confirmed LLM metrics emission includes required fields (duration, completion_tokens, prompt_tokens, prompt_cached_tokens, total_tokens, tokens_per_second, ttft, speech_id).

Notes

  • speech_id is expected to be null in direct standalone llm.chat(...).collect() tests; it is populated in full AgentSession voice flow context.

devin-ai-integration[bot]

This comment was marked as resolved.

dhruvladia-sarvam and others added 3 commits March 10, 2026 23:21
…models.py

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Copy link
Contributor

@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 found 1 new potential issue.

View 6 additional findings in Devin Review.

Open in Devin Review

"Programming Language :: Python :: 3 :: Only",
]
dependencies = ["livekit-agents[codecs]>=1.4.5", "numpy>=1.26"]
dependencies = ["livekit-agents[codecs, openai]>=1.4.4", "numpy>=1.26"]
Copy link
Contributor

Choose a reason for hiding this comment

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

🟡 Minimum dependency version lowered from >=1.4.5 to >=1.4.4 inconsistently with all other plugins

The livekit-agents minimum version was lowered from >=1.4.5 to >=1.4.4 in this PR. Every other plugin in the monorepo (including livekit-plugins-openai at livekit-plugins/livekit-plugins-openai/pyproject.toml:25) and every extras entry in livekit-agents/pyproject.toml:63-118 specifies >=1.4.5. This inconsistency could allow installation of livekit-agents==1.4.4 whose openai extra definition may differ from the current version, potentially pulling in an incompatible livekit-plugins-openai version that lacks features the sarvam plugin depends on.

Suggested change
dependencies = ["livekit-agents[codecs, openai]>=1.4.4", "numpy>=1.26"]
dependencies = ["livekit-agents[codecs, openai]>=1.4.5", "numpy>=1.26"]
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant