Keep non-chat models out of the chat lists

This commit is contained in:
Thorsten Sommer committed 2026-09-12 13:52:10 +02:00
1 parent 77130a450a
commit b6defc8b4b
11 files changed
+111 -5

No files matched your search

@@ -79,7 +79,12 @@ public sealed class ProviderX() : BaseProvider(LLMProviders.X, new Uri("https://
var result = await this.LoadModels(SecretStoreType.LLM_PROVIDER, ["grok-"], apiKeyProvisional, token);
return result with
{
Models = [..result.Models.Where(n => !n.Id.Contains("-image", StringComparison.OrdinalIgnoreCase))]
//
// Asking what a model is made for rather than testing its name for a word. The word was
// "-image", which said nothing about grok-imagine-video: that one made films and stood
// in the list of things to chat with.
//
Models = [..result.Models.Where(model => model.IsChatModel())]
};
}