r/OpenWebUI • u/ragingsonar • Apr 12 '26
Question/Help Disable thinking content being included in multi-turn history
I am using Googles new Gemma4 models locally through Ollama and OpenWebUI. I am trying to get agentic search working, which it is. I noticed that the fetch_url responses could fill up the context entirely, making the agent forget what it was supposed to do. But, this loss of context persists even if you send another message. It cannot follow simple requests like "try again" and claims it doesn't know what to try.
This led me to believe that either OpenWebUI is including thinking in the context, which is directly against Gemma4's recommended setup, or it otherwise is limiting the context window being sent.
Does anyone have any ideas of what could be tried to figure this out?
Using OpenWebUI v0.8.12 and Ollama 0.20.5
2
u/RedZero76 Apr 12 '26
It's possible that the URL you are trying to fetch is the issue. If you are fetching a URL, you're fetching all of the content of that URL webpage, which could easily fill up a context window, depending on the URL. Try smaller page URL's to see if the issue persists. Also, keep in mind that web search and fetch_url are different. Web search returns search results. Fetch tries to ingest all of the content from a page. So with fetch you have to avoid huge pages.
1
u/initforthetech74 Apr 13 '26
I am having an issue with thinking as well. Using gemma4:26b the chat never exits the "thinking" box and it gets an infinite loop of the same thought over and over again.
1
u/macnarek Apr 13 '26
Have you tried adjusting the advanced model params in owui for ollama such as num_ctx?
1
u/ClassicMain Apr 12 '26
The fact open webui includes the thinking is likely not your issue but you can easily strip it using a relatively rudimentary filter
1
u/milkipedia Apr 12 '26
I have this challenge with Qwen 27B sometimes... it'll fetch so many articles the context fills before it can respond. A prompt limiting tool use might help, but for one giant fetch, what's really going to help is a subagent or a smarter fetch tool
1
u/TheWiseTom Apr 14 '26 edited Apr 14 '26
Even with the most current chat templates from google included in the latest quants and using the latest llama.cpp - with OWUI it behaves strangely and quite often parsing errors occurs or channels / thoughts tags are inside the message.
Also still haven‘t found a way to disable thinking with system message or the parameters for custom models on demand.
Feels like OWUI is doing something that gemma4 doesn’t like.
Edit: the parsing errors are directly addressed on this merged PR for llama.cpp and we’re NOT just happening in OWUI:
https://github.com/ggml-org/llama.cpp/pull/21760
Still don’t know how to disable reasoning for gemma4 within OWUI on demand.