/** * Anthropic Provider * Implementation for Claude models with streaming and tools support */ import type { LLMRequest, LLMResponse, AnthropicConfig, ModelCapabilities, ProviderBalance, Tool } from '../types.js'; import { BaseProvider } from './base.js'; export declare class AnthropicProvider extends BaseProvider { name: string; models: string[]; supportsStreaming: boolean; supportsTools: boolean; supportsBatching: boolean; supportsVision: boolean; private apiKey; private baseUrl; private version; constructor(config: AnthropicConfig); generateResponse(request: LLMRequest): Promise; validateConfig(): boolean; getModels(): string[]; estimateCost(request: LLMRequest): number; healthCheck(): Promise; getProviderBalance(): Promise; protected getModelCapabilities(): Record; private makeAnthropicRequest; private formatRequest; private formatMessageContent; private formatResponse; private mapStopReason; /** * Stream response support with SSE chunk schema validation. * * Each non-DONE data frame is validated against the expected Anthropic SSE * shape. Malformed JSON or a drifted content_block_delta envelope errors the * stream with SchemaDriftError (triggering factory fallback) rather than * silently producing truncated output. * * Unknown event types (additive upstream changes) are skipped for * forward-compatibility. Only the event types the parser actively reads * are validated. */ streamResponse(request: LLMRequest): Promise>; /** * Tool usage support */ generateWithTools(request: LLMRequest & { tools: Tool[]; }): Promise; private getDefaultModel; } //# sourceMappingURL=anthropic.d.ts.map