import { EventEmitter } from 'events'; import type { Message } from '../core/types'; import type { MCPToolDefinition } from '../tools/mcp'; export interface ChatOptions { tools?: MCPToolDefinition[]; } export interface LLMProvider { name: string; chat(messages: Message[], systemPrompt?: string, options?: ChatOptions): Promise; chatStream(messages: Message[], systemPrompt?: string): AsyncIterable; } export declare function autoDetectProvider(): { name: string; model?: string; baseUrl?: string; apiKey?: string; }; export declare function createProvider(name?: string | Record, model?: string, baseUrl?: string, apiKey?: string, extraHeaders?: Record): LLMProvider; export declare const SUPPORTED_PROVIDERS: readonly ["openai", "ollama", "claude-cli", "deepseek", "qwen", "gemini", "dashscope", "zhipu", "moonshot"]; export declare class FailoverProvider extends EventEmitter implements LLMProvider { name: string; private providers; private failureCounts; private readonly MAX_FAILURES; private readonly COOLDOWN_MS; constructor(providers: LLMProvider[]); private isCircuitOpen; private recordFailure; private recordSuccess; chat(messages: Message[], systemPrompt?: string, options?: ChatOptions): Promise; chatStream(messages: Message[], systemPrompt?: string): AsyncIterable; } /** Wraps multiple providers with automatic failover on 429/5xx errors and circuit breaker */ //# sourceMappingURL=index.d.ts.map