The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(session_host): update model fixture logic for testing
Steven Enamakelfa95a30b3fdc
diff --git a/crates/openhuman-core/src/agent/session_host/test_support.rs b/crates/openhuman-core/src/agent/session_host/test_support.rsindex 72e06dea63..8a48b1a4d9 100644--- a/crates/openhuman-core/src/agent/session_host/test_support.rs+++ b/crates/openhuman-core/src/agent/session_host/test_support.rs@@ -40,19 +40,27 @@ fn model_fixture_entry() -> ChatModelEntry {models: Some(ProviderModelHooks {default_model: Arc::new(|| Some("test/session-fixture".into())),role_for_model: Arc::new(|model| {- model- .strip_prefix("hint:")- .filter(|role| crate::config::WORKLOAD_ROLES.contains(role))- .map(str::to_string)+ if model == "fixture-reasoning" {+ Some("reasoning".to_string())+ } else {+ model+ .strip_prefix("hint:")+ .filter(|role| crate::config::WORKLOAD_ROLES.contains(role))+ .map(str::to_string)+ }}),is_alias: Arc::new(|model| {- model+ model == "fixture-reasoning"+ || model.strip_prefix("hint:").is_some_and(|role| crate::config::WORKLOAD_ROLES.contains(&role))}),- is_raw_model: Arc::new(|model| !model.starts_with("hint:")),+ is_raw_model: Arc::new(|model| {+ !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:")diff --git a/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs b/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rsindex d6d95162ac..99cce81462 100644--- a/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs+++ b/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs@@ -442,6 +442,12 @@ fn harness_model_default_override_preserves_unowned_model_ids() {// registered its provider policy. Bare core preserves arbitrary IDs.assert_eq!(harness_model_default_override("reasoning-v1"), "reasoning-v1");assert_eq!(harness_model_default_override("chat-v1"), "chat-v1");+ crate::agent::session_host::test_support::install_model_fixture();+ assert_eq!(+ harness_model_default_override("fixture-reasoning"),+ "hint:reasoning",+ "registered generic provider aliases must still select their workload role"+ );// Generic `hint:*` routing markers keep their role.assert_eq!(harness_model_default_override("hint:reasoning"),