Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#577·speech-to-speech

Local tool calls lose positional arguments and are skipped when required parameters disappear

Author: andimarafiotiCreated Sep 22, 2026Updated Sep 27, 2026

Problem

In the local LLM Python-style tool-call path, positional arguments are parsed but discarded when converting the call into a Realtime function-call item. If a discarded argument supplies a required parameter, validation fails and the entire call is skipped. The client receives no tool call from this path, even though the model generated one.

This is silent from the client's perspective, not from the server's: warnings are logged. The tool prompt requests named arguments, but also presents Python-style signatures that permit positional invocation. Deviating from the named-argument instruction should not silently lose an otherwise bindable call.

Reported by @brijmohan while evaluating an on-premises municipal booking assistant. Report and before/after results, section 7.

Reproduction

Declare a tool with this parameter schema:

json
{
  "name": "list_slots",
  "description": "List available ceremony slots for a month",
  "parameters": {
    "type": "object",
    "properties": {"month": {"type": "string"}},
    "required": ["month"]
  }
}

When the model emits list_slots("June") in a tool-call block:

  1. _parse_call_expr() records the value as __arg_0__.
  2. FunctionToolCall.to_realtime_function_tool_call() removes positional entries.
  3. Required-parameter validation raises because month is missing.
  4. The local language-model handler catches the error and skips the call.

The reporter captured these warnings:

Dropping positional arguments for 'list_slots': {'__arg_0__'}
Skipping invalid tool call: Missing required parameters for 'list_slots': {'month'}

Expected: emit a function call named list_slots with JSON arguments {"month":"June"}. Named calls such as list_slots(month="June") must continue to work.

Relevant code:

  • src/speech_to_speech/LLM/tool_call/function_call.py: parsing and conversion.
  • src/speech_to_speech/LLM/language_model.py: catches conversion errors and skips invalid calls.
  • src/speech_to_speech/LLM/tool_call/signature_from_schema.py: signature ordering presented to the model.

Reported end-to-end evidence

Tested against v1.0.0, commit 16d7f98, using speech-to-speech serve --mac-optimal-settings --host 127.0.0.1 --port 8765 on an M3 Pro with 18 GB RAM. The stack used Parakeet TDT, Qwen3-4B-Instruct-2507 (4-bit), and Qwen3-TTS-12Hz-1.7B-CustomVoice (6-bit), via MLX.

Six recorded requests produced 0/6 tool calls before the reporter's positional-binding patch and 5/6 afterward. The remaining “Book it” request produced no call in either run; this issue does not assume all six failures have the same cause. A separate routing experiment also demonstrated recovery of a two-argument hold_slot(date, time) call. These are the reporter's results, not an independently rerun benchmark.

Expected fix and regression coverage

  • Bind positional arguments using the same parameter order as the rendered tool signature, then combine them with named arguments.
  • Coordinate with open PR #384, which reorders parameters to make valid Python signatures. Binding directly against raw JSON Schema property order could assign values to the wrong names after that change.
  • Reject excess positional arguments and duplicate positional/named assignments explicitly; preserve required-parameter validation.
  • Cover one and multiple positional arguments, mixed positional/named calls, named-only calls, optional/defaulted parameters, and a schema declaring an optional property before a required one.
  • Verify that a valid positional call reaches the Realtime client with the correct named JSON arguments. Also cover optional-only tools, where dropping arguments can otherwise emit an incomplete call without a missing-required error.

Scope: argument conversion and delivery in the local Python-style tool-call path. Tool-description routing, contact transcription, and latency measurements are separate findings.

Source: huggingface/speech-to-speech

View original on GitHubView discussion on GitHub