mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #20565] issue: [Bug] AttributeError: 'NoneType' object has no attribute 'get' in process_chat when model capabilities are None #19226
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @a328929 on GitHub (Jan 11, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20565
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.7.2
Ollama Version (if applicable)
No response
Operating System
Ubuntu 24.04
Browser (if applicable)
Chrome 100.0
Confirmation
README.md.Expected Behavior
The application should gracefully handle models with missing or null metadata (specifically the capabilities field). Instead of throwing an AttributeError, the system should default to an empty configuration (e.g., treating capabilities as {}) and proceed with the chat session normally.
Actual Behavior
Actual Behavior
When attempting to start a new chat session with a specific model (e.g., XiaomiMiMo/MiMo-V2-Flash), the request fails and the chat does not initialize. The backend logs indicate an AttributeError: 'NoneType' object has no attribute 'get', which occurs because the model's metadata capabilities field is set to None instead of a dictionary.
Steps to Reproduce
Prerequisite (Model State):
Ensure there is a model registered in the system (often imported via an external OpenAI-compatible connection) where the
metainformation is incomplete. Specifically, thecapabilitiesfield in the model's metadata must beNone(null), rather than an empty dictionary{}.XiaomiMiMo/MiMo-V2-Flashhad the following metadata structure:'meta': {'description': None, 'capabilities': None}.Environment Configuration:
Set the environment variable
GLOBAL_LOG_LEVELtoDEBUGin your Docker container or.envfile to ensure the traceback and payload details are visible in the logs.Navigate to Chat:
Open the Open WebUI main interface and start a New Chat.
Select the Model:
From the model selector dropdown, choose the specific model identified in Step 1 (the one with
capabilities: None).Trigger the Error:
Type any message into the chat input (e.g., "Hello") and press Send.
Observe the Failure:
process_chatfunction fails when attempting to access.get()on thecapabilitiesobject.DEBUG | open_webui.main:process_chat:1746 - Error processing chat payload: 'NoneType' object has no attribute 'get'Logs & Screenshots
Backend Logs (Docker):
@karoldydo commented on GitHub (Jan 11, 2026):
Same for me, similar setup.
@Classic298 commented on GitHub (Jan 11, 2026):
delete your cache / force reload the page
@karoldydo commented on GitHub (Jan 11, 2026):
It's not a browser problem, I was trying on different browser even in private mode - same results.
@karoldydo commented on GitHub (Jan 11, 2026):
I found a workaround that works for me:
I hope this helps you as well.
Best,
Karol
@Classic298 commented on GitHub (Jan 11, 2026):
thanks for sharing! will add that as troubleshooting steps to the docs as well. can anyone else confirm this works for them? We haven't really had issues like these internally nor from other users reporting this
@a328929 commented on GitHub (Jan 12, 2026):
I've dug a bit deeper into the code logic.
The root cause is indeed that
model_info['meta']['capabilities']is returningNonefor these specific models, and the backend code doesn't guard against this before calling.get().Here is a suggested fix that would make the backend more robust. In
open_webui/main.py(inside theprocess_chatfunction), we should sanitize the capabilities dictionary before using it.Suggested Code Change:
@AndreasUpb commented on GitHub (Jan 15, 2026):
I re-saved the models like described in the workaround, but some users reported afterwards the issue again
@Classic298 commented on GitHub (Jan 15, 2026):
@AndreasUpb deleted cache?
@aq2kx commented on GitHub (Jan 15, 2026):
Same issue here
@AndreasUpb commented on GitHub (Jan 15, 2026):
Good hint, thank you. Disabled model cache; Saved; Activated model list again; Saved.
Will report if users still run in this problem
@Classic298 commented on GitHub (Jan 15, 2026):
i meant browser cache but yeah
@nielskorte commented on GitHub (Jan 20, 2026):
Had the same issue! Please fix it. Going to the models and just saving it again worked as a fix for now.
@Classic298 commented on GitHub (Jan 20, 2026):
A PR is already pending as you can see above... @nielskorte
@tjbck commented on GitHub (Jan 22, 2026):
Should be fixed in dev, testing wanted here!
@flyingbrike commented on GitHub (Jan 27, 2026):
This worked for me. Thx
@tahaipek commented on GitHub (Feb 1, 2026):
Thanks! This workaround solved the issue for me 👍
Editing the model in Admin and hitting Save fixed the
NoneType.geterror instantly.