mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[GH-ISSUE #23538] issue: Gemma4 output is sometime part of "thinking" part - sometimes not. #35536
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @derritter88 on GitHub (Apr 9, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23538
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.8.12
Ollama Version (if applicable)
v0.20.3
Operating System
Ubuntu 24.04
Browser (if applicable)
Firefox
Confirmation
README.md.Expected Behavior
The output after reasoning/thinking should be displayed as standalone part as usual.
Actual Behavior
Sometimes output is part of reasoning/thinking block - e.g.:
should indicate that thinking is done and the output begins.
Steps to Reproduce
Use gemma4:26b and interact with it
Logs & Screenshots
(This matches the provided good response). Switched to German. Focus on "Dopamin-Ersatz" and "Regeneration". End with a motivating closing. (Self-correction: Ensure I don't sound like a doctor, but like a nutrition-savvy training partner). Highlighting magnesium in dark chocolate is a great "pro-athlete" tip.
Wait, I should also mention the "Sugar Crash" risk for training. If he eats a huge sugary snack right before a run, it's bad. If he eats it after, it's fine.
Final Polish of the German text. (Proceed to generate output).Das ist erst einmal: Herzlichen Glückwunsch! Mit dem Rauchstopp hast du die wichtigste Entscheidung für deine Lungenkapazität und deine kardiovaskuläre Gesundheit als Triathlet getroffen. Das ist ein gewaltiger Sieg für dein Training.
Dass du jetzt auf Süßes anspringst, ist biologisch absolut logisch. Nikotin und Zucker triggern beide das Belohnungssystem im Gehirn (Dopamin). Wenn das Nikotin wegfällt, sucht das Gehirn nach einem Ersatz, um den Dopaminspiegel stabil zu halten. Süßes ist der einfachste und schnellste Weg.
Additional Information
No response
@Classic298 commented on GitHub (Apr 9, 2026):
https://github.com/open-webui/open-webui/issues/23357
@TomTheWise commented on GitHub (Apr 9, 2026):
https://www.reddit.com/r/LocalLLaMA/comments/1sgl3qz/gemma_4_on_llamacpp_should_be_stable_now/
For my understanding this MAYBE is not a bug in Open WebUI but rather a requirement to currently explicitly state the Chat Template for llama.cpp / ik_llama.cpp / other variants to prevent such errors. --jinja is apparently NOT enough.
In the reddit comments there are some indications that the interleaved template that is specially named for the 31B should work for the other gemma4 variants too (including MoE 26B-A4B) as the google documentation on parsing does not differenciate for the model variants:
https://ai.google.dev/gemma/docs/core/prompt-formatting-gemma4?hl=de#managing-thought-context
I'll test tomorrow and hopefully then also the chat parameters (reasoning enabled/disabled and so on) won't be ignored anymore as llama.cpp will know "how to tell the" LLM if it should reason or not. - But thats just my theory.
@TomTheWise commented on GitHub (Apr 9, 2026):
OK even after applying the chat template to llama.cpp like currently recommended in reddit and so on I can too still reproduce it - very rarely.
It especially occurs on longer back and forth conversations. Its rare but once it comes you have a high chance of that conversation being unfixable because it will always run into that error egain.
@TomTheWise commented on GitHub (Apr 10, 2026):
Google finally uploaded jinja chat templates that apparently now have a good quality.
Now after researching a bit I think OWUI indeed needs a fix / change for gemma4?
So if OWUI does indeed need updates for the gemma4 control tokens, now they are official clear.
Here is the google documentation
@tjbck commented on GitHub (Apr 12, 2026):
Provider dependent.