LocalAI icon indicating copy to clipboard operation
LocalAI copied to clipboard

fix: Bug: listing models needs to filter out GGUF extension

Open majiayu000 opened this issue 3 months ago • 2 comments

Summary

This PR fixes #1077

Changes

  • Added .gguf to the knownModelsNameSuffixToSkip list in pkg/model/loader.go to filter out GGUF files from the model listing endpoint
  • Added test case to verify .gguf files are properly filtered from the model listing

Testing

  • All existing tests pass (61 of 61 specs)
  • New test specifically verifies that .gguf files are excluded from ListFilesInModelPath()

🤖 Generated with Claude Code

majiayu000 avatar Dec 30 '25 10:12 majiayu000

Deploy Preview for localai ready!

Name Link
Latest commit cb8dd060f7be1f8285091b60e70ad67e4d562885
Latest deploy log https://app.netlify.com/projects/localai/deploys/6953b002fe3ec100088ecf42
Deploy Preview https://deploy-preview-7791--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.

netlify[bot] avatar Dec 30 '25 10:12 netlify[bot]

mmm this is on purpose actually, if a gguf model file is found in the model directory, you should be still able to use it without a config file, as LocalAI should use sane defaults in that case. This allows the user to manually drop gguf files in the model folder and that should just make it available in the API.

Is there a specific issue you are trying to fix?

mudler avatar Dec 30 '25 17:12 mudler