Class: FallbackRegistryFetcher
Makaio Framework / services-core / FallbackRegistryFetcher
Class: FallbackRegistryFetcher
Section titled “Class: FallbackRegistryFetcher”Defined in: ../../../packages/services/core/src/model-registry/fallback-registry-fetcher.ts:18
Tries multiple fetchers in order, returning the first successful result.
Each fetcher is attempted sequentially. On success, returns immediately. On failure, moves to the next fetcher. If all fetchers fail, throws the last error encountered.
Example
Section titled “Example”const fetcher = new FallbackRegistryFetcher([ new CachedRegistryFetcher(new CdnRegistryFetcher(cdnUrl), fileCache), new BundledSeedFetcher(seedPath),]);Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new FallbackRegistryFetcher(
fetchers):FallbackRegistryFetcher
Defined in: ../../../packages/services/core/src/model-registry/fallback-registry-fetcher.ts:26
Creates a new FallbackRegistryFetcher.
Parameters
Section titled “Parameters”fetchers
Section titled “fetchers”Ordered list of fetchers to try (first match wins)
Returns
Section titled “Returns”FallbackRegistryFetcher
Throws
Section titled “Throws”Error if fetchers array is empty
Methods
Section titled “Methods”fetch()
Section titled “fetch()”fetch():
Promise<{$schema:"makaio/model-registry/v2";labs:Record<string, {models:object[];name:string; }>;providers:Record<string, {models:Record<string, {canonicalModel?:string;contextWindowSize?:number;family?:string;friendlyName?:string;labId?:undefined;metadata?: {capabilities?: {parallelToolCalls?: … | … | …;pdfUpload?: … | … | …;speechToText?: … | …;structuredOutput?: … | … | …;textToSpeech?: … | …;toolCalling?: … | … | …;vision?: … | … | …; };description?:string;includedInSubscription?:boolean;maxOutputTokens?:number;pricing?: {request?: … | …;token?: … | …; }; };name?:undefined;supportedReasoningLevels?: {extra-high?:string|number;high?:string|number;low?:string|number;medium?:string|number;none?:string|number; }; }>;name:string; }>;updatedAt:string; }>
Defined in: ../../../packages/services/core/src/model-registry/fallback-registry-fetcher.ts:38
Try each fetcher in order, returning the first successful result.
Returns
Section titled “Returns”Promise<{ $schema: "makaio/model-registry/v2"; labs: Record<string, { models: object[]; name: string; }>; providers: Record<string, { models: Record<string, { canonicalModel?: string; contextWindowSize?: number; family?: string; friendlyName?: string; labId?: undefined; metadata?: { capabilities?: { parallelToolCalls?: … | … | …; pdfUpload?: … | … | …; speechToText?: … | …; structuredOutput?: … | … | …; textToSpeech?: … | …; toolCalling?: … | … | …; vision?: … | … | …; }; description?: string; includedInSubscription?: boolean; maxOutputTokens?: number; pricing?: { request?: … | …; token?: … | …; }; }; name?: undefined; supportedReasoningLevels?: { extra-high?: string | number; high?: string | number; low?: string | number; medium?: string | number; none?: string | number; }; }>; name: string; }>; updatedAt: string; }>
The model registry from the first successful fetcher
Throws
Section titled “Throws”The last error if all fetchers fail