/**
 * Feature → model routing resolution.
 *
 * This is the authoritative runtime resolver: given the stored AI config and the
 * current model catalog, it decides which provider connection + model a feature
 * should use. Resolution order for each feature:
 *
 *   1. The feature's explicit `modelId` override (if it exists in the catalog).
 *   2. A capability-typed default that matches the feature's dominant required
 *      capability (e.g. a vision feature falls back to `defaultVisionModelId`).
 *   3. The global `defaultModelId`.
 *   4. Any `fallbackModelIds` listed on the feature.
 *
 * The first candidate that is present in the catalog, available, AND satisfies
 * every required capability wins. If none fully satisfy, we still return the
 * best candidate we found and report the missing capabilities so callers (UI +
 * enforcement) can warn rather than silently misroute. The admin UI mirrors a
 * simplified version of this for live preview, but THIS function is the source
 * of truth consumed by the AI runtime.
 */
import type { AIConfigDocument, AIModel } from './types.js';
/** Where the resolved model came from in the precedence chain above. */
export type FeatureModelSource = 'feature-override' | 'capability-default' | 'global-default' | 'fallback' | 'none';
export interface ResolvedFeatureModel {
    featureKey: string;
    /** Catalog model id (`provider:modelId`), or the raw override when uncatalogued. */
    modelId?: string;
    /** Provider connection id that owns the resolved model. */
    providerId?: string;
    model?: AIModel;
    source: FeatureModelSource;
    /** True when a usable model was found that satisfies every required capability. */
    satisfiesCapabilities: boolean;
    /** Required capabilities the resolved model is missing (empty when satisfied). */
    missingCapabilities: string[];
}
/** Resolve the provider + model a single feature should use. */
export declare function resolveFeatureModel(config: AIConfigDocument, featureKey: string, catalog: AIModel[]): ResolvedFeatureModel;
/** Resolve routing for every configured feature, keyed by feature key. */
export declare function resolveAllFeatureModels(config: AIConfigDocument, catalog: AIModel[]): Record<string, ResolvedFeatureModel>;
//# sourceMappingURL=resolve.d.ts.map