/** * ProviderService - Multi-provider AI routing with failover * * Supports 13+ AI providers: * - Anthropic (Claude) * - OpenAI (GPT-4o, o1, o3) * - Google (Gemini) * - DeepSeek * - Groq * - Together * - Fireworks * - OpenRouter * - Z.AI (GLM) * - Kimi * - Ollama (local) * - Perplexity * * Features: * - Automatic retry with exponential backoff * - Health tracking per provider * - Circuit breakers * - Cost-aware routing * - Session delegation for Anthropic */ import type { FoundationConfig, ProviderName, AgentRole, ProviderHealth, ProviderInvokeResult } from '../types/index.js'; import { ProviderManager } from '../providers/index.js'; export interface InvokeOptions { role: AgentRole; task: string; context?: string; systemPrompt?: string; temperature?: number; maxTokens?: number; } export declare class ProviderService { private static instance; private config; private storage; private providerManager; private initialized; private constructor(); static getInstance(): ProviderService; /** * Initialize with configuration */ init(config: FoundationConfig): Promise; /** * Configure providers from Foundation config */ private configureProviders; /** * Invoke an agent role with a task */ invoke(options: InvokeOptions): Promise; /** * Invoke with fallback chain */ private invokeWithFallback; /** * Invoke a specific provider */ private invokeProvider; /** * Build the prompt from invoke options */ private buildPrompt; /** * Handle session delegation response * Returns formatted instructions for the current Claude session */ private handleSessionDelegation; /** * List available providers */ listProviders(): ProviderName[]; /** * Get health status for all providers */ getProviderHealth(): ProviderHealth[]; /** * Test a specific provider's connectivity */ testProvider(provider: ProviderName): Promise<{ success: boolean; latencyMs: number; error?: string; }>; /** * Test all configured providers */ testAllProviders(): Promise>; /** * Get the underlying provider manager * Useful for advanced use cases */ getProviderManager(): ProviderManager; } //# sourceMappingURL=provider.service.d.ts.map