Skip to content

feat(inworld): add inworld-tts-2 model#1396

Merged
tinalenguyen merged 1 commit intomainfrom
claude/quirky-galileo-Rw3kN
May 5, 2026
Merged

feat(inworld): add inworld-tts-2 model#1396
tinalenguyen merged 1 commit intomainfrom
claude/quirky-galileo-Rw3kN

Conversation

@toubatbrian
Copy link
Copy Markdown
Contributor

Summary

Ports livekit/agents#5646 ((inworld tts): add new model) from the Python livekit-agents repo into agents-js, exposing Inworld's new inworld-tts-2 model.

This is an automated Claude Code Routine port created by @toubatbrian.

cc @toubatbrian @livekit/agent-devs for review.

Ported features

  1. New inworld-tts-2 model on the Inference Gateway TTS client. Adds 'inworld/inworld-tts-2' to the InworldModels literal union in agents/src/inference/tts.ts so callers using inference.TTS({ model: 'inworld/inworld-tts-2', ... }) get type-checked autocomplete and the value is accepted by the gateway-bound type.

  2. TTSModels literal exported from @livekit/agents-plugin-inworld. Mirrors the new Python TTSModels = Literal["inworld-tts-2", "inworld-tts-1.5-max"] alias by exporting:

    export type TTSModels = 'inworld-tts-2' | 'inworld-tts-1.5-max';

    TTSOptions.model is now typed TTSModels | string (matching model: TTSModels | str in Python), preserving the freeform-string fallback so users can still pass any model id the Inworld API accepts while getting IDE autocomplete on the curated names.

Implementation notes / nuances vs. Python

  • The Python plugin re-exports TTSModels from livekit/plugins/inworld/__init__.py. In the JS plugin, src/index.ts already does export * from './tts.js', so adding the new export type TTSModels in tts.ts is automatically re-exported from the package root — no additional change to index.ts needed.
  • The Python PR also widens both __init__ and update_options signatures to TTSModels | str. In the JS plugin those argument types come transitively from TTSOptions['model'] (Partial<TTSOptions> in constructor / updateOptions), so widening the field type on the interface widens the constructor and updateOptions simultaneously — a single edit covers both call sites that the Python diff touches in two places.
  • TS-level caveat: TTSModels | string widens to string in TypeScript, so the union is effectively documentation/IDE help, not a runtime constraint. We chose this form (over TTSModels | (string & {})) to stay consistent with how cartesia, minimax, google and neuphonic plugins already type their model field in this repo.
  • No changes are needed to existing tests: plugins/inworld/src/tts.test.ts doesn't pin a model and the inference TTS tests don't reference the new literal. All 51 tests in agents/src/inference/tts.test.ts continue to pass.

Out-of-scope vs. Python diff

The Python PR also modifies livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/__init__.py to export TTSModels alongside the other public symbols. The TS equivalent is automatic via export * from './tts.js' (see note above), so there is no analogous file edit on the JS side.

Changeset

patch bump for @livekit/agents-plugin-inworld and @livekit/agents (the latter because the public InworldModels union exported from agents/inference also gained a member).

Test plan

  • pnpm --filter @livekit/agents build — passes
  • pnpm --filter @livekit/agents-plugin-inworld build — passes
  • pnpm --filter @livekit/agents-plugin-inworld lint — passes (clean)
  • pnpm --filter @livekit/agents lint — passes (no new warnings)
  • pnpm vitest run agents/src/inference/tts.test.ts — 51/51 pass
  • Manual smoke test against the Inworld API with model: 'inworld-tts-2' (would require live INWORLD_API_KEY; deferred to human reviewer)

Generated by Claude Code

Ports livekit/agents#5646 from livekit/agents.

- Adds 'inworld/inworld-tts-2' to the InworldModels union in
  @livekit/agents/inference TTS so the new model is selectable via the
  LiveKit Inference Gateway TTS client.
- Exports a new TTSModels type from @livekit/agents-plugin-inworld
  ('inworld-tts-2' | 'inworld-tts-1.5-max') and updates TTSOptions.model
  to TTSModels | string, matching the Python plugin so users get
  autocomplete on the curated names while still being able to pass any
  custom model id.
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 5, 2026

🦋 Changeset detected

Latest commit: ce04b81

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

This PR includes changesets to release 28 packages
Name Type
@livekit/agents-plugin-inworld Patch
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-assemblyai 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-elevenlabs Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-hedra 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-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-phonic 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-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

Copy link
Copy Markdown
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: 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 merged commit 5204a06 into main May 5, 2026
8 of 9 checks passed
@tinalenguyen tinalenguyen deleted the claude/quirky-galileo-Rw3kN branch May 5, 2026 17:53
@github-actions github-actions Bot mentioned this pull request May 5, 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