/**
 * Model catalog orchestration: live sync (with curated normalization), curated
 * fallback, and resolution of a configured-but-missing model to an `unavailable`
 * entry so the UI can warn without silently dropping the admin's choice.
 */
import { AI_CONFIG_COLLECTION } from './config-store.js';
import type { AIModel } from './types.js';
export { AI_CONFIG_COLLECTION };
export interface SyncModelsResult {
    models: AIModel[];
    fromFallback: boolean;
    /** Present when the live listing failed and we fell back to curated data. */
    warning?: string;
}
/**
 * Sync the model catalog for a provider connection. Attempts a live listing;
 * on any failure falls back to the curated catalog so the selector is never
 * empty. Persists the result on the `__ai_config__` document under
 * `catalog[connectionId]` and stamps `lastModelSyncAt`.
 */
export declare function syncModels(db: unknown, connectionId: string): Promise<SyncModelsResult>;
/**
 * Read the cached catalog for a connection (or all connections). Falls back to
 * the curated catalog for connections that have never been synced so the UI
 * always has something to show.
 */
export declare function getModels(db: unknown, params?: {
    connectionId?: string;
    provider?: string;
}): Promise<AIModel[]>;
/**
 * Resolve a configured model id to a catalog entry. When the id is no longer in
 * the catalog (provider removed/renamed it) returns a synthesized `unavailable`
 * model so the caller can keep the setting and warn the user.
 */
export declare function resolveModelOrUnavailable(modelId: string | undefined, catalog: AIModel[]): AIModel | null;
//# sourceMappingURL=models.d.ts.map