Skip to content

(inference): type Cartesia turn-detection params in CartesiaOptions - #6597

Merged
tinalenguyen merged 1 commit into
livekit:mainfrom
ajayarora1235:aa/cartesia-gateway-options
Jul 29, 2026
Merged

(inference): type Cartesia turn-detection params in CartesiaOptions#6597
tinalenguyen merged 1 commit into
livekit:mainfrom
ajayarora1235:aa/cartesia-gateway-options

Conversation

@ajayarora1235

Copy link
Copy Markdown
Contributor

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

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ajayarora1235
ajayarora1235 requested a review from a team as a code owner July 29, 2026 06:40

@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

@tinalenguyen tinalenguyen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks for the PR!

@tinalenguyen
tinalenguyen merged commit a4e675c into livekit:main Jul 29, 2026
17 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

Development

Successfully merging this pull request may close these issues.

2 participants