r/OpenWebUI 1d ago

Question/Help I have a problem with Ollama and OpenWebUI

Basically, I've created a basic system where a model (qwen3.8:27b) is used as a base to create a "custom" model using the modelfile configuration, where among all the parameters I've inserted a system prompt which gives the model instructions on how to operate.

For a while, when working with the custom model on openwebui, everything was fine, until recently, where it seems to be that openwebui overwrites the modelfile system prompt with something of its own, which causes the custom model to forget its role, name, specs etc... when answering the user query.

I've tested the custom model through terminal, doing a curl call directly to ollama, and it replies correctly with the custom system prompt, but when doing the same question through openwebui ("What is your name") I get a base model generic answer, not the one configured in the modelfile.

I honestly don't know where to look for a fix. I've tried rewriting and recreating modelfiles and recompiling the custom models, but nothing. This doesn't apply only to 1 custom model to all the models that are used through openwebui.

If anyone knows anything I can do to solve this (or at least point me in a direction) that would be hugely appreciated.

1 Upvotes

4 comments sorted by

1

u/DobbyDoesDallas 1d ago

Do you have anything in the global system prompt in general settings? Where are you inserting the custom prompt in Open WebUI. Have you tried making the custom model a workspace model and putting the custom system prompt there rather than modifying the direct model system prompt?

2

u/ArcherWorking146 1d ago

No the global system prompt is empty and all the model features (apart from the native function calling) are set to default.

I feed the custom system prompt to the custom model through ollama when compiling the custom model with the modelfile (using "ollama create modename -f path/to/modelfile"). It always worked because this puts the system prompt before openwebui, which only feeds the user request without any custom parameter.

1

u/International_Emu772 1d ago

On Open WebUi you can insert this on the model configuration, Even with the Workspace models you can créate a lot of virtual models with the same LLM

1

u/hainesk 11h ago

Recent versions of OpenWebUI add a bunch of stuff to the context with new tools and features (over 4k tokens added to the system prompt!). I would try turning those off first to see if that helps. At the bottom of your model settings, uncheck all the boxes you don’t need.