fix(vram): persist remote probe metadata - #11487
Conversation
|
Does it make sense to either add an option to disable this entirely (at startup) or if the existing |
it does indeed make sense. @localai-org-maint-bot update the PR, incorporate the feedback, and also add a runtime toggle wired in the setting section of the webui |
|
Implemented and pushed in
Verified with |
|
@localai-org-maint-bot we want also a toggle to disable automatic loading and pre-warm on boot |
The startup warmer repeated remote size and GGUF metadata probes after every restart because both caches lived only in memory. Store successful HTTP probes for 24 hours so frequent restarts reuse the prior results. Bound the cache, reject invalid records, and purge it when gallery data changes. Local model files continue to bypass persistence. Assisted-by: Codex:gpt-5
The lint gate rejects the unchecked cleanup call in the persistent cache writer. Assisted-by: Codex:gpt-5.6 [golangci-lint]
Remote metadata probes can transfer enough data that operators need control over disk reuse and startup warming. Gallery autoload now gates both behaviors, and the runtime setting applies changes immediately. Assisted-by: Codex:gpt-5
The existing gallery autoload setting also gates the startup metadata warmer. Name both effects in Settings so operators can find the requested boot control. Assisted-by: Codex:gpt-5
998f40e to
99c80d5
Compare
|
Implemented and pushed in The existing |
Description
This PR fixes #11483.
The gallery startup warmer previously rebuilt process-memory-only size and GGUF metadata caches after every restart. Successful HTTP(S) probes now persist for 24 hours under the LocalAI cache directory, so frequent restarts reuse them.
The persistent cache:
The VRAM management documentation now describes persistence, expiry, and the entry limit.
Notes for Reviewers
Verification:
go test -count=1 ./pkg/vramgo test -count=1 ./core/applicationgo test -count=1 ./core/gallery -ginkgo.focus="refresh|cached gallery"go test -race -count=1 ./pkg/vramgo vet ./pkg/vram ./core/gallery ./core/applicationgit diff --checkThe full
core/gallerysuite also ran 375 passing specs; three unrelated network-dependent specs failed because GitHub raw/gist requests return HTTP 403 in this environment.Signed commits