@bobmatnyc/ai-code-review
Version:
A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter
40 lines (39 loc) • 1.55 kB
TypeScript
/**
* @fileoverview Helper utilities for working with Anthropic models.
*
* This module provides utilities for model detection, initialization, and validation
* specific to Anthropic's Claude models. It handles determining if a model is an
* Anthropic model, validating API keys, and initializing model connections.
*/
import { testAnthropicApiAccess } from './anthropicApiClient';
export { testAnthropicApiAccess };
/**
* Interface for the result of Anthropic model detection
*/
export interface AnthropicModelResult {
isCorrect: boolean;
adapter: string;
modelName: string;
}
/**
* Determines if the current model is an Anthropic model and extracts adapter and model name.
* @returns Object containing detection results
*/
export declare function isAnthropicModel(): AnthropicModelResult;
/**
* Resolve the API model name for Anthropic from the model mapping
* @param modelName The model name (without provider prefix)
* @returns The API model name or the original name if not found
*/
export declare function getApiModelName(modelName: string): Promise<string>;
/**
* Initialize the Anthropic client and validate the model and API key
* @returns Promise resolving to a boolean indicating if initialization was successful
*/
export declare function initializeAnthropicClient(): Promise<boolean>;
/**
* Parse a response string for JSON content
* @param content Response content to parse
* @returns Parsed data or null if parsing fails
*/
export declare function parseJsonResponse(content: string): unknown | null;