Adds a Load / Preload Model button to the model selector dropdown — the missing counterpart to the existing Eject (unload) button. When an Ollama model is idle (not loaded in VRAM), admins can now preload it before starting a chat, eliminating cold-start latency.
Resolves community request in Discussion #14750 and related Issue #3987.
What changed
File
Change
backend/open_webui/main.py
New POST /api/models/load endpoint. Resolves the Ollama node(s) for the model and sends a keep-alive generate request (keep_alive: 5m, empty prompt) to warm the model into VRAM. Admin-only.
src/lib/apis/index.ts
New loadModel() client function that calls the backend endpoint.
Backend: POST /api/models/load accepts { "model": "<model_id>" }. It looks up the model in OLLAMA_MODELS, resolves prefix IDs and API keys per Ollama node, then sends POST /api/generate with an empty prompt and keep_alive: "5m" to warm the model. Returns { "status": true } on success or a 500 with per-node error details.
Frontend: The Load button appears only for admin users, only for Ollama-owned models, and only when the model is not already loaded (!item.model.loaded && item.model.owned_by === 'ollama'). Once loaded, the button disappears and the existing Eject button becomes visible instead.
Screenshots
The Load button (download icon) appears next to idle Ollama models in the selector dropdown. After loading, it's replaced by the existing Eject button (upload icon). Non-Ollama models and non-admin users see no change.
Testing
Have an Ollama instance with at least one model that is not loaded (verify via ollama ps).
Open the model selector in Open WebUI as an admin user.
Hover over the idle Ollama model — a download-tray icon (Load) should appear.
Click the Load button — a "Loading model..." toast appears, followed by "Model loaded successfully".
The model now shows as loaded (green dot) and the Eject button replaces the Load button.
Verify non-admin users do not see the Load button.
Verify non-Ollama models do not show the Load button.
Notes
No new dependencies added.
Admin-only — follows the same permission pattern as the existing Eject button.
Follows existing code patterns for Ollama API interaction (mirrors unload_model endpoint structure).
The keep_alive: "5m" default matches Ollama's standard behavior; the model stays warm for 5 minutes after the preload request.
🔄 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/24800
**Author:** [@Sarvind1](https://github.com/Sarvind1)
**Created:** 5/15/2026
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `feature/load-model-button`
---
### 📝 Commits (1)
- [`4d2c927`](https://github.com/open-webui/open-webui/commit/4d2c927712a5ee1ce3db23afde79afebf552a6cd) feat: add Load/Preload button for Ollama models in model selector
### 📊 Changes
**5 files changed** (+141 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/main.py` (+64 -0)
📝 `src/lib/apis/index.ts` (+33 -0)
📝 `src/lib/components/chat/ModelSelector/ModelItem.svelte` (+21 -0)
📝 `src/lib/components/chat/ModelSelector/Selector.svelte` (+19 -1)
📝 `src/lib/i18n/locales/en-US/translation.json` (+4 -0)
</details>
### 📄 Description
## Summary
Adds a **Load / Preload Model** button to the model selector dropdown — the missing counterpart to the existing **Eject** (unload) button. When an Ollama model is idle (not loaded in VRAM), admins can now preload it before starting a chat, eliminating cold-start latency.
Resolves community request in Discussion #14750 and related Issue #3987.
## What changed
| File | Change |
|------|--------|
| `backend/open_webui/main.py` | New `POST /api/models/load` endpoint. Resolves the Ollama node(s) for the model and sends a keep-alive generate request (`keep_alive: 5m`, empty prompt) to warm the model into VRAM. Admin-only. |
| `src/lib/apis/index.ts` | New `loadModel()` client function that calls the backend endpoint. |
| `src/lib/components/chat/ModelSelector/Selector.svelte` | `loadModelHandler` — calls `loadModel()`, shows toast notifications, refreshes the model list on success. |
| `src/lib/components/chat/ModelSelector/ModelItem.svelte` | Renders a download-tray icon (ArrowDownTray) for idle Ollama models visible to admins. Mirrors the existing Eject button pattern. |
| `src/lib/i18n/locales/en-US/translation.json` | Added i18n keys: `Load`, `Load model`, `Loading model...`, `Model loaded successfully`. |
## How it works
- **Backend**: `POST /api/models/load` accepts `{ "model": "<model_id>" }`. It looks up the model in `OLLAMA_MODELS`, resolves prefix IDs and API keys per Ollama node, then sends `POST /api/generate` with an empty prompt and `keep_alive: "5m"` to warm the model. Returns `{ "status": true }` on success or a 500 with per-node error details.
- **Frontend**: The Load button appears only for admin users, only for Ollama-owned models, and only when the model is not already loaded (`!item.model.loaded && item.model.owned_by === 'ollama'`). Once loaded, the button disappears and the existing Eject button becomes visible instead.
## Screenshots
The **Load** button (download icon) appears next to idle Ollama models in the selector dropdown. After loading, it's replaced by the existing **Eject** button (upload icon). Non-Ollama models and non-admin users see no change.
## Testing
1. Have an Ollama instance with at least one model that is **not** loaded (verify via `ollama ps`).
2. Open the model selector in Open WebUI as an admin user.
3. Hover over the idle Ollama model — a download-tray icon (Load) should appear.
4. Click the Load button — a "Loading model..." toast appears, followed by "Model loaded successfully".
5. The model now shows as loaded (green dot) and the Eject button replaces the Load button.
6. Verify non-admin users do not see the Load button.
7. Verify non-Ollama models do not show the Load button.
## Notes
- No new dependencies added.
- Admin-only — follows the same permission pattern as the existing Eject button.
- Follows existing code patterns for Ollama API interaction (mirrors `unload_model` endpoint structure).
- The `keep_alive: "5m"` default matches Ollama's standard behavior; the model stays warm for 5 minutes after the preload request.
---
<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/24800
Author: @Sarvind1
Created: 5/15/2026
Status: ❌ Closed
Base:
dev← Head:feature/load-model-button📝 Commits (1)
4d2c927feat: add Load/Preload button for Ollama models in model selector📊 Changes
5 files changed (+141 additions, -1 deletions)
View changed files
📝
backend/open_webui/main.py(+64 -0)📝
src/lib/apis/index.ts(+33 -0)📝
src/lib/components/chat/ModelSelector/ModelItem.svelte(+21 -0)📝
src/lib/components/chat/ModelSelector/Selector.svelte(+19 -1)📝
src/lib/i18n/locales/en-US/translation.json(+4 -0)📄 Description
Summary
Adds a Load / Preload Model button to the model selector dropdown — the missing counterpart to the existing Eject (unload) button. When an Ollama model is idle (not loaded in VRAM), admins can now preload it before starting a chat, eliminating cold-start latency.
Resolves community request in Discussion #14750 and related Issue #3987.
What changed
backend/open_webui/main.pyPOST /api/models/loadendpoint. Resolves the Ollama node(s) for the model and sends a keep-alive generate request (keep_alive: 5m, empty prompt) to warm the model into VRAM. Admin-only.src/lib/apis/index.tsloadModel()client function that calls the backend endpoint.src/lib/components/chat/ModelSelector/Selector.svelteloadModelHandler— callsloadModel(), shows toast notifications, refreshes the model list on success.src/lib/components/chat/ModelSelector/ModelItem.sveltesrc/lib/i18n/locales/en-US/translation.jsonLoad,Load model,Loading model...,Model loaded successfully.How it works
POST /api/models/loadaccepts{ "model": "<model_id>" }. It looks up the model inOLLAMA_MODELS, resolves prefix IDs and API keys per Ollama node, then sendsPOST /api/generatewith an empty prompt andkeep_alive: "5m"to warm the model. Returns{ "status": true }on success or a 500 with per-node error details.!item.model.loaded && item.model.owned_by === 'ollama'). Once loaded, the button disappears and the existing Eject button becomes visible instead.Screenshots
The Load button (download icon) appears next to idle Ollama models in the selector dropdown. After loading, it's replaced by the existing Eject button (upload icon). Non-Ollama models and non-admin users see no change.
Testing
ollama ps).Notes
unload_modelendpoint structure).keep_alive: "5m"default matches Ollama's standard behavior; the model stays warm for 5 minutes after the preload request.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.