fix(routing): match provider model names in admin routing counts

This commit is contained in:
ZheFox
2026-05-17 18:59:41 +08:00
parent 485d166912
commit d9c8119bda
3 changed files with 206 additions and 11 deletions

View File

@@ -784,7 +784,9 @@ function targetFormatsForEndpoint(
provider: RoutingProviderInfo,
endpoint: RoutingEndpointInfo
): string[] {
return STANDARD_ROUTING_API_FORMATS.filter(format =>
const endpointFormat = normalizeLegacyOpenAIFormatAlias(endpoint.api_format)
const candidateFormats = Array.from(new Set([...STANDARD_ROUTING_API_FORMATS, endpointFormat]))
return candidateFormats.filter(format =>
endpointSupportsClientFormat(provider, endpoint, format, endpoint.api_format)
)
}