Skip to content

docs: correct TTS model header guidance across agent-facing and authored docs - #111

Open
M2Night wants to merge 1 commit into
mainfrom
docs/update-agent-model-guidance
Open

docs: correct TTS model header guidance across agent-facing and authored docs#111
M2Night wants to merge 1 commit into
mainfrom
docs/update-agent-model-guidance

Conversation

@M2Night

@M2Night M2Night commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Hand-authored docs and both agent skills still described the TTS model header as required with only s1/s2-pro available — predating the S2.1-Pro launch. Live testing (trace IDs below) shows the header is optional, and omitted or unrecognized values fall back to the paid s2.1-pro registry default in edge-api.

This PR fixes every hand-authored occurrence. The openapi.json mirror is intentionally untouched — it syncs automatically once the companion backend PR (platform-api fix/tts-model-header-optional-default) is deployed.

Changes

File Change
.mintlify/skills/fish-audio-api/SKILL.md Header optional, all four models, fallback documented; recommend s2.1-pro (production) / s2.1-pro-free (free tier) per Models Overview; samples moved to s2.1-pro (same list price as s2-pro); multi-speaker + normalize_loudness scoped to s2-pro and the S2.1-Pro family; removed obsolete 422-on-missing-model troubleshooting entry
.mintlify/skills/fish-audio-sdk/SKILL.md + references/text-to-speech.md Document the SDK typing lag: the API accepts S2.1 models and both SDKs forward them at runtime, but SDK type definitions still list only s1/s2-pro — agents are told to use # type: ignore / as casts, or the raw-API skill
api-reference/asyncapi.yml WebSocket model header optional, full enum, fallback documented; three multi-speaker notes and one normalize_loudness note corrected
api-reference/sdk/javascript/api-reference.mdx Note that the Backends type lags the API and how to pass S2.1 values
features/text-to-speech.mdx (default) on s2-pro qualified as the Python SDK default; raw-API section no longer claims the header is required
developer-guide/core-features/emotions.mdx [bracket] emotion syntax attributed to the S2 family, not "the default S2-Pro model"
developer-guide/resources/agent-quickstart.mdx Optional header, all four models, recommendation and fallback

Evidence

Behavior verified live with traceparent-tagged requests (per the observability docs):

Scenario model trace-id Result
Omitted 5e56d2de69a1a713a62e369c01aa8e92 200, paid tier
Misspelled s2pro 9027a9d2f50f325d9ccdce983e524f4b 200, paid tier, no error
Valid s2-pro 9a40d052f02ec2cfbf05eb70a1b1b452 200
Valid s2.1-pro aaa50a97136c81c78926b47011379de6 200

Capability scoping cross-checked against models-overview.mdx, platform-web tts-models.ts, and the inference engine's model-agnostic normalize_loudness handling. AsyncAPI validated with the official @asyncapi/parser (0 errors). Reviewed across two external review rounds; all findings addressed.

Coordination notes

  • The check-openapi CI job currently fails on every PR because the live schema has drifted from the committed mirror (unrelated pvc_*/422 changes); it resolves when the nightly update-openapi job's auto-PR lands.
  • Merge order with the backend PR is flexible for this PR (it does not touch openapi.json), but the full fix is complete only after platform-api's fix/tts-model-header-optional-default deploys and the schema mirror syncs.
  • docs: fix TTS model header — optional, default s2.1-pro, document fallback #110 is superseded by that auto-sync and can be closed.
  • Follow-up (separate repos): add S2.1 models to the Python SDK Model literal (fish-audio-python types/shared.py) and the JS SDK Backends type, then simplify the SDK-skill caveats.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated text-to-speech guidance for the S2.1-Pro model family, including production and free-tier options.
    • Clarified that model selection is optional and defaults to S2.1-Pro when omitted or unrecognized.
    • Documented expanded multi-speaker synthesis, prosody controls, and natural-language emotion cues.
    • Updated REST, WebSocket, Python, and JavaScript examples and SDK usage guidance.
    • Marked older speech models as deprecated and documented SDK typing workarounds and API defaults.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@M2Night, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b6a757d8-3fe7-4b36-ab55-196000fa530a

📥 Commits

