/** * Provider-native live model discovery, extracted from ProviderRegistry to * keep registry.ts under its line-cap ceiling, mirroring the extraction * pattern already used by registry-catalog-lifecycle.ts and * registry-models.ts. * * Owns the `providerNativeModels` bucket: model definitions synthesized * directly from a provider's own `models` list (populated either * synchronously at registration from a dated-static baseline, or later via * `refreshModels()`), independent of the shared third-party model catalog. */ import type { LLMProvider } from './interface.js'; import type { ModelDefinition } from './registry-types.js'; import { type LiveModelDiscoveryResult } from './live-model-discovery.js'; export type ProviderRefreshableModel = Pick & Partial<{ refreshModels: (force?: boolean) => Promise; }>; /** * Seed `providerNativeModels` for one provider from its current `.models` * list. Called at registration time (before any async `refreshModels()` has * run) and again after each refresh. Only applies to providers that declare * a `modelSource` other than `catalog-backed`; providers relying entirely on * the shared catalog (or with no declaration, meaning their static list IS * the whole story) don't need a separate native-model bucket. * * Returns a new array with this provider's prior entries replaced. */ export declare function applyProviderNativeModelBaseline(providerNativeModels: readonly ModelDefinition[], provider: LLMProvider): ModelDefinition[]; /** Remove a provider's entries from the bucket (used on runtime-provider unregister). */ export declare function removeProviderNativeModels(providerNativeModels: readonly ModelDefinition[], providerName: string): ModelDefinition[]; export interface LiveModelDiscoverySweepResult { readonly providerNativeModels: ModelDefinition[]; readonly reports: Array<{ providerId: string; } & LiveModelDiscoveryResult>; } /** * Re-check live model discovery for every provider in `providers` that * implements `refreshModels()` (or just `providerId` when given). This is * the registry-level hook a picker-open handler or an explicit user refresh * command calls: routine background refreshes respect each provider's * on-disk TTL cache, `force: true` bypasses it. * * Always resolves with one report per checked provider, a provider whose * live fetch fails still gets an honest report (see * `LiveModelDiscoveryResult.error`), never a thrown exception that would * abort the whole sweep. */ export declare function sweepLiveModelDiscovery(providers: Iterable, providerNativeModels: readonly ModelDefinition[], providerId: string | undefined, options: { force?: boolean; }): Promise; //# sourceMappingURL=registry-live-model-discovery.d.ts.map