feat: Fetch model list in background thread #5974

Closed
opened 2025-11-11 16:41:10 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @dattasid on GitHub (Aug 6, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

Setup:

  1. A few Ollama (and other) endpoints are configured with open-webui
  2. One or more Ollama endpoints are temporarily down

The main area of the page does not render and only shows a spinning wheel. This continues until each configured endpoint either sends a model list or times out.

Even if the last chat, or every recent chat, is from available services, if another service is temporarily down, I have to wait for the connection timeout before I can start chatting.

Note: One workaround is to delete the services I know are down, that means I have to keep adding and deleting servers that I use once in a while. I only start some servers when I need them, I would prefer the endpoints stay added and not lock me out of the app for 30s.

Desired Solution you'd like

When the page in opened, or refreshed, page should render quickly along with chat window and previous chat etc. Model dropdown can slowly populate in the background as data becomes available.

Alternatives Considered

No response

Additional Context

No response

Originally created by @dattasid on GitHub (Aug 6, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description Setup: 1. A few Ollama (and other) endpoints are configured with open-webui 2. One or more Ollama endpoints are temporarily down The main area of the page does not render and only shows a spinning wheel. This continues until each configured endpoint either sends a model list or times out. Even if the last chat, or every recent chat, is from available services, if another service is temporarily down, I have to wait for the connection timeout before I can start chatting. Note: One workaround is to delete the services I know are down, that means I have to keep adding and deleting servers that I use once in a while. I only start some servers when I need them, I would prefer the endpoints stay added and not lock me out of the app for 30s. ### Desired Solution you'd like When the page in opened, or refreshed, page should render quickly along with chat window and previous chat etc. Model dropdown can slowly populate in the background as data becomes available. ### Alternatives Considered _No response_ ### Additional Context _No response_
Author
Owner

@dattasid commented on GitHub (Aug 6, 2025):

Log messages for timeout, for services that are down:

2025-08-05 17:36:21.498 | ERROR | open_webui.routers.ollama:send_get_request:106 - Connection error: - {}
2025-08-05 17:36:21.499 | ERROR | open_webui.routers.ollama:send_get_request:106 - Connection error: - {}
2025-08-05 17:36:32.510 | ERROR | open_webui.routers.ollama:send_get_request:106 - Connection error: - {}
2025-08-05 17:36:32.510 | ERROR | open_webui.routers.ollama:send_get_request:106 - Connection error: - {}

@dattasid commented on GitHub (Aug 6, 2025): Log messages for timeout, for services that are down: 2025-08-05 17:36:21.498 | ERROR | open_webui.routers.ollama:send_get_request:106 - Connection error: - {} 2025-08-05 17:36:21.499 | ERROR | open_webui.routers.ollama:send_get_request:106 - Connection error: - {} 2025-08-05 17:36:32.510 | ERROR | open_webui.routers.ollama:send_get_request:106 - Connection error: - {} 2025-08-05 17:36:32.510 | ERROR | open_webui.routers.ollama:send_get_request:106 - Connection error: - {}
Author
Owner

@tjbck commented on GitHub (Aug 6, 2025):

Intended behaviour here, you can adjust the timeout with an env var.

@tjbck commented on GitHub (Aug 6, 2025): Intended behaviour here, you can adjust the timeout with an env var.
Author
Owner

@dattasid commented on GitHub (Aug 6, 2025):

Just clarifying, UI being stuck behind a HTTP call is fine ?

Its understandable if it is out of scope for now due to manpower issues. Will you accept PR for this?

@dattasid commented on GitHub (Aug 6, 2025): Just clarifying, UI being stuck behind a HTTP call is fine ? Its understandable if it is out of scope for now due to manpower issues. Will you accept PR for this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#5974