Open WebUI 0.13.1+: chats with memories, skills or knowledge fail on some models

By MV2 of Munim, Inc., with AI agents. 14 November 2026. Tested: we rendered the message layout that Open WebUI 0.13.3 sends with 22 public chat templates from Hugging Face, using transformers 5.23.0's own template renderer. Not tested: a real Open WebUI install or any model server. See the limits.

Chats that worked on Open WebUI 0.13.0 fail after the update to 0.13.1, 0.13.2 or 0.13.3, but only in some chats: the ones where the model has memories, there are skills in the workspace, or knowledge is attached. A chat with none of these still works. Depending on the model and the server, the error is one of these:

Conversation roles must alternate user/assistant/user/assistant/...
Can only get item pairs from a mapping.
'str object' has no attribute 'items'
Tool call IDs should be alphanumeric strings with length 9!
No user message found in messages            (Hermes Agent, HTTP 400)

The short answer

ErrorWhere we saw itQuickest fix
Conversation roles must alternate user/assistant/user/assistant/...Gemma 3 and Gemma 3n templates (no tool role at all)For that model, turn off Builtin Tools or set Function Calling to Legacy (below)
Can only get item pairs from a mapping.Qwen3.5 templates (9B, 35B-A3B), when the call's arguments arrive as a JSON stringThe same, or a server or template that turns the arguments into an object
'str object' has no attribute 'items'GLM-4.5-Air's template, string argumentsThe same
Tool call IDs should be alphanumeric strings with length 9!Mistral 7B Instruct v0.3's template. Open WebUI's IDs are fc_ plus 24 hex charactersBuiltin Tools off, or Legacy
No user message found in messagesHermes Agent's API server (open-webui#34047)Builtin Tools off, or Legacy. A Hermes fix is open as hermes-agent#151549

What changed in 0.13.1

The 0.13.1 release notes list it under Changed, "Context as hidden tool results": with native function calling (the default), memory recall, the skills list and the attached knowledge list now arrive as hidden tool results after your message instead of in the system prompt. Open WebUI's prompt caching docs name the hidden tools recall_memories, list_available_skills and list_attached_knowledge. They also say when the tools are used: in web UI chats with Native function calling and the model's Builtin Tools capability on, once per reply, skipped when there is nothing to list, and saved and replayed unchanged on later turns.

In 0.13.3's source, hidden_tool_result() in backend/open_webui/utils/middleware.py stores a completed function call with arguments '{}' and an ID from output_id('fc') (fc_ plus 24 hex characters), followed by its output. convert_output_to_messages() in utils/misc.py turns that into an ordinary chat-completions tool round. It passes the arguments through as the string "{}", sets the assistant's content to an empty string, and doesn't drop the call for being hidden. The docstring says automatic recall is kept "in ordinary tool history so later turns replay it unchanged". So once a chat has the round, every later request in that chat carries it again, and switching the setting off doesn't repair an old chat. Start a new one. What an OpenAI-compatible server receives looks like this:

[{"role": "system", "content": "…"},
 {"role": "user", "content": "your message"},
 {"role": "assistant", "content": "",
  "tool_calls": [{"id": "fc_24 hex", "type": "function",
                  "function": {"name": "recall_memories", "arguments": "{}"}}]},
 {"role": "tool", "tool_call_id": "fc_24 hex", "content": "the memories / skills / knowledge list"}]

Many chat templates only handle a tool round correctly when the model itself made the call, or they expect arguments in one particular form. The request is valid OpenAI format, so what breaks is the template or server on the other end. The Open WebUI maintainers said the same when closing #34047.

Results: 22 chat templates, rendered

Each template was rendered with transformers' own renderer, with a system message, one user message, the hidden tool round and a one-tool tools list, and add_generation_prompt on. "0.13.0 layout" is the same context inside the system prompt instead. "As sent" uses string arguments, as Open WebUI sends them. "Object arguments" is what you get from a server that parses the string into an object before rendering. Every render that succeeded contained both the user's message and the hidden context.

Template (Hugging Face repo)0.13.0 layout0.13.1+ as sent (string arguments)0.13.1+ with object arguments
google Gemma 3 (unsloth/gemma-3-4b-it)okConversation roles must alternate user/assistant/user/assistant/...same
Gemma 3n (unsloth/gemma-3n-E4B-it)okConversation roles must alternate user/assistant/user/assistant/...same
Qwen/Qwen3.5-9BokCan only get item pairs from a mapping.ok
Qwen/Qwen3.5-35B-A3BokCan only get item pairs from a mapping.ok
zai-org/GLM-4.5-Airok'str object' has no attribute 'items'ok
unsloth/mistral-7b-instruct-v0.3okTool call IDs should be alphanumeric strings with length 9!same
deepseek-ai/DeepSeek-V3.1okokcan only concatenate str (not "dict") to str
deepseek-ai/DeepSeek-R1-0528okokcan only concatenate str (not "dict") to str
Qwen3 (Qwen3-8B, Qwen3-30B-A3B, Qwen3-4B-Instruct-2507), Qwen2.5-7B-Instruct, QwQ-32B, DeepSeek-R1-Distill-Qwen-7Bokokok
Llama 3.1 8B and 3.2 3B Instruct (unsloth copies), Mistral-Small-3.2-24B-Instruct-2506 (unsloth), Phi-4-mini-instruct, gpt-oss-20b, Hermes 3 8B (both templates), granite-3.3-8b-instruct, Kimi-K2-Instructokokok

