open-webui/backend/open_webui
Classic298 d75a7aaf54
fix: surface upstream errors on arena models instead of crashing (#29662)
Sending a message to an arena model failed with "'JSONResponse' object has no attribute 'body_iterator'" whenever the backing provider answered with an HTTP error, so the real error never reached the user. Non-streaming requests on an arena model, such as title and tag generation, broke the same way with "'JSONResponse' object is not a mapping".

The arena wrapper assumed the sub-model call always returns a stream for a streaming request and a dict for everything else, but the OpenAI-compatible router returns a plain response object as soon as the provider answers 4xx or 5xx. Both arms now hand that response straight back, which is exactly what the non-arena path already does, so the existing error handling turns it into the usual error message in the chat.

Verified against a matrix of streaming and non-streaming requests with the sub-model returning a stream, a dict, a JSONResponse and a PlainTextResponse: both crashes are gone and the two success paths are unchanged, including the selected_model_id prelude on the stream.

Fixes #29658
2026-09-04 17:17:02 -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 refac 2026-08-31 10:37:46 -04:00
retrieval fix: apply the shared metadata size cap to the last four vector DB backends (#29502) 2026-09-04 11:42:20 -04:00
routers refac 2026-09-03 15:31:07 -04:00
socket perf: stop scanning every socket.io payload for binary data (#28180) 2026-08-31 01:22:06 -04:00
static refac 2026-07-27 19: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: surface upstream errors on arena models instead of crashing (#29662) 2026-09-04 17:17:02 -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-08-31 10:19:05 -04:00
constants.py refac 2026-08-29 16:14:32 -04:00
env.py fix: bound extracted document metadata by the upload size limit by default (#29025) 2026-08-25 15:50:27 -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 fix: report version check failures instead of claiming latest (#29626) 2026-09-04 11:39:52 -04:00
tasks.py fix: stopping a response across instances on Redis Cluster (#29165) 2026-08-29 15:00:52 -04:00