mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[GH-ISSUE #10918] Admin panel can't get models when ENABLE_FORWARD_USER_INFO_HEADERS is True #16080
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 @robert-norberg on GitHub (Feb 27, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/10918
Bug Report
Installation Method
Docker
Environment
Open WebUI Version: v0.5.17
Ollama (if applicable): (not used, disabled in admin settings)
Operating System: alpine3.20
Browser (if applicable): Edge 133.0.3065.69
Confirmation:
Expected Behavior:
I expect the models available from my OpenAI API server to show up in the Admin Panel -> Settings -> Models page when the environment variable
ENABLE_FORWARD_USER_INFO_HEADERSisTrue.Actual Behavior:
No models show up in the Admin Panel -> Settings -> Models page when the environment variable
ENABLE_FORWARD_USER_INFO_HEADERSisTrue.Description
Bug Summary:
When the environment variable
ENABLE_FORWARD_USER_INFO_HEADERSisTrue, the Admin Panel -> Settings -> Models page is unusable. When I unset this environment variable or set it toFalse, I don't encounter the bug.Reproduction Details
Steps to Reproduce:
Set
ENABLE_FORWARD_USER_INFO_HEADERSenvironment variable toTrue. Restart. Make sure OpenAI API connection is configured correctly. Go to Admin Panel -> Settings -> Models. You will see no models listed.Logs and Screenshots
Docker Container Logs:
Screenshots/Screen Recordings (if applicable):
Additional Information
When I click from another Settings tab over to Models, I see
GETrequest to/api/v1/configs/modelsthat returns everything it should.GETrequest to/ollama/configthat (correctly) returns{ENABLE_OLLAMA_API: false, OLLAMA_BASE_URLS: [], OLLAMA_API_CONFIGS: {}}(because I have disabled Ollama).GETrequest to/api/v1/models/basethat returns a long list of available models.GETrequest to/api/models/basethat returns (incorrectly I believe){data: []}Looking in the container logs, I see:
Following the error message to the code here, it looks like
send_get_requestis getting called without a properuserargument (or withuser = None?) and whenENABLE_FORWARD_USER_INFO_HEADERSisTrue, the code path withuser.nameon line 65 is exercised, raising the error above.