Skip to content

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

refactor(tests): adjust model resolution logic in tests

Steven Enamakelb7ba6e480563
diff --git a/crates/openhuman-core/src/agent/session_host/test_support.rs b/crates/openhuman-core/src/agent/session_host/test_support.rs
index 9af122d432..effee4673a 100644
--- a/crates/openhuman-core/src/agent/session_host/test_support.rs
+++ b/crates/openhuman-core/src/agent/session_host/test_support.rs
@@ -65,10 +65,11 @@ fn model_fixture_entry() -> ChatModelEntry {
.strip_prefix("hint:")
.filter(|role| crate::config::WORKLOAD_ROLES.contains(role))
.map(|_| "test/session-fixture".to_string()),
- None => config
- .default_model
- .clone()
- .or_else(|| Some("test/session-fixture".into())),
+ None => match config.default_model.as_deref() {
+ Some("fixture-reasoning") => Some("test/selected-reasoning".into()),
+ Some(model) => Some(model.to_string()),
+ None => Some("test/session-fixture".into()),
+ },
}),
context_window: Arc::new(|_| None),
default_pricing: Arc::new(|| None),
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rs
index d9c55d7aba..351c5579fd 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rs
@@ -478,7 +478,7 @@ fn resolve_subagent_source_hint_with_config_routes_via_factory() {
// distinct `default_model` so the assertion proves the role — not the
// global default — drives the resolved tier.
config.agentic_provider = Some("openhuman".to_string());
- config.default_model = Some("chat-v1".to_string());
+ config.default_model = Some("fixture-reasoning".to_string());
let parent: Arc<dyn ChatModel<()>> = ScriptedProvider::new(vec![]);
let (_resolved_source, resolved_model) = super::super::resolve_subagent_source(