open-webui/backend
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
open_webui fix: normalize a tool call name sent as null (#29690) 2026-09-06 17:00:03 -04:00
.dockerignore fix: litellm config issue 2024-02-24 22:35:11 -08:00
.gitignore refac 2024-09-06 04:59:20 +02:00
dev.sh perf: allow disabling websocket per-message-deflate (#28613) 2026-08-24 18:46:07 -04:00
requirements-slim.txt refac 2026-09-06 16:48:30 -04:00
requirements.txt chore: drop the Google Drive client and other unimported dependency pins (#29726) 2026-09-06 16:39:24 -04:00
start.sh refac 2026-09-06 16:48:30 -04:00
start_windows.bat chore: drop nltk, unused at the pinned versions (#29725) 2026-09-06 16:39:05 -04:00