mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-20 00:11:27 +00:00
Two fixes for direct connection users where background task generation (titles, tags, follow-ups) crashes with TypeError or returns 404: 1. middleware.py: Clear request.state.direct before running background_tasks_handler so task generation routes through the server-side path instead of generate_direct_chat_completion, which requires an active WebSocket session unavailable in this context. 2. tasks.py: Always use request.app.state.MODELS for task endpoints and move model validation after get_task_model_id() so the configured task model can resolve before the existence check runs. Previously, the chat model (from a direct connection) was validated before the task model override, causing a 404 when the chat model wasn't in the server's MODELS registry. Fixes #24092, Fixes #24095 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| data | ||
| internal | ||
| migrations | ||
| models | ||
| retrieval | ||
| routers | ||
| socket | ||
| static | ||
| storage | ||
| test | ||
| tools | ||
| utils | ||
| __init__.py | ||
| alembic.ini | ||
| config.py | ||
| constants.py | ||
| env.py | ||
| functions.py | ||
| main.py | ||
| tasks.py | ||