test: Implemented unit tests to prevent regression on agent reasoning effort inheritance
CI / All (ubuntu-latest) (push) Failing after 25s
CI / All (macos-latest) (push) Has been cancelled
CI / All (windows-latest) (push) Has been cancelled

This commit is contained in:
2026-08-04 13:12:37 -06:00
parent 9e5e8a60f2
commit 70b6d51b55
2 changed files with 56 additions and 0 deletions
+19
View File
@@ -573,6 +573,25 @@ impl Agent {
_ => bail!("No return value from '_instructions' function"),
}
}
#[cfg(test)]
pub fn test_new(config: AgentConfig) -> Self {
Self {
name: config.name.clone(),
config,
shared_variables: Default::default(),
session_variables: None,
shared_dynamic_instructions: None,
session_dynamic_instructions: None,
functions: Functions::default(),
rag: None,
graph_rags: Default::default(),
model: Model::default(),
vault: std::sync::Arc::new(Vault::default()),
is_graph: false,
enabled_tools: None,
}
}
}
impl RoleLike for Agent {