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

Function find_model

crates/chat-cli/src/cli/chat/cli/model.rs:232–240  ·  view source on GitHub ↗
(models: &'a [ModelInfo], name: &str)

Source from the content-addressed store, hash-verified

230}
231
232pub fn find_model<'a>(models: &'a [ModelInfo], name: &str) -> Option<&'a ModelInfo> {
233 let normalized = normalize_model_name(name);
234 models.iter().find(|m| {
235 m.model_name
236 .as_deref()
237 .is_some_and(|n| n.eq_ignore_ascii_case(normalized))
238 || m.model_id.eq_ignore_ascii_case(normalized)
239 })
240}

Callers 1

executeMethod · 0.85

Calls 1

normalize_model_nameFunction · 0.85

Tested by

no test coverage detected