LocalAI/core/config
LocalAI [bot] 6d182281cf
fix: allow reranking models configured with known_usecases (#8681)
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>
2026-03-02 19:00:18 +01:00
..
application_config.go fix(cli): Fix watchdog running constantly and spamming logs (#8624) 2026-02-23 11:57:28 +01:00
application_config_test.go feat(watchdog): add Memory resource reclaimer (#7583) 2025-12-16 09:15:18 +01:00
config_suite_test.go dependencies(grpcio): bump to fix CI issues (#2362) 2024-05-21 14:33:47 +02:00
gallery.go refactor: gallery inconsistencies (#2647) 2024-06-24 17:32:12 +02:00
gguf.go fix: drop gguf VRAM estimation (now redundant) (#8325) 2026-02-01 17:33:28 +01:00
guesser.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
model_config.go fix: allow reranking models configured with known_usecases (#8681) 2026-03-02 19:00:18 +01:00
model_config_filter.go fix(config): make syncKnownUsecasesFromString idempotent (#7493) 2025-12-09 21:08:22 +01:00
model_config_loader.go fix: allow reranking models configured with known_usecases (#8681) 2026-03-02 19:00:18 +01:00
model_config_test.go fix(realtime): Use user provided voice and allow pipeline models to have no backend (#8415) 2026-02-11 14:18:05 +01:00
model_test.go fix(realtime): Use user provided voice and allow pipeline models to have no backend (#8415) 2026-02-11 14:18:05 +01:00
runtime_settings.go feat(api): add support for open responses specification (#8063) 2026-01-17 22:11:47 +01:00