mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 19:38:46 -05:00
[GH-ISSUE #1184] OPENAI_API_BASE_URLS borked #51048
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NiLon on GitHub (Mar 16, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/1184
Bug Report
Description
Bug Summary:
OPENAI_API_BASE_URLS with one api url timeouts, with two urls python crash. Model lists get loaded correctly. The webui settings show all the endpoints correctly.
Steps to Reproduce:
Just running the webui with (do assume correct values in testing) and making prompt:
For timeout:
OPENAI_API_BASE_URLS=http://apiurl/v1
OPENAI_API_KEYS=firstkey
For crash:
OPENAI_API_BASE_URLS=http://apiurl/v1;http://apiurl2/v1
OPENAI_API_KEYS=firstkey;secondkey
Environment
Reproduction Details
Confirmation:
Error message for multiple urls
UnboundLocalError: cannot access local variable 'r' where it is not associated with a value
Additional Information
I have verified that using OPENAI_API_BASE_URL and OPENAI_API_KEY do work correctly with used endpoints and keys.
@tjbck commented on GitHub (Mar 16, 2024):
Should be fixed on our dev branch now, feel free to try it out and let me know if the issue persists!
@NiLon commented on GitHub (Mar 16, 2024):
Tested the dev branch, seems like there is more underlying problem. Maybe it doesn't get proper url to try?
AttributeError: 'NoneType' object has no attribute 'status_code'
@tjbck commented on GitHub (Mar 16, 2024):
Just added additional fix to address the attribute error, but based on the error log you provided, it seems like the backend also can't connect to the url at all? I'd suggest you check if you've provided the proper urls just in case!
@NiLon commented on GitHub (Mar 16, 2024):
Now that you said that I made additional test. In my case I had list like http://apiurl/v1;http://apiurl2/v1 the first one was offline but second one wasn't. And when I tried to use the model on second one it borked. But as I did bring up the first one, then the second started working. So I would suspect that if one of the urls in the list is down, then none of them work or something in that line.
@tjbck commented on GitHub (Mar 18, 2024):
@NiLon Thanks for the pointer! Should be fixed on our dev branch now, feel free to try it out and let me know if the issue persists!