aimo_client/types/
models.rs

1use serde::{Deserialize, Serialize};
2
3/// Pricing information for models
4#[derive(Serialize, Deserialize, Debug, Clone)]
5pub struct ModelPricing {
6    /// USDC per million prompt tokens
7    pub prompt: f32,
8    /// USDC per million completion tokens
9    pub completion: f32,
10    /// USDC per image input (optional)
11    pub image: Option<f32>,
12}
13
14/// Metadata for a model provided by a provider,
15/// used in new `connection` endpoints.
16#[derive(Serialize, Deserialize, Debug, Clone)]
17pub struct ProviderModelMetadata {
18    /// Pricing information for the model
19    pub pricing: ModelPricing,
20    /// Slug / id name for the model
21    pub name: String,
22    /// Display name for the model
23    pub display_name: String,
24    /// Provider name (optional)
25    pub provider_name: Option<String>,
26    /// List of capabilities for the model
27    #[serde(default)]
28    pub capabilities: Vec<String>,
29    /// List of input modalities for the model
30    #[serde(default)]
31    pub input_modalities: Vec<String>,
32    /// List of output modalities for the model
33    #[serde(default)]
34    pub output_modalities: Vec<String>,
35    /// Maximum context length (optional)
36    pub context_length: Option<u32>,
37}