mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[GH-ISSUE #12125] issue: Improve compatibility with OpenAI structured outputs json_schema response format #103472
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 @SuperPat45 on GitHub (Mar 27, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12125
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.5.20
Ollama Version (if applicable)
0.6.2
Operating System
ubuntu 22.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
What is the issue?
Can you improve the /chat/completions compatibility with OpenAI about the json_schema response_format?
I tested with the gemma3 model, and this OpenAI syntax is ignored if called through the /api/chat/completions OpenWebUI API whereas it works through the /ollama/v1/chat/completions API:
Whereas this one work in all case:
It seems the response_format parameter is dropped before relaying to Ollama.
Actual Behavior
The response is not a json string unsing response_format, ok with format parameter.
Steps to Reproduce
Calling with /api/chat/completions, is not working:
Whereas calling with /ollama/v1/chat/completions, is ok:
Logs & Screenshots
n/a
Additional Information
No response
@tjbck commented on GitHub (Mar 28, 2025):
MIght be addressed with
5e720cd84b, testing wanted here.