devibe
Version:
Intelligent repository cleanup with auto mode, AI learning, markdown consolidation, auto-consolidate workflow, context-aware classification, and cost optimization
55 lines • 1.82 kB
TypeScript
/**
* AI Model Configuration
*
* Supports multiple AI providers and models with automatic optimization
* based on cost, context window, and quality requirements.
*/
export interface ModelConfig {
id: string;
name: string;
provider: 'anthropic' | 'openai' | 'google';
contextWindow: number;
inputPricePerMillion: number;
outputPricePerMillion: number;
recommendedBatchSize: number;
apiUrl: string;
quality: 'excellent' | 'good' | 'best';
speed: 'very-fast' | 'fast' | 'slow';
}
export declare const AVAILABLE_MODELS: Record<string, ModelConfig>;
export type ModelSelector = 'cheapest' | 'fastest' | 'largest-context' | 'best-quality' | 'best-value' | string;
/**
* Select optimal model based on criteria
*/
export declare function selectModel(criteria?: ModelSelector): ModelConfig;
/**
* Calculate estimated cost for a batch
*/
export declare function estimateCost(model: ModelConfig, inputTokens: number, outputTokens: number): number;
/**
* Get model configuration from environment or default
*/
export declare function getModelConfig(): ModelConfig;
/**
* Compare models side-by-side
*/
export declare function compareModels(fileCount: number, avgInputTokensPerFile?: number, avgOutputTokensPerFile?: number): Array<{
model: string;
batchCount: number;
totalCost: number;
costPerFile: number;
apiCalls: number;
}>;
/**
* Get API key for a provider
*/
export declare function getApiKey(provider: 'anthropic' | 'openai' | 'google'): string | undefined;
/**
* Check if a model is available (API key exists)
*/
export declare function isModelAvailable(modelKey: string): boolean;
/**
* Get all available models (with API keys configured)
*/
export declare function getAvailableModels(): ModelConfig[];
//# sourceMappingURL=ai-model-config.d.ts.map