pub trait ProviderAdmin: Send + Sync {
// Required methods
fn get_config(
&self,
) -> Pin<Box<dyn Future<Output = Result<ProviderSnapshot, ModelError>> + Send + '_>>;
fn set_config(
&self,
expected_revision: String,
config: ProviderConfig,
) -> Pin<Box<dyn Future<Output = Result<ProviderSnapshot, ModelError>> + Send + '_>>;
fn list_models(
&self,
profile_id: String,
) -> Pin<Box<dyn Future<Output = Result<Vec<ModelDescriptor>, ModelError>> + Send + '_>>;
}Expand description
An explicitly granted capability, not part of an ordinary model session. Hosts bind the authenticated user before providing this interface. Every operation remains subject to backend authorization and durable-write checks. Dropping a mutation abandons its response, not its durable commit. Refresh configuration/status before deciding whether an interrupted write needs retry.
Required Methods§
fn get_config( &self, ) -> Pin<Box<dyn Future<Output = Result<ProviderSnapshot, ModelError>> + Send + '_>>
fn set_config( &self, expected_revision: String, config: ProviderConfig, ) -> Pin<Box<dyn Future<Output = Result<ProviderSnapshot, ModelError>> + Send + '_>>
Sourcefn list_models(
&self,
profile_id: String,
) -> Pin<Box<dyn Future<Output = Result<Vec<ModelDescriptor>, ModelError>> + Send + '_>>
fn list_models( &self, profile_id: String, ) -> Pin<Box<dyn Future<Output = Result<Vec<ModelDescriptor>, ModelError>> + Send + '_>>
The models the provider lists, asked as its sign-in or, for a local
server, as itself: also the proof that the endpoint answers.
crate::protocol::ErrorKind::Unsupported when it lists none.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".