Skip to content

Conversation

@davidzhao
Copy link
Member

@davidzhao davidzhao commented Jan 23, 2026

Summary by CodeRabbit

  • New Features

    • Added new LLMs (GPT‑5.2/5.1 variants), Moonshot Kimi, DeepSeek v3.2, and non-preview Google Gemini entries.
    • Added STT: AssemblyAI universal streaming variants and ElevenLabs Scribe v2 realtime; Deepgram model updates and Cartesia ink‑whisper consolidation.
    • Added TTS: Deepgram Aura variants, updated Cartesia Sonic variants, and new Inworld TTS variants; expanded TTS option typings.
  • Deprecations

    • Removed Qwen and legacy Kimi LLM exports; removed several legacy Deepgram, Cartesia and Rime model variants.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Jan 23, 2026

🦋 Changeset detected

Latest commit: e416a5e

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

This PR includes changesets to release 18 packages
Name Type
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-hedra Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugins-test 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

@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

Updates inference model type definitions for LiveKit Agents across LLM, STT, and TTS: adds new provider/model variants (GPT‑5.1/5.2, Moonshot, DeepSeek, Deepgram Aura, AssemblyAI, ElevenLabs STT, Inworld), removes deprecated models, and adjusts union/option typings.

Changes

Cohort / File(s) Summary
Changeset Declaration
.changeset/kind-coins-add.md
Adds a patch changeset for @livekit/agents noting an update to the LiveKit inference models.
LLM Model Types
agents/src/inference/llm.ts
Added OpenAI GPT‑5.1/5.2 variants; replaced Google preview model names with non‑preview equivalents; introduced MoonshotModels (moonshotai/kimi-k2-instruct); added deepseek-ai/deepseek-v3.2; removed/exported QwenModels and KimiModels from the public surface and updated LLMModels union.
STT Model Types
agents/src/inference/stt.ts
Reworked DeepgramModels (use deepgram/flux-general, removed some nova-* entries, added nova-2-conversationalai); removed generic cartesia entry (keep cartesia/ink-whisper); added AssemblyaiModels and ElevenlabsSTTModels; expanded _STTModels union.
TTS Model Types
agents/src/inference/tts.ts
Replaced/renamed Cartesia variants (added sonic-3, kept sonic-2/sonic-turbo); introduced DeepgramTTSModels (deepgram/aura, deepgram/aura-2) and DeepgramTTSOptions; removed broad elevenlabs token (retain submodels); exported InworldModels; narrowed RimeModels; expanded _TTSModels, TTSModels, and updated TTSOptions<TModel> mapping.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • lukasIO
  • theomonnom
  • chenghao-mou

Poem

🐰 Soft paws on typing keys I prance,
New models land, I do a dance —
Moonshot, Deepgram, GPT‑Five gleam,
Types hop in, old names redeemed,
A rabbit cheers the inference team 🌿✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request lacks any description content, leaving the template sections empty with no explanation of changes, rationale, or testing performed. Add a comprehensive description covering what was updated, why each model change was made, and confirmation that testing was completed as per the template checklist.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main objective of updating inference models to latest versions, which is reflected across multiple files (llm.ts, stt.ts, tts.ts) and the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5c736a8 and e416a5e.

📒 Files selected for processing (3)
  • agents/src/inference/llm.ts
  • agents/src/inference/stt.ts
  • agents/src/inference/tts.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/agent-core.mdc)

Add SPDX-FileCopyrightText and SPDX-License-Identifier headers to all newly added files with '// SPDX-FileCopyrightText: 2025 LiveKit, Inc.' and '// SPDX-License-Identifier: Apache-2.0'

Files:

  • agents/src/inference/stt.ts
  • agents/src/inference/llm.ts
  • agents/src/inference/tts.ts
**/*.{ts,tsx}?(test|example|spec)

📄 CodeRabbit inference engine (.cursor/rules/agent-core.mdc)

When testing inference LLM, always use full model names from agents/src/inference/models.ts (e.g., 'openai/gpt-4o-mini' instead of 'gpt-4o-mini')

Files:

  • agents/src/inference/stt.ts
  • agents/src/inference/llm.ts
  • agents/src/inference/tts.ts
**/*.{ts,tsx}?(test|example)

📄 CodeRabbit inference engine (.cursor/rules/agent-core.mdc)

