mirror of
https://github.com/mudler/LocalAI.git
synced 2026-03-31 21:25:59 -04:00
When a model is configured with 'known_usecases: [rerank]' in the YAML config, the reranking endpoint was not being matched because: 1. The GuessUsecases function only checked for backend == 'rerankers' 2. The syncKnownUsecasesFromString() was not being called when loading configs via yaml.Unmarshal in readModelConfigsFromFile This fix: 1. Updates GuessUsecases to also check if Reranking is explicitly set to true in the model config (in addition to checking backend type) 2. Adds syncKnownUsecasesFromString() calls after yaml.Unmarshal in readModelConfigsFromFile to ensure known_usecases are properly parsed Fixes #8658 Signed-off-by: localai-bot <localai-bot@users.noreply.github.com> Co-authored-by: localai-bot <localai-bot@users.noreply.github.com>