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

Method get_api_key

core/src/config/provider.rs:164–166  ·  view source on GitHub ↗

Get the effective API key for a model (model override or provider default)

(&'a self, model: &'a ModelConfig)

Source from the content-addressed store, hash-verified

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> {
165 model.api_key.as_deref().or(self.api_key.as_deref())
166 }
167
168 /// Get the effective base URL for a model (model override or provider default)
169 pub fn get_base_url<'a>(&'a self, model: &'a ModelConfig) -> Option<&'a str> {

Callers 2

default_llm_configMethod · 0.80
llm_configMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected