🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/9254
**Author:** [@wdvr](https://github.com/wdvr)
**Created:** 2/2/2025
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `add-timeout-warning`
---
### 📝 Commits (1)
- [`a64b954`](https://github.com/open-webui/open-webui/commit/a64b9546f33528f213df6160571bfe995d73fd7d) Add timeout warning for model loading
### 📊 Changes
**2 files changed** (+17 additions, -7 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/routers/ollama.py` (+8 -4)
📝 `backend/open_webui/routers/openai.py` (+9 -3)
</details>
### 📄 Description
Add timeout handling for model loading in `ollama.py` and `openai.py`.
* **Timeout Parameter**
- Add a `timeout` parameter to the `send_get_request` function in both `ollama.py` and `openai.py`.
- Set the default timeout to 10 seconds.
* **Model Loading with Timeout**
- Modify the `get_all_models` function in both `ollama.py` and `openai.py` to use the `timeout` parameter when calling `send_get_request`.
- Add a warning message to be displayed if the timeout is reached and some models are not loaded.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/open-webui/open-webui/pull/9254?shareId=9372dfd6-dd0c-470d-a392-dd82e68900b6).
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/9254
Author: @wdvr
Created: 2/2/2025
Status: ❌ Closed
Base:
main← Head:add-timeout-warning📝 Commits (1)
a64b954Add timeout warning for model loading📊 Changes
2 files changed (+17 additions, -7 deletions)
View changed files
📝
backend/open_webui/routers/ollama.py(+8 -4)📝
backend/open_webui/routers/openai.py(+9 -3)📄 Description
Add timeout handling for model loading in
ollama.pyandopenai.py.Timeout Parameter
timeoutparameter to thesend_get_requestfunction in bothollama.pyandopenai.py.Model Loading with Timeout
get_all_modelsfunction in bothollama.pyandopenai.pyto use thetimeoutparameter when callingsend_get_request.For more details, open the Copilot Workspace session.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.