Environment
LiveKit Agents (Python), LLM via LiveKit Inference gateway, model google/gemma-4-31b-it. streaming llm_node pass-through.
Problem
On turns that clearly warrant a tool, Gemma frequently emits a terminal text turn that only promises the action, for example “Olá! Com certeza, vou já verificar.” or “Sure, let me look for the reservation right now.”, with zero tool_calls. The turn ends, so the agent waits for the user. The tool only fires on the next user utterance, leaving a roughly 20 second dead-air stall in between.
Reference IDs
Observability session: RM_5JMY2MnP65yZ (agent says “I’ll look for the reservation right now” at 00:23.88, find_reservation does not fire until the caller speaks again at 00:44.07).
tool_choice=“auto” (default): 0/10 clean tool call, 10/10 narration-only stall, 0 errors.
reasoning_effort=“none”: 0/10 clean tool call, 10/10 narration-only stall, 0 errors.
tool_choice=“required”: 10/10 clean tool call, 0/10 narration-only stall, 0 errors.
Prompt hardening (“call the tool silently and immediately, do NOT narrate”), the same rule that works for other tools, only moved it to about 5/15 under the full prompt. Gemma treats tool use as optional and ignores prose rules buried in a large prompt.
What works: tool_choice=“required” forces the call and suppresses content, 10/10, and the Inference gateway accepts it (no 400). But it cannot be a global default: it would force a tool on pure-chat and KB-prose turns too.