@bobmatnyc/ai-code-review
Version:
A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter
57 lines (56 loc) • 1.79 kB
TypeScript
/**
* @fileoverview Utilities for testing AI model availability and capabilities.
*
* This module provides functions for testing the availability and functionality of
* different AI models across all supported providers. It helps users verify that
* their API keys are valid and that the models they intend to use are accessible
* and functioning correctly.
*/
import { Provider } from './modelMaps';
/**
* Test result interface
*/
export interface TestResult {
success: boolean;
message: string;
model?: string;
provider?: Provider;
response?: string;
error?: any;
}
/**
* Test a Gemini model
* @param modelName Model name to test
* @returns Test result
*/
export declare function testGeminiModel(modelName?: string): Promise<TestResult>;
/**
* Test an Anthropic model
* @param modelName Model name to test
* @returns Test result
*/
export declare function testAnthropicModel(modelName?: string): Promise<TestResult>;
/**
* Test an OpenAI model
* @param modelName Model name to test
* @returns Test result
*/
export declare function testOpenAIModel(modelName?: string): Promise<TestResult>;
/**
* Test an OpenRouter model
* @param modelName Model name to test
* @returns Test result
*/
export declare function testOpenRouterModel(modelName?: string): Promise<TestResult>;
/**
* Test the best available model
* @returns Test result
*/
export declare function testBestAvailableModel(): Promise<TestResult>;
/**
* Find an available model for a specific provider
* @param provider Provider to test
* @param modelOptions Array of model names to try
* @returns The first available model or null if none are available
*/
export declare function findAvailableModelForProvider(provider: Provider, modelOptions: string[]): Promise<string | null>;