Skip to content

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

fix: correct factory provider role test module name

Steven Enamakel70b09ad8a5d6
diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory.rs b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
index c37c8731a8..c465c80072 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
@@ -296,7 +296,7 @@ impl OpenHumanSessionHost {
// `hint:coding`, while existing pre-registry callers continue using
// `config.default_model` unchanged.
let provider_role =
- provider_role_for_definition(agent_id, config.default_model.as_deref(), target_def);
+ provider_role_for_definition(config.default_model.as_deref(), target_def);
// Retry/backoff is now owned by the crate `RetryPolicy` at the harness
// model call (issue #4249, Phase 3a) — see `tinyagents::run_policy_for`.
// The turn path therefore no longer wraps the resolved provider in
@@ -1154,10 +1154,10 @@ fn definition_disallows_tool(disallowed: &[String], name: &str) -> bool {
/// Resolve the provider/workload role for a session build.
///
-/// Explicit `hint:<role>` markers route to their workload; everything else (incl. the legacy `default_model` tier the
-/// bootstrap pinned) falls through to `chat` so `chat_provider` drives the
-/// user-facing turn.
-pub(crate) fn provider_role_for(_agent_id: &str, default_model: Option<&str>) -> &'static str {
+/// Explicit `hint:<role>` markers route to their workload; everything else
+/// (incl. the legacy `default_model` tier the bootstrap pinned) falls through
+/// to `chat` so `chat_provider` drives the user-facing turn.
+pub(crate) fn provider_role_for(default_model: Option<&str>) -> &'static str {
match default_model.map(str::trim) {
Some("hint:agentic") => "agentic",
Some("hint:coding") => "coding",
@@ -1174,7 +1174,6 @@ mod provider_role_tests;
/// Resolve the initial harness workload without constructing a session.
/// Flow readiness shares this path so it checks the provider used at runtime.
pub(crate) fn provider_role_for_definition(
- agent_id: &str,
default_model: Option<&str>,
target_def: Option<&crate::agent::harness::definition::AgentDefinition>,
) -> &'static str {
@@ -1195,7 +1194,7 @@ pub(crate) fn provider_role_for_definition(
})
})
.flatten();
- provider_role_for(agent_id, master_hint.as_deref().or(default_model))
+ provider_role_for(master_hint.as_deref().or(default_model))
}
fn derive_turn_workspace_descriptor() -> Option<tinytools::WorkspaceDescriptor> {
diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory_provider_role_tests_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/factory_provider_role_tests_tests.rs
index bea035ed27..7e59f595de 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/factory_provider_role_tests_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/factory_provider_role_tests_tests.rs
@@ -3,11 +3,11 @@ use super::provider_role_for;
#[test]
fn legacy_orchestrator_fallback_defaults_to_chat() {
- assert_eq!(provider_role_for("orchestrator", Some("chat-v1")), "chat");
- assert_eq!(provider_role_for("orchestrator", None), "chat");
+ assert_eq!(provider_role_for(Some("chat-v1")), "chat");
+ assert_eq!(provider_role_for(None), "chat");
// A legacy heavy default_model tier still falls through to chat.
assert_eq!(
- provider_role_for("orchestrator", Some("reasoning-v1")),
+ provider_role_for(Some("reasoning-v1")),
"chat"
);
}
@@ -15,15 +15,15 @@ fn legacy_orchestrator_fallback_defaults_to_chat() {
#[test]
fn explicit_hints_route_to_workload() {
assert_eq!(
- provider_role_for("orchestrator", Some("hint:agentic")),
+ provider_role_for(Some("hint:agentic")),
"agentic"
);
assert_eq!(
- provider_role_for("orchestrator", Some("hint:reasoning")),
+ provider_role_for(Some("hint:reasoning")),
"reasoning"
);
assert_eq!(
- provider_role_for("orchestrator", Some("hint:coding")),
+ provider_role_for(Some("hint:coding")),
"coding"
);
}