Fix Gemma 4 thinking tags not hidden after tool calls (closes #7509)

This commit is contained in:
oobabooga
2026-04-22 15:17:17 -07:00
parent 4737744f4a
commit 1d871c0896

View File

@@ -8,6 +8,7 @@ THINKING_FORMATS = [
('<|channel|>commentary<|message|>', '<|end|>', '<|channel|>final<|message|>'),
('<seed:think>', '</seed:think>', None),
('<|channel>thought', '<channel|>', None), # Gemma 4
('thought\n', '<channel|>', None), # Gemma 4 (after tool responses, <|channel> may be absent)
('<|think|>', '<|end|>', '<|content|>'), # Solar Open
# ('Thinking Process:', '</think>', None), # Qwen3.5 verbose thinking outside tags -- removed: too prone to false positives in streaming
(None, '</think>', None), # End-only variant (e.g., Qwen3-next)