Cut Open WebUI's hidden API spend: task models, follow-ups and usage tracking

Open WebUI makes background model calls after every reply. Move them to a cheap model, compact long chats, and track tokens per model in Analytics.

· ranx.cloud

Illustration of a large kettle and a small kettle on a stove, the small one steaming while the large one sits cold

This is for anyone running Open WebUI on their own API keys who looked at the provider's bill and found more requests than messages. Open WebUI makes its own model calls in the background: titles, tags, follow-up suggestions, search queries. By default they all run on whatever model you are chatting with. You end up with those calls on a cheap model, the ones you don't need switched off, long chats summarized instead of resent in full, and Analytics showing tokens per model so you can check the result.

Settings below were checked against Open WebUI v0.13.0. Prices are list prices as of November 2026. All settings are in Settings, in the Admin section of the left column (click your avatar at the bottom of the sidebar to open Settings).

What Open WebUI sends besides your message

From the task models documentation and the v0.13.0 source:

Background task When it runs Default
Title generation after the first exchange of a new chat on
Tags generation after the first exchange of a new chat on
Follow-up suggestions after every reply; sends the last 5 messages on
Web search query generation every message with web search on, Legacy tool-calling mode only on
Retrieval query generation every message with attached files or knowledge, unless they're in full-context mode on
Autocomplete as you type off
Context compaction when a chat passes a token threshold off
Emoji in voice calls one request per spoken sentence off

All of them use Current Model unless you set a task model. The expensive one is follow-ups: it runs after every answer and carries the recent conversation with it.

What that costs

Take a working day of 40 replies, with recent messages averaging 1,500 tokens. Each follow-up request then carries about 5 × 1,500 = 7,500 tokens of history plus a 400-token instruction, and returns about 150 tokens. On Claude Opus 5.5 ($4 input / $20 output per million tokens, Anthropic pricing):

per follow-up:  7,900 × $4/M + 150 × $20/M = $0.0316 + $0.0030 = $0.035
per day:        40 × $0.035 = $1.38
per month:      22 working days ≈ $30

The same on GPT-6 Luna ($0.10 / $0.50, OpenAI pricing):

per follow-up:  7,900 × $0.10/M + 150 × $0.50/M = $0.00079 + $0.000075 ≈ $0.00087
per month:      40 × 22 × $0.00087 ≈ $0.77

That's before the thinking tokens a reasoning model may spend on producing a JSON list of three suggestions. Claude 5 models think by default when called through Anthropic's OpenAI-compatible endpoint, which is how Open WebUI reaches them, and the thinking is billed as output.

Step 1: Make tokens visible

Analytics can only count tokens the provider reports, and most OpenAI-compatible providers report usage on streamed replies only when asked. Open WebUI asks when a model's Usage capability is on, and it's off by default.

  1. Open Models under AI in the Admin section.
  2. Click Model Defaults at the top of the list.
  3. Under Model Capabilities, switch Usage on, and press Save.

Model Defaults apply to every model; a model that sets the capability itself keeps its own value. From now on each reply records input and output tokens.

Step 2: Give background tasks their own model

Open Interface in the Admin section. The Tasks section has two pickers:

  • External Task Model: used when the chat model comes from an API connection (OpenAI, Anthropic, OpenRouter). This is the one that matters on a hosted instance.
  • Local Task Model: used for models from a connection marked Local, such as Ollama.

Set External Task Model to a small, fast model. Good picks:

Model Route Input / output per 1M
gpt-6-luna OpenAI $0.10 / $0.50
deepseek/deepseek-v4.1-flash OpenRouter $0.0486 / $0.54
qwen/qwen3.8-flash OpenRouter $0.15 / $0.47

Claude Haiku 5.5 is cheap too ($0.10 / $0.50 below 100K-token prompts), but as noted above it thinks by default through the compatible endpoint, which costs output tokens and can eat the task's token budget before the title is written. Prefer a model that answers directly. If you pick a model that's later removed, Open WebUI falls back to the chat model rather than failing, so check this setting after cleaning up connections.

