Function: resolveModelId()
resolveModelId(
input,endpoints,options?):object
Snap a user-supplied model name to the single closest configured serving
endpoint via searchServingEndpoints. Returns the input unchanged with
matched: false when nothing scores within the threshold (or the catalogue
is empty), so a deliberate model id is never silently rewritten to a
similar-looking neighbour and the upstream call surfaces the canonical 404.
Parameters
Section titled “Parameters”string
endpoints
Section titled “endpoints”readonly object[]
options?
Section titled “options?”requiresTools?
Section titled “requiresTools?”boolean = ...
threshold?
Section titled “threshold?”number = ...
Returns
Section titled “Returns”object
matched
Section titled “matched”matched:
boolean
modelId
Section titled “modelId”modelId:
string
score?
Section titled “score?”
optionalscore?:number