Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(session_host): add model name to session builders

Steven Enamakel0567ac882ba6
diff --git a/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs b/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs
index da92d8d896..1902335025 100644
--- a/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs
@@ -52,6 +52,7 @@ async fn resumed_orphaned_tool_head_is_repaired_before_the_request() {
// Splices rows into the head: the host writes through this store.
.with_session_history_locator(Arc::clone(&locator))
.chat_model(chat_model.clone())
+ .model_name("test/session-fixture".to_string())
.tools(Vec::new())
.workspace_dir(root.path().join("workspace"))
.action_dir(root.path().to_path_buf())
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs
index f30ce5039e..d1d2118c0b 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs
@@ -458,6 +458,7 @@ async fn a_resumed_orchestrator_keeps_the_integration_actions_it_was_sent() {
Arc::new(tinyagents_harness::testkit::ScriptedModel::new(Vec::new()));
let mut host = crate::agent::SessionHostBuilder::new()
.chat_model(model)
+ .model_name("test/session-fixture".to_string())
.tools(Vec::new())
.action_dir(action_dir.path().to_path_buf())
.workspace_dir(action_dir.path().to_path_buf())
@@ -527,6 +528,7 @@ async fn session_locator_is_memoized_across_calls() {
Arc::new(tinyagents_harness::testkit::ScriptedModel::new(Vec::new()));
let host = crate::agent::SessionHostBuilder::new()
.chat_model(model)
+ .model_name("test/session-fixture".to_string())
.tools(Vec::new())
.action_dir(action_dir.path().to_path_buf())
.workspace_dir(action_dir.path().to_path_buf())
@@ -561,6 +563,7 @@ fn text_dialect_host(
let tools = crate::agent::goals::goal_tools(action_dir.path());
let mut host = crate::agent::SessionHostBuilder::new()
.chat_model(model)
+ .model_name("test/session-fixture".to_string())
.tools(tools)
.action_dir(action_dir.path().to_path_buf())
.workspace_dir(action_dir.path().to_path_buf())
@@ -677,6 +680,7 @@ async fn newly_connected_action_cannot_shadow_a_permanent_source() {
Arc::new(tinyagents_harness::testkit::ScriptedModel::new(Vec::new()));
let mut host = crate::agent::SessionHostBuilder::new()
.chat_model(model)
+ .model_name("test/session-fixture".to_string())
.tools(vec![Box::new(AttachedAction)])
.permanent_tool_names(std::collections::HashSet::from(["GMAIL_SEND_EMAIL".into()]))
.action_dir(action_dir.path().to_path_buf())