interface ModelInfo { id: string; name: string; provider: string; contextWindow: number; maxOutputTokens: number; supportsToolUse: boolean; supportsStreaming: boolean; supportsVision: boolean; supportsThinking: boolean; pricing?: ModelPricing; tags: string[]; } interface ModelPricing { inputPerMillion: number; outputPerMillion: number; currency: string; } type ModelCapability = "tool_use" | "streaming" | "vision" | "thinking" | "code" | "fast" | "cheap" | "local"; interface BenchmarkResult { modelId: string; provider: string; latencyMs: number; ttftMs: number; outputTokens: number; totalTokens: number; tokPerSec: number; promptTokens: number; success: boolean; error?: string; timestamp: number; } interface BenchmarkConfig { prompt: string; maxTokens: number; runs: number; warmup: number; streaming: boolean; } type BenchmarkPreset = "latency" | "throughput" | "code_apply" | "streaming"; interface SelectionCriteria { minTokPerSec?: number; maxLatencyMs?: number; maxInputCostPer1M?: number; maxOutputCostPer1M?: number; minContextWindow?: number; requireCapabilities?: ModelCapability[]; preferLocal?: boolean; preferFast?: boolean; preferCheap?: boolean; task?: "code" | "chat" | "apply" | "analysis"; } interface RankedModel { model: ModelInfo; score: number; benchmark?: BenchmarkResult; reasons: string[]; } interface ProviderAdapter { readonly name: string; listModels(): Promise; benchmark(modelId: string, config: BenchmarkConfig, apiKey: string, baseURL?: string): Promise; healthCheck(modelId: string, apiKey: string, baseURL?: string): Promise; } export type { BenchmarkConfig as B, ModelCapability as M, ProviderAdapter as P, RankedModel as R, SelectionCriteria as S, BenchmarkPreset as a, BenchmarkResult as b, ModelInfo as c, ModelPricing as d };