import type { AiModelConfig, ProviderFactory, ProviderAdapter, RerankingAdapter, FileAdapter, VectorStoreAdapter } from './types.js'; /** * Try a list of provider/model strings in order until one succeeds. * * Used by the media-generation paths (Image, Audio, Transcription) to give * the same failover ergonomics agents already have. The first model is the * "primary"; the rest are fallbacks. Errors from earlier candidates are * swallowed; only the last error is thrown if every candidate fails. * * The agent loop has its own failover wired into LoopContext (telemetry, * abort handling, observer attempts counter). This is a simpler helper for * single-shot calls outside the agent loop. * * @param primary The user's chosen model string (e.g. `'openai/dall-e-3'`). * @param fallbacks Additional candidates to try on failure. * @param call Receives each candidate model string and runs the work. */ export declare function tryWithFailover(primary: string, fallbacks: readonly string[], call: (modelString: string) => Promise): Promise; export declare class AiRegistry { /** Register a provider factory */ static register(factory: ProviderFactory): void; /** Get a registered provider factory by name */ static getFactory(name: string): ProviderFactory; /** Set the default provider/model string */ static setDefault(modelString: string): void; /** Get the default provider/model string */ static getDefault(): string; /** Parse 'provider/model' string into [providerName, modelId] */ static parseModelString(modelString: string): [string, string]; /** Resolve a provider/model string to a ProviderAdapter */ static resolve(modelString: string): ProviderAdapter; /** Resolve a provider/model string to a RerankingAdapter */ static resolveReranking(modelString: string): RerankingAdapter; /** Resolve a file adapter for a provider name */ static resolveFiles(providerName: string): FileAdapter; /** Resolve a vector-store adapter for a provider name (#B8) */ static resolveVectorStores(providerName: string): VectorStoreAdapter; /** Set available models for user selection */ static setModels(models: AiModelConfig[]): void; /** Get available models */ static getModels(): AiModelConfig[]; /** Test-cleanup hook (public — other packages reset across the boundary). */ static reset(): void; } //# sourceMappingURL=registry.d.ts.map