Qwen model speaking tool call JSON out loud instead of executing

This question originally came up in our Slack community and the thread has been consolidated here for long-term reference.

I’m using qwen3-32B LLM via the Groq plugin, but tool calling is broken. The agent speaks the tool call JSON out loud:

<tool_call>
{"name": "end_call", "arguments": {}}
</tool_call>

It was working fine with Gemini model.

Two suggestions for fixing Qwen tool calling:

  1. Set tool_choice to required: Instead of auto, this forces the model to use tools properly.
    Groq LLM plugin guide | LiveKit Documentation

  2. Pass the raw_schema parameter: Ensure your function schema matches Qwen’s expectations by passing raw_schema to the @function_tool decorator.
    Function Calling - Qwen