/**
 * Model Registry — types and functions for model resolution, availability, and routing.
 * Extracted from config.ts for modularity.
 */
import { type ModelContextCapability } from './model-capabilities.js';
export interface ConfiguredModel {
    id: string;
    label: string;
    backendModel: string;
    aliases: string[];
    tier: string;
    provider?: string;
    default?: boolean;
    channel?: string;
    role?: string;
    availability?: 'available' | 'unavailable' | 'unknown';
    endpoint?: string;
    apiKey?: string;
    apiKeyEnv?: string;
    apiKeySource?: 'env' | 'config' | 'unset';
    headers?: Record<string, string>;
    contextWindow?: number;
    timeoutMs?: number;
}
export type ResponseModelStyle = 'platform' | 'requested';
export type LocalRuntimeProtocol = 'auto' | 'openai_chat' | 'anthropic_messages';
export interface ResolvedModel {
    id: string;
    label: string;
    backendModel: string;
    provider?: string;
    endpoint?: string;
    apiKey?: string;
    apiKeySource?: 'env' | 'config' | 'unset';
    headers?: Record<string, string>;
    contextWindow?: number;
    timeoutMs?: number;
}
export interface ModelRoute {
    backendModel: string;
    endpointUrl: string;
    headers: Record<string, string>;
    translate: boolean;
    timeoutMs?: number;
}
export declare class LocalRuntimeProtocolUnresolvedError extends Error {
    constructor(message: string);
}
export declare function normalizeModel(raw: Record<string, unknown>): ConfiguredModel;
/** Config-like interface needed by model functions */
export interface ModelRegistryConfig {
    models: ConfiguredModel[];
    routerUrl: string;
    localRuntimeProtocol?: LocalRuntimeProtocol;
    responseModelStyle: ResponseModelStyle;
    modelMap: Record<string, string>;
    defaultModel: string;
    reverseMapInResponse: boolean;
}
export declare function isInteractiveChatModelName(name: string): boolean;
export declare function isInteractiveChatModel(model: Pick<ConfiguredModel, 'id' | 'backendModel' | 'tier'>): boolean;
/**
 * Legacy placeholder written by older `owlcoda init` runs when no local
 * backend was reachable. It has no endpoint and a "your-…" id that no real
 * provider exposes. Treat it as never-default-eligible so a fresh cloud
 * provider added in Admin wins automatically and so launch can detect a
 * placeholder-only config and route to onboarding.
 */
export declare function isPlaceholderConfiguredModel(model: Pick<ConfiguredModel, 'id' | 'backendModel' | 'endpoint'>): boolean;
export declare function resolveConfiguredModel(config: ModelRegistryConfig, requestModel: string): ResolvedModel;
export declare function getDefaultConfiguredModel(config: ModelRegistryConfig): ResolvedModel | null;
export declare function getPreferredInteractiveConfiguredModel(config: ModelRegistryConfig): ResolvedModel | null;
export declare function listConfiguredModels(config: ModelRegistryConfig): ConfiguredModel[];
export declare function hasResolvedLocalRuntimeProtocol(config: ModelRegistryConfig): boolean;
export declare function requiresResolvedLocalRuntimeProtocol(config: ModelRegistryConfig, requestModel: string): boolean;
export declare function probeRouterModels(routerUrl: string, timeoutMs?: number): Promise<Set<string>>;
export declare function overlayAvailability(config: ModelRegistryConfig, routerModelIds: Set<string>): void;
export declare function responseModelName(config: ModelRegistryConfig, requestModel: string): string;
export declare function resolveModelContextWindow(config: ModelRegistryConfig, requestModel: string): number;
export declare function resolveModelContextCapability(config: ModelRegistryConfig, requestModel: string): ModelContextCapability;
export declare function resolveModelRoute(config: ModelRegistryConfig, requestModel: string): ModelRoute;
export declare function resolveModel(config: ModelRegistryConfig, requestModel: string): string;
export declare function reverseModel(config: ModelRegistryConfig, requestModel: string): string;
