feat(inworld): add inworld-tts-2 model#1396
Merged
tinalenguyen merged 1 commit intomainfrom May 5, 2026
Merged
Conversation
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.
|
|
🦋 Changeset detectedLatest commit: ce04b81 The changes in this PR will be included in the next version bump. This PR includes changesets to release 28 packages
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 |
tinalenguyen
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports livekit/agents#5646 (
(inworld tts): add new model) from the Pythonlivekit-agentsrepo intoagents-js, exposing Inworld's newinworld-tts-2model.This is an automated Claude Code Routine port created by @toubatbrian.
cc @toubatbrian @livekit/agent-devs for review.
Ported features
New
inworld-tts-2model on the Inference Gateway TTS client. Adds'inworld/inworld-tts-2'to theInworldModelsliteral union inagents/src/inference/tts.tsso callers usinginference.TTS({ model: 'inworld/inworld-tts-2', ... })get type-checked autocomplete and the value is accepted by the gateway-bound type.TTSModelsliteral exported from@livekit/agents-plugin-inworld. Mirrors the new PythonTTSModels = Literal["inworld-tts-2", "inworld-tts-1.5-max"]alias by exporting:TTSOptions.modelis now typedTTSModels | string(matchingmodel: TTSModels | strin 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
TTSModelsfromlivekit/plugins/inworld/__init__.py. In the JS plugin,src/index.tsalready doesexport * from './tts.js', so adding the newexport type TTSModelsintts.tsis automatically re-exported from the package root — no additional change toindex.tsneeded.__init__andupdate_optionssignatures toTTSModels | str. In the JS plugin those argument types come transitively fromTTSOptions['model'](Partial<TTSOptions>inconstructor/updateOptions), so widening the field type on the interface widens the constructor andupdateOptionssimultaneously — a single edit covers both call sites that the Python diff touches in two places.TTSModels | stringwidens tostringin TypeScript, so the union is effectively documentation/IDE help, not a runtime constraint. We chose this form (overTTSModels | (string & {})) to stay consistent with howcartesia,minimax,googleandneuphonicplugins already type theirmodelfield in this repo.plugins/inworld/src/tts.test.tsdoesn't pin a model and the inference TTS tests don't reference the new literal. All 51 tests inagents/src/inference/tts.test.tscontinue to pass.Out-of-scope vs. Python diff
The Python PR also modifies
livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/__init__.pyto exportTTSModelsalongside the other public symbols. The TS equivalent is automatic viaexport * from './tts.js'(see note above), so there is no analogous file edit on the JS side.Changeset
patchbump for@livekit/agents-plugin-inworldand@livekit/agents(the latter because the publicInworldModelsunion exported fromagents/inferencealso gained a member).Test plan
pnpm --filter @livekit/agents build— passespnpm --filter @livekit/agents-plugin-inworld build— passespnpm --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 passmodel: 'inworld-tts-2'(would require liveINWORLD_API_KEY; deferred to human reviewer)Generated by Claude Code