Reviewing files that changed from the base of the PR and between 3f8b4fa and 076e84b.

📒 Files selected for processing (1)
  • api-reference/openapi.json
📝 Walkthrough

Walkthrough

The documentation now covers S2.1-Pro models across TTS APIs, WebSocket usage, SDKs, examples, multi-speaker synthesis, prosody controls, and emotion cues. Model headers are optional and fall back to s2.1-pro.

Changes

TTS model guidance

Layer / File(s) Summary
API model contract
api-reference/asyncapi.yml, features/text-to-speech.mdx, developer-guide/resources/agent-quickstart.mdx, developer-guide/core-features/emotions.mdx
Documents S2.1-Pro model values, optional model selection, fallback to s2.1-pro, and expanded multi-speaker, prosody, and emotion support.
API usage guidance
.mintlify/skills/fish-audio-api/SKILL.md
Updates model recommendations, validation rules, WebSocket guidance, and Python and Node.js examples.
SDK model guidance
.mintlify/skills/fish-audio-sdk/SKILL.md, .mintlify/skills/fish-audio-sdk/references/text-to-speech.md, api-reference/sdk/javascript/api-reference.mdx
Documents runtime support, SDK typing limitations, workarounds, and deprecated model values.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: python

Suggested reviewers: twangodev

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the documentation updates for TTS model header guidance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/update-agent-model-guidance

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mintlify

mintlify Bot commented Jul 31, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
hanabiaiinc 🟢 Ready View Preview Jul 31, 2026, 6:03 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
features/text-to-speech.mdx (1)

112-115: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Document the Python path to the recommended model.

Line 110 recommends s2.1-pro for production, but Line 115 tells Python users to pass model="s2-pro". The nearby Python examples omit model, so they use the older SDK default.

Add the runtime and type-checker workaround for model="s2.1-pro", or state that these examples intentionally use s2-pro.

As per coding guidelines, prioritize accuracy and usability of documentation content.

🤖 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 `@features/text-to-speech.mdx` around lines 112 - 115, Update the Python
guidance and nearby examples in the model-selection section so they consistently
document the recommended s2.1-pro model. Include the necessary runtime and
type-checker workaround for passing model="s2.1-pro"; alternatively, explicitly
state that the examples intentionally use the older s2-pro default.

Source: Coding guidelines

🤖 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 @.mintlify/skills/fish-audio-api/SKILL.md:
- Around line 87-94: Add the missing shell continuation character to the model
header in both curl examples, including the single-speaker and the example
around the second model header, so each following --data line remains part of
the same curl command.

In `@api-reference/asyncapi.yml`:
- Around line 60-73: Align the model binding with its documented fallback by
changing the enum-based schema to a string schema that permits omitted or
unrecognized values to fall back to s2.1-pro, while preserving the supported
model names in the description or examples. Update both the binding definition
and the Connection Headers documentation consistently.

In `@developer-guide/resources/agent-quickstart.mdx`:
- Line 110: Update the TTS model-selection documentation and the corresponding
POST /v1/tts OpenAPI definition so they agree on whether the model header is
required; preserve the documented default only if the header remains optional,
otherwise state that callers must provide it.

---

Nitpick comments:
In `@features/text-to-speech.mdx`:
- Around line 112-115: Update the Python guidance and nearby examples in the
model-selection section so they consistently document the recommended s2.1-pro
model. Include the necessary runtime and type-checker workaround for passing
model="s2.1-pro"; alternatively, explicitly state that the examples
intentionally use the older s2-pro default.
🪄 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: b33ba9ba-05b8-4f52-b8e7-f6ea6cd3aeb6

📥 Commits

Reviewing files that changed from the base of the PR and between 87c0c10 and c76c74a.

📒 Files selected for processing (8)
  • .mintlify/skills/fish-audio-api/SKILL.md
  • .mintlify/skills/fish-audio-sdk/SKILL.md
  • .mintlify/skills/fish-audio-sdk/references/text-to-speech.md
  • api-reference/asyncapi.yml
  • api-reference/sdk/javascript/api-reference.mdx
  • developer-guide/core-features/emotions.mdx
  • developer-guide/resources/agent-quickstart.mdx
  • features/text-to-speech.mdx

