pub struct ModelMetadata {
pub id: String,
pub provider: String,
pub context_limit: Option<u32>,
pub output_limit: Option<u32>,
pub pricing: Option<ModelPricing>,
pub capabilities: ModelCapabilities,
pub release_date: Option<String>,
pub source: ModelSource,
pub variants: Vec<VariantDef>,
}Expand description
Static metadata for a known model.
Represents model knowledge (context limits, pricing, capabilities) independent of runtime configuration. Used to inform the agent about model properties without hardcoded fallbacks.
Fields§
§id: StringUnique model identifier (e.g., “claude-sonnet-4-5-20250929”).
provider: StringProvider name (e.g., “anthropic”, “openai”, “google”).
context_limit: Option<u32>Maximum context window in tokens.
output_limit: Option<u32>Maximum output tokens.
pricing: Option<ModelPricing>Pricing information (per 1M tokens, USD).
capabilities: ModelCapabilitiesModel capability flags.
release_date: Option<String>Model release date (ISO 8601 or similar).
source: ModelSourceWhere this metadata originated.
variants: Vec<VariantDef>Named invocation presets for this model (ADR-048).
Trait Implementations§
Source§impl Clone for ModelMetadata
impl Clone for ModelMetadata
Source§fn clone(&self) -> ModelMetadata
fn clone(&self) -> ModelMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelMetadata
impl Debug for ModelMetadata
Source§impl<'de> Deserialize<'de> for ModelMetadata
impl<'de> Deserialize<'de> for ModelMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ModelMetadata
impl JsonSchema for ModelMetadata
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ModelMetadata
impl RefUnwindSafe for ModelMetadata
impl Send for ModelMetadata
impl Sync for ModelMetadata
impl Unpin for ModelMetadata
impl UnsafeUnpin for ModelMetadata
impl UnwindSafe for ModelMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more