Skip to content

feat: default FishAudio TTS model to s3-pro - #11633

Open
lumpinif wants to merge 2 commits into
AstrBotDevs:masterfrom
lumpinif:feat/fishaudio-s3-pro-default
Open

lumpinif wants to merge 2 commits into
AstrBotDevs:masterfrom
lumpinif:feat/fishaudio-s3-pro-default

Conversation

@lumpinif

@lumpinif lumpinif commented Dec 3, 2026 •

Copy link
Copy Markdown

I maintain Fish Audio's SDKs and docs.

Fish Audio's recommended text-to-speech model, and the default of its official Python SDK, is now S3 Pro (s3-pro). #9381 set the FishAudio TTS provider's default to s2-pro because that was the SDK default at the time; this moves it to the current one. S3 Pro costs the same as S2 Pro (pricing).

Modifications / 改动点

  • astrbot/core/config/default.py: the FishAudio TTS(API) template now uses "model": "s3-pro".
  • astrbot/core/provider/sources/fishaudio_tts_api_source.py: the fallback for a config without model is s3-pro.
  • tests/test_fishaudio_tts_source.py (new): checks the default model header, that a configured model is sent unchanged, and that a provider built from the dashboard template in CONFIG_METADATA_2 sends s3-pro.

Providers that already have a model keep it.

  • This is NOT a breaking change. / 这不是一个破坏性变更。

Screenshots or Test Results / 运行截图或测试结果

Verification steps:

  1. Unit test and lint on the 3 changed files:
$ uv run pytest -q tests/test_fishaudio_tts_source.py
3 passed, 1 warning
$ uv run ruff format --check astrbot/core/config/default.py astrbot/core/provider/sources/fishaudio_tts_api_source.py tests/test_fishaudio_tts_source.py
3 files already formatted
$ uv run ruff check astrbot/core/config/default.py astrbot/core/provider/sources/fishaudio_tts_api_source.py tests/test_fishaudio_tts_source.py
All checks passed!

With the source file from master, test_model_defaults_to_s3_pro fails; with the template in default.py set back to s2-pro, test_dashboard_template_sends_s3_pro fails.

  1. Live: ProviderFishAudioTTSAPI built from the shipped template in CONFIG_METADATA_2 (character 可莉, format set to mp3), get_audio("Read [the guide](https://example.com/guide) today.") against the Fish Audio API returns an MP3 that transcribes as "Read the guide today!". S3 Pro reads Markdown link text; S2 models drop it.

Not run: make pr-test-neo / pr-test-full, the WebUI, CI.


Checklist / 检查清单

  • 😊 If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
    / 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。
    (Not discussed beforehand. The change is a default value, not a new feature.)

  • 👀 My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
    / 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。

  • 📚 I checked the affected WebUI instructions and screenshots in docs/zh and docs/en against the changed navigation, page structure, and labels, and updated them in this PR (or explained why no documentation update is needed). For renamed, moved, or merged entry points, I included an old entry → new entry mapping in the documentation and changelog.
    / 我已对照变化后的 WebUI 入口、页面结构和术语,核对并在本 PR 中更新 docs/zh 和 docs/en 的相关操作说明与截图(或说明无需更新文档的原因)。入口改名、移动或合并时,已在文档和 changelog 中补充 旧入口 → 新入口 对照。
    (No documentation update needed: no navigation, page or label changes, and docs/zh and docs/en do not mention the FishAudio TTS model.)

  • 🤓 I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
    / 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到 requirements.txt 和 pyproject.toml 文件相应位置。

  • 😮 My changes do not introduce malicious code.
    / 我的更改没有引入恶意代码。

Summary by Sourcery

Use Fish Audio’s current recommended s3-pro model as the default for new or unspecified FishAudio TTS configurations.

Enhancements:

  • Set the FishAudio TTS(API) template and fallback model to s3-pro, while preserving explicitly configured models.

Tests:

  • Add tests covering the default model, configured model preservation, and the dashboard template's model.

The existing tests built their own configuration, so they still passed with
the dashboard template reverted to s2-pro. This case loads the template from
CONFIG_METADATA_2 and expects the s3-pro header.
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-12-03T13:17:53.811461Z
We couldn’t complete this review. Comment @codex review to try again.
7c9572e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="tests/test_fishaudio_tts_source.py" line_range="16" />
<code_context>
+    )
+
+
+def test_model_defaults_to_s3_pro():
+    assert _provider().headers["model"] == "s3-pro"
+
</code_context>
<issue_to_address>
**Test file added despite policy**

The PR adds a new test file, contrary to the repository's instruction not to generate test files.

Remove the new test file to comply with the repository instruction.
</issue_to_address>

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

)


def test_model_defaults_to_s3_pro():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ Low · Test file added despite policy

The PR adds a new test file, contrary to the repository's instruction not to generate test files.

Remove the new test file to comply with the repository instruction.

Prompt for AI agents
In `tests/test_fishaudio_tts_source.py` at line 16:

**Test file added despite policy**

The PR adds a new test file, contrary to the repository's instruction not to generate test files.

Remove the new test file to comply with the repository instruction.

From .github/copilot-instructions.md L27:

Do not generate test files for now.

This branch has not been deployed

No deployments
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.

1 participant