CatalogOptions
Defined in: packages/core/src/providers/modelCatalog.ts:127
Options shared by catalog reads; every field is injectable for hermetic tests.
Properties
Section titled “Properties”cacheDir?
Section titled “cacheDir?”
optionalcacheDir?:string
Defined in: packages/core/src/providers/modelCatalog.ts:131
Override the cache directory (defaults to ~/.gsloth/model-catalog).
cacheOnly?
Section titled “cacheOnly?”
optionalcacheOnly?:boolean
Defined in: packages/core/src/providers/modelCatalog.ts:155
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 a cold fetch there is bounded
only by CATALOG_TIMEOUT_MS: a fraction of a second on a fast link, and on a slow or
high-latency one whatever the link takes, all of it in front of the user’s first turn — to
decide a threshold that has a fallback (the model profile) and whose absence costs only that
one session’s preventive compaction. It is the tail this guards, not the median. The cache is
filled by gth init and gth models --refresh, which are explicit and can afford to wait.
What the fallback costs in exchange is written where it is paid — see the tier-3 ruling in
core/contextWindow.ts.
Ignored when refresh is set — an explicit refresh is a request to go to the network.
fetchImpl?
Section titled “fetchImpl?”
optionalfetchImpl?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Defined in: packages/core/src/providers/modelCatalog.ts:135
Override the fetch implementation (defaults to the global fetch).
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”URL | RequestInfo
RequestInit
Returns
Section titled “Returns”Promise<Response>
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>
optionalnow?:number
Defined in: packages/core/src/providers/modelCatalog.ts:133
Override “now” for TTL math (defaults to Date.now()).
refresh?
Section titled “refresh?”
optionalrefresh?:boolean
Defined in: packages/core/src/providers/modelCatalog.ts:129
Force a network refresh even when a fresh cache exists (backs gth models --refresh).
ttlMs?
Section titled “ttlMs?”
optionalttlMs?:number
Defined in: packages/core/src/providers/modelCatalog.ts:137
Override the TTL window in ms (defaults to CATALOG_TTL_MS).