Initialize logger before using any LLM functionality with initializeLogger({ pretty: true }) from '@livekit/agents'

Files:

  • agents/src/inference/stt.ts
  • agents/src/inference/llm.ts
  • agents/src/inference/tts.ts
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to **/*.{ts,tsx}?(test|example|spec) : When testing inference LLM, always use full model names from `agents/src/inference/models.ts` (e.g., 'openai/gpt-4o-mini' instead of 'gpt-4o-mini')
📚 Learning: 2026-01-16T14:33:39.551Z
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to **/*.{ts,tsx}?(test|example|spec) : When testing inference LLM, always use full model names from `agents/src/inference/models.ts` (e.g., 'openai/gpt-4o-mini' instead of 'gpt-4o-mini')

Applied to files:

  • agents/src/inference/stt.ts
  • agents/src/inference/llm.ts
  • agents/src/inference/tts.ts
📚 Learning: 2026-01-16T14:33:39.551Z
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to examples/src/test_*.ts : For plugin component debugging (STT, TTS, LLM), create test example files prefixed with `test_` under the examples directory and run with `pnpm build && node ./examples/src/test_my_plugin.ts`

Applied to files:

  • agents/src/inference/tts.ts
🧬 Code graph analysis (2)
agents/src/inference/stt.ts (1)
agents/src/inference/tts.ts (1)
  • CartesiaModels (25-29)
agents/src/inference/tts.ts (2)
agents/src/inference/index.ts (3)
  • TTSModels (27-27)
  • ModelWithVoice (28-28)
  • TTSOptions (29-29)
agents/src/inference/utils.ts (1)
  • AnyString (8-8)
🪛 Biome (2.1.2)
agents/src/inference/tts.ts

[error] 58-58: An empty interface is equivalent to {}.

Safe fix: Use a type alias instead.

(lint/suspicious/noEmptyInterface)


[error] 60-60: An empty interface is equivalent to {}.

Safe fix: Use a type alias instead.

(lint/suspicious/noEmptyInterface)


[error] 62-62: An empty interface is equivalent to {}.

Safe fix: Use a type alias instead.

(lint/suspicious/noEmptyInterface)

🔇 Additional comments (10)
agents/src/inference/llm.ts (5)

20-23: LGTM!

New OpenAI model variants follow the established naming convention and expand supported options.


35-36: Preview model variants replaced with GA versions.

The -preview suffixes are removed from Gemini 3 models. Users passing the old preview strings (e.g., 'google/gemini-3-pro-preview') will lose type-safe autocomplete but can still use any model string at runtime due to AnyString in the union. This is likely intentional as models graduate from preview.


43-43: LGTM!

New MoonshotModels type follows the established provider/model naming convention.


45-45: LGTM!

Additive expansion of DeepSeek model support while maintaining the existing v3 model.


85-85: The review comment is based on inaccurate information. Searches of the codebase reveal that QwenModels and KimiModels types do not exist and have never been exported. There are no references to these types anywhere in the repository and no git history indicating they were ever present. The LLMModels union at line 85 correctly includes MoonshotModels (which supports Kimi models via 'moonshotai/kimi-k2-instruct'), and no breaking changes exist.

Likely an incorrect or invalid review comment.

agents/src/inference/stt.ts (3)

27-34: LGTM!

The DeepgramModels type updates look correct - adding flux-general and nova-2-conversationalai variants while following the established provider/model naming convention.


82-94: LGTM! Minor observation on ElevenlabsSTTModels options.

The _STTModels union correctly includes all provider types. Note that ElevenlabsSTTModels isn't explicitly handled in STTOptions (lines 88-94) and falls through to Record<string, unknown>. This is acceptable if ElevenLabs STT has no provider-specific options yet.


36-42: No action needed. The naming of CartesiaModels in both stt.ts and tts.ts does not create a TypeScript conflict because the types are not directly re-exported from the shared index file and remain properly scoped to their respective modules.

agents/src/inference/tts.ts (2)

25-46: Model union expansions look consistent.
New provider/model strings are correctly namespaced and grouped.


