feat(inworld): add delivery mode option#1577
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 8925ccd The changes in this PR will be included in the next version bump. This PR includes changesets to release 33 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 21, 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
delivery_modeto the Inworld TTS plugin, exposing the TTS-2-onlydeliveryModeoutput-variation control. Accepts"DELIVERY_MODE_UNSPECIFIED","STABLE","BALANCED", or"CREATIVE"per the Inworld REST API reference.createpacket(
SynthesizeStreamvia_InworldConnection._send_loop) and the HTTPstreaming request body (
ChunkedStream._run). Mirrors the existingtext_normalization/timestamp_typeplumbing.TTS.__init__,TTS.update_options, and_TTSOptions, withthe same
_validate_str_paramvalidation used by the sibling enum params.Why
Inworld TTS-2 introduced
deliveryModeand silently ignorestemperatureon that model. Previously the plugin gave TTS-2 users no way to steer output
variation. Defaults are unchanged —
delivery_modeis opt-in and absent fromthe wire when unset, letting the server default (
BALANCED) apply.No client-side model-gating: Inworld silently ignores the wrong knob on each
model, and gating client-side would require tracking Inworld's per-model field
support over time. The docstring calls out the TTS-2-only semantics.
Test plan
uv run pytest tests/test_plugin_inworld_tts.py— 9 new unit tests pass(option round-trip + validation for all four documented values + rejection
of unknown values + wire-payload assertions for both WS and HTTP paths,
including the negative case that
deliveryModeis omitted when unset)make check— ruff lint, ruff format, mypy cleanline with
delivery_mode="STABLE","BALANCED", and"CREATIVE"againstinworld-tts-2. All three were accepted (no fallback toEXPRESSIVEneeded —the REST docs are authoritative, the Inworld Python SDK docstring is stale)
and produced audibly different cadence/expressiveness.