Skip to content

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

refactor(test): update model resolution logic in test support

Steven Enamakel5f4bd08e9426
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 effee4673a..5af94e4a52 100644
--- a/crates/openhuman-core/src/agent/session_host/test_support.rs
+++ b/crates/openhuman-core/src/agent/session_host/test_support.rs
@@ -58,18 +58,23 @@ fn model_fixture_entry() -> ChatModelEntry {
!model.starts_with("hint:") && model != "fixture-reasoning"
}),
supports_vision: Arc::new(|_| false),
- resolve_model: Arc::new(|_, config, model| match model {
- Some("fixture-reasoning") => Some("test/selected-reasoning".to_string()),
- Some(model) if !model.starts_with("hint:") => Some(model.to_string()),
- Some(model) => model
- .strip_prefix("hint:")
- .filter(|role| crate::config::WORKLOAD_ROLES.contains(role))
- .map(|_| "test/session-fixture".to_string()),
- 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()),
- },
+ resolve_model: Arc::new(|role, config, model| {
+ if role == "agentic" {
+ return Some("test/session-fixture".to_string());
+ }
+ match model {
+ Some("fixture-reasoning") => Some("test/selected-reasoning".to_string()),
+ Some(model) if !model.starts_with("hint:") => Some(model.to_string()),
+ Some(model) => model
+ .strip_prefix("hint:")
+ .filter(|role| crate::config::WORKLOAD_ROLES.contains(role))
+ .map(|_| "test/session-fixture".to_string()),
+ 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),