Skip to content

ui : add model download pipeline - #27959

Open
allozaur wants to merge 3 commits into
allozaur/ui/model-compatibilityfrom
allozaur/ui/download-pipeline
Open

ui : add model download pipeline#27959
allozaur wants to merge 3 commits into
allozaur/ui/model-compatibilityfrom
allozaur/ui/download-pipeline

Conversation

@allozaur

Copy link
Copy Markdown
Contributor

Overview

Additional information

Requirements

@allozaur
allozaur force-pushed the allozaur/ui/download-pipeline branch from b4fb93a to 8d949af Compare August 30, 2026 06:36
@allozaur
allozaur force-pushed the allozaur/ui/download-pipeline branch from 8d949af to 3f602b4 Compare August 31, 2026 10:56
@allozaur
allozaur marked this pull request as ready for review August 31, 2026 10:56
@allozaur
allozaur requested a review from a team as a code owner August 31, 2026 10:56
Copilot AI lite review requested due to automatic review settings August 31, 2026 10:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /models download + SSE download events.
  • Add ModelsService helpers for download/cancel and a new modelsHubStore for 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
allozaur force-pushed the allozaur/ui/download-pipeline branch from 3f602b4 to 20e2518 Compare August 31, 2026 12:49
@allozaur
allozaur force-pushed the allozaur/ui/download-pipeline branch from 20e2518 to c1b3b97 Compare August 31, 2026 15:41
@allozaur
allozaur force-pushed the allozaur/ui/download-pipeline branch from c1b3b97 to 816e019 Compare August 31, 2026 21:46
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
@allozaur
allozaur force-pushed the allozaur/ui/download-pipeline branch from 816e019 to 5b7a434 Compare August 31, 2026 22:50
@Titaniumtown

Copy link
Copy Markdown
Contributor

Can you please fill out the PR template and describe your changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants