Repository navigation
Fix Studio auto-titles for reasoning models - #7098
Conversation
There was a problem hiding this comment.
Code Review
This pull request configures the title generation model payload to disable thinking and reasoning efforts, and updates the response parsing to handle truncated responses or the presence of thinking tags. It also adds and updates corresponding unit tests. The review feedback suggests making the thinking-disabled configuration more robust by adding thinking: { type: "disabled" } for models like Claude 3.7, and expanding the regular expression to filter out alternative thinking tags such as <thought>, <thinking>, or <reasoning>.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
Hardens Studio’s automatic chat-title generation for reasoning models by explicitly disabling reasoning in the title request and rejecting non-title outputs so the deterministic fallback is used.
Changes:
- Add
enable_thinking: falseandreasoning_effort: "none"to the title-generation model payload. - Reject title candidates that are truncated (
finish_reason === "length") or contain<think>markers. - Expand regression tests around title generation, fallback behavior, and tool-call-only first turns.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/studio/test_chat_title_generation.py | Extends regression coverage by asserting new payload fields and new rejection/fallback behaviors via source-string checks. |
| studio/frontend/src/features/chat/runtime-provider.tsx | Adds reasoning-disable flags to the title request and rejects truncated / think-tagged model outputs before normalizing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
15471ce to
a1eefe0
Compare
|
Reproduced your root cause live. On a Qwen3.6-27B GGUF, replaying real first-user messages with the old title payload gave the literal "Thinking Process" title on 4 of 5 chats (truncated reasoning, I also traced the two new request fields through the backend: template-gated on GGUF, peeled off on safetensors/MLX, and the title request never routes to an external provider. Your rebuttals to the bots hold, since the explicit Tests and typecheck pass; CI green on a fork mirror: oobabooga#51. Merging. |
Summary
enable_thinking: falseandreasoning_effort: "none".Root cause
Automatic title generation reused the active chat model with a 24-token output limit but did not disable reasoning. Reasoning models could spend the complete budget on reasoning before producing a title. On the GGUF path, reasoning-only output may be promoted to visible content to protect normal chat responses from becoming blank, allowing that text to pass title normalization and become the permanent chat title.
This change keeps the global GGUF behavior intact and hardens only the title-generation request and response handling. It does not special-case any observed title phrase.
Fixes #7071
Validation
Targeted ESLint reports the same pre-existing ref-during-render error and Fast Refresh warnings as the unchanged base branch; this patch introduces no new lint finding.
Risk
The patch is limited to title generation. If a backend rejects the reasoning controls, the existing failed-request path uses the deterministic title fallback. If a backend ignores them, truncated and think-tagged responses are also rejected. An always-reasoning backend that silently ignores both controls and returns short, untagged reasoning with a non-truncation finish reason remains outside what the response shape can distinguish from a valid title.