Repository navigation
Studio: keep literal <think> text visible when the request turns thinking off - #10662
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 316c4a5896
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Reproduction on Actions (A/B)Two branches off the same fresh
The probe step prints which implementation it got, so the pair cannot be mixed up: base logs What the base run actually fails on - this is the bug, on a runner: The one test that passes on both sides is Since the last round the gate also handles two shapes it previously got wrong, both of which reproduce the exact symptom in the title:
Both gates now share one helper, so "same rule as |
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Before / after, end to endTwo isolated Studio installs from the two commits, one resident
Gemma rather than Qwen3 because Qwen3 will not emit a raw Controls, identical on both sides (or the pair proves nothing): What moved - every predeclared API fact, and nothing else:
So on The chat bubble does not move, and that is worth saying
The cause is in the source, not inferred: the frontend runs its own splitter over the reply text. That is a separate defect on a different layer and not something to fold in here: gating it means threading a per-turn "thinking was off" flag through the streaming adapter, the incremental parser and the recovery replay. This PR's claim is the server-side gate, and the table above is the evidence for it. Worth a follow-up for the client-side splitter. |
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Confirmed the gate in studio/backend/routes/inference.py still returns true for any reasoning-capable backend at the responses path, so literal think tag text is cut out of the reply even when the request turns thinking off, and sharing one helper with _think_parsing_expected is the right shape. Noted your point that parse-assistant-content.ts still splits client side, so I will review that separately. |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
…g controls The safetensors/MLX branch of /v1/chat/completions split <think> markup whenever the template supported reasoning, so a literal <think> quoted in a thinking-off reply was moved into reasoning_content. Read only the dial the template branches on, prefer enable_thinking on hybrid templates, and keep the template default for transformers image turns, whose generator drops both reasoning fields.
|
Pushed a follow-up commit that closes the same bug on the safetensors/MLX path.
What changed:
Tests in |
|
@codex review |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4aa8a229ea
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Lyxot
left a comment
There was a problem hiding this comment.
LGTM. The think-tag gate now follows the request on both the GGUF and safetensors/MLX paths, the tests cover each branch, and CI is green apart from the Core HF=latest job that also fails on main.

When a request turns thinking off, the server still runs the think tag splitter on the reply. So if a model writes the literal text
<think>hi</think>as part of its answer, that text gets cut out of the visible reply and moved into a hidden reasoning block. A stray closing tag is deleted outright. This happens on the chat completions and responses endpoints, and Studio's own composer sends this shape when the Thinking toggle is off.The gate now checks the request the same way the messages endpoint already does. Thinking off means the tags stay as text. Thinking on, always on reasoning models, and models that map thinking off to a low effort keep splitting as before. Two existing tests that locked in the old behavior are updated, and new tests cover both endpoints.