resolveInitModel
resolveInitModel(
providerId):Promise<string|undefined>
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/providers/modelDiscovery.ts:687
Resolve the model id that init should bake into a generated config for a
provider (CFG-14) — the safeguard against writing a speculative id that 404s
once the model is retired.
- Live discovery possible (a key / running daemon and a responding
/v1/modelsendpoint): returns a verified-present id — the highest-ranked curated ⭐ id that is actually in the live list (matched tolerant of an:latestsuffix), or, when no curated id is live, the first live id. - Live discovery impossible (
kind: 'none', no key, offline, empty catalog): returnsundefined. This is the ONLY speculative path, and it deliberately declines to invent a literal: the caller OMITSmodelso the provider factory falls back to getCuratedFallbackModel at run time (a single curated source that upgrades with the installed version).
Never throws — a bad key or network error degrades to undefined, mirroring
discoverModels.
Parameters
Section titled “Parameters”providerId
Section titled “providerId”Returns
Section titled “Returns”Promise<string | undefined>