Gemma models return reasoning in `<thought>` tags – UI does not format/hide them
@justschen is already working on this.
Since Jun 18, 2026.
Assessment
This issue has not been assessed yet.
Description
When using Gemma models (e.g., gemma-4-27b-a4b-it, gemma-4-21b-it) via the Google AI API , the model includes its reasoning/chain-of-thought inside <thought>...</thought> tags. The extension currently only strips or formats tags like <think> or <thinking>, leaving <thought> content rendered as plain text, which clutters the chat UI and breaks the intended clean display.
Environment:
- Copilot Chat Extension Version: 0.54.0
- VS Code Version:
- OS Version: windows 11
- Feature: Ask/Edit mode (both)
- Selected model: Gemma 4 31B and 27B (via custom endpoint)
Steps to Reproduce:
- Configure the extension to use the Google AI API with a Gemma model.
- Send a prompt that triggers reasoning (e.g., a math problem or coding puzzle).
- Observe the response – the model outputs a
<thought>block containing its internal reasoning, followed by the final answer. - The
<thought>content appears as raw text in the chat panel, not collapsed or styled.
Expected Behavior:
The extension should treat <thought> tags similarly to <think>/<thinking> – i.e., either hide them entirely (since they are internal reasoning) or render them in a collapsible/separate section with a distinct style (e.g., grayed out, collapsed by default). This would keep the final answer clean and readable.
Actual Behavior:
The entire <thought> block is displayed verbatim, making the response messy and harder to parse, especially for lengthy reasoning.
Workaround (for now):
I cloned the copilot repo and applied support for .
Here is before
Here is after
Additional Context:
This affects all Gemma models served by Google . The model’s official documentation confirms it uses <thought> for internal reasoning. Many other tools (e.g., Ollama, LM Studio) already support stripping these tags, so it would be great if this extension could do the same.
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.9k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·