/** * Anthropic LLM Provider * * Provider for Anthropic API (https://api.anthropic.com). * Supports Claude 3.5 Sonnet, Claude 3 Opus, and Claude 3 Haiku. * * Environment variables: * - ANTHROPIC_API_KEY: Required API key * - ANTHROPIC_BASE_URL: Optional base URL (default: https://api.anthropic.com) * - ANTHROPIC_MODEL: Model to use (default: claude-3-5-sonnet-20241022) */ import type { LLMProvider, GenerationRequest, GenerationResponse } from './index.js'; export interface AnthropicConfig { apiKey?: string; baseURL?: string; model?: string; timeout?: number; } export declare class AnthropicProvider implements LLMProvider { name: string; models: string[]; private readonly apiKey; private readonly baseURL; private readonly defaultModel; private readonly timeout; private readonly version; constructor(config?: AnthropicConfig); isAvailable(): Promise; generate(request: GenerationRequest): Promise; stream(request: GenerationRequest): AsyncIterable; countTokens(text: string): number; private buildMessages; private extractContent; } /** * Anthropic-specific error */ export declare class AnthropicError extends Error { code: string; details?: Record; constructor(message: string, details?: Record); } /** * Create Anthropic provider with default settings */ export declare function createAnthropicProvider(config?: AnthropicConfig): AnthropicProvider; /** * Check if Anthropic is available and configured */ export declare function checkAnthropicSetup(): Promise;