So 6 of the 22 templates fail on the layout exactly as Open WebUI sends it, and 6 fail when the arguments are turned into an object. Gemma 3, Gemma 3n and Mistral 7B v0.3 fail either way. All 22 render the 0.13.0 layout. mistralai/Devstral-Small-2507 has no Jinja template on Hugging Face and was skipped.

No one argument form suits every template. Qwen3.5's template loops over tool_call.arguments|items and GLM-4.5's calls _args.items(), so both need an object. DeepSeek V3.1's and R1-0528's templates join the arguments onto a string, so they need a string. Whether your setup fails therefore depends on what your server does with the arguments before it applies the template, and we did not test that for any server. Test your own.

Gemma 3 and Mistral 7B v0.3 would already fail on any real tool call with native function calling. What is new in 0.13.1 is that the tool round appears even when you never asked for a tool: a memory, a skill in the workspace or an attached knowledge base is enough.

Test your own server in one command

This sends the same shape of request Open WebUI 0.13.1+ sends, with a short placeholder in place of real memories. Point it at the OpenAI-compatible URL Open WebUI uses for that connection, and set your model name (add -H "Authorization: Bearer …" if the server needs a key):

curl -s http://localhost:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{
 "model": "YOUR-MODEL", "max_tokens": 20,
 "messages": [
  {"role": "system", "content": "You are a helpful assistant."},
  {"role": "user", "content": "Reply only with OK."},
  {"role": "assistant", "content": "", "tool_calls": [{"id": "fc_0123456789abcdef01234567", "type": "function",
    "function": {"name": "recall_memories", "arguments": "{}"}}]},
  {"role": "tool", "tool_call_id": "fc_0123456789abcdef01234567", "content": "Memory: the user likes short answers."}],
 "tools": [{"type": "function", "function": {"name": "recall_memories", "description": "Recall saved memories.",
   "parameters": {"type": "object", "properties": {"query": {"type": "string"}}, "required": []}}}]}'

An answer means the server and template handle the round. A 400 or 500 with one of the messages above means this is your problem, and the fixes below apply. A 400 about something else, for example DeepSeek's reasoning_content, is covered on its own page.

Fixes

  1. Per model, in Open WebUI (works today). Open the model in Settings > Admin > Models, turn off Builtin Tools under Capabilities, and save. Or set Function Calling to Legacy in the model's Advanced Params. An Open WebUI maintainer gave both in #34047: the model then gets only your message again. According to the docs, in that mode recalled memories are appended to your message on every turn, and there is no skills or knowledge list (with Legacy, only skills you select go into the system message). Turning off Builtin Tools also turns off Open WebUI's own built-in tools for that model. Use this for Gemma 3/3n and Mistral 7B v0.3, which can't take a tool round anyway, and for Hermes Agent until its fix ships.
  2. Memories only: ENABLE_MEMORY_SYSTEM_CONTEXT=false turns automatic memory injection off for every chat (docs, same page). With Native function calling, the model then reads memories on demand through the memory tools. That is still a tool round, so it doesn't help a template that can't take one.
  3. Fix the template, for Qwen3.5 and GLM-4.5. The usual patch checks the type before looping: loop over the arguments when they are a mapping, and print them as they are when they are a string. A fix like this was proposed for Nemotron's template (discussion). Some clients work around it themselves instead: WeKnora #4119 retries with object arguments. Load a patched template with your server's chat-template option, for example --chat-template-file for llama-server or --chat-template for vLLM. We have not tested a patched template.

On 14 November 2026, 0.13.3 (8 November) was still Open WebUI's newest release, and the release notes of 0.13.2 and 0.13.3 don't mention a change to this layout. #34047 was closed as not planned, since the request is valid. The Hermes Agent pull request #151549 ("accept tool-tailed OpenAI chat requests") was open and not merged.

Other layouts we rendered

How this was made, and its limits

AI agents working for MV2 of Munim, Inc. ran a sealed job on 14 November 2026. It downloaded each repository's chat_template.jinja or tokenizer_config.json from Hugging Face (main branch), rendered every layout with transformers.utils.chat_template_utils.render_jinja_template from transformers 5.23.0 (checked first with a smoke render), and recorded the result or the exact exception. The same job pulled Open WebUI v0.13.0 and v0.13.3 to compare middleware.py. Limits:

Data and code: every render (template SHA-256, layout, result, exception text, and the end of each rendered prompt) is in openwebui-hidden-tool-template-matrix.json (CC BY 4.0), and the script that produced it is openwebui-hidden-tool-matrix.py (Apache-2.0; python3 openwebui-hidden-tool-matrix.py run OUT_DIR, needs transformers or jinja2 and network). Corrections are welcome as issues at github.com/munimtechnologies/local-ai-checkup.

Related

Want someone to check it for you?

MV2 of Munim, Inc. does a $49 local AI health check for one machine, or a $199 small-office check for up to 5 machines or one shared Open WebUI, Ollama or vLLM server. You get a written report of what's exposed, risky or slow and what to fix first, with exact commands for your OS. See a sample report. Pay $49 or pay $199 on Stripe, then email mv2@munimtech.com the output of the free local-ai-checkup script (python3 local_ai_checkup.py --json), your OS, and what you use it for. MV2 never asks for passwords, keys or remote access.