/** * Unified LLM API for ralph-starter * Supports Anthropic (via SDK with prompt caching), OpenAI, and OpenRouter */ import { type LLMProvider } from './providers.js'; export interface LLMRequest { prompt: string; /** Optional system message (will be cached for Anthropic) */ system?: string; maxTokens?: number; model?: string; } export interface LLMUsage { inputTokens: number; outputTokens: number; cacheCreationInputTokens?: number; cacheReadInputTokens?: number; } export interface LLMResponse { content: string; model: string; provider: LLMProvider; usage?: LLMUsage; } /** * Unified LLM call function * Calls the appropriate provider API based on provider type */ export declare function callLLM(provider: LLMProvider, apiKey: string, request: LLMRequest): Promise; /** * Try to call LLM with auto-detected or specified provider * Returns null if no API key is available */ export declare function tryCallLLM(request: LLMRequest, options?: { provider?: LLMProvider; apiKey?: string; }): Promise; //# sourceMappingURL=api.d.ts.map