open-webui/backend/open_webui
Classic298 ac091273b7
fix: keep streamed text when a filter or provider sends non-string content (#28840)
A stream filter function, or a provider that puts something other than a string in a delta, makes the streaming handler concatenate a string with a non-string. That raises TypeError, and the broad handler wrapped around the whole per-chunk block swallows it at debug level and moves on. The chunk's text never reaches the message the user sees, and nothing above debug level says why.

The content and reasoning fields are now coerced to text once, where they are read off the delta, ahead of every consumer. The coercion is guarded on truthiness, so falsy values such as an empty list still skip the block exactly as before, and the accumulated content receives byte for byte what it received previously.

Checked against 14 delta shapes covering strings, empty values, numbers, booleans, None, lists, dicts and a content array: the truthiness gate and the accumulated content are identical before and after.
2026-08-23 15:35:53 -04:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
internal perf: route native JSON columns through JSONCodec instead of stdlib json (#28396) 2026-08-10 19:39:49 -05:00
migrations refac 2026-08-10 23:22:08 -06:00
models refac 2026-08-23 13:49:50 -04:00
retrieval refac 2026-08-23 13:33:51 -04:00
routers fix: apply connection prefix id to the model display name as well as the id (#28950) 2026-08-23 15:27:09 -04:00
socket fix: keep the usage pool cleanup task alive across lock loss and Redis errors (#28834) 2026-08-20 12:59:38 -07:00
static refac 2026-07-27 19:39:36 -04:00
storage refac 2026-07-31 17:41:14 -04:00
tools refac 2026-08-17 00:24:47 -07:00
utils fix: keep streamed text when a filter or provider sends non-string content (#28840) 2026-08-23 15:35:53 -04:00
__init__.py refac 2026-07-27 19:39:36 -04:00
alembic.ini fix: Alembic CLI commands from failing 2025-08-15 04:17:47 -04:00
config.py refac 2026-08-20 13:13:51 -07:00
constants.py refac: make the web search error message a plain constant (#28948) 2026-08-23 13:27:02 -04:00
env.py refac 2026-08-20 13:13:51 -07:00
events.py refac 2026-08-16 23:21:00 -07:00
functions.py fix: honor bypass_system_prompt on the pipe route (#28739) 2026-08-19 11:08:02 -07:00
main.py refac 2026-08-17 00:47:32 -07:00
tasks.py refac 2026-08-23 13:40:13 -04:00