ModelCatalogPort

Trait ModelCatalogPort 

Source
pub trait ModelCatalogPort:
    Send
    + Sync
    + Debug {
    // Required methods
    fn list_models<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ModelSummary>, CatalogError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn resolve_model<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ModelSummary>, CatalogError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn resolve_for_launch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ModelLaunchSpec>, CatalogError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Port for querying the model catalog.

This interface provides read-only access to the model catalog for listing and resolving models. It does not handle model registration or deletion.

Required Methods§

Source

fn list_models<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<ModelSummary>, CatalogError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all models in the catalog.

Returns a list of model summaries ordered by name.

§Errors

Returns CatalogError if the catalog cannot be queried.

Source

fn resolve_model<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<ModelSummary>, CatalogError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolve a model by name or alias.

This method performs model resolution:

  1. Exact name match
  2. Case-insensitive name match
  3. Fuzzy/partial match (implementation-defined)

Returns None if no matching model is found.

§Arguments
  • name - Model name or alias to resolve
§Errors

Returns CatalogError if the catalog cannot be queried.

Source

fn resolve_for_launch<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<ModelLaunchSpec>, CatalogError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolve a model for launching.

Returns full launch specification including file path. Use this when you need to actually run a model, not just list it.

§Arguments
  • name - Model name or alias to resolve
§Errors

Returns CatalogError if the catalog cannot be queried.

Implementors§