64-91: TTS model unions and option mapping updated cleanly.
The unions and conditional mapping now include the new model groups as expected.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In `@agents/src/inference/llm.ts`:
- Around line 85-90: The LLMModels union type is split across multiple lines
causing Prettier to fail; update the declaration of LLMModels so the entire
union is on a single line (e.g., collapse the multi-line union of OpenAIModels,
GoogleModels, MoonshotModels, DeepSeekModels, and AnyString into one line) to
conform with the repo's Prettier rules and re-run formatting/linting for the
file containing the LLMModels type.

In `@agents/src/inference/stt.ts`:
- Around line 36-40: Prettier flags the AssemblyaiModels union formatting;
update the type declarations so each union member is on its own line —
specifically reformat the AssemblyaiModels type (and keep consistent style with
CartesiaModels and ElevenlabsSTTModels) so the two members
'assemblyai/universal-streaming' and
'assemblyai/universal-streaming-multilingual' are split across separate lines to
satisfy Prettier.

In `@agents/src/inference/tts.ts`:
- Around line 58-62: Replace the three empty interface declarations
DeepgramTTSOptions, RimeOptions, and InworldOptions with equivalent type aliases
(e.g. "type DeepgramTTSOptions = {}") so they are not flagged as empty
interfaces by CI; update the declarations for DeepgramTTSOptions, RimeOptions,
and InworldOptions in the tts module accordingly, keeping names unchanged and
preserving exported visibility.
- Around line 64-72: Prettier flagged formatting on the _TTSModels / TTSModels
union; reformat these type declarations to match the project's Prettier rules
(consistent line breaks and pipe placement) — specifically update the _TTSModels
and export type TTSModels declarations (symbols: _TTSModels and TTSModels) so
the union members are arranged and indented according to the repo style, then
run Prettier (or your editor's format) to ensure CI passes.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3e2fbb2 and 5c736a8.

📒 Files selected for processing (4)
  • .changeset/kind-coins-add.md
  • agents/src/inference/llm.ts
  • agents/src/inference/stt.ts
  • agents/src/inference/tts.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/agent-core.mdc)

Add SPDX-FileCopyrightText and SPDX-License-Identifier headers to all newly added files with '// SPDX-FileCopyrightText: 2025 LiveKit, Inc.' and '// SPDX-License-Identifier: Apache-2.0'

Files:

  • agents/src/inference/llm.ts
  • agents/src/inference/stt.ts
  • agents/src/inference/tts.ts
**/*.{ts,tsx}?(test|example|spec)

📄 CodeRabbit inference engine (.cursor/rules/agent-core.mdc)

When testing inference LLM, always use full model names from agents/src/inference/models.ts (e.g., 'openai/gpt-4o-mini' instead of 'gpt-4o-mini')

Files:

  • agents/src/inference/llm.ts
  • agents/src/inference/stt.ts
  • agents/src/inference/tts.ts
**/*.{ts,tsx}?(test|example)

📄 CodeRabbit inference engine (.cursor/rules/agent-core.mdc)

Initialize logger before using any LLM functionality with initializeLogger({ pretty: true }) from '@livekit/agents'

Files:

  • agents/src/inference/llm.ts
  • agents/src/inference/stt.ts
  • agents/src/inference/tts.ts
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to **/*.{ts,tsx}?(test|example|spec) : When testing inference LLM, always use full model names from `agents/src/inference/models.ts` (e.g., 'openai/gpt-4o-mini' instead of 'gpt-4o-mini')
📚 Learning: 2026-01-16T14:33:39.551Z
Learnt from: CR
Repo: livekit/agents-js PR: 0
File: .cursor/rules/agent-core.mdc:0-0
Timestamp: 2026-01-16T14:33:39.551Z
Learning: Applies to **/*.{ts,tsx}?(test|example|spec) : When testing inference LLM, always use full model names from `agents/src/inference/models.ts` (e.g., 'openai/gpt-4o-mini' instead of 'gpt-4o-mini')

Applied to files:

  • agents/src/inference/llm.ts
  • agents/src/inference/stt.ts
  • agents/src/inference/tts.ts
🧬 Code graph analysis (2)
agents/src/inference/stt.ts (1)
agents/src/inference/tts.ts (1)
  • CartesiaModels (25-29)
agents/src/inference/tts.ts (3)
agents/src/inference/utils.ts (1)
  • AnyString (8-8)
plugins/deepgram/src/tts.ts (1)
  • TTSOptions (21-29)
plugins/cartesia/src/tts.ts (1)
  • TTSOptions (30-45)
