Skip to content

Add Cartesia inference STT turn options - #2161

Closed
rosetta-livekit-bot[bot] wants to merge 2 commits into
mainfrom
port-cartesia-inference-turn-options
Closed

Add Cartesia inference STT turn options#2161
rosetta-livekit-bot[bot] wants to merge 2 commits into
mainfrom
port-cartesia-inference-turn-options

Conversation

@rosetta-livekit-bot

@rosetta-livekit-bot rosetta-livekit-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Cartesia turn-detection tuning fields to inference STT CartesiaOptions
  • Mark existing Cartesia volume/silence options as ink-whisper-only
  • Add a minor changeset for @livekit/agents
Source diff coverage
Source file Classification Target handling
livekit-agents/livekit/agents/inference/stt.py Ported Target counterpart is agents/src/inference/stt.ts. Ported the CartesiaOptions type additions and updated comments as TypeScript interface fields/JSDoc.

No source tests were added or modified in PR #6597, so there were no tests to port.

Validation

  • pnpm exec prettier --write agents/src/inference/stt.ts .changeset/sharp-cartesia-turns.md
  • pnpm test agents passed: 111 test files, 1503 tests passed, 5 skipped
  • pnpm --filter @livekit/agents build passed
  • pnpm --filter @livekit/agents lint completed with existing warnings
  • pnpm build passed
  • pnpm lint completed with existing warnings
  • pnpm --filter @livekit/agents api:check failed on existing API Extractor/toolchain issue: export * as ___ syntax is not supported yet in agents/dist/index.d.ts

Runtime cue-cli validation was not run because this port is a type-only inference STT options change and does not modify voice pipeline behavior.


Ported from livekit/agents#6597

Original PR description

Companion to #6594 (which exposed these on the direct plugin): the Inference gateway already accepts and validates Cartesia's turn-detection tuning params via extra_kwargs — they're just missing from the CartesiaOptions TypedDict, so users can't discover them.

Verified live against the gateway today:

  • extra_kwargs={"turn_start_threshold": 0.6} on cartesia/ink-2 → session created and runs normally.
  • extra_kwargs={"turn_start_threshold": 2.0} → session creation fails with cartesiaturns: extra settings validation failed: turn_start_threshold must be <= 0.9, got 2 — i.e. the gateway's cartesia-turns adapter knows these params and enforces Cartesia's documented ranges.

This PR only adds the keys to the TypedDict (typing/discoverability — extra_kwargs already passes them through verbatim) and annotates the two existing keys as ink-whisper-only, per Cartesia's API reference. Ranges/defaults from https://docs.cartesia.ai/api-reference/stt/turns/websocket.

Verified with ruff check / ruff format.

🤖 Generated with Claude Code

@rosetta-livekit-bot
rosetta-livekit-bot Bot requested a review from a team as a code owner July 29, 2026 18:56
@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3a163d7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 39 packages
Name Type
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-anthropic Patch
@livekit/agents-plugin-assemblyai Patch
@livekit/agents-plugin-azure Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-cerebras Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-did Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-fishaudio Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-hedra Patch
@livekit/agents-plugin-hume Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-krisp Patch
@livekit/agents-plugin-lemonslice Patch
@livekit/agents-plugin-liveavatar Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-minimax Patch
@livekit/agents-plugin-mistral Patch
@livekit/agents-plugin-mistralai Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-perplexity Patch
@livekit/agents-plugin-phonic Patch
@livekit/agents-plugin-protoface Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-runway Patch
@livekit/agents-plugin-sarvam Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugin-soniox Patch
@livekit/agents-plugin-tavus Patch
@livekit/agents-plugins-test Patch
@livekit/agents-plugin-trugen Patch
@livekit/agents-plugin-xai Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@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

@u9g

u9g commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

done in #2173

@u9g u9g closed this Jul 30, 2026
@u9g
u9g deleted the port-cartesia-inference-turn-options branch July 30, 2026 17:46
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.

2 participants