[GH-ISSUE #8564] ComfyUI API key not passed as ?token to websocket #134899

Closed
opened 2026-05-25 01:18:22 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @pwillia7 on GitHub (Jan 14, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8564

Bug Report

Important Notes

  • Before submitting a bug report: Please check the Issues or Discussions section to see if a similar issue or feature request has already been posted. It's likely we're already tracking it! If you’re unsure, start a discussion post first. This will help us efficiently focus on improving the project.

  • Collaborate respectfully: We value a constructive attitude, so please be mindful of your communication. If negativity is part of your approach, our capacity to engage may be limited. We’re here to help if you’re open to learning and communicating positively. Remember, Open WebUI is a volunteer-driven project managed by a single maintainer and supported by contributors who also have full-time jobs. We appreciate your time and ask that you respect ours.

  • Contributing: If you encounter an issue, we highly encourage you to submit a pull request or fork the project. We actively work to prevent contributor burnout to maintain the quality and continuity of Open WebUI.

  • Bug reproducibility: If a bug cannot be reproduced with a :main or :dev Docker setup, or a pip install with Python 3.11, it may require additional help from the community. In such cases, we will move it to the "issues" Discussions section due to our limited resources. We encourage the community to assist with these issues. Remember, it’s not that the issue doesn’t exist; we need your help!

Note: Please remove the notes above when submitting your post. Thank you for your understanding and support!


Installation Method

Docker

Environment

  • Open WebUI Version: v0.5.4

Confirmation:

  • [ x] I have read and followed all the instructions provided in the README.md.
  • [x ] I am on 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 the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Description

Bug Summary:

When ComfyUI is setup to use an API key via Comfy-ui-login which the Open Webui Image Generation ComfyUI API Key works with, it does not send the key as a url param named 'token', causing comfyui to fail to connect in Open-Webui.

Just need to change this line to
ws.connect(f"{ws_url}/ws?clientId={client_id}&token={api_key}", header=headers)

Comfyui login docs: https://github.com/liusida/ComfyUI-Login?tab=readme-ov-file#using-rest-api-calls

Originally created by @pwillia7 on GitHub (Jan 14, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/8564 # Bug Report ## Important Notes - **Before submitting a bug report**: Please check the Issues or Discussions section to see if a similar issue or feature request has already been posted. It's likely we're already tracking it! If you’re unsure, start a discussion post first. This will help us efficiently focus on improving the project. - **Collaborate respectfully**: We value a constructive attitude, so please be mindful of your communication. If negativity is part of your approach, our capacity to engage may be limited. We’re here to help if you’re open to learning and communicating positively. Remember, Open WebUI is a volunteer-driven project managed by a single maintainer and supported by contributors who also have full-time jobs. We appreciate your time and ask that you respect ours. - **Contributing**: If you encounter an issue, we highly encourage you to submit a pull request or fork the project. We actively work to prevent contributor burnout to maintain the quality and continuity of Open WebUI. - **Bug reproducibility**: If a bug cannot be reproduced with a `:main` or `:dev` Docker setup, or a pip install with Python 3.11, it may require additional help from the community. In such cases, we will move it to the "issues" Discussions section due to our limited resources. We encourage the community to assist with these issues. Remember, it’s not that the issue doesn’t exist; we need your help! Note: Please remove the notes above when submitting your post. Thank you for your understanding and support! --- ## Installation Method Docker ## Environment - **Open WebUI Version:** v0.5.4 **Confirmation:** - [ x] I have read and followed all the instructions provided in the README.md. - [x ] I am on 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 the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Description **Bug Summary:** When ComfyUI is setup to use an API key via [Comfy-ui-login](https://github.com/liusida/ComfyUI-Login) which the Open Webui Image Generation ComfyUI API Key works with, it does not send the key as a url param named 'token', causing comfyui to fail to connect in Open-Webui. Just need to change [this line](https://github.com/open-webui/open-webui/blob/main/backend/open_webui/utils/images/comfyui.py#L175 ) to `ws.connect(f"{ws_url}/ws?clientId={client_id}&token={api_key}", header=headers)` Comfyui login docs: https://github.com/liusida/ComfyUI-Login?tab=readme-ov-file#using-rest-api-calls
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#134899