Skip to content

[bugfix] Fix self-hosted TTS voice and agent tool argument errors - #1

Merged
princepride merged 2 commits into
mainfrom
fix/self-hosted-tts-voice-and-agent-arg-errors
Oct 27, 2026
Merged

princepride merged 2 commits into
mainfrom
fix/self-hosted-tts-voice-and-agent-arg-errors

Conversation

@princepride

Copy link
Copy Markdown
Collaborator

Two backend bugs found while testing the canvas against self-hosted vLLM-Omni services. The rea branch already contains the same fixes.

Self-hosted speech always failed

OpenAI-compatible speech requests always sent voice: "alloy". vLLM-Omni Qwen3-TTS rejects that with 400 Invalid voice 'alloy'. Supported: aiden, dylan, …, so every self-hosted narration failed.

  • Self-hosted configurations now send "default", which vLLM-Omni maps to the model's own speaker.
  • Provider APIs keep "alloy".
  • A voice in the task parameters takes precedence over both.

Agent retried rejected tool calls blindly

A schema-invalid tool call returned only 工具参数或文本格式无效,未执行。. The model could not see what was wrong and repeated the call until the decision limit. In one turn, Qwen3-30B-A3B added an unknown modelConfigId to generate_asset six times.

The tool result now names the failing fields with Pydantic's messages, for example modelConfigId:Extra inputs are not permitted. Argument values are never echoed. Non-validation errors keep the old message.

Testing

  • New tests: test_self_hosted_speech_uses_the_server_default_or_chosen_voice and test_rejected_tool_arguments_name_the_fields_without_their_values.
  • pytest tests: 610 passed, 4 skipped (checks that need the frontend's npm dependencies). 2 failed: test_fasth3_inputs.py::test_real_finalization_… also fails on unchanged main with this machine's FFmpeg.
  • Against a real Qwen3-TTS-12Hz-1.7B-CustomVoice vLLM-Omni server: alloy → 400; default and vivian → audio.
  • With a Qwen3-30B-A3B agent, a one-image request completed through generate_asset. That run used the rea branch, which carries the same change.

🤖 Generated with Claude Code

princepride and others added 2 commits October 27, 2026 08:22
…eech

## summary

OpenAI-compatible speech requests always sent voice "alloy". vLLM-Omni
speech servers name their own speakers, so Qwen3-TTS rejected every
request with 400 "Invalid voice 'alloy'". Self-hosted configurations
now send "default", which vLLM-Omni maps to the model's own speaker;
provider APIs keep "alloy", and a voice in the task parameters wins.

## validation

- pytest tests/test_self_hosted.py
- Verified against a vLLM-Omni Qwen3-TTS-12Hz-1.7B-CustomVoice server:
  "alloy" returns 400, "default" and "vivian" return audio.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
## summary

A schema-invalid tool call returned only "工具参数或文本格式无效", so
the model could not tell what to change and repeated the same call
until the turn's decision limit. Qwen3-30B-A3B added an unknown
modelConfigId to generate_asset six times in one turn. The tool result
now lists the failing fields and Pydantic messages, without echoing
argument values; other errors keep the previous message.

## validation

- pytest tests/test_agent_canvas.py
- pytest tests: 610 passed; the two FFmpeg finalization checks in
  test_fasth3_inputs.py fail with the local FFmpeg build, unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@princepride
princepride merged commit 75abd4d into main Oct 27, 2026
@princepride
princepride deleted the fix/self-hosted-tts-voice-and-agent-arg-errors branch October 27, 2026 08:36
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