mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3232
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ludiazv on GitHub (Nov 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5409
What happens
With a harness that also offers a code-mode tool (the model writes JavaScript that calls the other tools as
tools.<name>(...)), Qwen3.8-Flash-Next sometimes carries that spelling into a native call's function name, witha space instead of the dot, or the bare prefix alone:
The declared tool is
actio(parameters includecommand). Neither name matches a declared tool or one of thealiases in
OutputParser.__init__(serve/frontend.py, the #4751 block:tools.,functions.,default_api.+name), so the block is returned as answer text and the turn ends (
finish_reason: stop). The harness (Pi) shows theraw block instead of running the call, and the agent stalls until the user intervenes.
Setup
IQ3_S, MTP drafter, default
tool_call_recovery(on). The alias rule is the same in v0.2.11 and on main.pi/1.x) through an OpenAI-compatible proxy (llama-swap), Chat Completions withtools. Declaredtools:
read,bash,write,edit,codemode,actio,budget.codemoderuns JavaScript in which the othertools are
tools.read(...),tools.actio(...), etc.How often
One long agent session (494 assistant turns, all Flash-Next): 516 tool calls parsed correctly (158 of them
codemode),2 returned as text: one
<function=tools>, one<function=tools actio>. Both came during code-mode work; thesecond directly followed a
codemodecall that usedtools.actio(...)(it failed on a parameter error, and the modelthen tried a native call to inspect the tool).
Expected
The same unambiguous-alias rule as #4751, extended to the spellings Qwen produced here:
<prefix> <name>with a space, for the existing prefixes (tools,functions,default_api): an alias of<name>when exactly one declared tool has that name. This one seems safe (it is #4751's alias with a differentseparator).
tools(orfunctions) as the name: the call is that tool only when exactly one declared toolaccepts the call's parameters (its parameter names a subset of that tool's properties, the tool's required ones
present). Otherwise text as today. This is a guess from the arguments, so maybe behind the recovery switch, or opt-in.
An exactly declared name keeps winning over any alias, as now (a tool really named
toolsis unaffected).Possible change (sketch, serve/frontend.py, the #4751 loop)
and, for case 2, where a call's name is resolved: if the name is
tools/functions, not declared and not an alias,pick the single declared tool whose schema accepts the call's parameter names.
Related
tools./functions./default_api.prefixes this extends)harness can answer "unknown tool" and the model retries instead of the turn ending)
@Niko1221 commented on GitHub (Nov 7, 2026):
Fixed:
<function=tools NAME>(space form) and a bare<function=tools>are now read as the declared tool when the name matches a declared tool; otherwise nothing changes (68ab15ddc,b1541ab24).Released in Strata v0.2.12: https://github.com/Niko1221/Strata/releases/tag/v0.2.12