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
Session title silently empty when the title model is a reasoning model (returns only a <think> block) #42287
ensureTitle() generates the session title with the small model (small: true).
When that model is a reasoning model (e.g. GLM-4.6 / Kimi K3 via OpenRouter), the
completion is frequently reasoning-only: after the <think>…</think> strip in ensureTitle, the remaining text is empty. The function then hits if (!cleaned) return
and the session silently keeps its default New session - <timestamp> title.
It is intermittent (a reasoning model returns usable text on some turns, think-only on
others), which matches the "happens at times" reports below.
constcleaned=text.replace(/<think>[\s\S]*?<\/think>\s*/g,"").split("\n").map(l=>l.trim()).find(l=>l.length>0)if(!cleaned)return// reasoning-only output -> empty -> no title, silently
Steps to reproduce
Set the small/title model to a reasoning model (e.g. openrouter/z-ai/glm-4.6).
Start a new session and send a normal message.
On turns where the title model returns only reasoning, the title stays New session - <timestamp>.
Root cause
ensureTitle withholds the title whenever the model output is empty, instead of
falling back to a deterministic source. Reasoning-only output is the common trigger.
Fall back to the first user message when the model output is empty — the title is then
never withheld, regardless of why the model returned nothing. I have this change ready
and will open a PR referencing this issue.
Activity
github-actions commentedon Oct 13, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.