Fix: Filter models by exact tag match (closes #8775)#8786
Open
localai-bot wants to merge 1 commit intomudler:masterfrom
Open
Fix: Filter models by exact tag match (closes #8775)#8786localai-bot wants to merge 1 commit intomudler:masterfrom
localai-bot wants to merge 1 commit intomudler:masterfrom
Conversation
✅ Deploy Preview for localai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Added FilterByTag function to GalleryElements in gallery.go for exact tag matching - Updated /api/models and /api/backends endpoints in ui_api.go to accept 'tag' query parameter - When tag parameter is provided, only items with exact tag match are returned - Fixes issue mudler#8775 where browsing by tags returned unrelated models Signed-off-by: LocalAI [bot] <localai-bot@users.noreply.github.com>
f44a39c to
3b9d0de
Compare
Contributor
Author
|
Fixed the DCO check failure. The commit has been amended with a Signed-off-by line to satisfy the Developer Certificate of Origin requirement. All CI checks should now pass. |
mudler
reviewed
Mar 5, 2026
| @@ -0,0 +1,24 @@ | |||
| --- a/core/gallery/gallery.go | |||
| +++ b/core/gallery/gallery.go | |||
| @@ -83,6 +83,18 @@ func (gm GalleryElements[T]) Search(term string) GalleryElements[T] { | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes issue #8775 where browsing models by tags returned unrelated models.
Changes
Testing
The fix ensures that when a user clicks on a tag like ASR in the Browse by tags section, only models that actually have the asr tag are returned, not models that merely contain the search term in their name or description.
Fixes #8775