[GH-ISSUE #24762] issue: Error 'NoneType' object has no attribute 'startswith' #107393

Closed
opened 2026-05-18 06:11:40 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @SuperPat45 on GitHub (May 15, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24762

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.9.5

Ollama Version (if applicable)

v0.24.0

Operating System

Ubuntu 24.10

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

No error

Actual Behavior

Return HTTP error 400:

{"detail":"'NoneType' object has no attribute 'startswith'"}

Steps to Reproduce

  1. Send POST request to URL https://openwebui/api/v1/chat/completions
  2. With minimal content: {"messages":[{"content":"Who are you?","role":"user"}],"model":"gemma4:26b"}
  3. I test many models, same error.

Logs & Screenshots

2026-05-15 15:15:55.946 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.2.33:0 - "POST /api/v1/chat/completions HTTP/1.1" 400
2026-05-15 15:15:56.863 | ERROR | open_webui.main:process_chat:2013 - Error processing chat payload: 'NoneType' object has no attribute 'startswith'

Additional Information

No response

Originally created by @SuperPat45 on GitHub (May 15, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24762 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.9.5 ### Ollama Version (if applicable) v0.24.0 ### Operating System Ubuntu 24.10 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior No error ### Actual Behavior Return HTTP error 400: > {"detail":"'NoneType' object has no attribute 'startswith'"} ### Steps to Reproduce 1. Send POST request to URL `https://openwebui/api/v1/chat/completions` 2. With minimal content: `{"messages":[{"content":"Who are you?","role":"user"}],"model":"gemma4:26b"}` 3. I test many models, same error. ### Logs & Screenshots > 2026-05-15 15:15:55.946 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.2.33:0 - "POST /api/v1/chat/completions HTTP/1.1" 400 > 2026-05-15 15:15:56.863 | ERROR | open_webui.main:process_chat:2013 - Error processing chat payload: 'NoneType' object has no attribute 'startswith' ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-18 06:11:40 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (May 15, 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:

  1. 🟣 #24550 bug: NoneType object has no attribute 'startswith' — all /api/v1/chat/completions calls return 400 (v0.9.5, direct connections)
    Reports the same 400 error with 'NoneType' object has no attribute 'startswith' on /api/v1/chat/completions in v0.9.5, and notes it affects direct external API clients. This is essentially the same failure mode and endpoint as the new issue.
    by ThefloorMiner

  2. 🟣 #24564 bug: API calls to /api/chat/completions fail: "'NoneType' object has no attribute 'startswith'"
    Very close match: the title and body describe /api/chat/completions returning the exact same 'NoneType' object has no attribute 'startswith' error. It also reproduces across models and API-only usage, matching the new report.
    by da-astro · bug

  3. 🟣 #24573 issue: External API returns 400 error with 'NoneType' object has no attribute 'startswith' since v0.9.3**
    Describes the same external API failure and identical error string beginning in v0.9.3 through v0.9.5. Although it mentions a slightly different endpoint path, it is clearly the same completions API bug affecting API clients.
    by choseongho11 · bug

  4. 🟣 #24554 issue: Open WebUI v0.9.5 Broken Completions API
    This issue says v0.9.5 broke the completions API for token-authenticated clients like OpenCode and Continue Dev, which is the same symptom class and same regression window as the new issue.
    by xcjs · bug

  5. 🟣 #24575 bug: 'NoneType' object has no attribute 'startswith' on /api/chat/completions when external client omits parent_id
    The error string is identical, and the report narrows the trigger to external clients omitting parent_id on /api/chat/completions. The new issue also uses a minimal external API payload and hits the same error, so this is highly related.
    by Ghosterme-dev · bug


💡 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.

<!-- gh-comment-id:4461148147 --> @owui-terminator[bot] commented on GitHub (May 15, 2026): <!-- terminator-bot:related-issues-reply --> 🔍 **Related Issues Found** I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions: 1. 🟣 [#24550](https://github.com/open-webui/open-webui/issues/24550) **bug: NoneType object has no attribute 'startswith' — all /api/v1/chat/completions calls return 400 (v0.9.5, direct connections)** *Reports the same 400 error with `'NoneType' object has no attribute 'startswith'` on `/api/v1/chat/completions` in v0.9.5, and notes it affects direct external API clients. This is essentially the same failure mode and endpoint as the new issue.* *by ThefloorMiner* 2. 🟣 [#24564](https://github.com/open-webui/open-webui/issues/24564) **bug: API calls to /api/chat/completions fail: "'NoneType' object has no attribute 'startswith'"** *Very close match: the title and body describe `/api/chat/completions` returning the exact same `'NoneType' object has no attribute 'startswith'` error. It also reproduces across models and API-only usage, matching the new report.* *by da-astro · `bug`* 3. 🟣 [#24573](https://github.com/open-webui/open-webui/issues/24573) **issue: External API returns 400 error with 'NoneType' object has no attribute 'startswith' since v0.9.3**** *Describes the same external API failure and identical error string beginning in v0.9.3 through v0.9.5. Although it mentions a slightly different endpoint path, it is clearly the same completions API bug affecting API clients.* *by choseongho11 · `bug`* 4. 🟣 [#24554](https://github.com/open-webui/open-webui/issues/24554) **issue: Open WebUI v0.9.5 Broken Completions API** *This issue says v0.9.5 broke the completions API for token-authenticated clients like OpenCode and Continue Dev, which is the same symptom class and same regression window as the new issue.* *by xcjs · `bug`* 5. 🟣 [#24575](https://github.com/open-webui/open-webui/issues/24575) **bug: 'NoneType' object has no attribute 'startswith' on /api/chat/completions when external client omits parent_id** *The error string is identical, and the report narrows the trigger to external clients omitting `parent_id` on `/api/chat/completions`. The new issue also uses a minimal external API payload and hits the same error, so this is highly related.* *by Ghosterme-dev · `bug`* --- 💡 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.
Author
Owner

@Classic298 commented on GitHub (May 15, 2026):

duplicate, fixed in dev, please search for existing issues

<!-- gh-comment-id:4461189926 --> @Classic298 commented on GitHub (May 15, 2026): duplicate, fixed in dev, please search for existing issues
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#107393