[GH-ISSUE #24573] issue: External API returns 400 error with 'NoneType' object has no attribute 'startswith' since v0.9.3** #74945

Closed
opened 2026-05-13 07:48:46 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @choseongho11 on GitHub (May 11, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24573

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

0.9.5

Ollama Version (if applicable)

No response

Operating System

ubuntu 24

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

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/completions fail with HTTP 400 and the following error:

'NoneType' object has no attribute 'startswith'

Steps to Reproduce

  1. Deploy Open WebUI v0.9.3 or later
  2. Generate API key from Settings
  3. Call /api/chat/completions endpoint 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"}]}'

  1. Returns HTTP 400 with error: {"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

  • Open WebUI v0.9.3, v0.9.4, v0.9.5 (all affected)
  • Docker deployment
  • PostgreSQL + pgvector backend
  • External API call via Authorization Bearer token

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/completions fail with HTTP 400 and the following error:

'NoneType' object has no attribute 'startswith'

Steps to Reproduce

  1. Deploy Open WebUI v0.9.3 or later
  2. Generate API key from Settings
  3. Call /api/chat/completions endpoint 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"}]}'

  1. Returns HTTP 400 with error: {"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

  • Open WebUI v0.9.3, v0.9.4, v0.9.5 (all affected)
  • Docker deployment
  • PostgreSQL + pgvector backend
  • External API call via Authorization Bearer token

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/completions fail with HTTP 400 and the following error:

'NoneType' object has no attribute 'startswith'

Steps to Reproduce

  1. Deploy Open WebUI v0.9.3 or later
  2. Generate API key from Settings
  3. Call /api/chat/completions endpoint 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"}]}'

  1. Returns HTTP 400 with error: {"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

  • Open WebUI v0.9.3, v0.9.4, v0.9.5 (all affected)
  • Docker deployment
  • PostgreSQL + pgvector backend
  • External API call via Authorization Bearer token

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/completions fail with HTTP 400 and the following error:

'NoneType' object has no attribute 'startswith'

Steps to Reproduce

  1. Deploy Open WebUI v0.9.3 or later
  2. Generate API key from Settings
  3. Call /api/chat/completions endpoint 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"}]}'

  1. Returns HTTP 400 with error: {"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

  • Open WebUI v0.9.3, v0.9.4, v0.9.5 (all affected)
  • Docker deployment
  • PostgreSQL + pgvector backend
  • External API call via Authorization Bearer token

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/completions fail with HTTP 400 and the following error:

'NoneType' object has no attribute 'startswith'

Steps to Reproduce

  1. Deploy Open WebUI v0.9.3 or later
  2. Generate API key from Settings
  3. Call /api/chat/completions endpoint 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"}]}'

  1. Returns HTTP 400 with error: {"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

  • Open WebUI v0.9.3, v0.9.4, v0.9.5 (all affected)
  • Docker deployment
  • PostgreSQL + pgvector backend
  • External API call via Authorization Bearer token

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.

Originally created by @choseongho11 on GitHub (May 11, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24573 ### 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 0.9.5 ### Ollama Version (if applicable) _No response_ ### Operating System ubuntu 24 ### 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 **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/completions` fail with HTTP 400 and the following error: `'NoneType' object has no attribute 'startswith'` **Steps to Reproduce** 1. Deploy Open WebUI v0.9.3 or later 2. Generate API key from Settings 3. Call `/api/chat/completions` endpoint 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"}]}' 4. Returns HTTP 400 with error: `{"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** - Open WebUI v0.9.3, v0.9.4, v0.9.5 (all affected) - Docker deployment - PostgreSQL + pgvector backend - External API call via Authorization Bearer token **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/completions` fail with HTTP 400 and the following error: `'NoneType' object has no attribute 'startswith'` **Steps to Reproduce** 1. Deploy Open WebUI v0.9.3 or later 2. Generate API key from Settings 3. Call `/api/chat/completions` endpoint 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"}]}' 4. Returns HTTP 400 with error: `{"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** - Open WebUI v0.9.3, v0.9.4, v0.9.5 (all affected) - Docker deployment - PostgreSQL + pgvector backend - External API call via Authorization Bearer token **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/completions` fail with HTTP 400 and the following error: `'NoneType' object has no attribute 'startswith'` **Steps to Reproduce** 1. Deploy Open WebUI v0.9.3 or later 2. Generate API key from Settings 3. Call `/api/chat/completions` endpoint 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"}]}' 4. Returns HTTP 400 with error: `{"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** - Open WebUI v0.9.3, v0.9.4, v0.9.5 (all affected) - Docker deployment - PostgreSQL + pgvector backend - External API call via Authorization Bearer token **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/completions` fail with HTTP 400 and the following error: `'NoneType' object has no attribute 'startswith'` **Steps to Reproduce** 1. Deploy Open WebUI v0.9.3 or later 2. Generate API key from Settings 3. Call `/api/chat/completions` endpoint 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"}]}' 4. Returns HTTP 400 with error: `{"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** - Open WebUI v0.9.3, v0.9.4, v0.9.5 (all affected) - Docker deployment - PostgreSQL + pgvector backend - External API call via Authorization Bearer token **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/completions` fail with HTTP 400 and the following error: `'NoneType' object has no attribute 'startswith'` **Steps to Reproduce** 1. Deploy Open WebUI v0.9.3 or later 2. Generate API key from Settings 3. Call `/api/chat/completions` endpoint 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"}]}' 4. Returns HTTP 400 with error: `{"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** - Open WebUI v0.9.3, v0.9.4, v0.9.5 (all affected) - Docker deployment - PostgreSQL + pgvector backend - External API call via Authorization Bearer token **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.
GiteaMirror added the bug label 2026-05-13 07:48:46 -05:00
Author
Owner

@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:

  1. 🟣 #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/completions returns 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

  2. 🟢 #24553 issue: /api/chat/completions runs into error
    This open issue reports /api/chat/completions failing 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

  3. 🟣 #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/completions with an API key and getting the same 400/startswith error. The external API-only nature and the version regression make it highly related, even though it uses the /api/v1 route.
    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.

<!-- gh-comment-id:4419556318 --> @owui-terminator[bot] commented on GitHub (May 11, 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. 🟣 [#24564](https://github.com/open-webui/open-webui/issues/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/completions` returns 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`* 2. 🟢 [#24553](https://github.com/open-webui/open-webui/issues/24553) **issue: /api/chat/completions runs into error** *This open issue reports `/api/chat/completions` failing 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`* 3. 🟣 [#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)** *This issue is about external clients hitting `/api/v1/chat/completions` with an API key and getting the same 400/`startswith` error. The external API-only nature and the version regression make it highly related, even though it uses the `/api/v1` route.* *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.
Author
Owner

@mamontuka commented on GitHub (May 11, 2026):

Server Log ERROR | open_webui.main:process_chat:2013 - Error processing chat payload: 'NoneType' object has no attribute 'startswith'

https://github.com/open-webui/open-webui/issues/24553
https://github.com/open-webui/open-webui/pull/24556

<!-- gh-comment-id:4419776868 --> @mamontuka commented on GitHub (May 11, 2026): > > **Server Log** ERROR | open_webui.main:process_chat:2013 - Error processing chat payload: 'NoneType' object has no attribute 'startswith' https://github.com/open-webui/open-webui/issues/24553 https://github.com/open-webui/open-webui/pull/24556
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#74945