Skip to content

fix(sarvam): saaras:v3 does not support the config/prompt message - #6617

Merged
tinalenguyen merged 3 commits into
livekit:mainfrom
biztex:fix/sarvam-v3-prompt
Aug 3, 2026
Merged

fix(sarvam): saaras:v3 does not support the config/prompt message#6617
tinalenguyen merged 3 commits into
livekit:mainfrom
biztex:fix/sarvam-v3-prompt

Conversation

@biztex

@biztex biztex commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #6606.

MODEL_CONFIGS["saaras:v3"] declared supports_prompt=True, so the plugin sent a config/prompt message on a connection that ignores it — callers could set prompt for hotword biasing and it never reached anything.

Sets the flag to False. The existing streaming guard already skips the config frame when prompt support is false, so no control-flow change is needed.

saaras:v3 connects to wss://api.sarvam.ai/speech-to-text/ws, whose AsyncAPI
schema documents only audio-data and flush client messages. The config/prompt
message the plugin sent on connect is documented only for the legacy translate
endpoint (/speech-to-text-translate/ws), which is used exclusively by
saaras:v2.5 - so the prompt was silently dropped server-side and hotword
biasing built on it never had any effect.

Mark saaras:v3 as supports_prompt=False, stop assuming prompt support for
unknown models (they are routed to the non-translate endpoint too), and warn
when a caller supplies a prompt that will not be sent, instead of failing
silently. Adds hermetic tests pinning prompt support to the translate
endpoint.

Fixes livekit#6606
@biztex
biztex requested a review from a team as a code owner July 30, 2026 15:02

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

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 1 additional finding.

Open in Devin Review

@dhruvladia-sarvam

Copy link
Copy Markdown
Contributor

@biztex Thanks for finding this. Let’s keep the fix scoped to the reported capability mismatch:
Change MODEL_CONFIGS["saaras:v3"].supports_prompt from True to False.

The existing streaming guard already avoids sending the config frame when prompt support is false, so no further control-flow change is needed. Sarvam silently ignores a raw config/prompt frame on the v3 endpoint, it does not return a provider error, and since saaras:v2.5 is on its way to be deprecated, the LiveKit docs reflect no support for a prompt parameter. Please drop the unknown-model behaviour change, warning logs, and expanded endpoint/protocol commentary.

scope the fix to the reported capability mismatch, per Sarvam review.
@biztex

biztex commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — done in 27c8dc3. It's just the flag now: supports_prompt=False for saaras:v3, nothing else. Dropped the unknown-model change, the warnings and the endpoint commentary, and left the streaming guard alone.

Kept a two-line test asserting v3 is False and v2.5 is still True, happy to drop that too if you'd rather have it as a pure one-liner.

devin-ai-integration[bot]

This comment was marked as resolved.

Comment thread tests/test_sarvam_stt_options.py Outdated
@tinalenguyen
tinalenguyen merged commit a95d87d into livekit:main Aug 3, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants