Skip to content

Conversation

@majiayu000
Copy link
Contributor

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

Add .gguf to the list of file extensions to skip when listing models
in the model path. This prevents raw GGUF model files from appearing
as available models in the /v1/models endpoint.

Fixes mudler#1077

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: majiayu000 <1835304752@qq.com>
@netlify
Copy link

netlify bot commented Dec 30, 2025

Deploy Preview for localai ready!

Name Link
🔨 Latest commit cb8dd06
🔍 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.

@mudler
Copy link
Owner

mudler commented Dec 30, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants