Skip to content

CatalogOptions

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

Options shared by catalog reads; every field is injectable for hermetic tests.

optional cacheDir?: string

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

Override the cache directory (defaults to ~/.gsloth/model-catalog).


optional cacheOnly?: boolean

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

EXT-161 — read the cache and never reach the network, returning the cached slice whether it is fresh or stale, and null when there is none.

For callers on a latency-critical path that would rather have no answer than a slow one. The context guard runs before the first model call of a session, and api.json is a few MB behind a 10 s timeout: a cold cache would put that delay in front of the user’s first turn, to decide a threshold that has a perfectly good fallback (the model profile) and whose absence costs only that one session’s preventive compaction. The cache is filled by gth init and gth models --refresh, which are explicit and can afford to wait.

Ignored when refresh is set — an explicit refresh is a request to go to the network.


optional fetchImpl?: {(input, init?): Promise<Response>; (input, init?): Promise<Response>; }

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

Override the fetch implementation (defaults to the global fetch).

(input, init?): Promise<Response>

MDN Reference

URL | RequestInfo

RequestInit

Promise<Response>

(input, init?): Promise<Response>

MDN Reference

string | URL | Request

RequestInit

Promise<Response>


optional now?: number

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

Override “now” for TTL math (defaults to Date.now()).


optional refresh?: boolean

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

Force a network refresh even when a fresh cache exists (backs gth models --refresh).


optional ttlMs?: number

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

Override the TTL window in ms (defaults to CATALOG_TTL_MS).