Documentation
¶
Overview ¶
Package modelcatalog provides pure, offline utilities to match user-provided model endpoints and provider types to the built-in catwalk model catalogue. It maps custom endpoint URLs and provider types to rich model metadata without performing any network I/O.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MatchKind ¶
type MatchKind int
MatchKind represents how a provider was resolved in the catalogue.
const ( // MatchNone indicates the provider or URL could not be resolved. MatchNone MatchKind = iota // MatchByType indicates the lookup was resolved purely by provider type. MatchByType // MatchByURLExact indicates the URL matched an endpoint in the catalogue exactly. MatchByURLExact // MatchByURLHost indicates the URL matched a unique host in the catalogue. MatchByURLHost )
func Resolve ¶
Resolve maps a provider type and optional custom URL to a catalogued provider. It resolves the provider in the exact order specified: 1. If the URL is empty, it looks up the provider by type. 2. If the URL is non-empty, it matches against non-placeholder API endpoints. It first attempts an exact match of the normalized URL, then falls back to a host-unique match.