open-webui/backend/open_webui
Classic298 66e021a926
fix: normalize a tool call name sent as null (#29690)
Some endpoints stream a tool call whose function name is JSON null instead of a string. Nothing normalized it, so the null stayed on the tool call, was written into the stored message, and was sent back to the endpoint in the assistant message on the next turn, where a null is not a valid function name.

The delta accumulator now replaces a null name with an empty string, at the same point it already normalizes the arguments field. The call still fails as an unknown tool, which is the right outcome for a call that has no name, so the result is one failed tool call instead of a follow-up request the endpoint has to reject.

This is done where the delta enters the accumulator rather than at the consumers, because the name is emitted to the client and persisted while the response is still streaming, before anything downstream could clean it up.

Checked against 1261 streaming delta sequences: behaviour is unchanged except where the delta that creates the tool call carries a null name.

Seen in #29686 with a custom sglang build.
2026-09-06 17:00:03 -04:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
internal refac 2026-08-30 21:36:17 -04:00
migrations chore: format 2026-08-25 16:53:53 -04:00
models Gate the model profile image endpoint on model read access (#29700) 2026-09-06 16:20:13 -04:00
retrieval refac 2026-09-06 16:48:30 -04:00
routers Gate the channel webhook profile image endpoint on channel access (#29703) 2026-09-06 16:58:50 -04:00
socket perf: stop scanning every socket.io payload for binary data (#28180) 2026-08-31 01:22:06 -04:00
static chore: drop the unused Noto Sans variable fonts (#29723) 2026-09-06 16:39:36 -04:00
storage refac 2026-07-31 17:41:14 -04:00
tools refac: run the built-in file grep off the event loop (#29621) 2026-09-04 11:41:06 -04:00
utils fix: normalize a tool call name sent as null (#29690) 2026-09-06 17:00:03 -04:00
__init__.py perf: allow disabling websocket per-message-deflate (#28613) 2026-08-24 18:46:07 -04:00
alembic.ini fix: Alembic CLI commands from failing 2025-08-15 04:17:47 -04:00
config.py refac 2026-09-06 16:48:30 -04:00
constants.py refac 2026-08-29 16:14:32 -04:00
env.py refac 2026-09-06 16:48:30 -04: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-09-06 16:48:30 -04:00
tasks.py fix: stopping a response across instances on Redis Cluster (#29165) 2026-08-29 15:00:52 -04:00