[GH-ISSUE #24603] issue: opencode api access Bad Request: {"detail":"'NoneType' object has no attribute 'startswith'"} #123665

Closed
opened 2026-05-21 03:04:34 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @vibeopsde on GitHub (May 12, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24603

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

Ollama Version (if applicable)

No response

Operating System

Ubuntu 24.04

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

v0.9.5 and earlier: works absolutly fine with opencode over api

Actual Behavior

since v0.9.6:
Bad Request: {"detail":"'NoneType' object has no attribute 'startswith'"}
this message blub at every message.

Steps to Reproduce

system1: macstudio - lm studio <-> system2: vserver - openwebui <-> every endpoint - opencode (v1.4.48)

Logs & Screenshots

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

Build · qwen3.5-122b-a10b

Additional Information

No response

Originally created by @vibeopsde on GitHub (May 12, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24603 ### 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.6 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 24.04 ### 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 v0.9.5 and earlier: works absolutly fine with opencode over api ### Actual Behavior since v0.9.6: Bad Request: {"detail":"'NoneType' object has no attribute 'startswith'"} this message blub at every message. ### Steps to Reproduce system1: macstudio - lm studio <-> system2: vserver - openwebui <-> every endpoint - opencode (v1.4.48) ### Logs & Screenshots Bad Request: {"detail":"'NoneType' object has no attribute 'startswith'"} Build · qwen3.5-122b-a10b ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-21 03:04:34 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (May 12, 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. 🟣 #24575 bug: 'NoneType' object has no attribute 'startswith' on /api/chat/completions when external client omits parent_id
    This is the closest match: it reports the same 400 error with 'NoneType' object has no attribute 'startswith' on /api/chat/completions for external OpenAI-compatible clients, specifically when required context like parent_id is missing. The reported OpenCode failure in #24603 is the same symptom and likely the same request-path regression.
    by Ghosterme-dev · bug

  2. 🟣 #24550 bug: NoneType object has no attribute 'startswith' — all /api/v1/chat/completions calls return 400 (v0.9.5, direct connections)
    This issue describes the same 'NoneType' object has no attribute 'startswith' 400 error for external completions API clients, including OpenClaude CLI and VS Code extensions. It appears to be the broader underlying bug affecting external API requests, which would include OpenCode.
    by ThefloorMiner

  3. 🟣 #24573 issue: External API returns 400 error with 'NoneType' object has no attribute 'startswith' since v0.9.3**
    This earlier report matches the same error message and the same external API /api/chat/completions path across v0.9.3+ versions. It provides historical context that the regression affects token-authenticated external clients, which is consistent with the OpenCode breakage in #24603.
    by choseongho11 · bug

  4. 🟣 #24554 issue: Open WebUI v0.9.5 Broken Completions API
    This issue reports the completions API breaking in v0.9.5 specifically for OpenCode and Continue Dev, with the same 'NoneType' object has no attribute 'startswith' error. Since #24603 is also about OpenCode over the API and the error persists in a later version, it is directly related.
    by xcjs · 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:4427508590 --> @owui-terminator[bot] commented on GitHub (May 12, 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. 🟣 [#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** *This is the closest match: it reports the same 400 error with `'NoneType' object has no attribute 'startswith'` on `/api/chat/completions` for external OpenAI-compatible clients, specifically when required context like `parent_id` is missing. The reported OpenCode failure in #24603 is the same symptom and likely the same request-path regression.* *by Ghosterme-dev · `bug`* 2. 🟣 [#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 describes the same `'NoneType' object has no attribute 'startswith'` 400 error for external completions API clients, including OpenClaude CLI and VS Code extensions. It appears to be the broader underlying bug affecting external API requests, which would include OpenCode.* *by ThefloorMiner* 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**** *This earlier report matches the same error message and the same external API `/api/chat/completions` path across v0.9.3+ versions. It provides historical context that the regression affects token-authenticated external clients, which is consistent with the OpenCode breakage in #24603.* *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 reports the completions API breaking in v0.9.5 specifically for OpenCode and Continue Dev, with the same `'NoneType' object has no attribute 'startswith'` error. Since #24603 is also about OpenCode over the API and the error persists in a later version, it is directly related.* *by xcjs · `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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#123665