Skip to main content

Task Models

Open WebUI makes small model calls in the background, separately from the answer a user is waiting for. They write chat titles, generate tags, suggest follow-up messages, produce autocomplete ghost text, rewrite a message into a retrieval or web search query, rewrite a message into an image prompt and summarize older messages when context compaction is on.

By default all of that runs on the model the user is chatting with. On an expensive flagship model it is a bill nobody planned for, and on a slow local model it makes the whole interface feel sluggish. Pointing background work at a small, fast model is the highest-value change an administrator can make here.

Background calls do not run Filter Functions, so a filter that logs, redacts or rewrites chat messages never sees them.

The settings below are in Settings > Interface (admin section).


Choosing the task model​

The Tasks section holds two pickers. Open WebUI picks between them based on the connection the chat model came from:

FieldEnvironment variableUsed when the chat model comes from
Local Task ModelTASK_MODELa connection typed Local (Ollama and anything else you marked local)
External Task ModelTASK_MODEL_EXTERNALevery chat model not typed Local, including pipe and function models and models with no connection type

Both default to Current Model, which means background work runs on the chat's own model. If you name a model that is no longer in Open WebUI's model list, background work falls back to the chat's model.

Users need read access to the task model

That fallback covers only a missing model. A task model that exists but that a user cannot read is still picked for that user's chats, and each background request then fails the access check with Model not found. Admins skip that check, so the setup works when an admin tests it and fails only for accounts with the User role. For those users:

  • A new chat is named after its first message, in full.
  • Tags and follow-up suggestions never appear.
  • Knowledge retrieval and web search use the user's message, word for word, as the search query.
  • Legacy tool calling selects no tool.

The server log shows reason=model_read_denied for a task model the user cannot read, or reason=model_unregistered for one with no saved entry in Settings > Models (admin section). To fix it, choose Make Public in the task model's ellipsis (...) menu in Settings > Models (admin section), or give the users' groups read access in its Access settings, the same way as for the base model of a workspace model. You can also set the picker back to Current Model.

Agent chats​

A chat with an agent model from Open Terminal cannot run background work on that agent. Chat titles and autocomplete use the External Task Model instead, or the Local Task Model when the external one is Current Model, unavailable or itself an agent. The connection type does not matter here.

When neither picker names an available model that is not an agent, an agent chat is titled with the first 50 characters of its first message, and autocomplete offers nothing. Agent chats never get tags or follow-up suggestions, whatever the task model.

What to pick

Small, fast and non-reasoning. A reasoning model spends seconds thinking before producing a three-word title, and you pay for those thinking tokens.

  • External Task Model: gpt-5.4-nano, gemini-3.5-flash-lite, claude-haiku-4-5-20251001.
  • Local Task Model: qwen3.5:2b, gemma4:e2b, llama3.2:3b.

The main chat experience does not change. The background work just stops dragging.


Task model parameters​

Task Model Parameters > Configure, in the same Tasks section, opens the advanced parameter controls you already know from a model and applies them to every background request. The equivalent environment variable is TASK_MODEL_PARAMS, which takes a JSON object such as {"max_tokens":4000,"temperature":0.3}.

Leave it empty and background requests behave as they always have: task calls use the task model's own max_tokens from its model editor when one is set, and 1000 output tokens when none is, and every other parameter is left out. Context compaction has its own Context Compaction Model picker under Chat (CONTEXT_COMPACTION_MODEL, default Current Model) and does not use the Local or External task model. Its summaries have no output limit unless max_tokens is set here.

Reach for it when:

  • A title comes back cut off. This is the usual symptom of a reasoning task model. Thinking counts against the same 1000 tokens, so the budget can be gone before any answer is written. Raise max_tokens or turn reasoning_effort down.
  • Background calls cost more than you expected. Tag, follow-up, query and autocomplete requests carry no output limit of their own. Setting max_tokens puts a ceiling on all of them at once.
  • Background output is too loose. Lower temperature for steadier titles and tags.
Setting anything replaces the built-in limit

As soon as you set a single parameter, the built-in 1000-token limit on titles is dropped. If you still want a limit, include max_tokens in what you set. Emoji generation is the one exception: it always asks for 4 tokens and ignores this setting.

Five of the controls in the panel have no effect on background requests: Stream Chat Response, Stream Delta Chunk Size, Function Calling, Reasoning Tags and Context Compaction Threshold. Setting them here changes nothing.

