PhoenixKit.Modules.AI.AIModel (phoenix_kit v1.7.71)

Copy Markdown View Source

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 description
  • context_length - Maximum context window size in tokens
  • max_completion_tokens - Maximum output tokens
  • supported_parameters - List of supported parameters (e.g., ["temperature", "top_p"])
  • pricing - Pricing info map with "prompt" and "completion" keys
  • architecture - Architecture info map with "modality" key
  • top_provider - Top provider metadata map

Summary

Types

t()

@type t() :: %PhoenixKit.Modules.AI.AIModel{
  architecture: map(),
  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()
}