Table of Contents

Class ModelIdMatcher

Namespace
JD.AI.Core.Providers.Metadata
Assembly
JD.AI.Core.dll

Multi-strategy model ID matching between our Id values and LiteLLM catalog keys.

public static class ModelIdMatcher
Inheritance
ModelIdMatcher
Inherited Members

Methods

FindBestMatch(string, string, IReadOnlyDictionary<string, ModelMetadataEntry>)

Finds the best matching ModelMetadataEntry for a given model ID using a ranked set of strategies: exact, provider-prefixed, bare suffix, normalized stem.

public static ModelMetadataEntry? FindBestMatch(string modelId, string providerName, IReadOnlyDictionary<string, ModelMetadataEntry> entries)

Parameters

modelId string
providerName string
entries IReadOnlyDictionary<string, ModelMetadataEntry>

Returns

ModelMetadataEntry