mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[GH-ISSUE #15876] issue: Adding system prompt to a custom model based on Google Gen AI API models results in 400 Error #17700
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @T-A-GIT on GitHub (Jul 19, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/15876
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.17
Ollama Version (if applicable)
No response
Operating System
Ubuntu 22.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Using the latest version of Open Web UI 0.6.17 via docker install on Ubuntu 22.04.
Trying to create a custom model for my kids with system prompt using google models. Expected behavior to have the model work in line with the system prompt restrictions.
Actual Behavior
When trying to use the custom model it results in the 400 Server connection error.
Steps to Reproduce
Reproduce / Troubleshooting steps:
The base model work fine when i try use them directly.
Also if i include no system prompt on the custom models it works fine.
But if i add a system prompt to the custom models to restrict the output it fails with the 400: Open WebUI: Server Connection Error
Logs & Screenshots
'stream': True, 'model': 'custom-1', 'messages': [{'role': 'system', 'content': '8 year old assistant model'}, {'role': 'use...
│ └ <starlette.requests.Request object at 0x72077c607310>
└ <function generate_chat_completion at 0x7207cc3f4400>
File "/app/backend/open_webui/utils/chat.py", line 278, in generate_chat_completion
return await generate_openai_chat_completion(
└ <function generate_chat_completion at 0x7207cc34d9e0>
Additional Information
No response
@T-A-GIT commented on GitHub (Jul 19, 2025):
Closing as the issue is on Google APIs where system prompt are not supported for Gemma models.