using System.Text.Json.Serialization; namespace AnchorCli.OpenRouter; /// /// Represents the response from OpenRouter's /api/v1/models endpoint. /// internal sealed class ModelsResponse { [JsonPropertyName("data")] public List Data { get; set; } = []; } /// /// A single model entry from the OpenRouter API. /// internal sealed class ModelInfo { [JsonPropertyName("id")] public string Id { get; set; } = ""; [JsonPropertyName("name")] public string Name { get; set; } = ""; [JsonPropertyName("pricing")] public ModelPricing? Pricing { get; set; } [JsonPropertyName("context_length")] public int ContextLength { get; set; } } /// /// Pricing info for a model. All values are USD per token (as strings). /// internal sealed class ModelPricing { /// USD per input token. [JsonPropertyName("prompt")] public string Prompt { get; set; } = "0"; /// USD per output token. [JsonPropertyName("completion")] public string Completion { get; set; } = "0"; /// Fixed USD cost per API request. [JsonPropertyName("request")] public string Request { get; set; } = "0"; }