MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / get_model_info

Function get_model_info

crates/chat-cli/src/cli/chat/cli/model.rs:163–170  ·  view source on GitHub ↗
(model_id: &str, os: &Os)

Source from the content-addressed store, hash-verified

161}
162
163pub async fn get_model_info(model_id: &str, os: &Os) -> Result<ModelInfo, ChatError> {
164 let (models, _) = get_available_models(os).await?;
165
166 models
167 .into_iter()
168 .find(|m| m.model_id == model_id)
169 .ok_or_else(|| ChatError::Custom(format!("Model '{}' not found", model_id).into()))
170}
171
172/// Get available models with caching support
173pub async fn get_available_models(os: &Os) -> Result<(Vec<ModelInfo>, ModelInfo), ChatError> {

Callers 1

newMethod · 0.85

Calls 2

get_available_modelsFunction · 0.85
CustomClass · 0.85

Tested by

no test coverage detected