[ISSUE-031] Fix --stream default model — auto-select sona_speech_1 when no -m given#60
Merged
Merged
Conversation
…en no -m Streaming only supports sona_speech_1, but `_run_tts` resolved the model to the generic default (sona_speech_2) on the streaming path too, so `supertone tts ... --stream` failed unless the user added `-m sona_speech_1`. When --stream is set and no explicit -m/--model is given, resolve the model to sona_speech_1 (bypassing config default_model, which would otherwise always break streaming). An explicit incompatible model still errors as before. Tests: test_stream_defaults_to_sona_speech_1, test_stream_explicit_incompatible_model_still_errors. Closes #59 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rtion Address review findings on PR #60: - Add test_stream_default_overrides_config_default_model — covers the PR's load-bearing guarantee (config default_model is bypassed on the streaming path) which was previously untested (RL-004). - Assert the "Streaming requires sona_speech_1" message in the incompatible-model test to pin the validate_params path. - Note "keep in sync with _STREAM_MODELS" on the fix comment (RL-005). - Record review in docs/review_notes.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pillip
added a commit
that referenced
this pull request
Jun 17, 2026
…eview lessons - CHANGELOG: [Unreleased] entry for --stream auto-selecting sona_speech_1 - README: clarify streaming auto-selects sona_speech_1 when no --model given - issues.md/STATUS.md: ISSUE-031 Status=done, PR #60 - review_lessons.md: RL-004 frequency 2 (ISSUE-031), new RL-005 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pillip
added a commit
that referenced
this pull request
Jun 17, 2026
- src/supertone_cli/__init__.py: bump __version__ to 0.2.2
- CHANGELOG.md: cut [0.2.2] - 2026-06-17
- Changed: tts --stream auto-selects sona_speech_1 when no --model is
given, so streaming works without -m sona_speech_1 (ISSUE-031, PR #60)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Closes #59
Problem
supertone tts "hello" -v <voice-id> --streamfailed withError: Streaming requires sona_speech_1, but model is sona_speech_2.because_run_ttsresolved the model to the generic default (sona_speech_2) on the streaming path. Streaming is only supported onsona_speech_1, forcing users to pass-m sona_speech_1on every--streamcall.Fix
In
src/supertone_cli/commands/tts.py:_run_tts, when--streamis set and no explicit-m/--modelis given, resolve the model tosona_speech_1— bypassingconfig default_model(which would otherwise always break streaming). An explicit incompatible model (e.g.--stream -m sona_speech_2) still errors as before.Behavior
tts "hi" -v <id> --stream→ works (autosona_speech_1) ✅tts "hi" -v <id> --stream -m sona_speech_1→ works ✅tts "hi" -v <id> --stream -m sona_speech_2→ exit 3, incompatible-model error (unchanged) ✅Tests
test_stream_defaults_to_sona_speech_1— asserts the resolved modeltest_stream_explicit_incompatible_model_still_errorsruff check .clean.Follow-up (separate repo)
The API-docs
en|ko|ja/docs/sdks/cli.mdxcurrently force-m sona_speech_1in every--streamexample; those can drop the flag once this ships.