mirror of
https://github.com/mudler/LocalAI.git
synced 2026-09-12 22:33:54 -04:00
feat(downloads): add resume-safe pause action (#11222)
Give gallery operations distinct pause and cancel paths. Pause preserves partial download data so reinstalling the same model or backend resumes through HTTP Range, while cancel keeps its destructive semantics. Surface the action in the Activity UI and document the API behavior. Assisted-by: Codex:gpt-5 Co-authored-by: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com>
This commit is contained in:
1 parent
8f74f74b10
commit
fd4ec083b9
20 files changed
+224
-43
No files matched your search
@@ -157,7 +157,7 @@ When authentication is enabled, the following endpoints require admin role:
|
||||
**Model & Backend Management:**
|
||||
- `GET /api/models`, `POST /api/models/install/*`, `POST /api/models/delete/*`
|
||||
- `GET /api/backends`, `POST /api/backends/install/*`, `POST /api/backends/delete/*`
|
||||
- `GET /api/operations`, `POST /api/operations/*/cancel`, `POST /api/operations/*/dismiss`
|
||||
- `GET /api/operations`, `POST /api/operations/*/cancel`, `POST /api/operations/*/pause`, `POST /api/operations/*/dismiss`
|
||||
- `GET /api/operations/history`, `DELETE /api/operations/history`
|
||||
- `GET /models/available`, `GET /models/galleries`, `GET /models/jobs/*`
|
||||
- `GET /backends`, `GET /backends/available`, `GET /backends/galleries`
|
||||
|
||||
@@ -170,10 +170,15 @@ Both surfaces are backed by these endpoints. All of them are admin-only when
|
||||
| -------- | -------------------------------- | ------------------------------------------------------------------------ |
|
||||
| `GET` | `/api/operations` | Running, queued and failed operations, least advanced first. |
|
||||
| `POST` | `/api/operations/{jobID}/cancel` | Cancel a queued operation, or a running install. Not a running removal. |
|
||||
| `POST` | `/api/operations/{jobID}/pause` | Pause a queued operation or running download and preserve partial data. |
|
||||
| `POST` | `/api/operations/{jobID}/dismiss`| Acknowledge a failed operation and move it into the record. |
|
||||
| `GET` | `/api/operations/history` | List finished operations, newest first. |
|
||||
| `DELETE` | `/api/operations/history` | Clear the record. Live operations are untouched. |
|
||||
|
||||
Pausing preserves the download's `.partial` file. Start the same model or
|
||||
backend installation again to resume from the saved bytes when the origin
|
||||
supports HTTP Range requests. Cancelling intentionally discards partial data.
|
||||
|
||||
Both `GET` endpoints wrap their list in an `operations` key rather than
|
||||
returning a bare array:
|
||||
|
||||
|
||||
Reference in new issue
Block a user