Comment thread .mintlify/skills/fish-audio-api/SKILL.md
Comment thread api-reference/asyncapi.yml
Comment thread developer-guide/resources/agent-quickstart.mdx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
.mintlify/skills/fish-audio-api/SKILL.md (1)

93-94: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Restore the shell continuation after each model header.

The current examples omit \ at Line 93 and Line 110. Bash ends the curl command there, so each following --data line runs as a separate command. Add the continuation to both headers.

Proposed fix
-  --header "model: s2.1-pro"
+  --header "model: s2.1-pro" \

Apply the same change to both curl examples.

Also applies to: 110-111

🤖 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 @.mintlify/skills/fish-audio-api/SKILL.md around lines 93 - 94, Restore the
shell continuation character after the model header in both curl examples,
including the examples anchored by the `--header "model: s2.1-pro"` lines and
the corresponding header near the second example, so each following `--data`
option remains part of the same curl command.
🤖 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.

Duplicate comments:
In @.mintlify/skills/fish-audio-api/SKILL.md:
- Around line 93-94: Restore the shell continuation character after the model
header in both curl examples, including the examples anchored by the `--header
"model: s2.1-pro"` lines and the corresponding header near the second example,
so each following `--data` option remains part of the same curl command.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6bdd5be3-e9f1-4f93-9eca-086e929aa693

📥 Commits

Reviewing files that changed from the base of the PR and between c76c74a and 3f8b4fa.

📒 Files selected for processing (8)
  • .mintlify/skills/fish-audio-api/SKILL.md
  • .mintlify/skills/fish-audio-sdk/SKILL.md
  • .mintlify/skills/fish-audio-sdk/references/text-to-speech.md
  • api-reference/asyncapi.yml
  • api-reference/sdk/javascript/api-reference.mdx
  • developer-guide/core-features/emotions.mdx
  • developer-guide/resources/agent-quickstart.mdx
  • features/text-to-speech.mdx
🚧 Files skipped from review as they are similar to previous changes (6)
  • developer-guide/resources/agent-quickstart.mdx
  • developer-guide/core-features/emotions.mdx
  • .mintlify/skills/fish-audio-sdk/references/text-to-speech.md
  • api-reference/sdk/javascript/api-reference.mdx
  • features/text-to-speech.mdx
  • api-reference/asyncapi.yml

…red docs

The model header was documented as required with only s1/s2-pro
available, predating the S2.1-Pro launch. Live-verified behavior
(trace IDs 5e56d2de…, 9027a9d2…, 9a40d052…, aaa50a97…): the header is
optional, and omitted or unrecognized values fall back to the paid
s2.1-pro registry default in edge-api.

- .mintlify/skills/fish-audio-api/SKILL.md: model header optional with
  all four models and fallback documented; recommend s2.1-pro for
  production and s2.1-pro-free for the free tier (matching Models
  Overview); samples moved to s2.1-pro (same list price as s2-pro);
  multi-speaker and normalize_loudness scoped to s2-pro + S2.1-Pro
  family; drop the obsolete 422-on-missing-model troubleshooting entry
- .mintlify/skills/fish-audio-sdk/: document the SDK typing lag — the
  API accepts S2.1 models and both SDKs forward them at runtime, but
  the type definitions still list only s1/s2-pro, so agents are told
  to use type overrides or the raw-API skill for S2.1
- api-reference/asyncapi.yml: ws model header optional, full enum,
  fallback documented; multi-speaker and normalize_loudness notes
  corrected
- api-reference/sdk/javascript/api-reference.mdx: note that Backends
  lags the API and how to pass S2.1 values
- features/text-to-speech.mdx: '(default)' on s2-pro qualified as the
  Python SDK default; raw-API section no longer claims the header is
  required
- developer-guide/core-features/emotions.mdx: bracket emotion syntax
  attributed to the S2 family per Models Overview
- developer-guide/resources/agent-quickstart.mdx: optional header, all
  four models, recommendation and fallback

Capability scoping verified against models-overview.mdx, platform-web
tts-models.ts, and the inference engine's model-agnostic handling.
AsyncAPI validated with the official parser (0 errors).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Jul 31, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
hanabiaiinc 🟡 Building Jul 31, 2026, 6:02 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

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