Below the pickers, Task Model Parameters → Configure sets parameters for all background requests. Tags, follow-ups and query generation have no output limit of their own, so give them one:

{"max_tokens": 600}

Setting anything here replaces the built-in 1,000-token limit on titles and compaction summaries, which is why max_tokens is in the object.

Step 3: Switch off what you don't use

Still on Interface, under Generation:

  • Follow Up Generation: the clickable suggestions under each reply. If you never click them, turn it off. It's the largest saving on the list.
  • Tags Generation: tags for searching chats. Off if you search by text anyway.
  • Title Generation: keep it; one cheap call per chat makes the sidebar usable.
  • Autocomplete Generation: off by default, and the docs advise leaving it off on modest hardware because it fires as you type.

Turning these off at the admin level also hides the matching switch in each user's Settings → Interface.

Step 4: Stop resending long chats in full

Every message sends the whole conversation again. A chat that has grown to 150,000 tokens costs this much per message on Claude Sonnet 5.5 at $2 per million input tokens:

150,000 × $2/M = $0.30 of input before the model writes anything

Anthropic's OpenAI-compatible endpoint doesn't support prompt caching, so there's no discount for the repeated part. OpenAI and DeepSeek cache repeated prefixes automatically, which helps but doesn't remove the cost.

Two ways to deal with it:

  • Start new chats. The cheapest fix. Carry over a short summary if you need context.
  • Context Compaction, in the Chat section of Interface. Switch on Context Compaction, set Context Compaction Model to your cheap model, and set Token Threshold to something like 60000. When a chat's estimated context passes the threshold, older messages are summarized and only the summary plus the most recent messages (Retained Messages, 40% by default) are sent. The full history stays visible in the chat; a Context compacted line marks where the summary starts.

With a 60,000-token threshold, the same message costs at most about 60,000 × $2/M = $0.12 in input, and each compaction costs one summary call on the cheap model. Compaction is skipped silently when it can't find a clean split point, such as one very long exchange, so it's a ceiling most of the time, not a guarantee.

One more threshold to know: Claude Haiku 5.5 is billed at five times its base rate for any request whose prompt exceeds 100,000 tokens. Keep long Haiku chats below that.

Step 5: Check the numbers

Analytics (Admin section, under Quality) shows tokens per model for a period you choose: Last 24 hours, Last 7 days, Last 30 days and longer. The table under the chart lists each model's Input, Output and Total tokens. Multiply by the prices above for a cost estimate; Open WebUI shows tokens, not dollars.

Your own Settings → Usage page shows the same totals for your account with an activity heatmap, which is the same data on a single-user instance.

Analytics counts only what was recorded after you switched Usage on in step 1. For the real bill, use the provider's billing page, and set a limit there:

A week after these changes, compare the task model's row in Analytics with your chat models. It should show many requests and few tokens.

What goes wrong

Analytics shows no tokens. The Usage capability is off for those models, or the replies predate the change. Check that no individual model overrides the default.

Titles come back cut off, or chats stay "New Chat". The task model is a reasoning model that spent the token budget thinking. Pick a non-reasoning model, or raise max_tokens in Task Model Parameters.

Follow-up suggestions stopped appearing after switching the task model. The model wraps its JSON in extra text and Open WebUI can't parse it (#32322). Try a different small model.

After compaction, the model replies in English in a non-English chat. The built-in summary prompt doesn't ask for the conversation's language (#33230). Write your own Context Compaction Prompt that ends with "Write the summary in the language of the conversation." The prompt supports {{COMPACTED_MESSAGES}} and {{RECENT_MESSAGES}}.

Compaction summaries are cut short. You set Task Model Parameters without enough max_tokens, and summaries share that limit. Raise it to 1,500 or so if you use compaction.

Spend didn't drop. Most of it is the chat model itself. Look at the per-model table: if a premium model dominates, the next step is a cheaper default model for everyday chats and the premium one picked deliberately.

The instance size doesn't change this bill. On ranx.cloud the plan sets CPU, memory and disk for Open WebUI itself; model calls go to your provider at the same per-token price on any plan.