feat: add S2.1 Pro model support - #162
Conversation
|
Warning Review limit reached
Next review available in: 30 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughTTS synchronous and asynchronous methods now default to ChangesTTS model update
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
tests/unit/test_tts.py (1)
66-66: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover all changed default paths.
This assertion covers only synchronous
stream; add equivalent coverage for synchronous/asyncconvertand both WebSocket methods so future default drift is detected across every changed entry point.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/unit/test_tts.py` at line 66, Add assertions covering the default model header for synchronous and asynchronous convert methods and both WebSocket methods, matching the existing synchronous stream assertion in the relevant test flow. Ensure each changed entry point verifies the default value is “s2.1-pro” so future default drift is detected consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/fishaudio/types/shared.py`:
- Around line 25-46: Update the model type aliases in shared.py to separate the
supported-model Literal used by SUPPORTED_MODELS from a permissive pass-through
model alias. In tts.py, annotate parameters that only accept supported models
with the known-model alias, while methods that intentionally forward
undocumented or deprecated values should use the permissive alias; keep
warn_if_deprecated_model accepting those runtime values.
---
Nitpick comments:
In `@tests/unit/test_tts.py`:
- Line 66: Add assertions covering the default model header for synchronous and
asynchronous convert methods and both WebSocket methods, matching the existing
synchronous stream assertion in the relevant test flow. Ensure each changed
entry point verifies the default value is “s2.1-pro” so future default drift is
detected consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 527983eb-5505-4a43-bf74-fc02f769518e
📒 Files selected for processing (4)
README.mdsrc/fishaudio/resources/tts.pysrc/fishaudio/types/shared.pytests/unit/test_tts.py
4304a68 to
06eb85c
Compare
06eb85c to
999c59d
Compare
| DeprecationWarning, | ||
| stacklevel=3, | ||
| ) | ||
| elif model not in SUPPORTED_MODELS: |
There was a problem hiding this comment.
If we can accept string as the model name, we don’t need to alert anything when user enter anything
Kilerd
left a comment
There was a problem hiding this comment.
We don’t need to warn for the unknown model name
Some feedback I got was to warn user if the model passed is different than what is being served, I'll remove this part but it was part of the inspiritation |
Update the default model, supported model types, pass-through behavior, documentation, and default-path coverage for s2.1-pro. AI-Assisted-By: Codex
c7148a5 to
89e5269
Compare
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
Default synchronous, asynchronous, and WebSocket TTS calls to S2.1 Pro. Keep undocumented model values pass-through but emits a warning to callers that model may not supported and behavior may fallback to default server model.
Summary by CodeRabbit
New Features
s2.1-promodel for streaming, conversion, and WebSocket generation.s2.1-proin Text-to-Speech documentation.s1,s2-pro, ands2.1-pro.Bug Fixes