Files
open-webui/backend/open_webui/utils
4719881105 fix: move bypass_system_prompt off query parameter onto request.state (#25156)
bypass_system_prompt is an internal flag used by utils/middleware.py and utils/chat.py to skip applying the model system prompt on recursive base-model calls, but it was still declared as a positional argument on the openai/ollama chat-completion route handlers, so FastAPI bound it from the query string. Move it to request.state so external clients cannot set it, matching how bypass_filter is handled.

Drop the argument from both route signatures and read getattr(request.state, 'bypass_system_prompt', False); utils/chat.py sets request.state.bypass_system_prompt alongside bypass_filter and drops the kwarg from the two route-handler calls (the recursive self-calls keep it). Mirrors c0385f60b.

Co-authored-by: anishgirianish <161533316+anishgirianish@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-31 14:53:53 -07:00
..
2026-04-19 19:15:05 +09:00
2026-03-17 17:58:01 -05:00
2026-05-19 20:33:46 +04:00
2026-05-19 21:35:04 +04:00
2026-05-28 16:33:48 -05:00
2026-05-20 00:22:27 +04:00
2026-05-19 22:25:39 +04:00
2026-03-17 17:58:01 -05:00
2026-05-11 02:25:11 +09:00