Protected ReadonlyauthProtecteddiscoveryWhy the last model discovery failed, if it did.
Being signed in does not imply that requests are accepted: the credentials can lack the Copilot entitlement, be revoked, or belong to a subscription served by a different API host. Reporting the models as ready in those cases claims a working setup that is not there, so the failure is remembered and reflected in the status of the models.
Protected ReadonlylanguageProtected ReadonlyloggerProtected ReadonlysdkProtected ReadonlytoProtectedcalculateCreate or update language models in the registry.
Fetches the models the Copilot CLI offers. Requires the CLI to be signed in; a failure is reported as ModelDiscoveryResult.error with no models rather than thrown, since the CLI being absent or signed out is an expected state rather than a fault.
ProtectedinitRefresh the status of all Copilot models (e.g., after authentication state changes).
Remove language models from the registry.
ProtectedselectNominates the models the chat input should show without the user asking, up to
NOMINATED_MODEL_COUNT. Copilot serves models of several vendors under one provider, so
ranking them against each other by the numbers in their ids would show several models of
whichever vendor counts highest and none of the others. The list is therefore filled vendor by
vendor: auto first, which lets Copilot itself choose and is the entry most users want, then the
newest model of each major vendor, then the next of each in turn until the list is full.
Everything else Copilot carries is left to be chosen deliberately: the list is meant to be the handful of models one switches between while chatting, not a survey of the catalogue.
Release-pinned ids are left out: the undated id of the same model is nominated, and pinning a release is the deliberate choice the check on its row makes.
ProtectedsetRecords the outcome of the last model discovery and reflects it in the status of the models.
ProtectedstopDetaches from the auth service when the container this manager lives in goes away.
Unbinding a container runs @preDestroy rather than dispose, see the client provider.
ProtectedvendorThe vendor a Copilot model id belongs to, or undefined for a vendor that is not nominated.
Matching on the id is all there is — the CLI reports nothing else — and it is deliberately narrow:
a model of a vendor this does not name is still registered and still selectable, it is simply not
one of the few the chat input starts with.
Backend implementation of the Copilot language models manager. Manages registration and lifecycle of Copilot language models in the AI language model registry.