Skip to content

Conversation

mudler
Copy link
Owner

@mudler mudler commented Aug 14, 2025

Description

  • Add a system backend path (LOCALAI_BACKENDS_SYSTEM_PATH or via args). Defaults to /usr/share/localai/backends. This path will be used as read-only and won't be used for installation and deletion of backends.
  • Refactor and consolidate system information in system state
  • Use system state in all the components to figure out the system paths to used whenever needed
  • Refactor BackendConfig -> ModelConfig. This was otherway misleading as now we do have a backend configuration which is not the model config.

This PR fixes #5917

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Copy link

netlify bot commented Aug 14, 2025

Deploy Preview for localai ready!

Name Link
🔨 Latest commit aac0e4a
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/689e10fd56c5f900085743db
😎 Deploy Preview https://deploy-preview-6059--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mudler
Copy link
Owner Author

mudler commented Aug 14, 2025

argh, should have been LOCALAI_BACKENDS_SYSTEM_PATH. Also, some files should have been renamed (backend_config to model_config, etc)

}
}
if err != nil {
log.Error().Err(err).Msgf("error installing backend %s", op.GalleryElementName)
if !op.Delete {
// If we didn't install the backend, we need to make sure we don't have a leftover directory
gallery.DeleteBackendFromSystem(g.appConfig.BackendsPath, op.GalleryElementName)
gallery.DeleteBackendFromSystem(systemState, op.GalleryElementName)

Check warning

Code scanning / gosec

Errors unhandled Warning

Errors unhandled
@mudler mudler force-pushed the feat/system-backends branch 2 times, most recently from 69d0ded to c9daca9 Compare August 14, 2025 14:01
@mudler mudler force-pushed the feat/system-backends branch 3 times, most recently from 536f166 to 2c190ee Compare August 14, 2025 15:53
- Add a system backend path
- Refactor and consolidate system information in system state
- Use system state in all the components to figure out the system paths
  to used whenever needed
- Refactor BackendConfig -> ModelConfig. This was otherway misleading as
  now we do have a backend configuration which is not the model config.

Signed-off-by: Ettore Di Giacinto <[email protected]>
@mudler mudler force-pushed the feat/system-backends branch from 2c190ee to aac0e4a Compare August 14, 2025 16:38
@mudler mudler merged commit 089efe0 into master Aug 14, 2025
25 of 26 checks passed
@mudler mudler deleted the feat/system-backends branch August 14, 2025 17:38
@mudler mudler added the enhancement New feature or request label Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow sideloading backends on filesystem
1 participant