@bobmatnyc/ai-code-review
Version:
A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter
30 lines (29 loc) • 1 kB
TypeScript
/**
* @fileoverview API client selector module.
*
* This module is responsible for selecting the appropriate API client based on
* available API keys and user preferences. It centralizes the logic for determining
* which AI provider to use for code reviews.
*/
import { AbstractClient } from '../clients/base/abstractClient';
/**
* API client types supported by the application
*/
export type ApiClientType = 'OpenRouter' | 'Google' | 'Anthropic' | 'OpenAI' | 'None';
/**
* API client configuration
*/
export interface ApiClientConfig {
clientType: ApiClientType;
modelName: string;
initialized: boolean;
provider?: string;
apiKey?: string;
client?: AbstractClient;
}
/**
* Select and initialize the appropriate API client based on available API keys
* @param cliOptions Optional CLI options (reserved for future use)
* @returns Promise resolving to the API client configuration
*/
export declare function selectApiClient(cliOptions?: any): Promise<ApiClientConfig>;