-
Notifications
You must be signed in to change notification settings - Fork 199
-
Hi,
I tried with OpenAI API key and I'm getting Network Problem error. If I try with wrong API key, I do get a message that my key is wrong, so there is some communication to the OpenAI server. I use this address:
https://api.openai.com/v1
(this works from my computer: https://api.openai.com/v1/models)
All the other services work well for me .. like Gemini and OpenRouter.
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 4 comments
-
Unable to reproduce.
Beta Was this translation helpful? Give feedback.
All reactions
-
Here are my settings:
image
I know the key works from the same computer.
If I run this from my powershell:
Invoke-RestMethod -Uri "https://api.openai.com/v1/models" -Headers @{ Authorization = "Bearer my_api_key_here" } | Select-Object -ExpandProperty data | Select-Object -First 5 id
I get a list of models. I can also try this:
$body = @{ model = "gpt-5.4-nano"; messages = @(@{ role = "user"; content = "Say 'Connection Successful' if you can hear me." }) } | ConvertTo-Json; (Invoke-RestMethod -Uri "https://api.openai.com/v1/chat/completions" -Method Post -Headers @{ Authorization = "Bearer my_api_key_here" } -ContentType "application/json" -Body $body).choices.message.content
And I get expected answer.
Any ideas how to trouble shoot the connection from within Open WebUI Desktop?
Beta Was this translation helpful? Give feedback.
All reactions
-
Just looked at the content of c:\Users<USER>\AppData\Roaming\open-webui\logs\server.log
send the errors to Gemini Pro. It tells me that:
The Root Cause
When Open WebUI tries to verify the connection, the OpenAI server sends back a response compressed with Brotli (indicated by content-encoding: br). To read it, Open WebUI uses a networking library called aiohttp, which in turn passes the data to the brotli Python package to decompress.
Recently, aiohttp added a security feature (protection against decompression bombs) that passes a second argument (max_length) to Brotli. However, the version of the brotli (or brotlipy) package currently installed in your environment is older and only accepts one argument. That mismatch is what's throwing the TypeError: process() takes exactly 1 argument (2 given) error.
How to Fix It
To resolve this, you just need to update the brotli and aiohttp packages in the specific Python environment Open WebUI is running from.
Beta Was this translation helpful? Give feedback.
All reactions
-
Just tested .. the version 0.9.2 solves this problem. So updating to the latest version within the Open WebUI Desktop resolved the issue.
Beta Was this translation helpful? Give feedback.