open-webui/backend/open_webui/routers
Classic298 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
..
analytics.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
audio.py refac 2026-05-21 18:43:45 +04:00
auths.py refac 2026-05-21 16:56:56 +04:00
automations.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
calendar.py fix: check destination calendar write access on event update (#24764) 2026-05-19 21:26:58 +04:00
channels.py refac 2026-05-19 20:44:38 +04:00
chats.py refac 2026-05-21 16:56:56 +04:00
configs.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
evaluations.py refactor: remove unused GET /evaluations/feedbacks/all endpoint (#24778) 2026-05-19 20:49:22 +04:00
files.py refac 2026-05-20 01:30:26 +04:00
folders.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
functions.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
groups.py refac 2026-05-14 13:12:59 +09:00
images.py refac 2026-05-14 02:40:20 +09:00
knowledge.py refac 2026-05-28 17:24:33 -05:00
memories.py refac 2026-05-21 14:01:57 +04:00
models.py fix: harden model profile image against SVG stored XSS (#25060) 2026-05-28 17:41:55 -05:00
notes.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
ollama.py fix: move bypass_system_prompt off query parameter onto request.state (#25156) 2026-05-31 14:53:53 -07:00
openai.py fix: move bypass_system_prompt off query parameter onto request.state (#25156) 2026-05-31 14:53:53 -07:00
pipelines.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
prompts.py refac 2026-05-21 14:01:57 +04:00
retrieval.py refac 2026-05-21 16:56:56 +04:00
scim.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
skills.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
tasks.py refac 2026-05-14 13:19:00 +09:00
terminals.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
tools.py refac 2026-05-21 14:01:57 +04:00
users.py refac 2026-05-21 15:29:49 +04:00
utils.py refac 2026-05-21 16:25:25 +04:00