ui : add model download pipeline - #27959
Open
allozaur wants to merge 3 commits into
Open
Conversation
allozaur
force-pushed
the
allozaur/ui/download-pipeline
branch
from
August 30, 2026 06:36
b4fb93a to
8d949af
Compare
allozaur
force-pushed
the
allozaur/ui/download-pipeline
branch
from
August 31, 2026 10:56
8d949af to
3f602b4
Compare
allozaur
marked this pull request as ready for review
August 31, 2026 10:56
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the UI-side plumbing for a “model download pipeline” in ROUTER mode by adding a DELETE-capable fetch helper, new /models endpoints, and TypeScript types/store scaffolding to support download lifecycle and HuggingFace hub browsing.
Changes:
- Add
apiDelete()utility and expose it via the utils barrel. - Introduce UI API types/enums/endpoints for
/modelsdownload + SSE download events. - Add
ModelsServicehelpers for download/cancel and a newmodelsHubStorefor catalog/search state.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/ui/src/lib/utils/index.ts | Re-export apiDelete from the utils barrel. |
| tools/ui/src/lib/utils/api-fetch.ts | Add apiDelete() helper built on existing fetch utilities. |
| tools/ui/src/lib/types/index.ts | Re-export new models download/SSE type aliases. |
| tools/ui/src/lib/types/api.d.ts | Add download request/response types and download-progress SSE payload type; widen SSE envelope shape. |
| tools/ui/src/lib/stores/models-hub/index.svelte.ts | New store for HuggingFace catalog + search results state. |
| tools/ui/src/lib/stores/index.ts | Export modelsHubStore. |
| tools/ui/src/lib/services/models.service.ts | Add downloadModel() and cancelDownload() service methods. |
| tools/ui/src/lib/enums/server.enums.ts | Add download_failed / download_finished SSE event types. |
| tools/ui/src/lib/constants/api-endpoints.constants.ts | Add /models constants for POST(download) and DELETE(cancel/remove). |
| tools/ui/src/app.d.ts | Re-export new API types as globals for TS modules. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+153
to
+158
| if (params && Object.keys(params).length > 0) { | ||
| return apiFetchWithParams<T>(path, params, { ...options, method: 'DELETE' }); | ||
| } | ||
|
|
||
| return apiFetch<T>(path, { ...options, method: 'DELETE' }); | ||
| } |
allozaur
force-pushed
the
allozaur/ui/download-pipeline
branch
from
August 31, 2026 12:49
3f602b4 to
20e2518
Compare
allozaur
force-pushed
the
allozaur/ui/download-pipeline
branch
from
August 31, 2026 15:41
20e2518 to
c1b3b97
Compare
allozaur
force-pushed
the
allozaur/ui/download-pipeline
branch
from
August 31, 2026 21:46
c1b3b97 to
816e019
Compare
Wire the model download flow: ModelsService.downloadModel (POST /models) and cancelDownload (DELETE /models), the apiDelete helper, ApiModelsDownloadRequest/Response types, the download_progress SSE payload, and the download_finished/download_failed SSE event kinds matching the server feed. Add modelsHubStore owning the HuggingFace GGUF model list for the discover dialog: curated catalog defaults on open, search replaces the list across all of HuggingFace. Assisted-by: pi
Port the download lifecycle into ModelsStatusManager: track per-entry progress keyed by <repo>:<tag> from the /models/sse feed, record failed downloads for the delete-and-retry path, and expose the downloadModel / cancelDownload operations (POST/DELETE /models). Add the ServerModelStatus.DOWNLOADED/DOWNLOADING cases and the ModelDownloadProgress type. Assisted-by: pi
Assisted-by: pi
allozaur
force-pushed
the
allozaur/ui/download-pipeline
branch
from
August 31, 2026 22:50
816e019 to
5b7a434
Compare
Contributor
|
Can you please fill out the PR template and describe your changes? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Additional information
Requirements