mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2092] [Issue]: AI response body is lost after inline thinking block closes #1021
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1021
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 @lanya-sketch on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2092
Originally assigned to: @cha1latte on GitHub.
Summary
AI response body can be lost when a model outputs an inline reasoning/thinking block followed by the actual reply.
When the parser fails to split the closing reasoning tag from the post-tag content, the visible reply is swallowed into the thinking pane and the message content becomes empty.
Expected behavior
For an output like:
Expected result:
internal reasoning.This is the actual visible reply.Actual behavior
The text after the closing reasoning tag can be kept inside the thinking/reasoning pane instead of the message body.
As a result:
Steps to reproduce
<thinking>...</thinking>or<think>...</think>.Environment
Logs, screenshots, or video
Relevant behavior:
Possible related cases:
Additional context
This seems related to inline thinking/reasoning tag parsing.
Likely edge cases:
<think>/<thinking>tag form differencesA possible fix is to preserve text after the final closing reasoning tag as message content, and avoid returning an empty message body when tokens were produced.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: