UNPKG

@hivetechs/hive-ai

Version:

Real-time streaming AI consensus platform with HTTP+SSE MCP integration for Claude Code, VS Code, Cursor, and Windsurf - powered by OpenRouter's unified API

53 lines 1.76 kB
/** * OpenRouter-Exclusive AI Provider Client * * This module provides access to 300+ AI models through OpenRouter's unified API. * All complexity of individual provider APIs is handled by OpenRouter's infrastructure. * * Architecture Decision (June 2025): * Based on extensive research showing only 30-40% of providers have stable APIs * and the impossibility of maintaining 55+ integrations with a small team, we've * partnered with OpenRouter as our exclusive infrastructure provider. * * Benefits: * - Access to ALL models through one API key * - Automatic failover and load balancing * - Zero maintenance of provider integrations * - Focus on our unique value: 4-stage consensus pipeline */ export interface ChatMessage { role: 'user' | 'assistant' | 'system'; content: string; name?: string; } export interface ChatCompletionOptions { model: string; messages: ChatMessage[]; temperature?: number; max_tokens?: number; stream?: boolean; } export interface ChatCompletionResult { content: string; model: string; provider: string; usage?: { prompt_tokens: number; completion_tokens: number; total_tokens: number; }; } /** * Create a chat completion using OpenRouter's unified API * ALL models from ALL providers are accessed through this single endpoint */ export declare function createChatCompletion(options: ChatCompletionOptions): Promise<ChatCompletionResult>; /** * Check if the system is properly configured with OpenRouter */ export declare function isOpenRouterConfigured(): Promise<boolean>; /** * Get helpful setup instructions for new users */ export declare function getSetupInstructions(): string; //# sourceMappingURL=provider-client.d.ts.map