pub struct OpenRouterModelInfo {
pub id: String,
pub canonical_slug: Option<String>,
pub name: Option<String>,
pub description: Option<String>,
pub created: Option<i64>,
pub context_length: Option<i64>,
pub architecture: Option<OpenRouterArchitecture>,
pub pricing: Option<OpenRouterPricing>,
pub top_provider: Option<OpenRouterTopProvider>,
pub supported_parameters: Vec<String>,
pub knowledge_cutoff: Option<String>,
}Expand description
Individual model entry from OpenRouter’s models API.
Only the fields we map are modeled; unknown fields are ignored so the parse is resilient to OpenRouter adding metadata over time.
Fields§
§id: StringFully qualified model id (e.g. nvidia/nemotron-3-super-120b-a12b).
canonical_slug: Option<String>Canonical model slug, when OpenRouter aliases the public id.
name: Option<String>Human-readable display name (e.g. “NVIDIA: Nemotron 3 Super”).
description: Option<String>Human-readable model description.
created: Option<i64>Unix timestamp of when the model was added.
context_length: Option<i64>Maximum context window in tokens.
architecture: Option<OpenRouterArchitecture>Modality metadata (input/output modalities).
pricing: Option<OpenRouterPricing>Per-token pricing reported by OpenRouter.
top_provider: Option<OpenRouterTopProvider>Top-provider limits (max completion tokens, effective context).
supported_parameters: Vec<String>Parameters the model/router accepts. The presence of reasoning
(or reasoning_effort) is what tells us reasoning is supported.
knowledge_cutoff: Option<String>Provider-reported knowledge cutoff, when available.
Implementations§
Source§impl OpenRouterModelInfo
impl OpenRouterModelInfo
Sourcepub fn is_chat_model(&self) -> bool
pub fn is_chat_model(&self) -> bool
Whether this is a text-producing chat model. OpenRouter also lists image-only / non-text-output models, which we exclude from discovery.
Sourcepub fn to_discovered_profile(&self) -> ModelProfile
pub fn to_discovered_profile(&self) -> ModelProfile
Build a ModelProfile from
OpenRouter’s advertised metadata.
Trait Implementations§
Source§impl Clone for OpenRouterModelInfo
impl Clone for OpenRouterModelInfo
Source§fn clone(&self) -> OpenRouterModelInfo
fn clone(&self) -> OpenRouterModelInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more