import type { Provider, ModelData } from "@mariozechner/lemmy"; /** * Result of model validation with comprehensive type information */ export interface ModelValidationResult { provider: Provider; model: string; isKnown: boolean; modelData?: ModelData; capabilities?: { supportsTools: boolean; supportsImageInput: boolean; contextWindow: number; maxOutputTokens: number; }; warnings: string[]; } /** * Configuration for model validation behavior */ export interface ModelValidationConfig { /** Whether to allow unknown models (default: true) */ allowUnknownModels?: boolean; /** Required capabilities for the model */ requiredCapabilities?: { tools?: boolean; images?: boolean; minContextWindow?: number; minOutputTokens?: number; }; /** Model registries to check against */ modelRegistries: Record>; /** Model-to-provider mapping */ modelToProvider: Record; } /** * Validate provider with exhaustive TypeScript checking */ export declare function validateProvider(provider: string, validProviders: readonly Provider[]): provider is Provider; /** * Get valid providers with exhaustive type checking * This ensures all Provider types are accounted for */ export declare function getValidProviders(): Provider[]; /** * Find model data across all registries */ export declare function findModelData(model: string, modelRegistries: Record>): ModelData | undefined; /** * Get provider for a model from mapping */ export declare function getModelProvider(model: string, modelToProvider: Record): Provider | undefined; /** * Get models that support specific capabilities */ export declare function getCapableModels(config: ModelValidationConfig, targetProvider?: Provider): Record; /** * Validate provider and model with comprehensive checking */ export declare function validateProviderAndModel(provider: string, model: string, config: ModelValidationConfig): ModelValidationResult | null; /** * Filter providers to exclude specific ones (e.g., for bridging scenarios) */ export declare function filterProviders(allProviders: Provider[], excludeProviders: T[]): Exclude[]; /** * Get exhaustive provider validation errors */ export declare function getProviderValidationError(provider: string): string; /** * Create a type-safe provider validator function */ export declare function createProviderValidator(validProviders: readonly Provider[]): (provider: string) => provider is Provider; /** * Exhaustive switch helper for provider-specific logic */ export declare function exhaustiveProviderSwitch(provider: Provider, cases: Record T>): T; //# sourceMappingURL=provider-validation.d.ts.map