Move the model kinds into the rule engine

This commit is contained in:
Thorsten Sommer committed 2026-09-12 10:13:59 +02:00
1 parent 77c95e6f41
commit 9307f2c363
16 files changed
+731 -10

No files matched your search

@@ -170,7 +170,7 @@ public class ProviderGoogle() : BaseProvider(LLMProviders.GOOGLE, new Uri("https
[
..result.Models.Where(model =>
model.Id.StartsWith("gemini-", StringComparison.OrdinalIgnoreCase) &&
!this.IsEmbeddingModel(model.Id))
!model.IsEmbeddingModel())
.Select(this.WithDisplayNameFallback)
]
};
@@ -189,7 +189,7 @@ public class ProviderGoogle() : BaseProvider(LLMProviders.GOOGLE, new Uri("https
{
Models =
[
..result.Models.Where(model => this.IsEmbeddingModel(model.Id))
..result.Models.Where(model => model.IsEmbeddingModel())
.Select(this.WithDisplayNameFallback)
]
};
@@ -222,12 +222,6 @@ public class ProviderGoogle() : BaseProvider(LLMProviders.GOOGLE, new Uri("https
token: token);
}
private bool IsEmbeddingModel(string modelId)
{
return modelId.Contains("embedding", StringComparison.OrdinalIgnoreCase) ||
modelId.Contains("embed", StringComparison.OrdinalIgnoreCase);
}
private Model WithDisplayNameFallback(Model model)
{
return string.IsNullOrWhiteSpace(model.DisplayName)