Fixed model capabilities and how model names are matched (#958)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-09-11 15:24:02 +02:00
1 parent e64c51bd57
commit 2834529753
16 files changed
+1164 -155

No files matched your search

@@ -32,7 +32,7 @@ public static partial class ProviderExtensions
var separatorIndex = model.Id.IndexOf('/');
var vendor = separatorIndex is -1 ? string.Empty : model.Id[..separatorIndex].ToLowerInvariant();
var bareModel = separatorIndex is -1 ? model : model with { Id = model.Id[(separatorIndex + 1)..] };
var bareModelName = bareModel.Id.ToLowerInvariant().AsSpan();
var bareModelName = NormalizeModelId(bareModel.Id).AsSpan();
var capabilities = vendor switch
{
@@ -69,6 +69,10 @@ public static partial class ProviderExtensions
/// A gateway serves every model through its OpenAI-compatible chat completion API.
/// The Responses API is not available there, no matter which API the original
/// provider offers.
///
/// The same holds for a provider which resells a model under its plain name instead of
/// prefixing it with the vendor, such as GWDG. Those go through the open source rules, which
/// call this for the very same reason.
/// </remarks>
private static List<Capability> NormalizeForGateway(List<Capability> capabilities)
{