You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ordinary bold reasoning text is silently deleted if it looks like an OpenRouter phase label #480
Ordinary bold text (**like this**) inside a model's reasoning/thinking output can silently vanish from the rendered UI — the text immediately before and after it renders fine, but the bold span itself disappears, leaving a blank gap. The model's actual output is completely unaffected; this is purely a display bug.
Real example
A local Ollama-served model's reasoning contained:
Let me also make sure about featureCounts GTF requirement: featureCounts works best with a GFF/GTF that has gene/transcript features...
Rendered in the UI, this appeared as the line stopping after "Let me also make sure about", a blank line, then the next line starting with ": featureCounts works best...". Checked the raw stored message data directly before concluding this was a rendering issue — the text is stored completely intact; the bug is entirely in reasoningDisplayText().
This exists (per its own doc comment) to strip OpenRouter's concatenated provider-summary phase headings from reasoning text — headings shaped like ...done.**Next** with no separator between adjacent phases. But the regex has no check confirming a given bold span actually is one of those headings; it matches any**bold** text anywhere in reasoning content, from any provider, and unconditionally replaces the match with "\n\n" — deleting the bold span itself while everything around it survives untouched.
Fix
Opened #479 with a minimal, provider-agnostic fix: OpenRouter's concatenated headings never have whitespace before the opening ** (they touch the previous phase's closing punctuation directly, or start the string) — ordinary inline emphasis in real prose always has a space before it. Scoping the match to require start-of-text or a preceding non-whitespace character distinguishes the two shapes cleanly, verified against every existing test case for this function (all unchanged) plus a new regression test for the exact case above.
Activity