mirror of
https://github.com/mudler/LocalAI.git
synced 2026-07-30 09:57:57 -04:00
* feat(config): add model artifact source contract Assisted-by: Codex:GPT-5 [Codex] * feat(downloader): add authenticated raw-byte progress Assisted-by: Codex:GPT-5 [Codex] * feat(huggingface): resolve immutable snapshot manifests Assisted-by: Codex:GPT-5 [Codex] * feat(models): add artifact storage primitives Assisted-by: Codex:GPT-5 [Codex] * feat(models): materialize pinned Hugging Face snapshots Assisted-by: Codex:GPT-5 [Codex] * feat(models): bind managed snapshots at runtime Assisted-by: Codex:GPT-5 [Codex] * feat(gallery): materialize model artifacts during install Assisted-by: Codex:GPT-5 [Codex] * feat(gallery): declare managed Hugging Face artifacts Assisted-by: Codex:GPT-5 [Codex] * feat(models): preload managed model artifacts Assisted-by: Codex:GPT-5 [Codex] * fix(gallery): retain shared artifact caches on delete Assisted-by: Codex:GPT-5 [Codex] * feat(models): report artifact acquisition progress Assisted-by: Codex:GPT-5 [Codex] * refactor(backends): load managed models from ModelFile Assisted-by: Codex:GPT-5 [Codex] * refactor(backends): load staged speech model snapshots Assisted-by: Codex:GPT-5 [Codex] * refactor(backends): use staged snapshots in engine backends Assisted-by: Codex:GPT-5 [Codex] * test(distributed): cover staged artifact snapshots Assisted-by: Codex:GPT-5 [Codex] * docs: explain managed model artifacts Assisted-by: Codex:GPT-5 [Codex] * docs: add product design context Assisted-by: Codex:GPT-5 [Codex] * feat(ui): show model artifact download progress Assisted-by: Codex:GPT-5 [Codex] * Eagerly materialize Hugging Face artifacts Materialize HF-backed model references as managed GGUF artifacts during load, with lazy download retained only as fallback. Assisted-by: Codex:GPT-5 [shell] * Refactor HF downloads through a shared executor Assisted-by: Codex:GPT-5 [shell] * drop Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
41 lines
1.5 KiB
JavaScript
41 lines
1.5 KiB
JavaScript
import { test, expect } from './coverage-fixtures.js'
|
|
|
|
test('operations bar shows managed model acquisition phase and bytes', async ({ page }) => {
|
|
await page.route('**/api/operations', (route) => route.fulfill({
|
|
contentType: 'application/json',
|
|
body: JSON.stringify({
|
|
operations: [{
|
|
id: 'qwen-asr',
|
|
name: 'qwen-asr',
|
|
fullName: 'qwen-asr',
|
|
jobID: 'artifact-job-123',
|
|
progress: 45,
|
|
taskType: 'installation',
|
|
isDeletion: false,
|
|
isBackend: false,
|
|
isQueued: false,
|
|
isCancelled: false,
|
|
cancellable: true,
|
|
phase: 'downloading',
|
|
currentBytes: 1073741824,
|
|
totalBytes: 4294967296,
|
|
}],
|
|
}),
|
|
}))
|
|
let cancelledPath = ''
|
|
await page.route('**/api/operations/artifact-job-123/cancel', (route) => {
|
|
cancelledPath = new URL(route.request().url()).pathname
|
|
return route.fulfill({ contentType: 'application/json', body: '{}' })
|
|
})
|
|
|
|
await page.goto('/app/models')
|
|
const operation = page.locator('.operation-item').filter({ hasText: 'qwen-asr' })
|
|
await expect(operation).toContainText('Downloading model files')
|
|
await expect(operation).toContainText('1 GB / 4 GB')
|
|
await expect(operation.locator('.operation-progress')).toHaveText('45%')
|
|
await expect(operation.locator('.operation-bar')).toHaveAttribute('style', /width: 45%/)
|
|
|
|
await operation.getByTitle('Cancel').click()
|
|
expect(cancelledPath).toBe('/api/operations/artifact-job-123/cancel')
|
|
})
|