Skip to content

resolve

Workspace-aware model selection.

Given a caller’s intent - a search string, a capability ModelClass ceiling, both, or nothing - the toolkit returns matching endpoints ranked by match quality then class, or collapses to the single best id the workspace actually has, degrading from “best in range” down to the static fallback floor. Selection is chat-only: embedding endpoints surface only when modelClass is explicitly ModelClass.Embedding.

Two shapes of selection, each in a pure form (over an endpoint list the caller already holds) and an I/O wrapper (that lists /serving-endpoints first): ranking, which returns a match- then class-ordered list, and single-selection, which collapses to one id plus how it was reached and layers the operator-pinned fallback / static-floor safety net on top. A chat modelClass acts as a ceiling: that band and the less-capable chat bands below it are eligible (see classesAtOrBelow), so a chat-balanced ask can fall to chat-fast but never escalate to chat-thinking.