MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / fetch_provider_profile

Function fetch_provider_profile

crates/openshell-cli/src/run.rs:4497–4520  ·  view source on GitHub ↗
(
    client: &mut crate::tls::GrpcClient,
    provider_type: &str,
)

Source from the content-addressed store, hash-verified

4495}
4496
4497async fn fetch_provider_profile(
4498 client: &mut crate::tls::GrpcClient,
4499 provider_type: &str,
4500) -> Result<ProviderProfile> {
4501 let response = client
4502 .get_provider_profile(GetProviderProfileRequest {
4503 id: provider_type.to_string(),
4504 })
4505 .await
4506 .map_err(|status| {
4507 if status.code() == Code::NotFound {
4508 miette::miette!(
4509 "provider profile '{provider_type}' not found; providers v2 discovery requires a provider profile"
4510 )
4511 } else {
4512 miette::miette!(status.to_string())
4513 }
4514 })?;
4515
4516 response
4517 .into_inner()
4518 .profile
4519 .ok_or_else(|| miette::miette!("provider profile '{provider_type}' missing from response"))
4520}
4521
4522async fn discover_existing_provider_data(
4523 client: &mut crate::tls::GrpcClient,

Callers 2

Calls 2

codeMethod · 0.80
get_provider_profileMethod · 0.45

Tested by

no test coverage detected