MCPcopy Create free account
hub / github.com/AI45Lab/Code / find_model

Method find_model

core/src/config/provider.rs:159–161  ·  view source on GitHub ↗

Find a model by ID

(&self, model_id: &str)

Source from the content-addressed store, hash-verified

157impl ProviderConfig {
158 /// Find a model by ID
159 pub fn find_model(&self, model_id: &str) -> Option<&ModelConfig> {
160 self.models.iter().find(|m| m.id == model_id)
161 }
162
163 /// Get the effective API key for a model (model override or provider default)
164 pub fn get_api_key<'a>(&'a self, model: &'a ModelConfig) -> Option<&'a str> {

Callers 4

default_model_configMethod · 0.80
llm_configMethod · 0.80

Calls

no outgoing calls

Tested by 2