Repository navigation
docs(recipe): fix MiniCPM-o 4.5 curl TTS example and clarify chat_template_kwargs usage - #4950
Merged
Merged
Conversation
…plate_kwargs usage Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
amy-why-3459
requested review from
Gaohan123,
david6666666 and
hsliuustc0106
as code owners
July 8, 2026 01:53
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Collaborator
Author
|
@tc-mb PTAL |
Contributor
ok |
amy-why-3459
enabled auto-merge (squash)
July 8, 2026 06:07
Contributor
|
@amy-why-3459 LGTM, Thanks for the fix! |
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>
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>
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.
##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)