mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-17 15:53:59 -06:00
[GH-ISSUE #24573] issue: External API returns 400 error with 'NoneType' object has no attribute 'startswith' since v0.9.3** #123653
Reference in New Issue
Block a user
Originally created by @choseongho11 on GitHub (May 11, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24573
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.9.5
Ollama Version (if applicable)
No response
Operating System
ubuntu 24
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Bug Report: External API returns 400 error with 'NoneType' object has no attribute 'startswith' since v0.9.3
Description
Since v0.9.3, external API calls to
/api/chat/completionsfail with HTTP 400 and the following error:'NoneType' object has no attribute 'startswith'Steps to Reproduce
/api/chat/completionsendpoint externally:curl http://[server]/api/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer [API_KEY]"
-d '{"model": "ModelName", "messages": [{"role": "user", "content": "Hello"}]}'
{"detail":"'NoneType' object has no attribute 'startswith'"}Server Log
ERROR | open_webui.main:process_chat:2013 - Error processing chat payload: 'NoneType' object has no attribute 'startswith'
Environment
Working Version
v0.9.2 works correctly with the same API call and configuration.
Expected Behavior
External API should return proper chat completion response as in v0.9.2.
Actual Behavior
Bug Report: External API returns 400 error with 'NoneType' object has no attribute 'startswith' since v0.9.3
Description
Since v0.9.3, external API calls to
/api/chat/completionsfail with HTTP 400 and the following error:'NoneType' object has no attribute 'startswith'Steps to Reproduce
/api/chat/completionsendpoint externally:curl http://[server]/api/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer [API_KEY]"
-d '{"model": "ModelName", "messages": [{"role": "user", "content": "Hello"}]}'
{"detail":"'NoneType' object has no attribute 'startswith'"}Server Log
ERROR | open_webui.main:process_chat:2013 - Error processing chat payload: 'NoneType' object has no attribute 'startswith'
Environment
Working Version
v0.9.2 works correctly with the same API call and configuration.
Expected Behavior
External API should return proper chat completion response as in v0.9.2.
Steps to Reproduce
Bug Report: External API returns 400 error with 'NoneType' object has no attribute 'startswith' since v0.9.3
Description
Since v0.9.3, external API calls to
/api/chat/completionsfail with HTTP 400 and the following error:'NoneType' object has no attribute 'startswith'Steps to Reproduce
/api/chat/completionsendpoint externally:curl http://[server]/api/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer [API_KEY]"
-d '{"model": "ModelName", "messages": [{"role": "user", "content": "Hello"}]}'
{"detail":"'NoneType' object has no attribute 'startswith'"}Server Log
ERROR | open_webui.main:process_chat:2013 - Error processing chat payload: 'NoneType' object has no attribute 'startswith'
Environment
Working Version
v0.9.2 works correctly with the same API call and configuration.
Expected Behavior
External API should return proper chat completion response as in v0.9.2.
Logs & Screenshots
Bug Report: External API returns 400 error with 'NoneType' object has no attribute 'startswith' since v0.9.3
Description
Since v0.9.3, external API calls to
/api/chat/completionsfail with HTTP 400 and the following error:'NoneType' object has no attribute 'startswith'Steps to Reproduce
/api/chat/completionsendpoint externally:curl http://[server]/api/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer [API_KEY]"
-d '{"model": "ModelName", "messages": [{"role": "user", "content": "Hello"}]}'
{"detail":"'NoneType' object has no attribute 'startswith'"}Server Log
ERROR | open_webui.main:process_chat:2013 - Error processing chat payload: 'NoneType' object has no attribute 'startswith'
Environment
Working Version
v0.9.2 works correctly with the same API call and configuration.
Expected Behavior
External API should return proper chat completion response as in v0.9.2.
Additional Information
Bug Report: External API returns 400 error with 'NoneType' object has no attribute 'startswith' since v0.9.3
Description
Since v0.9.3, external API calls to
/api/chat/completionsfail with HTTP 400 and the following error:'NoneType' object has no attribute 'startswith'Steps to Reproduce
/api/chat/completionsendpoint externally:curl http://[server]/api/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer [API_KEY]"
-d '{"model": "ModelName", "messages": [{"role": "user", "content": "Hello"}]}'
{"detail":"'NoneType' object has no attribute 'startswith'"}Server Log
ERROR | open_webui.main:process_chat:2013 - Error processing chat payload: 'NoneType' object has no attribute 'startswith'
Environment
Working Version
v0.9.2 works correctly with the same API call and configuration.
Expected Behavior
External API should return proper chat completion response as in v0.9.2.
@owui-terminator[bot] commented on GitHub (May 11, 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 same error signature and endpoint family:
/api/chat/completionsreturns HTTP 400 with'NoneType' object has no attribute 'startswith'. It also covers the external API key path described in the new report, making it the closest match.by da-astro ·
bug🟢 #24553 issue: /api/chat/completions runs into error
This open issue reports
/api/chat/completionsfailing with the exact same'NoneType' object has no attribute 'startswith'error on v0.9.5 and notes that reverting to v0.9.4 fixes it, which aligns closely with the regression described here.by tweinberger-lei ·
bug🟣 #24550 bug: NoneType object has no attribute 'startswith' — all /api/v1/chat/completions calls return 400 (v0.9.5, direct connections)
This issue is about external clients hitting
/api/v1/chat/completionswith an API key and getting the same 400/startswitherror. The external API-only nature and the version regression make it highly related, even though it uses the/api/v1route.by ThefloorMiner
💡 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.
@mamontuka commented on GitHub (May 11, 2026):
https://github.com/open-webui/open-webui/issues/24553
https://github.com/open-webui/open-webui/pull/24556