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§
Sourcefn 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 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.
Sourcefn 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_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:
- Exact name match
- Case-insensitive name match
- 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.