🪛 Biome (2.1.2)
agents/src/inference/tts.ts

[error] 58-58: An empty interface is equivalent to {}.

Safe fix: Use a type alias instead.

(lint/suspicious/noEmptyInterface)


[error] 60-60: An empty interface is equivalent to {}.

Safe fix: Use a type alias instead.

(lint/suspicious/noEmptyInterface)


[error] 62-62: An empty interface is equivalent to {}.

Safe fix: Use a type alias instead.

(lint/suspicious/noEmptyInterface)

🪛 GitHub Actions: Build
agents/src/inference/llm.ts

[error] 85-85: Prettier: Replace ⏎··|·OpenAIModels⏎··|·GoogleModels⏎··|·MoonshotModels⏎··|·DeepSeekModels with OpenAIModels|GoogleModels|MoonshotModels|DeepSeekModels [Error/prettier/prettier]

agents/src/inference/stt.ts

[error] 38-38: Prettier: Replace ·'assemblyai/universal-streaming' with ⏎··|·'assemblyai/universal-streaming'⏎· [Error/prettier/prettier]

agents/src/inference/tts.ts

[warning] 58-58: An empty interface is equivalent to {}. [Warning/@typescript-eslint/no-empty-interface]


[warning] 60-60: An empty interface is equivalent to {}. [Warning/@typescript-eslint/no-empty-interface]


[warning] 62-62: An empty interface is equivalent to {}. [Warning/@typescript-eslint/no-empty-interface]


[error] 64-64: Prettier: Replace CartesiaModels|DeepgramTTSModels|ElevenlabsModels|RimeModels with CartesiaModels|DeepgramTTSModels|ElevenlabsModels|RimeModels [Error/prettier/prettier]

🔇 Additional comments (9)
agents/src/inference/llm.ts (3)

19-32: LGTM!

The new OpenAI GPT-5.x model variants follow the established naming convention and integrate correctly into the existing type union.


34-41: LGTM!

The Google models have been updated from preview to stable variants (gemini-3-pro, gemini-3-flash), which aligns with the PR objective of matching the latest inference models.


43-45: LGTM!

New MoonshotModels and expanded DeepSeekModels types are well-defined and follow the provider/model naming convention.

agents/src/inference/stt.ts (2)

27-34: LGTM!

DeepgramModels appropriately expanded with flux-general and nova-2-conversationalai variants, following the established naming convention.


80-84: LGTM!

The _STTModels union correctly includes all the new model types (ElevenlabsSTTModels, AssemblyaiModels) alongside existing ones.

agents/src/inference/tts.ts (3)

25-31: LGTM!

CartesiaModels and DeepgramTTSModels are well-defined. The Cartesia sonic variants and Deepgram aura models follow the established naming convention.


40-46: LGTM!

InworldModels and updated RimeModels types are correctly defined with the provider/model naming convention.


76-86: LGTM!

The TTSOptions<TModel> conditional type correctly maps each model type to its corresponding options interface, with proper nesting and fallback to Record<string, unknown>.

.changeset/kind-coins-add.md (1)

1-5: LGTM!

The changeset correctly identifies this as a patch release for @livekit/agents. A patch bump is appropriate since the changes are additive (new model types) without breaking existing functionality.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link
Contributor

@lukasIO lukasIO left a comment

Choose a reason for hiding this comment

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

coderabbitai is right about the formatter still needing to run.

Looks good to me.

A general question: should we surface the fact that some of these are deprecated now? Right now users don't get any info on this, wondering if we should collect the deprecated ones in an Array and log a warning if they're still being used?

@davidzhao
Copy link
Member Author

A general question: should we surface the fact that some of these are deprecated now? Right now users don't get any info on this, wondering if we should collect the deprecated ones in an Array and log a warning if they're still being used?

we should have a better strategy of handling models.. it seems relying on the SDK isn't the best solution. (someone using an older version of the model wouldn't be able to see the warning).

ideally these are coming from the server side in our protocol.. the ability to return an error.

@davidzhao davidzhao merged commit ebfb82f into main Jan 26, 2026
8 checks passed
@davidzhao davidzhao deleted the require-stt-model branch January 26, 2026 16:02
@github-actions github-actions bot mentioned this pull request Jan 24, 2026
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.

4 participants