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#1121
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 @KarlGrier on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2794
What happened
This is the same family as #537 / #1526 (a quoted
</think>) and #2026 (a quoted</tool_call>, fixed in 0.1.43.1). The model quotes a tag while it thinks, and the server takes the quote for the real tag. #1526's rule (v0.1.42) treats a</think>written right after a quote or backtick, and followed by anything but a line break, as reasoning text. That rule misses a tag the model writes as Python source with escapes inside a fenced code block, which is common when an agent works on code that renders the chat template:(
\nhere is the two characters of the escape.) The character before the quoted</think>is thenof\n, soOutputParserends the reasoning there. What follows:</think>.</think>reads as quoted, because fence tracking restarts at the answer and the closing ``` of the quoted block opens a "fence".finish_reason: "stop", part of the reasoning as the answer, and no tool call, so an agent ends the session.How often. We ran one real task on Strata's own
serve/code 9 times, across four agent harnesses, over both/v1/chat/completionsand/v1/responses. The task was to make the config'sreasoning_effortdefault apply to every API; it involves"none"and so the<think>\n\n</think>prompt. All 9 sessions ended at this point. Whether the task got solved depended only on whether the fix was complete by then (3 of 9 were not). 18 sessions on plain coding tasks never hit it.Parser-only reproduction (from the repo root, no model needed):
On v0.1.44.1 this prints
tool calls: []and a content that starts with the rest of the quoted test ('\\n\\n", prompt)\n```\nNow read the file.\n</think>\n\n<tool_call>...'). Expected:tool calls: ['read']and an empty content.A fix we tested. Inside a code fence (``` or ~~~) of the reasoning, a
</think>is quoted text, the same way #804 / #1058 already treat<tool_call>. A fence the model never closes must not swallow the real end of the thinking, so the fix has a safeguard:</think>on, the text is held until the fence closes. Then the held text was reasoning, and it is released and read again as reasoning.</think>held is the end of the thinking.How we checked it:
OutputParser, as shipped and patched. The patched parser recovers the 7 lost tool calls (one for each session that was cut mid-task) and gives the same events for the other 496 turns. Its events are the same whether the text arrives 1 character, 7 characters or all at once.</think>, an unclosed fence with a quoted and then a real tag, and a turn cut inside an unclosed fence. The existingserve.test_reasoning_toolstests pass, and so does the full serve suite.serve/frontend.pyplus the tests. Happy to open it as a PR if that helps.Not covered: in one session the model wrote
"<think>\n\nand then a</think>with real line breaks around it, and ended its turn 12 tokens later. That looks like the model emitting its real end-of-thinking token, the #1814 / #2731 shape, which no parser rule can recover.Strata version, GPU, OS
Strata 0.1.44.1 server code.
serve/frontend.pyis unchanged from the tag, and main had no newer change to it on 2026-10-16. Our build carries local engine patches that do not touchserve/.Qwen3.8-Flash-Next IQ3_S, RTX 5080 16 GB and RTX 4060 Ti 8 GB, Linux.
Engine log
Not attached: the parser-only reproduction above shows the problem without a model.
Measured and drafted with Claude Code.
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.