import type { AIProvider, ProviderId } from "../types.js"; export type BenchmarkSourceId = "openrouter" | "artificial_analysis" | "huggingface_dataset" | "lmarena" | "swe_bench" | "bfcl" | "terminal_bench" | "simpleqa" | "internal_eval"; export type TaskProfile = "cheap" | "routing" | "extraction" | "json" | "fast" | "balanced" | "value" | "deep" | "pro" | "agentic" | "research" | "cyber" | "coding" | "content" | "summarization" | "long_context" | "local" | "vol"; export type ProfileChoiceKey = `${string}/${string}`; export type ModelIdentity = { provider: ProviderId; modelId: string; openRouterId?: string; canonicalSlug?: string; displayName?: string; }; export type OpenRouterModel = { id: string; canonical_slug?: string; name: string; created?: number; description?: string; context_length?: number; architecture?: { input_modalities?: string[]; output_modalities?: string[]; tokenizer?: string; instruct_type?: string | null; }; pricing?: { prompt?: string; completion?: string; request?: string; image?: string; web_search?: string; internal_reasoning?: string; input_cache_read?: string; input_cache_write?: string; }; top_provider?: { context_length?: number; max_completion_tokens?: number; is_moderated?: boolean; }; supported_parameters?: string[]; default_parameters?: Record | null; expiration_date?: string | null; benchmarks?: Record; }; export type OpenRouterModelResponse = { data: OpenRouterModel[]; }; export type ModelCapabilities = { inputModalities: string[]; outputModalities: string[]; contextLength?: number; maxOutputTokens?: number; supportsTools: boolean; supportsToolChoice: boolean; supportsStructuredOutputs: boolean; supportsResponseFormat: boolean; supportsReasoning: boolean; supportsIncludeReasoning: boolean; supportsTemperature: boolean; supportsSeed: boolean; isDeprecated: boolean; deprecationDate?: string; }; export type ModelPricing = { inputUsdPer1M?: number; outputUsdPer1M?: number; requestUsd?: number; imageUsd?: number; webSearchUsd?: number; reasoningUsdPer1M?: number; cacheReadUsdPer1M?: number; cacheWriteUsdPer1M?: number; }; export type NormalizedModel = { identity: ModelIdentity; source: "openrouter" | "local" | "direct"; capabilities: ModelCapabilities; pricing: ModelPricing; raw?: { openRouter?: OpenRouterModel; }; fetchedAt: string; }; export type BenchmarkMetricName = "intelligence" | "coding" | "agentic" | "functionCalling" | "factuality" | "nonHallucination" | "longContext" | "mathReasoning" | "scienceReasoning" | "instructionFollowing" | "writingPreference" | "jsonReliability" | "terminalUse" | "securityReasoning" | "costPerTask" | "outputTokensPerTask" | "tokensPerSecond" | "timeToFirstTokenMs" | "latencyP50Ms" | "latencyP95Ms"; export type BenchmarkSignal = { source: BenchmarkSourceId; sourceUrl?: string; provider?: ProviderId; modelId?: string; openRouterId?: string; displayName?: string; metric: BenchmarkMetricName; value: number; normalizedValue?: number; higherIsBetter: boolean; taskProfiles: TaskProfile[]; fetchedAt: string; publishedAt?: string; confidence: number; notes?: string; }; export type ModelIssueSignalName = "hallucinationRisk" | "overRefusalRisk" | "jsonBreakageRisk" | "toolCallFailureRisk" | "longContextDegradationRisk" | "highOutputCostRisk" | "latencyRisk" | "providerStabilityRisk" | "deprecationRisk" | "moderationRisk" | "benchmarkContaminationRisk" | "licenseRisk" | "localInstallRisk"; export type ModelIssueSignal = { source: BenchmarkSourceId | "internal_eval"; issue: ModelIssueSignalName; provider?: ProviderId; modelId?: string; openRouterId?: string; severity: "low" | "medium" | "high" | "critical"; score: number; evidence: string; sourceUrl?: string; fetchedAt: string; }; export type InternalEvalTaskId = "json_extraction" | "classification" | "routing_decision" | "cyber_analysis" | "long_input_summary" | "tool_calling" | "coding_patch" | "content_generation" | "final_executive_answer"; export type InternalEvalResult = { provider: ProviderId; modelId: string; openRouterId?: string; taskId: InternalEvalTaskId; passRate?: number; qualityScore?: number; jsonValidRate?: number; schemaValidRate?: number; toolCallSuccessRate?: number; hallucinationRate?: number; retryRate?: number; avgInputTokens?: number; avgOutputTokens?: number; avgReasoningTokens?: number; avgLatencyMs?: number; p95LatencyMs?: number; avgCostUsd?: number; sampleSize: number; evaluatedAt: string; }; export type EstimatedTaskShape = { inputTokens: number; outputTokens: number; reasoningTokens?: number; cacheReadTokens?: number; cacheWriteTokens?: number; requests?: number; webSearches?: number; }; export type TaskRequirements = { minContextTokens?: number; requiresTools?: boolean; requiresStructuredOutputs?: boolean; requiresReasoning?: boolean; requiresTextOutput?: boolean; maxCostUsd?: number; maxLatencyMs?: number; minQualityScore?: number; allowDeprecated?: boolean; }; export type ScoreWeights = { quality: number; cost: number; latency: number; reliability: number; context: number; benchmarkConfidence: number; }; export type ModelTaskScore = { model: ModelIdentity; taskProfile: TaskProfile; qualityScore: number; costScore: number; latencyScore: number; reliabilityScore: number; contextScore: number; benchmarkConfidenceScore: number; finalScore: number; estimatedCostUsd: number; evidence: Array; issues: ModelIssueSignal[]; disqualifiedReasons: string[]; }; export type ProfileModelRecommendation = { profileChoiceKey: ProfileChoiceKey; current?: { provider: ProviderId; modelId: string; }; recommended: { provider: ProviderId; modelId: string; modelStatus: "verified"; }; taskProfile: TaskProfile; score: number; estimatedCostUsd: number; reason: string; confidence: number; evidenceSummary: string[]; issuesSummary: string[]; requiresHumanApproval: boolean; }; export type PatchValidationError = { profileChoiceKey: string; message: string; }; export type ModelEvidenceFile = { generatedAt: string; sourceVersions: { openrouterFetchedAt: string; artificialAnalysisFetchedAt?: string; huggingFaceFetchedAt?: string; internalEvalFetchedAt?: string; }; models: NormalizedModel[]; benchmarkSignals: BenchmarkSignal[]; issues: ModelIssueSignal[]; recommendations: ProfileModelRecommendation[]; }; export type { AIProvider, ProviderId }; //# sourceMappingURL=types.d.ts.map