mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
Allow anonymous authentication for OpenAI-like API #1331
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 @JeremyEastham on GitHub (Jun 20, 2024).
Bug Report
Description
Bug Summary:
If the OpenAI API endpoint is configured to point to a local OpenAI-like server, the model list is not populated if an API key is not configured.
Steps to Reproduce:
open-webuinormallyOPENAI_API_BASE_URLorAdmin Panel -> Connections -> OpenAI APIExpected Behavior:
The models list should be populated if a request can be made to the models endpoint, regardless of whether or not an API key is provided. At the very least, an error should be displayed if an API key is not configured.
Actual Behavior:
Fetching the OpenAI models list silently fails if an API key is not configured. Observe that sending an authenticated request to
/api/modelsresults in an empty list. The models are also unavailable in the UI.Environment
Reproduction Details
Confirmation:
Logs and Screenshots
Browser Console Logs:
(not applicable)
Docker Container Logs:
INFO:apps.openai.main:get_all_models()is printed in the console, indicating that an attempt is being made to request the models list, but the request is not actually performed if the API key is missing (verified via LM Studio logs). The request is performed successfully if theCheck Connectionbutton is pressed in the Admin Panel, but the list of models is not retained.Screenshots (if applicable):
(not applicable)
Installation Method
Manual installation (
pip install)Additional Information
(follow up if needed)
Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
@justinh-rahb commented on GitHub (Jun 20, 2024):
Not a bug, expected behaviour.