pub struct ModelRecord {Show 14 fields
pub id: String,
pub display_name: String,
pub publisher: String,
pub role: ModelRole,
pub availability: Availability,
pub visibility: Visibility,
pub protocol: ModelProtocol,
pub pricing: PricingPerMillion,
pub limits: ModelLimits,
pub capabilities: ModelCapabilities,
pub provenance: CapabilityProvenance,
pub documentation_url: Option<String>,
pub catalog_added_at: Option<NaiveDate>,
pub raw: Value,
}Expand description
Normalized Workers AI model record - one source of truth for the picker, the fallback list, and generated YAML.
Fields§
§id: String§display_name: String§publisher: String§role: ModelRole§availability: Availability§visibility: Visibility§protocol: ModelProtocol§pricing: PricingPerMillion§limits: ModelLimits§capabilities: ModelCapabilities§provenance: CapabilityProvenance§documentation_url: Option<String>§catalog_added_at: Option<NaiveDate>§raw: ValueImplementations§
Source§impl ModelRecord
impl ModelRecord
Sourcepub fn from_openrouter(item: &Value) -> Option<Self>
pub fn from_openrouter(item: &Value) -> Option<Self>
Normalize one OpenRouter-format catalog entry.
Sourcepub fn eligible_for_primary_picker(&self) -> bool
pub fn eligible_for_primary_picker(&self) -> bool
True when the model may appear in the primary coding picker.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
True when the model is the project’s development default.
Trait Implementations§
Source§impl Clone for ModelRecord
impl Clone for ModelRecord
Source§fn clone(&self) -> ModelRecord
fn clone(&self) -> ModelRecord
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 ModelRecord
impl Debug for ModelRecord
Source§impl<'de> Deserialize<'de> for ModelRecord
impl<'de> Deserialize<'de> for ModelRecord
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 PartialEq for ModelRecord
impl PartialEq for ModelRecord
Source§impl Serialize for ModelRecord
impl Serialize for ModelRecord
impl StructuralPartialEq for ModelRecord
Auto Trait Implementations§
impl Freeze for ModelRecord
impl RefUnwindSafe for ModelRecord
impl Send for ModelRecord
impl Sync for ModelRecord
impl Unpin for ModelRecord
impl UnsafeUnpin for ModelRecord
impl UnwindSafe for ModelRecord
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