mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-23 10:02:10 -05:00
[GH-ISSUE #24716] issue: /api/chat/completions fails when chat_id is omitted #123698
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 @Sechma on GitHub (May 14, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24716
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
0.9.5
Ollama Version (if applicable)
No response
Operating System
Windows 10
Browser (if applicable)
Firefox
Confirmation
README.md.Expected Behavior
/api/chat/completions should accept a standard OpenAI-style payload without chat_id.
A request like this should work
{ "model": "example-model", "messages": [ { "role": "user", "content": "hello world" } ] }chat_id should be optional, not required.
Actual Behavior
If chat_id is omitted, the request fails with:
{"detail":"'NoneType' object has no attribute 'startswith'"}Server log
ERROR | open_webui.main:process_chat - Error processing chat payload: 'NoneType' object has no attribute 'startswith'Steps to Reproduce
Run (before please rename your base url and api key
Logs & Screenshots
Response
{"detail":"'NoneType' object has no attribute 'startswith'"}Docker log
ERROR | open_webui.main:process_chat - Error processing chat payload: 'NoneType' object has no attribute 'startswith'Additional Information
No response
@owui-terminator[bot] commented on GitHub (May 14, 2026):
🔍 Related Issues Found
I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:
🟣 #24564 bug: API calls to /api/chat/completions fail: "'NoneType' object has no attribute 'startswith'"
This is the closest duplicate: it reports the same '/api/chat/completions' failure with the exact 'NoneType' object has no attribute 'startswith' error. Although its reproduction differs, the underlying endpoint bug appears the same.
by da-astro ·
bug🟣 #24575 bug: 'NoneType' object has no attribute 'startswith' on /api/chat/completions when external client omits parent_id
This issue narrows the same error to external clients omitting parent_id on '/api/chat/completions', which is very similar to the current report about the endpoint failing when an optional request field is absent.
by Ghosterme-dev ·
bug🟣 #24639 issue: Error processing chat payload: 'NoneType' object has no attribute 'startswith'
This is another direct report of the identical 'Error processing chat payload'/'NoneType' object has no attribute 'startswith' stack at v0.9.5, so it likely tracks the same backend bug.
by Arondight ·
bug🟣 #24553 Issue #24553
This issue is about '/api/chat/completions' running into an error in the same version range and is likely part of the same regression family, even though the exact request shape differs.
by unknown
💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.
This comment was generated automatically. React with 👍 if helpful, 👎 if not.