[GH-ISSUE #23958] bug: Inconsistent API behavior caused by Brotli dependency issues (v0.9.1) #35656

Closed
opened 2026-04-25 09:50:25 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @sandr1x on GitHub (Apr 21, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23958

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

Pip Install

Open WebUI Version

v0.9.1

Ollama Version (if applicable)

No response

Operating System

Windows 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

  • External API connections (e.g. Mistral, Groq, Cloudflare Workers) should work consistently if the API is reachable and returns valid responses
  • Connection check and API requests should not fail due to missing or incompatible compression dependencies
  • Errors related to response decoding should be clearly reported in UI or logs

Actual Behavior

  • Some APIs failed with connection / payload errors while others worked normally
  • Errors were inconsistent and appeared random depending on the provider
  • In some cases, UI did not show clear errors
  • Logs showed decoding failures for Brotli-compressed responses:
ClientPayloadError: Can not decode content-encoding: br
  • Despite failures, HTTP responses were successful:
<ClientResponse(https://api.mistral.ai/v1/models) [200 OK]>

Steps to Reproduce

  1. Install Open WebUI v0.9.1 in a Python virtual environment

  2. Have an inconsistent or broken Brotli setup:

    • invalid leftover package (e.g. ~rotli)
    • incompatible version (brotli 1.2.0 instead of required 1.1.0)
    • missing or partially working Brotli support
  3. Connect external APIs that may return Brotli-compressed responses:

    • Mistral (https://api.mistral.ai/v1)
    • Groq
    • Cloudflare Workers
  4. Attempt to:

    • verify connection
    • fetch models
    • send requests

Logs & Screenshots

Relevant Error Log

ClientPayloadError: 400, message:
  Can not decode content-encoding: br

Traceback (most recent call last):
  File "<venv>\Lib\site-packages\aiohttp\client_reqrep.py", line 693, in read
    self._body = await self.content.read()
  File "<venv>\Lib\site-packages\aiohttp\streams.py", line 420, in read
    raise self._exception

During handling of the above exception:

  File "<venv>\Lib\site-packages\open_webui\routers\openai.py", line 707, in verify_connection
    response_data = await r.json()

Additional Context

<ClientResponse(https://api.mistral.ai/v1/models) [200 OK]>
POST /openai/verify HTTP/1.1" 200
GET /api/models?refresh=true HTTP/1.1" 200

Additional Information

Resolution / Workaround

Fixing Brotli dependencies resolves the issue:

pip uninstall brotli -y
pip uninstall brotlicffi -y

Remove leftover invalid package manually:

<venv>\Lib\site-packages\~rotli*

Reinstall correct versions:

pip install brotli==1.1.0
pip install brotlicffi

Suggestion

  • Validate Brotli dependency/version on startup
  • Warn about invalid distributions (e.g. ~rotli)
  • Handle Brotli decoding errors more explicitly
  • Improve error messaging for connection failures caused by decoding issues
Originally created by @sandr1x on GitHub (Apr 21, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/23958 ### 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 Pip Install ### Open WebUI Version v0.9.1 ### Ollama Version (if applicable) _No response_ ### Operating System Windows 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 * External API connections (e.g. Mistral, Groq, Cloudflare Workers) should work consistently if the API is reachable and returns valid responses * Connection check and API requests should not fail due to missing or incompatible compression dependencies * Errors related to response decoding should be clearly reported in UI or logs ### Actual Behavior * Some APIs failed with connection / payload errors while others worked normally * Errors were inconsistent and appeared random depending on the provider * In some cases, UI did not show clear errors * Logs showed decoding failures for Brotli-compressed responses: ```text ClientPayloadError: Can not decode content-encoding: br ``` * Despite failures, HTTP responses were successful: ```text <ClientResponse(https://api.mistral.ai/v1/models) [200 OK]> ``` ### Steps to Reproduce 1. Install Open WebUI v0.9.1 in a Python virtual environment 2. Have an inconsistent or broken Brotli setup: * invalid leftover package (e.g. `~rotli`) * incompatible version (`brotli 1.2.0` instead of required `1.1.0`) * missing or partially working Brotli support 3. Connect external APIs that may return Brotli-compressed responses: * Mistral (`https://api.mistral.ai/v1`) * Groq * Cloudflare Workers 4. Attempt to: * verify connection * fetch models * send requests ### Logs & Screenshots ### Relevant Error Log ``` ClientPayloadError: 400, message: Can not decode content-encoding: br Traceback (most recent call last): File "<venv>\Lib\site-packages\aiohttp\client_reqrep.py", line 693, in read self._body = await self.content.read() File "<venv>\Lib\site-packages\aiohttp\streams.py", line 420, in read raise self._exception During handling of the above exception: File "<venv>\Lib\site-packages\open_webui\routers\openai.py", line 707, in verify_connection response_data = await r.json() ``` ### Additional Context ``` <ClientResponse(https://api.mistral.ai/v1/models) [200 OK]> ``` ``` POST /openai/verify HTTP/1.1" 200 GET /api/models?refresh=true HTTP/1.1" 200 ``` ### Additional Information ### Resolution / Workaround Fixing Brotli dependencies resolves the issue: ```bash pip uninstall brotli -y pip uninstall brotlicffi -y ``` Remove leftover invalid package manually: ```text <venv>\Lib\site-packages\~rotli* ``` Reinstall correct versions: ```bash pip install brotli==1.1.0 pip install brotlicffi ``` --- ### Suggestion * Validate Brotli dependency/version on startup * Warn about invalid distributions (e.g. `~rotli`) * Handle Brotli decoding errors more explicitly * Improve error messaging for connection failures caused by decoding issues
GiteaMirror added the bug label 2026-04-25 09:50:25 -05:00
Author
Owner

@tjbck commented on GitHub (Apr 24, 2026):

Addressed in dev.

<!-- gh-comment-id:4311863660 --> @tjbck commented on GitHub (Apr 24, 2026): Addressed in dev.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35656