import { T as TokenUsage } from './pricing-BUJAtUlg.mjs'; interface ChatMessage { role: 'system' | 'user' | 'assistant' | 'function' | 'tool'; content: string | MessageContent[]; name?: string; function_call?: FunctionCall; tool_calls?: ToolCall[]; } type MessageContent = { type: 'text'; text: string; } | { type: 'image_url'; image_url: { url: string; detail?: 'low' | 'high' | 'auto'; }; }; interface FunctionCall { name: string; arguments: string; } interface ToolCall { id: string; type: 'function'; function: FunctionCall; } interface ChatCompletionRequest { model: string; messages: ChatMessage[]; temperature?: number; top_p?: number; top_k?: number; max_tokens?: number; frequency_penalty?: number; presence_penalty?: number; repetition_penalty?: number; stream?: boolean; transforms?: string[]; route?: 'fallback'; functions?: FunctionDefinition[]; function_call?: 'none' | 'auto' | { name: string; }; tools?: Tool[]; tool_choice?: 'none' | 'auto' | 'required' | { type: 'function'; function: { name: string; }; }; response_format?: { type: 'text' | 'json_object'; }; stop?: string | string[]; seed?: number; logit_bias?: Record; user?: string; } interface FunctionDefinition { name: string; description?: string; parameters: Record; } interface Tool { type: 'function'; function: FunctionDefinition; } interface ChatCompletionResponse { id: string; model: string; created: number; choices: ChatChoice[]; usage?: TokenUsage; provider?: string; native_tokens_used?: number; native_cost?: number; } interface ChatChoice { index: number; message: ChatMessage; finish_reason: 'stop' | 'length' | 'function_call' | 'tool_calls' | 'content_filter' | null; logprobs?: null; } interface StreamChunk { id: string; model: string; created: number; choices: StreamChoice[]; usage?: Partial; } interface StreamChoice { index: number; delta: { role?: 'assistant'; content?: string; function_call?: Partial; tool_calls?: Partial[]; }; finish_reason: 'stop' | 'length' | 'function_call' | 'tool_calls' | 'content_filter' | null; } interface ModelInfo { id: string; name: string; description?: string; pricing: { prompt: string; completion: string; image?: string; }; context_length: number; architecture: { modality: string; tokenizer: string; instruct_type?: string; }; top_provider: { is_moderated: boolean; max_completion_tokens?: number; }; per_request_limits?: { prompt_tokens?: string; completion_tokens?: string; }; } interface ModelsListResponse { data: ModelInfo[]; } interface OpenRouterError { error: { code: number; message: string; metadata?: Record; }; } export type { ChatCompletionResponse as C, FunctionCall as F, ModelsListResponse as M, OpenRouterError as O, StreamChunk as S, ToolCall as T, ChatCompletionRequest as a, ChatMessage as b, MessageContent as c, FunctionDefinition as d, Tool as e, ChatChoice as f, StreamChoice as g, ModelInfo as h };