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
Force think-tag stripping when tools are present in the request (subagent/tool-call invocations). This prevents tags in content from rendering as blank code blocks in the chat UI when using a subagent, flooding the chat with blank code boxes.
The trigger is tool-call detection (options.tools.length > 0), not model-specific. The ThinkTagFilter is a no-op for models that don't emit think tags, so this is safe for all models.
Thanks for this one @Barragek0, clean approach. Reusing the existing stripThinkTags plumbing and forcing the mode when tools are present beats a model-specific hack, and the no-op passthrough for models that don't emit think tags makes it safe across the board.
I pulled the branch and verified beyond lint: the full npm run lint gate passes (all 7 checks), and I ran a direct logic check on createThinkTagFilter. forceOverride activates the filter even on never, non-forced requests keep their old behavior, and the visible/thinking split comes through intact. Also like that the stripped thinking still surfaces via LanguageModelThinkingPart, so nothing gets dropped.
One small follow-up I'll handle myself after merging: a tiny unit test for the force path, since thinkTags.ts has no coverage yet. Not a blocker.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 What does this change?
Force think-tag stripping when tools are present in the request (subagent/tool-call invocations). This prevents tags in content from rendering as blank code blocks in the chat UI when using a subagent, flooding the chat with blank code boxes.
The trigger is tool-call detection (options.tools.length > 0), not model-specific. The ThinkTagFilter is a no-op for models that don't emit think tags, so this is safe for all models.
🧪 How did you test it?
Tested with MiMo v2.5
✅ Checklist
npm run compilepassesnpm run lintpassesnpm testpassesnpm run packageproduces a VSIX