mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1430] [CLOSED] serve: a tool call written <function= NAME> is the call NAME #3449
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#3449
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1430
Author: @itripn
Created: 10/7/2026
Status: ❌ Closed
Base:
main← Head:fix/tool-call-name-whitespace📝 Commits (1)
da6ed8dserve: a tool call written <function= NAME> is the call NAME📊 Changes
2 files changed (+49 additions, -3 deletions)
View changed files
📝
serve/frontend.py(+3 -3)➕
serve/test_tool_name_space.py(+46 -0)📄 Description
What
A tool call written
<function= NAME>(a space after the=) is now the callNAME. The function name is stripped in the three places it is read:parse_tool_call, the #804 rescue's check against the declared tools, and_finish_call's schema lookup.Why
Seen from Qwen3.8-Flash-Next IQ2_XS (v0.1.40.1, one GPU, Linux) in Zed's agent panel: in a long agent session the model wrote this at the end of its thinking, with no
</think>before it:The name was read as
" capture", which matched no declared tool, so the #804 rescue kept the call as reasoning text (correctly, by its rules: it just never matched). The reply came back as reasoning only, withfinish_reason: "stop"and notool_calls, and the agent stopped mid-task. After the thinking the same call is delivered, but named" capture", which the client does not know, and its arguments are typed without the tool's schema.<function=capture>capturecapture<function= capture>, before" capture", untyped arguments<function= capture>, aftercapturecaptureA name with surrounding whitespace is never meaningful, so this does not turn text into a call that was not one: the #804/#1058 conditions still decide whether a call inside the thinking is an act.
Reproduction (no GPU)
Tests
serve/test_tool_name_space.py: the call inside and after the thinking, streamed and not, fed in 3-character pieces, with a string parameter"42"that only stays a string when the schema is found. It fails 4/4 onmainand passes on this branch.test_reasoning_rescue,test_reasoning_toolsandtest_frontendare unchanged and pass (46 tests).Related: #804, #1053, #1058.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q2VjkVpcBMW9QSkWgQ1p3E
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.