UNPKG

@convo-lang/convo-lang

Version:
73 lines (72 loc) 1.9 kB
import { ConvoModelInfo } from "../convo-types.js"; export interface Architecture { input_modalities: string[]; output_modalities: string[]; tokenizer: string; instruct_type: string | null; } export interface Pricing { prompt: string; completion: string; image: string; request: string; web_search: string; internal_reasoning: string; input_cache_read: string | null; input_cache_write: string | null; } export interface TopProvider { is_moderated: boolean; context_length: number | null; max_completion_tokens: number | null; } /** * Information about an OpenRouter model. */ export interface OpenRouterModelInfo { /** * Unique model identifier used in API requests (e.g., "google/gemini-2.5-pro-preview") */ id: string; /** * Permanent slug for the model that never changes */ canonical_slug: string; /** * Human-readable display name for the model */ name: string; /** * Unix timestamp of when the model was added to OpenRouter */ created: number; /** * Detailed description of the model’s capabilities and characteristics */ description: string; /** * Maximum context window size in tokens */ context_length: number; /** * Object describing the model’s technical capabilities */ architecture: Architecture; /** * Lowest price structure for using this model */ pricing: Pricing; /** * Configuration details for the primary provider */ top_provider: TopProvider; /** * Rate limiting information (null if no limits) */ per_request_limits: Record<string, any> | null; /** * Array of supported API parameters for this model */ supported_parameters: string[]; } export declare const getOpenRouterModelsAsync: () => Promise<ConvoModelInfo[]>;