Function: selectModel()
selectModel(
client,host,input?):Promise<ResolvedModelSelection>
Resolve a model id for a workspace in one call: list its /serving-endpoints
(cached) and run resolveModel over the result. This is the entry
point for any consumer that holds a WorkspaceClient and just wants a usable
model name - a Lakeflow job, a one-off script, or the Mastra plugin alike.
Cheap exit: when an explicit name is given, fuzzy is off, and tool
capability is not required, the catalogue is never fetched. Catalogue
fetches otherwise fail loud: network / auth errors propagate so the caller
sees the real SDK message instead of a silent fallback.
Parameters
Section titled “Parameters”client
Section titled “client”string
Workspace host used as the cache key. Pass the value resolved
from client.config.getHost().
input?
Section titled “input?”SelectModelInput = {}
Returns
Section titled “Returns”Promise<ResolvedModelSelection>