Repository navigation
Studio: keep <think> text visible in the reply when Thinking is off - #11481
Conversation
Review + UI evidenceHead
Control: Thinking on still folds the tags The bare tags render as Review fixes pushed
Both come with regression tests that fail on the commit before the fix. The frontend suite passes 8224/8224, and typecheck matches base: its one error, |
|
Confirmed the client side still splits unconditionally in studio/frontend/src/features/chat/utils/parse-assistant-content.ts, so the reply gets folded away even after the server fix, and the reasoning-arrives fallback plus the recovery path both look right here. Will get this reviewed. |
The live stream used its own thinking-off rule while recovery read the stored request, so an effort of none (Inkling-style local templates, OpenAI-style external ladders) still split literal <think> text live even though the server leaves it as reply text. Build the reasoning fields once, send them, and decide parsing from them with requestParsesThinkTags.
|
Pushed e78f0d4 on top of your three commits. It fixes one gap. The live stream decided "Thinking off" with its own boolean, while recovery read the stored request with
The reasoning request fields are now built once, before the continuation yield. Both payloads send them, and the parse decision is Codex review on a staging copy converged: Lyxot#67 (comment). The staging copy is Lyxot#67, which is this PR at e78f0d4 merged onto main 5e04590, with an identical diff. The first two passes each raised a P2. Both are true edge cases, answered and resolved in-thread without code changes to keep this PR small:
CI on the staging PR: 40 passed, 5 failed. None of the failures involve this change, and each fails the same way on main at 5e04590 or is a runner problem:
This PR's own frontend unit tests pass, along with Frontend build + bundle sanity, which fails on this PR's old merge base only because of the |
Lyxot
left a comment
There was a problem hiding this comment.
LGTM. The client now follows the same thinking-off decision as the server and recovery. Codex converged on a staging copy, and the remaining CI failures also fail on main or are flaky.
…i#10365 conflicts) unslothai#10365 landed on main after this branch last merged, so the durable-turns code it introduced collided with the copy carried here. Resolved per file: - backend chat_generation_runs.py, tool_approvals.py, test_tool_approvals.py and tests/studio/test_multi_chat_prompt_queue_contract.py: take main's reviewed version (attended/unattended park, lease renewal, robust env parse, decision reasons). No replay-specific content was lost. - chat-adapter.ts: keep the shapeToolResult shaper; drop the now-duplicate local isMcpImageToolResult (imported from utils/tool-result-shape); keep isBareMcpImageWrapper (still called in the live path). - generation-tool-recovery.test.ts: union the mock store stubs (set/clearToolConfirmation + append/clearToolLiveOutput). - runtime-provider.tsx: keep createRecoveryReplay (this PR's replay impl). Follow-ups before this lands on main: tsc -b + npm test; backend test_tool_approvals + test_chat_generation_runs; port unslothai#11481 (requestParsesThinkTags/parseThink) onto the replay path.
…nslothai#11481) * Studio: keep literal <think> text in the chat reply when Thinking is off * Studio: read the think-parse choice from the request when recovery starts before the first save * Studio: decide think parsing before the continuation's first yield * Studio: decide think parsing from the reasoning fields the request sends The live stream used its own thinking-off rule while recovery read the stored request, so an effort of none (Inkling-style local templates, OpenAI-style external ladders) still split literal <think> text live even though the server leaves it as reply text. Build the reasoning fields once, send them, and decide parsing from them with requestParsesThinkTags. --------- Co-authored-by: Lyxot <[email protected]>



Follow up to #10662. With Thinking off, if the model writes
<think>in its answer, for example while explaining the tag, Chat hides that part as a collapsed thinking block. With Qwen3 this hid almost the whole answer, and it stayed hidden after a reload. #10662 fixed this on the server, but the Chat page still split the text on its own.Chat now leaves the text as it is when Thinking is off, and still shows a thinking block whenever the model really sends its thinking. Tested with Qwen3 in the browser: main showed only "The `" and a thinking block, this branch showed the full answer. Thinking on works the same as before.