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

Function apply_model

core/src/agent_api/agent_binding.rs:39–48  ·  view source on GitHub ↗
(opts: &mut SessionOptions, def: &AgentDefinition)

Source from the content-addressed store, hash-verified

37}
38
39fn apply_model(opts: &mut SessionOptions, def: &AgentDefinition) {
40 if opts.model.is_some() {
41 return;
42 }
43
44 if let Some(model) = &def.model {
45 let provider = model.provider.as_deref().unwrap_or("anthropic");
46 opts.model = Some(format!("{}/{}", provider, model.model));
47 }
48}
49
50fn apply_prompt(opts: &mut SessionOptions, def: &AgentDefinition) {
51 let Some(prompt) = &def.prompt else {

Callers 1

apply_agent_definitionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected