mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-23 10:02:10 -05:00
[GH-ISSUE #24553] issue: /api/chat/completions runs into error #74932
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 @tweinberger-lei on GitHub (May 10, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24553
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.9.5
Ollama Version (if applicable)
No response
Operating System
Debian 12
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
llm api response
Actual Behavior
"detail":"'NoneType' object has no attribute 'startswith'"
Steps to Reproduce
curl -s -X POST "http://127.0.0.1:8080/api/chat/completions"
-H "Authorization: Bearer xxxx"
-H "Content-Type: application/json"
-d '{
"model": "gpt-oss:120b",
"messages": [
{
"role": "user",
"content": "Answer with: OK"
}
],
"stream": false
}'
Logs & Screenshots
curl returns: {"detail":"'NoneType' object has no attribute 'startswith'"}
Additional Information
Reverting to v0.9.4 solves the issue
@Classic298 commented on GitHub (May 10, 2026):
We just had a report for this, which i closed because to the best of my efforts I can not reproduce this.
How can I reproduce this?
@tweinberger-lei commented on GitHub (May 10, 2026):
on my system it can be reproduced by using the curl script provided
@xcjs commented on GitHub (May 10, 2026):
@Classic298 #24554 has reproductions steps for my environment.
Downgrading to v0.9.4 resolves the issue for me for now.
@Classic298 commented on GitHub (May 10, 2026):
aha, direct api calls affected only
@lnovelli commented on GitHub (May 10, 2026):
same issue here on 0.9.5.
Downgrading to 0.9.4 fixes.
@Classic298 commented on GitHub (May 10, 2026):
whipping up a quick fix...
It should be a basically single line change if anyone wants to patch their file locally so they can use 0.9.5.
@tweinberger-lei commented on GitHub (May 10, 2026):
yes - would be great
@xcjs commented on GitHub (May 10, 2026):
I use Docker - the best way to resolve that would be to cut a new release.
@Classic298 commented on GitHub (May 10, 2026):
if anyone wants to fix it for their 0.9.5 installation: its a single line fix:
https://github.com/open-webui/open-webui/pull/24556
@Classic298 commented on GitHub (May 10, 2026):
@xcjs you can easily modify the file within docker
@Classic298 commented on GitHub (May 10, 2026):
but yeah tim will merge this in for sure
@xcjs commented on GitHub (May 10, 2026):
I'm aware, but not in my environment. I have orchestration around container deployments, and doing manual patches like that doesn't scale.
An extended Dockerfile is an option, but I'd have to break away from the Github registry/update process we use.
TL;DR: I'll just wait for v.0.9.6/etc. as long as it's coming. :-)
@Classic298 commented on GitHub (May 10, 2026):
For public facing deployments or deployments with higher security requirements I would personally recommend patching that one line, since 0.9.5 has more than a dozen security fixes for vulnerabilities. A dockerfile to patch that one line should be trivial - but yes you do you
Tim will merge it in 100% in 0.9.6. Just not within the hour. May take a day or so
@tweinberger-lei commented on GitHub (May 10, 2026):
confirmed to fix it - thanks!
@somera commented on GitHub (May 11, 2026):
Works for me. Thx.
@Classic298 commented on GitHub (May 11, 2026):
@Ghosterme-dev in case you didn't notice, i deleted your comment multiple times now from this and other issues. You copy pasted the same comment everywhere, and it's AI Slop. The "root cause" is not the root cause and the line you identified at being at fault/needing changes is not actually the line that needs changes.
https://github.com/open-webui/open-webui/pull/24556/changes#diff-c5a084a65b46fbba7f2b0916c5ca4e5b3435eef28bc533e60c53ae85aeb1da4bR903
this here is what actually needs a fix.
Please don't copy paste the same answer on multiple issues, that is spamming - and even less so when it's wrong information. Thank you.
@Ghosterme-dev commented on GitHub (May 11, 2026):
Sorry for the confusion. I wasn't aware that you deleted, as it said only bot. I thought the deletion was because the cases were already closed.
Only wanted to contribute your development.
However, I only had AI generate the layout, not the content. For some reason, though, the fix seems to have worked for me, so I wanted to let you know.
In any case, in the future I’ll be more careful with how I phrase things regarding the root cause.
@gaby commented on GitHub (May 11, 2026):
@Classic298 @tjbck It would be beneficial for Open-WebUI to release "rc" (release candidate) versions before a full release. Lately, releases have included both breaking bugs and database migrations.
@Classic298 commented on GitHub (May 11, 2026):
That's the dev branch. The dev branch is the release candidate. Everything that gets merged into dev basically has a 99.9% chance of making it into the next version. It practically never happens that something gets reverted on the dev branch - especially not db migrations
And what's the issue with database migrations being in releases? We specifically warn about it in the release notes on top and on the bottom in the changed section
@Classic298 commented on GitHub (May 11, 2026):
We have said many times on reddit/discord and here that we would appreciate if people can help test the dev branch more.
Testing environments, development environments, companies deploying the dev branch on a test server to test out new features and prepare for a new version etc.
If there'd be dedicated release candidate versions i am not sure that would improve at all because why would they start using rc versions if they are already not trying out the dev branch.
@gaby commented on GitHub (May 11, 2026):
Are there docker images for the
devbranch being published?@Classic298 commented on GitHub (May 11, 2026):
Yes. Every single commit gets a tagged docker image and if you pull just the dev image you always get the latest commit of the dev branch
@Classic298 commented on GitHub (May 11, 2026):
So every commit to dev, unless the build fails - in that case no tag is created - gets it's own tagged docker image with the sha being the identifier for that image, so you can even pin it to a specific commit if you like.
And the bare :dev tag always points to the latest commit on the dev branch
DB Migrations have, if i remember correctly, never been reverted on the dev branch.
And very large features are typically merged in one go. Tim creates dedicated large PRs for that and merges them into dev in one go - once that new feature is done.
I use dev privately, exclusively. For development but also for personal use. In my org we also have a dedicated testing environment with latest dev always deployed for testing new features and .. again: development.
I have caught minor not-ideal features before on dev branches, which helped us fix it before it shipped in a new version.
But bugs like this - I would never catch them because simply I do not use Open WebUI as an API proxy and this bug only affects that usecase.
WE ARE working on a full test suite with end-to-end tests and automated tests. And you can be sure that this one here got integrated yesterday, to cover an API-only chat completion flow. But before that entire test suite becomes really useful, a couple of months will have to pass where we slowly build and grow the test suite into hundreds of tests.
This doesn't mean we will never have regressions again, but it should help with reducing recurring regressions.
@Classic298 commented on GitHub (May 11, 2026):
And if not obvious - i encourage everyone here to use the dev branch.
If you do not want to risk your real data, then use it as a second environment only. If you are a company: set up a small (weak) VPS and install bare dev there and use it for development, testing and experimenting. If you catch anything that is out of the ordinary: great! Report it to us here so we can fix it while that bug is still in dev. We will be extremely happy if you do so.
In fact, this is the single thing you can do that has immense positive impact for Open WebUI.
Many PRs cannot be merged due to code quality, scope, atomicity or other reasons.
A well written bug report for a bug you found on the dev branch is GOLD.
If anyone needs a guide
ghcr.io/open-webui/open-webui:devtagIf you want a tagged version specific to one commit:
Just use the shortened commit hash and use that as tag as shown here in the image, which would result in, for example
docker pull ghcr.io/open-webui/open-webui:git-41b48b5@alexlach commented on GitHub (May 12, 2026):
If anyone needs a workaround while staying 0.9.5, you can pass a dummy chat_id in the payload like this:
@moras-p commented on GitHub (May 12, 2026):
For a quick fix, request with "chat_id": "" still fails for me, but "chat_id": "" does work.
@Classic298 commented on GitHub (May 12, 2026):
The quick fix has been documented above by me. There's an open PR. it's a single line edit, in fact, just two characters need to get changed then it works again. Use that as the primary fix.
@kaac5 commented on GitHub (May 13, 2026):
When can this bug be fixed?
@Classic298 commented on GitHub (May 13, 2026):
FIXED IN LATEST DEV
@Classic298 commented on GitHub (May 13, 2026):
bc244fdc90 (diff-c5a084a65b46fbba7f2b0916c5ca4e5b3435eef28bc533e60c53ae85aeb1da4bR895-L897)@chrysillis commented on GitHub (May 13, 2026):
I just pulled
ghcr.io/open-webui/open-webui:devand it still has the bug in it. I am trying with a curl command to test.@Classic298 commented on GitHub (May 13, 2026):
hmm tim refactored the docker container publishing pipeline. No image for latest dev has been published yet. @chrysillis feel free to download latest dev from git to try i'll go check whats what
@chrysillis commented on GitHub (May 13, 2026):
Maybe I'm trying to pull too soon? I tried pulling this ghcr.io/open-webui/open-webui:git-bc244fd and got this error:
failed to pull images of the stack: compose pull operation failed: Error response from daemon: manifest unknown@Classic298 commented on GitHub (May 13, 2026):
As i just said, no image for dev has been published yet. So there's nothing to pull.
Try downloading dev from git for now and i'll go check whats what
@Arondight commented on GitHub (May 13, 2026):
hi, when will v0.9.6 released?