Skip to content

docs(recipe): fix MiniCPM-o 4.5 curl TTS example and clarify chat_template_kwargs usage - #4950

Merged
amy-why-3459 merged 3 commits into
vllm-project:mainfrom
amy-why-3459:fix_minicpm
Jul 8, 2026
Merged

amy-why-3459 merged 3 commits into
vllm-project:mainfrom
amy-why-3459:fix_minicpm

Conversation

@amy-why-3459

Copy link
Copy Markdown
Collaborator

##Summary
Fixes incorrect TTS invocation guidance in the MiniCPM-o 4.5 recipe. The curl smoke test previously nested chat_template_kwargs under extra_body, which is not merged into the request root for raw HTTP calls. As a result, use_tts_template never reached the chat template, <|tts_bos|> was missing from the prompt, and Stage-1 talker returned silent WAV instead of speech.

##Changes
Update the curl example to pass chat_template_kwargs at the request root
Document that the OpenAI Python SDK may still use extra_body, because the client flattens those fields
Clarify response shape: text and audio typically appear in separate choices entries when modalities: ["text", "audio"]
Correct the TTS trigger note: without use_tts_template, clients still receive an audio field but it is silent (not text-only)
Root cause
Verified via /v1/chat/completions/render:

| Request shape | Prompt ends with <|tts_bos|> (151703) | |---|---| | extra_body.chat_template_kwargs.use_tts_template=true | No | | Top-level chat_template_kwargs.use_tts_template=true | Yes |

Stage-1 llm2tts requires the <|tts_bos|> … <|tts_eos|> span in thinker output to drive MiniCPMTTS + Token2Wav. Without it, talker skips real synthesis.

Test plan
POST /v1/chat/completions/render with nested extra_body.chat_template_kwargs → no 151703 in token_ids
POST /v1/chat/completions/render with top-level chat_template_kwargs → token_ids ends with 151703
POST /v1/chat/completions with corrected curl payload → non-zero audio amplitude (~12s WAV at 24 kHz)
Compared against broken recipe example → silent audio (max amplitude = 0)

…plate_kwargs usage

Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@amy-why-3459 amy-why-3459 changed the title docs(recipe): docs(recipe): fix MiniCPM-o 4.5 curl TTS example and clarify chat_template_kwargs usage docs(recipe): fix MiniCPM-o 4.5 curl TTS example and clarify chat_template_kwargs usage Jul 8, 2026
@amy-why-3459

Copy link
Copy Markdown
Collaborator Author

@tc-mb PTAL

@tc-mb

tc-mb commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@tc-mb PTAL

ok

@amy-why-3459 amy-why-3459 added the ready label to trigger buildkite CI label Jul 8, 2026
@amy-why-3459
amy-why-3459 enabled auto-merge (squash) July 8, 2026 06:07
@amy-why-3459 amy-why-3459 added ready label to trigger buildkite CI and removed ready label to trigger buildkite CI labels Jul 8, 2026
@tc-mb

tc-mb commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@amy-why-3459 LGTM, Thanks for the fix!

@Gaohan123 Gaohan123 added this to the v0.26.0 milestone Jul 8, 2026

@Gaohan123 Gaohan123 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Thanks

@amy-why-3459
amy-why-3459 merged commit 7d4decc into vllm-project:main Jul 8, 2026
6 of 7 checks passed
ZhengWG pushed a commit to ZhengWG/vllm-omni that referenced this pull request Jul 13, 2026
…plate_kwargs usage (vllm-project#4950)

Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
Signed-off-by: ZhengWG <zwg0606@gmail.com>
wkutak pushed a commit to wkutak/vllm-omni-cosmos-genai-nim that referenced this pull request Jul 13, 2026
…plate_kwargs usage (vllm-project#4950)

Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
@amy-why-3459
amy-why-3459 deleted the fix_minicpm branch August 26, 2026 10:21
khairulkabir1661 pushed a commit to khairulkabir1661/vllm-omni that referenced this pull request Sep 25, 2026
…plate_kwargs usage (vllm-project#4950)

Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready label to trigger buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants