@bobmatnyc/ai-code-review
Version:
A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter
36 lines (35 loc) • 1.05 kB
TypeScript
/**
* @fileoverview Factory for creating API clients based on model selection.
*
* This module provides a factory for creating the appropriate API client
* based on the selected model. It handles client instantiation, model detection,
* and initialization.
*/
import { AbstractClient } from '../base';
/**
* Client type enum
*/
export declare enum ClientType {
OPENAI = "openai",
ANTHROPIC = "anthropic",
GEMINI = "gemini",
OPEN_ROUTER = "openrouter",
UNKNOWN = "unknown"
}
/**
* Factory for creating API clients
*/
export declare class ClientFactory {
/**
* Create an appropriate client instance based on the selected model
* @param overrideModel Optional model to use instead of the configured one
* @returns The client instance
*/
static createClient(overrideModel?: string): AbstractClient;
/**
* Detect the client type from the model name
* @param modelName The model name to check
* @returns The detected client type
*/
private static detectClientType;
}