Function: searchServingEndpoints()
searchServingEndpoints(
input,endpoints,options?):ScoredEndpoint[]
Fuzzy-rank endpoints by how closely their name matches input, best
(lowest score) first, keeping only those within threshold:
- An exact name match short-circuits to a single
score: 0result. - Otherwise the input is tokenized (dashes / underscores / spaces become
separators) and fed through Fuse.js extended search, which AND-s each
token with fuzzy matching enabled - the “tokenized fuzzy match” a caller
reaches for when they type
"claude sonnet"instead of the full endpoint name.
Returns [] for an empty endpoint list or when input tokenizes to nothing,
so callers fall back to the raw input and let Databricks surface a clean 404.
This multi-result core is shared by resolveModelId (single best) and
the ranked rankModels selector.
Parameters
Section titled “Parameters”string
endpoints
Section titled “endpoints”readonly object[]
options?
Section titled “options?”ResolveModelOptions = {}