[PR #14531] app: add model manager with batch ops, copy, and per-model settings #19986

Open
opened 2026-04-16 07:22:25 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14531
Author: @4RH1T3CT0R7
Created: 3/1/2026
Status: 🔄 Open

Base: mainHead: feature/model-manager


📝 Commits (5)

  • c6df318 Add tests and logic to adjust defaultNumCtx based on parallelism
  • a88a03e Merge remote-tracking branch 'origin/main'
  • 878e626 Merge remote-tracking branch 'origin/main'
  • 1802315 Add model manager UI with pull, delete, search, and model details
  • 8340fbc Add batch ops, copy, sort, per-model settings, and security fixes to model manager

📊 Changes

15 files changed (+1807 additions, -18 deletions)

View changed files

📝 app/store/database.go (+104 -1)
📝 app/store/store.go (+31 -0)
📝 app/ui/app/codegen/gotypes.gen.ts (+2 -0)
📝 app/ui/app/src/api.ts (+170 -4)
📝 app/ui/app/src/components/ChatSidebar.tsx (+19 -9)
app/ui/app/src/components/ModelManager.tsx (+1262 -0)
📝 app/ui/app/src/routeTree.gen.ts (+26 -3)
app/ui/app/src/routes/models.tsx (+6 -0)
📝 app/ui/responses/types.go (+1 -0)
📝 app/ui/ui.go (+107 -1)
📝 app/wintray/eventloop.go (+3 -0)
📝 app/wintray/menus.go (+4 -0)
📝 app/wintray/messages.go (+1 -0)
📝 server/routes.go (+6 -0)
📝 server/routes_options_test.go (+65 -0)

📄 Description

Summary

Full model management UI for the Ollama desktop app:

  • Model list with search, expandable details (family, parameters, quantization, system prompt via /api/show)
  • Pull models with streaming progress bar, popular models suggestions with "installed" badges
  • Delete models with confirmation dialog
  • Batch operations — multi-select models via checkboxes, floating action bar for bulk delete
  • Copy / Alias — duplicate a model under a new name (POST /api/copy)
  • Sort controls — by name, size, or date (ascending/descending)
  • Per-model settings — temperature, context length, top_k, top_p, system prompt stored in SQLite (model_settings table, migration v15→v16), applied automatically in buildChatRequest()
  • SecurityauthProxy wrapper enforcing token authentication on destructive proxy routes (/api/pull, /api/delete, /api/copy)

This is Part 3 of 3 in the Ollama Desktop UI improvement series:

  1. PR #14526Extended Settings: Tabbed settings UI (General, GPU, Generation, Network)
  2. PR #14528Monitoring Dashboard: GPU/memory monitoring, loaded models, system tray extensions
  3. This PR — Model Manager: Full model CRUD, batch ops, per-model settings

Each PR is independent and can be merged separately. Together they transform the desktop app from a chat-only interface into a comprehensive Ollama management tool.

Backend changes

File Change
app/store/store.go ModelSettings struct, GetModelSettings/SetModelSettings/DeleteModelSettings Store methods
app/store/database.go Migration v15→v16 creating model_settings table, CRUD queries
app/ui/ui.go 3 new API endpoints (/api/v1/model-settings/{model}), authProxy for destructive routes, per-model settings applied in buildChatRequest()
app/ui/responses/types.go Size field on Model struct
app/wintray/ "Models..." system tray menu entry

Frontend changes

File Change
ModelManager.tsx 1262-line component: ModelCard, PullDialog, CopyDialog, BatchActionBar, SortDropdown, ModelSettingsPanel
api.ts getModelsDetailed, copyModel, deleteModel, showModel, pullModel (with error event handling), model settings CRUD
ChatSidebar.tsx Models navigation link
routes/models.tsx TanStack Router route

Test plan

  • Navigate to Models page from sidebar and system tray
  • Verify model list loads with sizes and dates
  • Pull a model — progress bar streams correctly
  • Delete a model — disappears from list
  • Batch select multiple models → bulk delete
  • Copy a model to a new name → appears in list
  • Sort by name/size/date in both directions
  • Set per-model temperature → verify it applies in chat
  • Set per-model system prompt → verify it prepends in conversation
  • Reset per-model settings → verify defaults restored
  • Verify destructive endpoints require auth (non-dev mode)
Screenshot_7 Screenshot_8 Screenshot_9 Screenshot_14

🔄 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/ollama/ollama/pull/14531 **Author:** [@4RH1T3CT0R7](https://github.com/4RH1T3CT0R7) **Created:** 3/1/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feature/model-manager` --- ### 📝 Commits (5) - [`c6df318`](https://github.com/ollama/ollama/commit/c6df31859c31c475306188d4697b67563b20b4f8) Add tests and logic to adjust defaultNumCtx based on parallelism - [`a88a03e`](https://github.com/ollama/ollama/commit/a88a03efbfa305d7b4a6f9c5a0773949b6762ed9) Merge remote-tracking branch 'origin/main' - [`878e626`](https://github.com/ollama/ollama/commit/878e626f70d3754027c1e459b51deee54da5a2f8) Merge remote-tracking branch 'origin/main' - [`1802315`](https://github.com/ollama/ollama/commit/18023158b2d0a730bd04a3585ce6768a00f543c2) Add model manager UI with pull, delete, search, and model details - [`8340fbc`](https://github.com/ollama/ollama/commit/8340fbc3fe1255f72b7229fda98fcb65f77fea07) Add batch ops, copy, sort, per-model settings, and security fixes to model manager ### 📊 Changes **15 files changed** (+1807 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `app/store/database.go` (+104 -1) 📝 `app/store/store.go` (+31 -0) 📝 `app/ui/app/codegen/gotypes.gen.ts` (+2 -0) 📝 `app/ui/app/src/api.ts` (+170 -4) 📝 `app/ui/app/src/components/ChatSidebar.tsx` (+19 -9) ➕ `app/ui/app/src/components/ModelManager.tsx` (+1262 -0) 📝 `app/ui/app/src/routeTree.gen.ts` (+26 -3) ➕ `app/ui/app/src/routes/models.tsx` (+6 -0) 📝 `app/ui/responses/types.go` (+1 -0) 📝 `app/ui/ui.go` (+107 -1) 📝 `app/wintray/eventloop.go` (+3 -0) 📝 `app/wintray/menus.go` (+4 -0) 📝 `app/wintray/messages.go` (+1 -0) 📝 `server/routes.go` (+6 -0) 📝 `server/routes_options_test.go` (+65 -0) </details> ### 📄 Description ## Summary Full model management UI for the Ollama desktop app: - **Model list** with search, expandable details (family, parameters, quantization, system prompt via `/api/show`) - **Pull models** with streaming progress bar, popular models suggestions with "installed" badges - **Delete models** with confirmation dialog - **Batch operations** — multi-select models via checkboxes, floating action bar for bulk delete - **Copy / Alias** — duplicate a model under a new name (`POST /api/copy`) - **Sort controls** — by name, size, or date (ascending/descending) - **Per-model settings** — temperature, context length, top_k, top_p, system prompt stored in SQLite (`model_settings` table, migration v15→v16), applied automatically in `buildChatRequest()` - **Security** — `authProxy` wrapper enforcing token authentication on destructive proxy routes (`/api/pull`, `/api/delete`, `/api/copy`) ### Related PRs This is **Part 3 of 3** in the Ollama Desktop UI improvement series: 1. **PR #14526** — [Extended Settings](https://github.com/ollama/ollama/pull/14526): Tabbed settings UI (General, GPU, Generation, Network) 2. **PR #14528** — [Monitoring Dashboard](https://github.com/ollama/ollama/pull/14528): GPU/memory monitoring, loaded models, system tray extensions 3. **This PR** — Model Manager: Full model CRUD, batch ops, per-model settings Each PR is independent and can be merged separately. Together they transform the desktop app from a chat-only interface into a comprehensive Ollama management tool. ### Backend changes | File | Change | |------|--------| | `app/store/store.go` | `ModelSettings` struct, `GetModelSettings`/`SetModelSettings`/`DeleteModelSettings` Store methods | | `app/store/database.go` | Migration v15→v16 creating `model_settings` table, CRUD queries | | `app/ui/ui.go` | 3 new API endpoints (`/api/v1/model-settings/{model}`), `authProxy` for destructive routes, per-model settings applied in `buildChatRequest()` | | `app/ui/responses/types.go` | `Size` field on `Model` struct | | `app/wintray/` | "Models..." system tray menu entry | ### Frontend changes | File | Change | |------|--------| | `ModelManager.tsx` | 1262-line component: ModelCard, PullDialog, CopyDialog, BatchActionBar, SortDropdown, ModelSettingsPanel | | `api.ts` | `getModelsDetailed`, `copyModel`, `deleteModel`, `showModel`, `pullModel` (with error event handling), model settings CRUD | | `ChatSidebar.tsx` | Models navigation link | | `routes/models.tsx` | TanStack Router route | ## Test plan - [ ] Navigate to Models page from sidebar and system tray - [ ] Verify model list loads with sizes and dates - [ ] Pull a model — progress bar streams correctly - [ ] Delete a model — disappears from list - [ ] Batch select multiple models → bulk delete - [ ] Copy a model to a new name → appears in list - [ ] Sort by name/size/date in both directions - [ ] Set per-model temperature → verify it applies in chat - [ ] Set per-model system prompt → verify it prepends in conversation - [ ] Reset per-model settings → verify defaults restored - [ ] Verify destructive endpoints require auth (non-dev mode) <img width="775" height="374" alt="Screenshot_7" src="https://github.com/user-attachments/assets/1a829ca5-cfa3-42d5-b963-cc3da170dec9" /> <img width="826" height="517" alt="Screenshot_8" src="https://github.com/user-attachments/assets/6fbdbfcb-481a-4db6-9b5b-79003451577f" /> <img width="794" height="625" alt="Screenshot_9" src="https://github.com/user-attachments/assets/b163a7e3-e3be-43fb-9ea1-ab9fb01625dd" /> <img width="791" height="801" alt="Screenshot_14" src="https://github.com/user-attachments/assets/59375a04-dbbb-4282-bc94-c8fcfefb503b" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-16 07:22:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#19986