import { type CredentialValueSource, type ModelConfig } from "@arnilo/prism"; export interface ListOpenRouterModelsOptions { readonly apiKey?: CredentialValueSource; readonly fetch?: typeof fetch; /** Defaults to `https://openrouter.ai/api/v1`. */ readonly baseUrl?: string; readonly signal?: AbortSignal; readonly headers?: Readonly>; readonly provider?: string; } /** * Official OpenRouter `GET /api/v1/models` entry (subset of documented fields). * @see https://openrouter.ai/docs/api/api-reference/models/get-models * @see https://openrouter.ai/docs/guides/best-practices/reasoning-tokens */ export interface OpenRouterModelEntry { readonly id: string; readonly name?: string; readonly created?: number; readonly description?: string; readonly context_length?: number; readonly architecture?: { readonly modality?: string; readonly input_modalities?: readonly string[]; readonly output_modalities?: readonly string[]; }; readonly pricing?: { readonly prompt?: string; readonly completion?: string; readonly input_cache_read?: string; readonly input_cache_write?: string; readonly input_cache_write_1h?: string; }; readonly top_provider?: { readonly context_length?: number | null; readonly max_completion_tokens?: number | null; }; readonly supported_parameters?: readonly string[]; readonly reasoning?: { readonly mandatory?: boolean; readonly default_enabled?: boolean; readonly supported_efforts?: readonly string[] | null; readonly default_effort?: string; readonly supports_max_tokens?: boolean; }; } /** * Caller-gated OpenRouter model discovery via official `GET /api/v1/models`. * Never invoked by `createOpenRouterProviderPackage` — hosts call this and pass * filtered results via `models:` (app-controlled registration remains the default). * Auth is optional for the public catalog; when supplied, Authorization is forwarded. * @see https://openrouter.ai/docs/api/api-reference/models/get-models */ export declare function listOpenRouterModels(options?: ListOpenRouterModelsOptions): Promise; /** * Map an official OpenRouter `/models` entry to Prism `ModelConfig`. * Pricing is converted from per-token USD strings to `per_million_tokens`. * Cache kind is best-effort: Anthropic/Qwen/Gemini families that document explicit * `cache_control` map to `cache_control`; others with cache-read pricing map to `implicit`. */ export declare function mapOpenRouterModel(entry: OpenRouterModelEntry, options?: { readonly provider?: string; }): ModelConfig;