/** * OpenRouter Live Model API * * Fetches the live model list from OpenRouter's API with pricing, * context windows, and capabilities. Cached for 1 hour. */ export type OpenRouterModel = { id: string; name: string; description?: string; contextLength: number; pricing: { prompt: number; completion: number; }; topProvider?: { maxCompletionTokens?: number; }; }; export type OpenRouterModelInfo = { id: string; name: string; contextLength: number; promptPricePerMillion: number; completionPricePerMillion: number; maxCompletionTokens?: number; }; /** * Fetch live model list from OpenRouter API. * Results are cached for 1 hour. * * Does NOT require an API key — the models endpoint is public. */ export declare function fetchOpenRouterModels(): Promise; /** * Clear the model cache (useful for testing). */ export declare function clearModelCache(): void; /** * Search models by name or ID. */ export declare function filterModels(models: OpenRouterModelInfo[], query: string): OpenRouterModelInfo[]; /** * Format a model for display in a selector. */ export declare function formatModelChoice(model: OpenRouterModelInfo): string; /** * Get pricing for a specific model from the live API. * Falls back to null if the model is not found. */ export declare function getModelPricing(modelId: string): Promise<{ inputPricePerMillion: number; outputPricePerMillion: number; } | null>; //# sourceMappingURL=openrouter-models.d.ts.map