Background requests also receive the task model's own per-model parameters from its model editor, with TASK_MODEL_PARAMS winning on conflicting keys. On an Ollama connection, keep_alive, format and think are the exception: a value set in the task model's editor wins over the same key in TASK_MODEL_PARAMS. A user's per-chat and per-account chat parameters never reach them, and neither do the global model defaults.

On Ollama this shows up with num_ctx. A num_ctx (Ollama) value set in a chat's Controls or in a user's General settings goes out only with the chat request. A title, tag or query request on the same model goes out with the model editor's num_ctx, or with none, so the two requests ask Ollama for different context lengths. Users see the next reply start after a long pause, and ollama ps can show a different CONTEXT value for the model after a background task than after a chat reply. A separate task model that does not fit in memory beside the chat model has a similar effect, since Ollama unloads an idle model to make room for a new one (Ollama FAQ). The same holds for an embedding model on that Ollama when Embedding Model Engine is Ollama. To avoid the reloads:

  • Set num_ctx in the model's editor instead of per chat or per account, so chat and background requests send the same value.
  • Or set the same num_ctx in Task Model Parameters, when every task model is on Ollama. Other connections receive num_ctx as a top-level request field.
  • Or pick a task model small enough to stay loaded beside the chat model, and check with ollama ps that both are listed.

Turning individual tasks off​

Each background task has a switch under Generation in the same panel, and an environment variable:

TaskAdmin toggleEnvironment variable
Chat title generationTitle GenerationENABLE_TITLE_GENERATION
Tag generationTags GenerationENABLE_TAGS_GENERATION
Follow-up suggestionsFollow Up GenerationENABLE_FOLLOW_UP_GENERATION
Autocomplete (fires as users type)Autocomplete GenerationENABLE_AUTOCOMPLETE_GENERATION
Query rewriting for knowledge retrievalRetrieval Query GenerationENABLE_RETRIEVAL_QUERY_GENERATION
Query rewriting for web searchWeb Search Query GenerationENABLE_SEARCH_QUERY_GENERATION

Turning off Title Generation, Tags Generation or Follow Up Generation also hides the matching switch in each user's Settings > Interface.

Web Search Query Generation shows only while web search is on.

Image prompt generation is switched off in Settings > Images & Videos (admin section) instead (ENABLE_IMAGE_PROMPT_GENERATION).

Weak hardware

Autocomplete is the first thing to turn off. It fires as users type, so a slow task model turns the prompt box to molasses.


Changing the prompts​

Most tasks' prompts sit under Generation, each empty by default, meaning the built-in prompt is used. Retrieval and web search share one Query Generation Prompt, the Image Prompt Generation Prompt sits under Generation while its toggle is on the Images tab, and the Context Compaction Prompt is under Chat. The Tasks section of the environment configuration reference has the full text of each built-in prompt and the placeholders it accepts.

A prompt saved in one of these fields is sent as is, and the built-in prompt is used only while the field is empty. Upgrading Open WebUI does not touch a saved prompt, so an instance that saved its own text, or set it through the matching environment variable such as TITLE_GENERATION_PROMPT_TEMPLATE, keeps sending that text after the built-in prompt changes.

For titles this shows up as wrong chat names. Open WebUI reads the title from a JSON object such as { "title": "Stock Trends" } in the task model's reply. When the reply has no such object, the chat is named after its first message, in full. If titles come out as the whole first message while Title Generation Prompt holds text, clear that field and click Save to go back to the built-in prompt, or rewrite your prompt to ask for that JSON object.

Queries work the same way. Open WebUI reads the queries from a JSON object such as { "queries": ["stock trends 2026"] } in the task model's reply. When the reply has no such object, the whole reply becomes the single search query, word for word, and shows that way under Searching or Querying in the chat. This happens with a saved Query Generation Prompt that asks for plain text, and with a reasoning task model whose reply carries its thinking as text. Clear the Query Generation Prompt field and click Save, rewrite the prompt to return {"queries": [...]}, or pick a non-reasoning task model.

Prompt modifiers are worth knowing about here, since task prompts often have to cope with pasted documents and long code blocks.

This content is for informational purposes only and does not constitute a warranty, guarantee, or contractual commitment. Open WebUI is provided "as is." See your license for applicable terms.