[GH-ISSUE #10918] Admin panel can't get models when ENABLE_FORWARD_USER_INFO_HEADERS is True #16080

Closed
opened 2026-04-19 22:07:12 -05:00 by GiteaMirror · 0 comments
Owner

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:

  • I have read and followed all the instructions provided in the README.md.
  • I am on 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 the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

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_HEADERS is True.

Actual Behavior:

No models show up in the Admin Panel -> Settings -> Models page when the environment variable ENABLE_FORWARD_USER_INFO_HEADERS is True.

Description

Bug Summary:
When the environment variable ENABLE_FORWARD_USER_INFO_HEADERS is True, the Admin Panel -> Settings -> Models page is unusable. When I unset this environment variable or set it to False, I don't encounter the bug.

Reproduction Details

Steps to Reproduce:
Set ENABLE_FORWARD_USER_INFO_HEADERS environment variable to True. 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:

2025-02-27 18:56:42.853 | INFO | uvicorn.protocols.http.httptools_impl:send:468 - XX.X.XXX.XXX:0 - "GET /api/v1/configs/models HTTP/1.1" 200 - {}
2025-02-27 18:56:42.858 | INFO | uvicorn.protocols.http.httptools_impl:send:468 - XX.X.XXX.XXX:0 - "GET /ollama/config HTTP/1.1" 200 - {}
2025-02-27 18:56:42.903 | INFO | uvicorn.protocols.http.httptools_impl:send:468 - XX.X.XXX.XXX:0 - "GET /api/v1/models/base HTTP/1.1" 200 - {}
2025-02-27 18:56:42.987 | INFO | open_webui.routers.openai:get_all_models:379 - get_all_models() - {}
2025-02-27 18:56:42.988 | ERROR | open_webui.routers.openai:send_get_request:78 - Connection error: 'NoneType' object has no attribute 'name' - {}
2025-02-27 18:56:43.031 | INFO | uvicorn.protocols.http.httptools_impl:send:468 - XX.X.XXX.XXX:0 - "GET /api/models/base HTTP/1.1" 200 - {}

Screenshots/Screen Recordings (if applicable):

Image

Additional Information

When I click from another Settings tab over to Models, I see

  1. A GET request to /api/v1/configs/models that returns everything it should.
  2. Then there's a GET request to /ollama/config that (correctly) returns {ENABLE_OLLAMA_API: false, OLLAMA_BASE_URLS: [], OLLAMA_API_CONFIGS: {}} (because I have disabled Ollama).
  3. A GET request to /api/v1/models/base that returns a long list of available models.
  4. A GET request to /api/models/base that returns (incorrectly I believe) {data: []}

Looking in the container logs, I see:

2025-02-27 18:56:42.988 | ERROR | open_webui.routers.openai:send_get_request:78 - Connection error: 'NoneType' object has no attribute 'name' - {}

Following the error message to the code here, it looks like send_get_request is getting called without a proper user argument (or with user = None?) and when ENABLE_FORWARD_USER_INFO_HEADERS is True, the code path with user.name on line 65 is exercised, raising the error above.

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:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on 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 the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## 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_HEADERS` is `True`. ## Actual Behavior: No models show up in the Admin Panel -> Settings -> Models page when the environment variable `ENABLE_FORWARD_USER_INFO_HEADERS` is `True`. ## Description **Bug Summary:** When the environment variable `ENABLE_FORWARD_USER_INFO_HEADERS` is `True`, the Admin Panel -> Settings -> Models page is unusable. When I unset this environment variable or set it to `False`, I don't encounter the bug. ## Reproduction Details **Steps to Reproduce:** Set `ENABLE_FORWARD_USER_INFO_HEADERS` environment variable to `True`. 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:** ``` 2025-02-27 18:56:42.853 | INFO | uvicorn.protocols.http.httptools_impl:send:468 - XX.X.XXX.XXX:0 - "GET /api/v1/configs/models HTTP/1.1" 200 - {} 2025-02-27 18:56:42.858 | INFO | uvicorn.protocols.http.httptools_impl:send:468 - XX.X.XXX.XXX:0 - "GET /ollama/config HTTP/1.1" 200 - {} 2025-02-27 18:56:42.903 | INFO | uvicorn.protocols.http.httptools_impl:send:468 - XX.X.XXX.XXX:0 - "GET /api/v1/models/base HTTP/1.1" 200 - {} 2025-02-27 18:56:42.987 | INFO | open_webui.routers.openai:get_all_models:379 - get_all_models() - {} 2025-02-27 18:56:42.988 | ERROR | open_webui.routers.openai:send_get_request:78 - Connection error: 'NoneType' object has no attribute 'name' - {} 2025-02-27 18:56:43.031 | INFO | uvicorn.protocols.http.httptools_impl:send:468 - XX.X.XXX.XXX:0 - "GET /api/models/base HTTP/1.1" 200 - {} ``` **Screenshots/Screen Recordings (if applicable):** ![Image](https://github.com/user-attachments/assets/033445d3-4df0-477c-93fd-66f6ab82ed7a) ## Additional Information When I click from another Settings tab over to Models, I see 1. A `GET` request to `/api/v1/configs/models` that returns everything it should. 2. Then there's a `GET` request to `/ollama/config` that (correctly) returns `{ENABLE_OLLAMA_API: false, OLLAMA_BASE_URLS: [], OLLAMA_API_CONFIGS: {}}` (because I have disabled Ollama). 3. A `GET` request to `/api/v1/models/base` that returns a long list of available models. 4. A `GET` request to `/api/models/base` that returns (incorrectly I believe) `{data: []}` Looking in the container logs, I see: ``` 2025-02-27 18:56:42.988 | ERROR | open_webui.routers.openai:send_get_request:78 - Connection error: 'NoneType' object has no attribute 'name' - {} ``` Following the error message to the code [here](https://github.com/open-webui/open-webui/blob/15485e7c5d2c09857acce10e311707e2bb8e86c9/backend/open_webui/routers/openai.py#L78), it looks like `send_get_request` is getting called without a proper `user` argument (or with `user = None`?) and when `ENABLE_FORWARD_USER_INFO_HEADERS` is `True`, the code path with `user.name` on line 65 is exercised, raising the error above.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#16080