Skip to content

buildInitConfigContent

buildInitConfigContent(providerId, model?): string

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/providers/modelDiscovery.ts:415

Build the minimal .gsloth.config.json body an init template writes for a provider (CFG-14). When model is omitted, the model key is left OUT of the config entirely, so the provider factory resolves it at run time from getCuratedFallbackModel — the single curated source that tracks the installed version, rather than a literal frozen into the user’s file that 404s once the model is retired.

A $schema pointer (CONFIG_SCHEMA_POINTER) is written first so editors offer autocomplete/validation against the shipped JSON Schema (GS2-1). $schema is a known, runtime-ignored config field (see the zod schema), so it never affects loading.

ProviderId

string

string