@juspay/neurolink
Version:
Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and
133 lines (132 loc) • 3.42 kB
TypeScript
/**
* Model Registry for NeuroLink CLI Commands
* Provides centralized model data for models command system
* Part of Phase 4.1 - Models Command System
*/
import { AIProviderName } from "../core/types.js";
import type { JsonValue } from "../types/common.js";
/**
* Model capabilities interface
*/
export interface ModelCapabilities {
vision: boolean;
functionCalling: boolean;
codeGeneration: boolean;
reasoning: boolean;
multimodal: boolean;
streaming: boolean;
jsonMode: boolean;
}
/**
* Model pricing information
*/
export interface ModelPricing {
inputCostPer1K: number;
outputCostPer1K: number;
currency: string;
}
/**
* Model performance characteristics
*/
export interface ModelPerformance {
speed: "fast" | "medium" | "slow";
quality: "high" | "medium" | "low";
accuracy: "high" | "medium" | "low";
}
/**
* Model limitations and constraints
*/
export interface ModelLimits {
maxContextTokens: number;
maxOutputTokens: number;
maxRequestsPerMinute?: number;
maxRequestsPerDay?: number;
}
/**
* Use case suitability scores (1-10 scale)
*/
export interface UseCaseSuitability {
coding: number;
creative: number;
analysis: number;
conversation: number;
reasoning: number;
translation: number;
summarization: number;
}
/**
* Complete model information
*/
export interface ModelInfo {
id: string;
name: string;
provider: AIProviderName;
description: string;
capabilities: ModelCapabilities;
pricing: ModelPricing;
performance: ModelPerformance;
limits: ModelLimits;
useCases: UseCaseSuitability;
aliases: string[];
deprecated: boolean;
isLocal: boolean;
releaseDate?: string;
category: "general" | "coding" | "creative" | "vision" | "reasoning";
}
/**
* Model search filters
*/
export interface ModelSearchFilters {
provider?: AIProviderName | AIProviderName[];
capability?: keyof ModelCapabilities | (keyof ModelCapabilities)[];
useCase?: keyof UseCaseSuitability;
maxCost?: number;
minContextSize?: number;
maxContextSize?: number;
performance?: ModelPerformance["speed"] | ModelPerformance["quality"];
category?: ModelInfo["category"] | ModelInfo["category"][];
}
/**
* Model search result with ranking
*/
export interface ModelSearchResult {
model: ModelInfo;
score: number;
matchReasons: string[];
}
/**
* Comprehensive model registry
*/
export declare const MODEL_REGISTRY: Record<string, ModelInfo>;
/**
* Model aliases registry for quick resolution
*/
export declare const MODEL_ALIASES: Record<string, string>;
/**
* Use case to model mappings
*/
export declare const USE_CASE_RECOMMENDATIONS: Record<string, string[]>;
/**
* Get all models
*/
export declare function getAllModels(): ModelInfo[];
/**
* Get model by ID
*/
export declare function getModelById(id: string): ModelInfo | undefined;
/**
* Get models by provider
*/
export declare function getModelsByProvider(provider: AIProviderName): ModelInfo[];
/**
* Get available providers
*/
export declare function getAvailableProviders(): AIProviderName[];
/**
* Calculate estimated cost for a request
*/
export declare function calculateCost(model: ModelInfo, inputTokens: number, outputTokens: number): number;
/**
* Format model for display
*/
export declare function formatModelForDisplay(model: ModelInfo): JsonValue;