Struct representing a normalized AI model from the OpenRouter API.
Constructed in OpenRouterClient.normalize_models/2 from JSON API responses.
Consumed by EndpointForm LiveView for model selection and configuration.
Fields
id- Model identifier (e.g.,"anthropic/claude-3-opus")name- Human-readable name (e.g.,"Claude 3 Opus")description- Model descriptioncontext_length- Maximum context window size in tokensmax_completion_tokens- Maximum output tokenssupported_parameters- List of supported parameters (e.g.,["temperature", "top_p"])pricing- Pricing info map with"prompt"and"completion"keysarchitecture- Architecture info map with"modality"keytop_provider- Top provider metadata mapcapabilities-PhoenixKitAI.Capabilitiesread from the catalogue row (all:unknownfor a provider without a catalogue)
Summary
Types
@type t() :: %PhoenixKitAI.AIModel{ architecture: map(), capabilities: PhoenixKitAI.Capabilities.t() | nil, context_length: integer() | nil, description: String.t() | nil, id: String.t(), max_completion_tokens: integer() | nil, name: String.t() | nil, pricing: map(), supported_parameters: [String.t()], top_provider: map() }